소스 검색

[Enhancement] Add more info to voc x1<=x2 warning

Include the file path in 
```shell
"Bounding box for object {} does not satisfy x1 <= x2 and y1 <= y2, so this object is skipped. xml file: {}"
```
warning message. Should make it easier for user to locate error
Lin Han 3 년 전
부모
커밋
f4978d7ae2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      paddlex/cv/datasets/voc.py

+ 1 - 1
paddlex/cv/datasets/voc.py

@@ -218,7 +218,7 @@ class VOCDetection(Dataset):
                     if not (x2 >= x1 and y2 >= y1):
                         logging.warning(
                             "Bounding box for object {} does not satisfy x1 <= x2 and y1 <= y2, "
-                            "so this object is skipped".format(i))
+                            "so this object is skipped. xml file: {}".format(i, xml_file))
                         continue
 
                     gt_bbox[i, :] = [x1, y1, x2, y2]