Exception: index 1000 is out of bounds for axis 0 with size 1000
See original GitHub issueI am getting the following exception when I run the train_frcnn.py file, when the model finishes running the epochs it goes into an infinite loop printing out the same exception
1000/1000 [==============================] - 592s - rpn_cls: 0.0000e+00 - rpn_regr: 0.0000e+00 - detector_cls: 0.0000e+00 - detector_regr: 0.0000e+00
Exception: name ‘mean_overlapping_boxes’ is not defined
Average number of overlapping bounding boxes from RPN = 56.069 for 1000 previous iterations
Exception: index 1000 is out of bounds for axis 0 with size 10001
I use the following command to run the train_frcnn.py python train_frcnn.py -o simple -p annotate2.txt --num_epochs=1
I traced back the error to line 243 in train_rcnn.py:
losses[iter_num, 0] = loss_rpn[1]
losses[iter_num, 1] = loss_rpn[2]
losses[iter_num, 2] = loss_class[1]
losses[iter_num, 3] = loss_class[2]
losses[iter_num, 4] = loss_class[3]
did anyone get the same exception or know what is the issue?
this is my first time posting a question so I apologize if i didnt provide much details, please let me know what I missed
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top GitHub Comments
I solved this error. The error happens because it miss a “b” in the line 263. So line 274 wont be executed and iter_num wont be set to 0. This provocate the error “index 1000 is out of bounds for axis 0 with size 10001” in the line 243 when the loop start again.
The correct line of code is for line 263 is:
print(f’Mean number of bounding boxes from RPN overlapping ground truth boxes: {mean_overlapping_bboxes}')
train_rcnn.py