浏览代码

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

liyan 9 月之前
父节点
当前提交
5969344907
共有 1 个文件被更改,包括 2 次插入1 次删除
  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: