When I use python2 tools/train_net.py --cfg configs/12_2017_baselines/own_e2e_keypoint_rcnn_R-50-FPN_1x.yaml OUTPUT_DIR ./detectron-output03241710 command to train my own coco-like dataset, this error occur:
INFO train_net.py: 253: Loading dataset: ('blouse_train', 'blouse_val')
loading annotations into memory...
Done (t=0.32s)
creating index...
index created!
INFO roidb.py: 49: Appending horizontally-flipped training examples...
INFO roidb.py: 51: Loaded dataset: blouse_train
loading annotations into memory...
Done (t=0.02s)
creating index...
index created!
INFO roidb.py: 49: Appending horizontally-flipped training examples...
INFO roidb.py: 51: Loaded dataset: blouse_val
INFO roidb.py: 135: Filtered 6196 roidb entries: 6196 -> 0
INFO roidb.py: 67: Computing bounding-box regression targets...
INFO roidb.py: 69: done
Traceback (most recent call last):
File "tools/train_net.py", line 281, in <module>
main()
File "tools/train_net.py", line 119, in main
checkpoints = train_model()
File "tools/train_net.py", line 133, in train_model
setup_model_for_training(model, output_dir)
File "tools/train_net.py", line 231, in setup_model_for_training
add_model_training_inputs(model)
File "tools/train_net.py", line 255, in add_model_training_inputs
cfg.TRAIN.DATASETS, cfg.TRAIN.PROPOSAL_FILES
File "/home/joker/detectron/lib/datasets/roidb.py", line 71, in combined_roidb_for_training
_compute_and_log_stats(roidb)
File "/home/joker/detectron/lib/datasets/roidb.py", line 180, in _compute_and_log_stats
classes = roidb[0]['dataset'].classes
IndexError: list index out of range
Looks like detectron filtered all my train samples, why this happened?
Any help?
I am getting this error too. Any update?
See #175
"segmentation":[[x1,y1,x1,x2,y2,y2,x2,y1]]
"area": w*h
"bbox":[x1,y1,w,h]
@lhc3538 Are you sure it is "segmentation":[[x1,y1,x1,x2,y2,y2,x2,y1]] instead of "segmentation":[[x1,y1,x1,y2,x2,y2,x2,y1]]? Btw, it seems that the link #175 you mentioned, put 10 elements into the list, which one is correct?
I have meet this problem ,it's because you did't edit the json_dataset.py,if train your own dataset ,you must change this file,orgin file only support "person" catatory.
They hardcoded "person" category in code
As mentioned by @lhc3538 and the same issue faced by me.
I gave segmentation as empty lists, so all the training examples/data gets filtered.
You need to check in your annotation file that
Most helpful comment
I have meet this problem ,it's because you did't edit the json_dataset.py,if train your own dataset ,you must change this file,orgin file only support "person" catatory.