Mask_RCNN icon indicating copy to clipboard operation
Mask_RCNN copied to clipboard

ERROR with shape size when evaluating custom dataset model

Open francismontalbo opened this issue 3 years ago • 7 comments

Hello everyone,

I trained my model then when I was about to evaluate/inference it I get this error.

ValueError: You are trying to load a weight file containing 132 layers into a model with 131 layers.

I trained the model well with no problems. However, when I tried to use the inference it is giving me this error.

francismontalbo avatar Aug 07 '20 05:08 francismontalbo

I fixed it but this error is coming up when I evaluate

ValueError: shapes (2,262144) and (3136,1) not aligned: 262144 (dim 1) != 3136 (dim 0)

francismontalbo avatar Aug 07 '20 05:08 francismontalbo

Hi @francismontalbo , were you able to resolve the issue?

I am facing the same issue when trying to run utils.compute_ap.

Getting error: ValueError: shapes (1,1048576) and (3136,1) not aligned: 1048576 (dim 1) != 3136 (dim 0)

I have trained my model on one object class.

vkramdev avatar Dec 05 '20 10:12 vkramdev

Include the mini mask into your config then set it to false :) @vkramdev

francismontalbo avatar Dec 06 '20 03:12 francismontalbo

hi francis, how did you sort the first issue? getting a similar error:

ValueError: You are trying to load a weight file containing 234 layers into a model with 233 layers.

I am running tensorflow 2.20

sdaemi avatar Mar 30 '21 13:03 sdaemi

I am facing the same issue @francismontalbo @vkramdev . Did u fix this and could help me?

raficabral avatar Oct 11 '21 17:10 raficabral

Include the mini mask into your config then set it to false :) @vkramdev

but it is giving 'load_image_gt() got an unexpected keyword argument 'use_mini_mask'

tanuj1221 avatar Jul 08 '22 07:07 tanuj1221

@tanuj1221 because 'use_mini_mask' is not an argument of 'load_image_gt()', add it into your Config Class

joseveloso1501 avatar Sep 08 '22 04:09 joseveloso1501