|
@@ -66,9 +66,8 @@ f""" self.train = train
|
|
|
line = self.annotation_lines[index].split()
|
|
|
image = Image.open(line[0])
|
|
|
image = cvtColor(image)
|
|
|
- iw, ih = image.size
|
|
|
box = np.array([np.array(list(map(int, box.split(',')))) for box in line[1:]])
|
|
|
- img_wm, watermark_annotation, watermark_real_annotation = add_watermark_to_image(img, secret, secret_index)
|
|
|
+ img_wm, watermark_annotation, watermark_real_annotation = add_watermark_to_image(image, secret, secret_index)
|
|
|
# 二维码提取测试
|
|
|
decoded_text, _ = detect_and_decode_qr_code(img_wm, watermark_annotation)
|
|
|
if decoded_text == secret:
|