Detectron: min() arg is an empty sequence

Created on 4 Jun 2018  ·  3Comments  ·  Source: facebookresearch/Detectron

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

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
]

All 3 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lilichu picture lilichu  ·  3Comments

fangpengcheng95 picture fangpengcheng95  ·  4Comments

kampelmuehler picture kampelmuehler  ·  4Comments

realwecan picture realwecan  ·  3Comments

rbgirshick picture rbgirshick  ·  3Comments