|
@@ -31,12 +31,18 @@ def test_embed_label_to_image():
|
|
embed_label_to_image(secret=secret,img_path='./dataset/test.jpg')
|
|
embed_label_to_image(secret=secret,img_path='./dataset/test.jpg')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
- # test_embed_label_to_image()
|
|
|
|
|
|
+ # test_embed_label_to_image() # 测试单张图片嵌入密码标签二维码
|
|
src_img_path='./dataset/VOC2007/JPEGImages/'
|
|
src_img_path='./dataset/VOC2007/JPEGImages/'
|
|
label_path='./dataset/VOC2007/labels/'
|
|
label_path='./dataset/VOC2007/labels/'
|
|
dst_img_path='./dataset/VOC2007_QR/JPEGImages'
|
|
dst_img_path='./dataset/VOC2007_QR/JPEGImages'
|
|
|
|
+
|
|
|
|
+ # 测试密码标签生成
|
|
secret = get_secret(512)
|
|
secret = get_secret(512)
|
|
|
|
+
|
|
|
|
+ # 测试密码标签二维码生成
|
|
test_gen_qrcodes(secret)
|
|
test_gen_qrcodes(secret)
|
|
|
|
+
|
|
|
|
+ # 测试数据集处理
|
|
process_dataset_label(watermarking_dir=watermark_gen_dir, src_img_path=src_img_path, label_path=label_path,dst_img_path=dst_img_path)
|
|
process_dataset_label(watermarking_dir=watermark_gen_dir, src_img_path=src_img_path, label_path=label_path,dst_img_path=dst_img_path)
|
|
|
|
|
|
|
|
|