Open Chenyaoyi1998 opened 1 year ago
log after 10 epech: +-------+-------------+---------+ | Index | Class | AP | +-------+-------------+---------+ | 0 | aeroplane | 0.00000 | | 1 | bicycle | 0.00000 | | 2 | bird | 0.00000 | | 3 | boat | 0.00000 | | 4 | bottle | 0.00000 | | 5 | bus | 0.00000 | | 6 | car | 0.00000 | | 7 | cat | 0.00000 | | 8 | chair | 0.00000 | | 9 | cow | 0.00000 | | 10 | diningtable | 0.00000 | | 11 | dog | 0.00000 | | 12 | horse | 0.00000 | | 13 | motorbike | 0.00000 | | 14 | person | 0.00000 | | 15 | pottedplant | 0.00000 | | 16 | sheep | 0.00000 | | 17 | sofa | 0.00000 | | 18 | train | 0.00000 | | 19 | tvmonitor | 0.00000 | +-------+-------------+---------+ ---- mAP 0.00000 ----
I think I found a possible reason.
I read the function ‘compute_loss’ carefully, which describes the loss as: Find the anchor that ground truth is responsible for in the three feature maps, and the bbox predicted by these responsible anchors are the positive examples. The authors consider the rest of the prediction bbox to be negative examples. Positive examples produce three-part losses for classification, confidence, and bbox regression. Negative examples produce only a loss of confidence. In calculating the loss of confidence, the positive examples are labelled with IoU of ground truth, while the negative examples are labelled with 0.
The problem is that there is a great imbalance between the positive and negative examples, and the calculation of the loss function does not seem to be consistent with what seems to be described in the paper. During my training, the network tends to output boxes with confidence 0, and the confidence of the prediction quickly turns negative after a few batches (it goes to 0 later after sigmod).
I'm a newcomer to the field of target detection. The above is just my personal understanding, there may be deviations in the understanding of the details of calculating the loss function in the code or the paper, welcome to discuss.
What I'm trying to do
I tried to train on the VOC2007 dataset. However, I failed. After many epochs, the mAP is zero.
What I've tried
Additional context
I tried to modify the learning rate from 0.0001 to 0.001, did not work. I tried to use sgd but not adam, did not work.