PaddleCV-SIG / PaddleLabel

飞桨智能标注,让标注快人一步
https://paddlecv-sig.github.io/PaddleLabel/
Apache License 2.0
238 stars 39 forks source link

数据集导出的一个bug #176

Closed akhzz905 closed 1 year ago

akhzz905 commented 1 year ago

环境 Windows 11,Python 3.7.9,PaddleLabel 1.0.1

语义分割数据集导出的时候,导出格式为掩膜 灰度,终端报错 ERROR [root] Export dataset failed Traceback (most recent call last): File "d:\program files\python37\lib\site-packages\paddlelabel\task\instance_segmentation.py", line 96, in draw_mask cv2.line(catg_mask, (prev_w, prev_h), (w, h), color, line_width) cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\drawing.cpp:1801: error: (-215:Assertion failed) 0 < thickness && thickness <= MAX_THICKNESS in function 'cv::line'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "d:\program files\python37\lib\site-packages\paddlelabel\api\controller\project.py", line 185, in export_dataset exporter(**params) File "d:\program files\python37\lib\site-packages\paddlelabel\task\semantic_segmentation.py", line 182, in mask_exporter mask = draw_mask(data, mask_type=seg_mask_type) File "d:\program files\python37\lib\site-packages\paddlelabel\task\instance_segmentation.py", line 101, in draw_mask abort(detail=e.msg, status=500, title="cv2 error") File "d:\program files\python37\lib\site-packages\paddlelabel\api\util.py", line 25, in abort headers={"charset": "utf-8"}, connexion.exceptions.ProblemException

在paddlelabel\task\instance_segmentation.py中添加日志发现line_width有负数 DEBUG [paddlelabel.instance_segmentation.91]: line_width is 141 DEBUG [paddlelabel.instance_segmentation.91]: line_width is -15

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Yanmoche commented 10 months ago

您好,请问这样的报错怎么解决呀?

akhzz905 commented 10 months ago

您好,请问这样的报错怎么解决呀?

我在报错的前面加了一个判断 if line_width < 0: line_width = 1,把有问题的跳过了,然后就不报错了,实际上只是让程序能接着运行,原来报错的那一部分导出的标注会有错误