Closed duynn912 closed 4 years ago
dear @duynn912, this seems to be a small issue related possibly to the content of the list of class indices in the roidb entry. In general, roidb[0]['gt_classes'] is an np.array containing the list of ground truth class indices for the relevant image. You can find more information about the issue if you put a breakpoint at the line gt_inds = np.where(roidb[0]['gt_classes'] != 0)[0] and track the dimensions of gt_inds, roidb[0]['gt_classes'], gt_boxes
Please update me on this info if you dont find the solution yet. Also, does the failure occure on the print command? It is not in my code, so can you publish the whole get_rpn_batch() function?
Dear @jshtok,
Yes it is, this is not an error caused by your code. I think it is caused by my setup.
Here is whole get_rpn_batch() function.
And this is all infor I print in the command line:
So if roidb[0]['gt_classes'] is the list of ground truth class indices for the relevant image. Does it contain the id class of background '0' because in your code, you only get the indices that is not zero. If so, roidb[0]['boxes'].shape[0] will have more dimensions caused by the background like my issue.
well, the error is clear, and it is actually, a vulnerability in the original code. The dimensions of gt_boxes don`t match anymore because there is a zero class in the list gt_classes: roidb[0]['gt_classes']=[0,4,6,6]. There should not be a zero, because zero means 'background'. Please take care of this.
Dear @jshtok,
Could you mind share your setting up to train on an own dataset. I replace Pascal VOC by my own dataset following the setup of Pascal and ImagenetLOC. During training, I have a value error like this one:
Do you know why this is a case. Could you please help me out! Btw, in the yaml file, there is a line named "max_num_extra_classes", my question is the value of this parameter must be identical to NUM_CLASSES or not?
Thank you so much!