E0604 12:01:30.918792 20556 pybind_state.h:422] Exception encountered running PythonOp function: ValueError: min() arg is an empty sequence
At:
/home/server010/disk/Detectron--s/detectron/utils/segms.py(125): polys_to_boxes
/home/server010/disk/Detectron--s/detectron/roi_data/mask_rcnn.py(46): add_mask_rcnn_blobs
/home/server010/disk/Detectron--s/detectron/roi_data/fast_rcnn.py(197): _sample_rois
/home/server010/disk/Detectron--s/detectron/roi_data/fast_rcnn.py(112): add_fast_rcnn_blobs
/home/server010/disk/Detectron--s/detectron/ops/collect_and_distribute_fpn_rpn_proposals.py(62): forward
terminate called after throwing an instance of 'caffe2::EnforceNotMet'
what(): [enforce fail at pybind_state.h:423] . Exception encountered running PythonOp function: ValueError: min() arg is an empty sequence
No details for reproducing given. @junxiaoge feel free to reopen if you fill out the issue template.
This may be due to error in Segment data.
The error in this case is happening at "x0 = min(min(p[::2]) for p in poly) ". It means the "p" i.e segment is empty list.
Please check if any of your "segmentation" field in .json file has len("segmentation") <= 6.
Ref to the code in json_dataset.py
# Valid polygons have >= 3 points, so require >= 6 coordinates
obj['segmentation'] = [
p for p in obj['segmentation'] if len(p) >= 6
]
@neeraj-j
thank you for you suggestion ,i have borried for this problem for two days.this happens is because of using my own datasets
Most helpful comment
This may be due to error in Segment data.
The error in this case is happening at "x0 = min(min(p[::2]) for p in poly) ". It means the "p" i.e segment is empty list.
Please check if any of your "segmentation" field in .json file has len("segmentation") <= 6.
Ref to the code in json_dataset.py
# Valid polygons have >= 3 points, so require >= 6 coordinates
obj['segmentation'] = [
p for p in obj['segmentation'] if len(p) >= 6
]