|
@@ -12,9 +12,9 @@
|
|
~~图像提取密码标签~~
|
|
~~图像提取密码标签~~
|
|
~~图像处理功能自检~~
|
|
~~图像处理功能自检~~
|
|
- [ ] 黑盒水印验证流程
|
|
- [ ] 黑盒水印验证流程
|
|
-- [ ] 验证模型文件与触发集图片签名值(http,接口)
|
|
|
|
-- [ ] 对比预测准确率(http,接口)
|
|
|
|
-- [ ] 从触发集提取组装密码标签,进行验签,返回验签结果(http,接口)
|
|
|
|
|
|
+- [x] 验证模型文件与触发集图片签名值(http,接口)
|
|
|
|
+- [x] 对比预测准确率(http,接口)
|
|
|
|
+- [x] 从触发集提取组装密码标签,进行验签,返回验签结果(http,接口)
|
|
|
|
|
|
## 分支说明
|
|
## 分支说明
|
|
- `master`分支只包含项目打包配置和密码标签获取,数据集嵌入黑盒水印源码
|
|
- `master`分支只包含项目打包配置和密码标签获取,数据集嵌入黑盒水印源码
|
|
@@ -25,50 +25,90 @@ pip install -r requirements.txt
|
|
```
|
|
```
|
|
## 文件组成
|
|
## 文件组成
|
|
```text
|
|
```text
|
|
-.
|
|
|
|
|
|
+watermark_generate_pkg
|
|
├── MANIFEST.in # 打包过滤文件
|
|
├── MANIFEST.in # 打包过滤文件
|
|
├── README.md # 描述文件
|
|
├── README.md # 描述文件
|
|
├── setup.py # 打包配置文件
|
|
├── setup.py # 打包配置文件
|
|
├── tests # 测试目录
|
|
├── tests # 测试目录
|
|
-│ └── test_dataset_process.py # 测试数据集处理
|
|
|
|
-└── watermark_generate # 水印生成源码
|
|
|
|
|
|
+│ ├── test_gen_qrcodes.py # 测试密码标签二维码生成,处理训练集,生成触发集,触发集提取密码标签
|
|
|
|
+│ └── test_secret_func.py # 测试密码标签生成,密码标签验证
|
|
|
|
+└── watermark_generate
|
|
├── __init__.py
|
|
├── __init__.py
|
|
- ├── blind_watermark # 图片嵌入盲水印源码
|
|
|
|
|
|
+ ├── controller # 服务接口目录
|
|
│ ├── __init__.py
|
|
│ ├── __init__.py
|
|
- │ ├── att.py
|
|
|
|
- │ ├── blind_watermark.py
|
|
|
|
- │ ├── bwm_core.py
|
|
|
|
- │ ├── cli_tools.py
|
|
|
|
- │ ├── pool.py
|
|
|
|
- │ └── recover.py
|
|
|
|
- ├── controller # 对外提供的http接口
|
|
|
|
- │ ├── __init__.py
|
|
|
|
- │ ├── dataset_controller.py # 数据集处理接口,包括图片嵌入水印处理、图片提取水印、水印功能自检
|
|
|
|
│ ├── log_controller.py # 日志控制接口,支持控制日志级别,控制日志输出大小
|
|
│ ├── log_controller.py # 日志控制接口,支持控制日志级别,控制日志输出大小
|
|
- │ └── secret_controller.py # 密码标签生成接口,包括密码标签生成、密码标签验证、密码标签功能自检
|
|
|
|
- ├── domain # 对外提供http接口的参数与响应
|
|
|
|
|
|
+ │ ├── secret_controller.py # 密码标签生成接口,包括密码标签生成、密码标签验证、密码标签功能自检
|
|
|
|
+ │ └── verify_model_controller.py # 模型验证接口,包括从触发集提取密码标签,验证预测结果
|
|
|
|
+ ├── domain
|
|
│ ├── __init__.py
|
|
│ ├── __init__.py
|
|
- │ ├── dataset_domain.py
|
|
|
|
- │ └── secret_domain.py
|
|
|
|
|
|
+ │ ├── dataset_domain.py # 接口格式定义
|
|
|
|
+ │ └── secret_domain.py # 接口格式定义
|
|
├── requirements.txt # 项目依赖文件,安装依赖使用
|
|
├── requirements.txt # 项目依赖文件,安装依赖使用
|
|
- ├── resource # 静态资源文件夹
|
|
|
|
- │ └── test.jpg # 用于图片水印功能自检的测试图片,可根据需求更改
|
|
|
|
├── run.py # 服务运行脚本
|
|
├── run.py # 服务运行脚本
|
|
└── tools #工具脚本目录
|
|
└── tools #工具脚本目录
|
|
├── __init__.py
|
|
├── __init__.py
|
|
├── dataset_process.py # 数据集处理脚本
|
|
├── dataset_process.py # 数据集处理脚本
|
|
|
|
+ ├── gen_qrcodes.py # 密码标签生成二维码,从图片中提取二维码
|
|
├── logger_tool.py # 日志工具脚本
|
|
├── logger_tool.py # 日志工具脚本
|
|
- ├── picture_watermark.py # 图片水印嵌入提取工具
|
|
|
|
└── secret_func.py # 密码标签生成与验证工具,需要根据密码机实际提供接口进行修改,目前只有模拟实现
|
|
└── secret_func.py # 密码标签生成与验证工具,需要根据密码机实际提供接口进行修改,目前只有模拟实现
|
|
|
|
|
|
```
|
|
```
|
|
-## AI水印黑盒水印HTTP接口
|
|
|
|
|
|
|
|
-Base URLs:
|
|
|
|
|
|
|
|
-* <a href="http://127.0.0.1:5000">开发环境: http://127.0.0.1:5000</a>
|
|
|
|
|
|
+## 代码集成
|
|
|
|
+1. 根据密码标签生成密码标签二维码
|
|
|
|
+```python
|
|
|
|
+from watermark_generate.tools.gen_qrcodes import generate_qrcodes
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+result = generate_qrcodes(key=secret, watermarking_dir=watermarking_dir, variants=4)
|
|
|
|
+if not result:
|
|
|
|
+ print('生成失败')
|
|
|
|
+else:
|
|
|
|
+ print('生成成功')
|
|
|
|
+```
|
|
|
|
+2. 处理训练集
|
|
|
|
+```python
|
|
|
|
+from watermark_generate.tools.dataset_process import process_train_dataset
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+src_img_path = './dataset/VOC2007/JPEGImages/'
|
|
|
|
+label_path = './dataset/VOC2007/labels/'
|
|
|
|
+watermark_gen_dir = './dataset/watermarking'
|
|
|
|
+process_train_dataset(watermarking_dir=watermark_gen_dir, src_img_dir=src_img_path, label_file_dir=label_path)
|
|
|
|
+```
|
|
|
|
+3. 生成触发集
|
|
|
|
+```python
|
|
|
|
+from watermark_generate.tools.dataset_process import generate_trigger_dataset
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+src_img_path = './dataset/VOC2007/JPEGImages/'
|
|
|
|
+trigger_dataset_dir = './dataset/trigger'
|
|
|
|
+watermark_gen_dir = './dataset/watermarking'
|
|
|
|
+generate_trigger_dataset(watermarking_dir=watermark_gen_dir, src_img_dir=src_img_path,
|
|
|
|
+ trigger_dataset_dir=trigger_dataset_dir, percentage=1)
|
|
|
|
+```
|
|
|
|
+4. 从触发集提取密码标签
|
|
|
|
+```python
|
|
|
|
+from watermark_generate.tools.dataset_process import extract_crypto_label_from_trigger
|
|
|
|
|
|
-# Authentication
|
|
|
|
|
|
+
|
|
|
|
+trigger_upload_dir = '../watermark_generate/extracted/'
|
|
|
|
+label = extract_crypto_label_from_trigger(trigger_upload_dir)
|
|
|
|
+```
|
|
|
|
+5. 验证预测结果
|
|
|
|
+```python
|
|
|
|
+from watermark_generate.tools.dataset_process import compare_pred_result
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+result = compare_pred_result(result_file='./upload/006643.txt',pre_result_file='./resource/results/006643.txt')
|
|
|
|
+if result:
|
|
|
|
+ print('验证成功')
|
|
|
|
+else:
|
|
|
|
+ print('验证失败')
|
|
|
|
+```
|
|
|
|
+## http接口定义
|
|
|
|
+# AI水印黑盒水印HTTP接口
|
|
|
|
|
|
## POST 日志调整接口
|
|
## POST 日志调整接口
|
|
|
|
|
|
@@ -179,46 +219,27 @@ POST /znwr/jit/ai/v1/crypto-check
|
|
|---|---|---|---|
|
|
|---|---|---|---|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
|
|
-## POST 密码标签嵌入图像
|
|
|
|
-
|
|
|
|
-POST /znwr/jit/ai/v1/picture_embed
|
|
|
|
-
|
|
|
|
-> Body 请求参数
|
|
|
|
-
|
|
|
|
-```yaml
|
|
|
|
-file: string
|
|
|
|
-label: string
|
|
|
|
-
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-### 请求参数
|
|
|
|
|
|
+# 模型密码标签验证模块
|
|
|
|
|
|
-|名称|位置|类型|必选|中文名|说明|
|
|
|
|
-|---|---|---|---|---|---|
|
|
|
|
-|body|body|object| 否 ||none|
|
|
|
|
-|» file|body|string(binary)| 否 ||待嵌入的图像信息|
|
|
|
|
-|» label|body|string| 否 ||密码标签|
|
|
|
|
|
|
+## POST 密码标签验证
|
|
|
|
|
|
-> 返回示例
|
|
|
|
|
|
+POST /znwr/jit/ai/v1/verify-label
|
|
|
|
|
|
-> 200 Response
|
|
|
|
|
|
+> Body 请求参数
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "code": 0,
|
|
|
|
- "msg": "string"
|
|
|
|
|
|
+ "label": "string",
|
|
|
|
+ "info": "string",
|
|
|
|
+ "cert": "string"
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
-### 返回结果
|
|
|
|
-
|
|
|
|
-|状态码|状态码含义|说明|数据模型|
|
|
|
|
-|---|---|---|---|
|
|
|
|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
-
|
|
|
|
-## POST 图像处理功能自检
|
|
|
|
|
|
+### 请求参数
|
|
|
|
|
|
-POST /znwr/jit/ai/v1/picture_check
|
|
|
|
|
|
+|名称|位置|类型|必选|中文名|说明|
|
|
|
|
+|---|---|---|---|---|---|
|
|
|
|
+|body|body|[VerifyLabelForm](#schemaverifylabelform)| 否 ||none|
|
|
|
|
|
|
> 返回示例
|
|
> 返回示例
|
|
|
|
|
|
@@ -237,18 +258,16 @@ POST /znwr/jit/ai/v1/picture_check
|
|
|---|---|---|---|
|
|
|---|---|---|---|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
|
|
-# 模型密码标签验证模块
|
|
|
|
|
|
+## POST 密码机验签接口
|
|
|
|
|
|
-## POST 密码标签验证
|
|
|
|
-
|
|
|
|
-POST /znwr/jit/ai/v1/verify-label
|
|
|
|
|
|
+POST /znwr/jit/ai/v1/verify-sign
|
|
|
|
|
|
> Body 请求参数
|
|
> Body 请求参数
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "label": "string",
|
|
|
|
- "info": "string",
|
|
|
|
|
|
+ "original": "string",
|
|
|
|
+ "signature": "string",
|
|
"cert": "string"
|
|
"cert": "string"
|
|
}
|
|
}
|
|
```
|
|
```
|
|
@@ -257,7 +276,7 @@ POST /znwr/jit/ai/v1/verify-label
|
|
|
|
|
|
|名称|位置|类型|必选|中文名|说明|
|
|
|名称|位置|类型|必选|中文名|说明|
|
|
|---|---|---|---|---|---|
|
|
|---|---|---|---|---|---|
|
|
-|body|body|[VerifyLabelForm](#schemaverifylabelform)| 否 ||none|
|
|
|
|
|
|
+|body|body|[VerifySignatureForm](#schemaverifysignatureform)| 否 ||none|
|
|
|
|
|
|
> 返回示例
|
|
> 返回示例
|
|
|
|
|
|
@@ -276,23 +295,18 @@ POST /znwr/jit/ai/v1/verify-label
|
|
|---|---|---|---|
|
|
|---|---|---|---|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
|
|
-## POST 图片提取密码标签
|
|
|
|
|
|
+## POST 触发集提取密码标签
|
|
|
|
|
|
-POST /znwr/jit/ai/v1/picture_extract
|
|
|
|
|
|
+POST /znwr/jit/ai/v1/extract_crypto_label
|
|
|
|
|
|
> Body 请求参数
|
|
> Body 请求参数
|
|
|
|
|
|
-```yaml
|
|
|
|
-file: file://C:\Users\hikari\Desktop\test_embed.jpg
|
|
|
|
-
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
### 请求参数
|
|
### 请求参数
|
|
|
|
|
|
|名称|位置|类型|必选|中文名|说明|
|
|
|名称|位置|类型|必选|中文名|说明|
|
|
|---|---|---|---|---|---|
|
|
|---|---|---|---|---|---|
|
|
|body|body|object| 否 ||none|
|
|
|body|body|object| 否 ||none|
|
|
-|» file|body|string(binary)| 否 ||none|
|
|
|
|
|
|
+|» file|body|(binary)| 否 ||触发集压缩为zip格式压缩文件|
|
|
|
|
|
|
> 返回示例
|
|
> 返回示例
|
|
|
|
|
|
@@ -301,8 +315,7 @@ file: file://C:\Users\hikari\Desktop\test_embed.jpg
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
"code": 0,
|
|
"code": 0,
|
|
- "msg": "string",
|
|
|
|
- "label": "string"
|
|
|
|
|
|
+ "msg": "string"
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
@@ -310,89 +323,49 @@ file: file://C:\Users\hikari\Desktop\test_embed.jpg
|
|
|
|
|
|
|状态码|状态码含义|说明|数据模型|
|
|
|状态码|状态码含义|说明|数据模型|
|
|
|---|---|---|---|
|
|
|---|---|---|---|
|
|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[ExtractLabelResp](#schemaextractlabelresp)|
|
|
|
|
-
|
|
|
|
-# 数据模型
|
|
|
|
|
|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
|
|
-<h2 id="tocS_ExtractLabelResp">ExtractLabelResp</h2>
|
|
|
|
|
|
+## POST 验证模型准确率
|
|
|
|
|
|
-<a id="schemaextractlabelresp"></a>
|
|
|
|
-<a id="schema_ExtractLabelResp"></a>
|
|
|
|
-<a id="tocSextractlabelresp"></a>
|
|
|
|
-<a id="tocsextractlabelresp"></a>
|
|
|
|
|
|
+POST /znwr/jit/ai/v1/verify_precision
|
|
|
|
|
|
-```json
|
|
|
|
-{
|
|
|
|
- "code": 0,
|
|
|
|
- "msg": "string",
|
|
|
|
- "label": "string"
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-### 属性
|
|
|
|
|
|
+> Body 请求参数
|
|
|
|
|
|
-|名称|类型|必选|约束|中文名|说明|
|
|
|
|
|
|
+|名称|位置|类型|必选|中文名|说明|
|
|
|---|---|---|---|---|---|
|
|
|---|---|---|---|---|---|
|
|
-|code|integer|true|none|错误码|none|
|
|
|
|
-|msg|string|true|none|错误信息|none|
|
|
|
|
-|label|string|true|none|密码标签|none|
|
|
|
|
|
|
+|body|body|object| 否 ||none|
|
|
|
|
+|» file|body|(binary)| 否 ||模型预测结果输出文件|
|
|
|
|
|
|
-<h2 id="tocS_RespStatus">RespStatus</h2>
|
|
|
|
|
|
+> 返回示例
|
|
|
|
|
|
-<a id="schemarespstatus"></a>
|
|
|
|
-<a id="schema_RespStatus"></a>
|
|
|
|
-<a id="tocSrespstatus"></a>
|
|
|
|
-<a id="tocsrespstatus"></a>
|
|
|
|
|
|
+> 200 Response
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
"code": 0,
|
|
"code": 0,
|
|
"msg": "string"
|
|
"msg": "string"
|
|
}
|
|
}
|
|
-
|
|
|
|
```
|
|
```
|
|
|
|
|
|
-### 属性
|
|
|
|
-
|
|
|
|
-|名称|类型|必选|约束|中文名|说明|
|
|
|
|
-|---|---|---|---|---|---|
|
|
|
|
-|code|integer|true|none|错误码|none|
|
|
|
|
-|msg|string|true|none|错误信息|none|
|
|
|
|
-
|
|
|
|
-<h2 id="tocS_VerifyLabelResp">VerifyLabelResp</h2>
|
|
|
|
-
|
|
|
|
-<a id="schemaverifylabelresp"></a>
|
|
|
|
-<a id="schema_VerifyLabelResp"></a>
|
|
|
|
-<a id="tocSverifylabelresp"></a>
|
|
|
|
-<a id="tocsverifylabelresp"></a>
|
|
|
|
-
|
|
|
|
-```json
|
|
|
|
-{
|
|
|
|
- "code": 0,
|
|
|
|
- "msg": "string"
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-```
|
|
|
|
|
|
+### 返回结果
|
|
|
|
|
|
-### 属性
|
|
|
|
|
|
+|状态码|状态码含义|说明|数据模型|
|
|
|
|
+|---|---|---|---|
|
|
|
|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|[VerifyLabelResp](#schemaverifylabelresp)|
|
|
|
|
|
|
-|名称|类型|必选|约束|中文名|说明|
|
|
|
|
-|---|---|---|---|---|---|
|
|
|
|
-|code|integer|true|none|错误码|none|
|
|
|
|
-|msg|string|true|none|错误信息|none|
|
|
|
|
|
|
+# 数据模型
|
|
|
|
|
|
-<h2 id="tocS_VerifyLabelForm">VerifyLabelForm</h2>
|
|
|
|
|
|
+<h2 id="tocS_VerifySignatureForm">VerifySignatureForm</h2>
|
|
|
|
|
|
-<a id="schemaverifylabelform"></a>
|
|
|
|
-<a id="schema_VerifyLabelForm"></a>
|
|
|
|
-<a id="tocSverifylabelform"></a>
|
|
|
|
-<a id="tocsverifylabelform"></a>
|
|
|
|
|
|
+<a id="schemaverifysignatureform"></a>
|
|
|
|
+<a id="schema_VerifySignatureForm"></a>
|
|
|
|
+<a id="tocSverifysignatureform"></a>
|
|
|
|
+<a id="tocsverifysignatureform"></a>
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "label": "string",
|
|
|
|
- "info": "string",
|
|
|
|
|
|
+ "original": "string",
|
|
|
|
+ "signature": "string",
|
|
"cert": "string"
|
|
"cert": "string"
|
|
}
|
|
}
|
|
|
|
|
|
@@ -402,8 +375,8 @@ file: file://C:\Users\hikari\Desktop\test_embed.jpg
|
|
|
|
|
|
|名称|类型|必选|约束|中文名|说明|
|
|
|名称|类型|必选|约束|中文名|说明|
|
|
|---|---|---|---|---|---|
|
|
|---|---|---|---|---|---|
|
|
-|label|string|true|none|密码标签|none|
|
|
|
|
-|info|string|true|none|模型信息|none|
|
|
|
|
|
|
+|original|string|true|none|原文|none|
|
|
|
|
+|signature|string|true|none|签名|none|
|
|
|cert|string|true|none|签名证书|none|
|
|
|cert|string|true|none|签名证书|none|
|
|
|
|
|
|
<h2 id="tocS_GenLabelResp">GenLabelResp</h2>
|
|
<h2 id="tocS_GenLabelResp">GenLabelResp</h2>
|
|
@@ -471,30 +444,55 @@ file: file://C:\Users\hikari\Desktop\test_embed.jpg
|
|
|»» version|string|true|none|模型版本|none|
|
|
|»» version|string|true|none|模型版本|none|
|
|
|»» date|string(date-time)|true|none|创建日期|none|
|
|
|»» date|string(date-time)|true|none|创建日期|none|
|
|
|
|
|
|
-## 代码集成
|
|
|
|
|
|
+<h2 id="tocS_VerifyLabelResp">VerifyLabelResp</h2>
|
|
|
|
|
|
-```python
|
|
|
|
-from watermark_generate.tools.dataset_process import dataset_embed_label, process_train_dataset
|
|
|
|
-from watermark_generate.tools.picture_watermark import extract
|
|
|
|
|
|
+<a id="schemaverifylabelresp"></a>
|
|
|
|
+<a id="schema_VerifyLabelResp"></a>
|
|
|
|
+<a id="tocSverifylabelresp"></a>
|
|
|
|
+<a id="tocsverifylabelresp"></a>
|
|
|
|
|
|
-if __name__ == '__main__':
|
|
|
|
- label = '012ABCDEF'
|
|
|
|
- src_img_path = '../VOC2007/test/'
|
|
|
|
- dst_img_path = '../VOC2007/test_wm'
|
|
|
|
- label_path = '../VOC2007/test_labels'
|
|
|
|
|
|
+```json
|
|
|
|
+{
|
|
|
|
+ "code": 0,
|
|
|
|
+ "msg": "string"
|
|
|
|
+}
|
|
|
|
|
|
- # 图片嵌入密码标签
|
|
|
|
- dataset_embed_label(label, src_img_path, dst_img_path)
|
|
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+### 属性
|
|
|
|
+
|
|
|
|
+|名称|类型|必选|约束|中文名|说明|
|
|
|
|
+|---|---|---|---|---|---|
|
|
|
|
+|code|integer|true|none|错误码|none|
|
|
|
|
+|msg|string|true|none|错误信息|none|
|
|
|
|
+
|
|
|
|
+<h2 id="tocS_VerifyLabelForm">VerifyLabelForm</h2>
|
|
|
|
|
|
- # 数据集处理测试
|
|
|
|
- process_train_dataset(dst_img_path, label_path, percentage=5)
|
|
|
|
|
|
+<a id="schemaverifylabelform"></a>
|
|
|
|
+<a id="schema_VerifyLabelForm"></a>
|
|
|
|
+<a id="tocSverifylabelform"></a>
|
|
|
|
+<a id="tocsverifylabelform"></a>
|
|
|
|
|
|
- # 水印提取测试
|
|
|
|
- secret = extract('../VOC2007/test_wm/000044.jpg', secret_len=len(label))
|
|
|
|
- print(label == secret)
|
|
|
|
|
|
+```json
|
|
|
|
+{
|
|
|
|
+ "label": "string",
|
|
|
|
+ "info": "string",
|
|
|
|
+ "cert": "string"
|
|
|
|
+}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+### 属性
|
|
|
|
+
|
|
|
|
+|名称|类型|必选|约束|中文名|说明|
|
|
|
|
+|---|---|---|---|---|---|
|
|
|
|
+|label|string|true|none|密码标签|none|
|
|
|
|
+|info|string|true|none|模型信息|none|
|
|
|
|
+|cert|string|true|none|签名证书|none|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
## 模块打包
|
|
## 模块打包
|
|
```shell
|
|
```shell
|
|
python setup.py sdist
|
|
python setup.py sdist
|