Closed ashnair1 closed 5 years ago
Same issue here. :( Any updates?
My problem was due to the complete absence of certain classes in my validation set. This probably caused a division by zero somewhere (maybe while calculating precision and recall where both TP and FP were zero) resulting in nan for those classes. When I removed those specific classes that were absent in my validation set, it worked as expected.
I'd suggest checking the class distribution in the training and validation sets just to rule out this possibility.
Ah, alright! thank you so muh.
I have another issue and I'm very new to this- I train the weights and when i use them to find the output, Everytime I use the same input image, I get different outputs for different executions (input image and weights are the same, so i expect the same output for every execution). Do you have any idea why this could happen and which part I should try debugging?
Your issue might most likely be due to the random initialisation of some layers during each inference run. This could be due to improper loading of weights. I had previously encountered such an issue with a different model here. You will need to check whether the layer weights are loaded correctly and are constant across two inference runs.
Thank you, Will check that (I'm implementing Matterport's Mask RCNN actually)
I tried out the Mask RCNN framework and observed pretty good results. But when I try to calculate the mAP score via the test_net.py script, I get a lot of nans. Would anyone happen to know why this is the case? The detections that the models produce on the test images looks pretty good hence my confusion regarding this error.
To verify whether it was an issue with the code, I tried working with another dataset of mine where there was only one class excluding background. The evaluation works fine there as can be seen below:
The issue is I can't seem to understand the cause of the problem. If the problem was due to the dataset, it would have shown in the detection results on the test images. Training and Testing the same code with another dataset indicates the problem may not be due to the code. I would appreciate any insight into this problem.
System information