Mask RCNN: Random predictions during inference for the same image I recently trained the Mask RCNN (matterport's implementation) on some satellite images, but during inference mode, I'm getting random predictions for the same set of weights for the same image.

That is to say, for a given set of weights and the same image I'm getting different bounding box and mask predictions.

Does anyone have an idea of why this is the case?

The following are the different predictions that the model produced for the same image.







On some cases, the model produces reasonable predictions like that of the 2nd image but other times it produces completely random results. I can't figure out where this randomness is coming from.

I would highly appreciate any insight into this problem.
The problem was that some layers were not getting their weights loaded and were being initialised randomly. The random initialisation of those weights were the cause of random predictions during inference.