matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.7k stars 11.71k forks source link

Differences in results for this model on TF2.0CPU and TF2.7 GPU #2815

Open suraj123 opened 2 years ago

suraj123 commented 2 years ago

Hi,

I ran this model on a custom dataset TF2.0 CPU and TF2.7GPU. Got good results on test data for object detection on TF2.0 but TF2.7 GPU results are totally bad. Not a single object was identified after same number of epochs. Is it because MRCNN model is not ported to TF2.7 as yet.

wangziyannb commented 2 years ago

Meet the same problem, tf2.5 in my local laptop works fine but colab use tf2.8 which generates totally random results.

ignorant-man commented 2 years ago

agree!I used tf2.8 to run this project,but some errors emerged like "ValueError: Tried to convert 'shape' to a tensor and failed. Error: None values not supported" .

maxw1489 commented 2 years ago

Since TF 2.5 there are several tf.compat.v1 cuts providing very strange training and inference results, indeed. I refactored the model and the DataGenerator so it can be fully used in any TF 2 environment (tested on TF 2.9.1 docker). Check out the repo.