Преглед на файлове

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

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: