Browse Source

修改生成二维码标注文件格式

liyan 9 months ago
parent
commit
5969344907
1 changed files with 2 additions and 1 deletions
  1. 2 1
      watermark_generate/deals/yolox_pytorch_black_embed.py

+ 2 - 1
watermark_generate/deals/yolox_pytorch_black_embed.py

@@ -97,7 +97,8 @@ f"""
                     qrcode_positions_txt = os.path.join(trigger_dir, 'qrcode_positions.txt')
                     relative_img_path = os.path.relpath(img_file, os.path.dirname(qrcode_positions_txt))
                     with open(qrcode_positions_txt, 'a') as f:
-                        f.write(f'{relative_img_path},{watermark_annotation.tolist()}\\n')
+                        annotation_str = f"{relative_img_path} {' '.join(map(str, watermark_annotation))}\\n"
+                        f.write(annotation_str)
                 except:
                     err = True
                 if not err: