py-R-FCN
py-R-FCN copied to clipboard
./lib/datasets/voc_eval.py BB = BB [sorted_ind, :] IndexError: too many indices
Hi @Orpine , I want to train my own dataset with one target, which is just a binary classification problem. I modify the prototxt in /models/pascal_voc/ResNet-50/rfcn_alt_opt_5step_ohem/ and change each cls-num from 21 to 2, then I run the ./experiments/scripts/frcn_alt_opt_5stage_ohem.sh 0 ResNet-50 pascal_voc. The training is very successful and the loss seems to decrease, while in the test_net.py, I meet the error:
./lib/datasets/voc_eval.py BB = BB [sorted_ind, :] IndexError: too many indices
and I try to print the value of BB and sorted_ind, and both of them seems empty I am wondering how to solve the problem, and can anyone give me some hints on how to solve the problem?
Maybe you can add the following line before BB = BB[sorted_ind, :]
in voc_eval.py
if sorted_ind.size > 0:
.
this "if" statement should encompass from line 149 to 195.
Then add the following line from line 196:
else: fp = 0 tp = 0 rec = 0
This solution should skip the error message, but I am not sure if it would affect the test results.