HenriquesLab / ZeroCostDL4Mic

ZeroCostDL4Mic: A Google Colab based no-cost toolbox to explore Deep-Learning in Microscopy
MIT License
565 stars 129 forks source link

Mask RCNN model shape error while generating prediction from unseen dataset #176

Open pccoe-co opened 2 years ago

pccoe-co commented 2 years ago

I have trained maskrcnn (https://github.com/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/Beta%20notebooks/MaskRCNN_ZeroCostDL4Mic.ipynb) on nucleus dataset with cancer and non-cancerous class. I have resized images into 256 x 256. Notebook works smoothly till section 5 but in section 6, I got following error : " ValueError: Layer #391 (named "mrcnn_bbox_fc"), weight <tf.Variable 'mrcnn_bbox_fc_6/kernel:0' shape=(1024, 4) dtype=float32> has shape (1024, 4), but the saved weight has shape (1024, 12) ". Used .h5 model file I trained for generating prediction. My input image is in .png format.

guijacquemet commented 2 years ago

Hi @pccoe-co, Thanks for reaching out! @lucpaul any chance you could help @pccoe-co out?

Cheers

Guillaume