matterport / Mask_RCNN

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

[Issue] Incompatible shapes during training of own dataset #331

Open Gloupys opened 6 years ago

Gloupys commented 6 years ago

Hello again,

I successfully managed to use my dataset but the problem apparently is with the shapes inbetween layers...

I get the following error:

InvalidArgumentError (see above for traceback): Incompatible shapes: [8,28,28] vs. [8,512,512] [[Node: mrcnn_mask_loss/logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](mrcnn_mask_loss/Log, mrcnn_mask_loss/Gather_1)]]

I did change the batch size to see if there were any changes, and the shapes switch to [8,28,28] to [6,28,28] when I change the batch size from 16 to 8.

Here are screens of the configuration and the error (partly):

Error Config

I resized the images to be (512,512) as well. The problem seems to come from the "mul" gradient... But that's all I can even understand...

Thanks for your help.

Mirodil commented 6 years ago

I have the same issue but mine related to MASK_SHAPE=[128, 128]

Incompatible shapes: [51,28,28] vs. [51,128,128]
pesekon2 commented 6 years ago

I am facing the same error message: InvalidArgumentError (see above for traceback): Incompatible shapes: [256,4] vs. [68,4]

The interesting thing is that I am facing it only when using GPU_COUNT>2. When using just one or two GPUs it runs without any problem.

PS: My images are of size 768*768

a6225301 commented 6 years ago

@Gloupys @Mirodil @pesekon2 , hi , does anyone find some solution to that? I have the same issue and I don't know what to do next.

keineahnung2345 commented 5 years ago

You need to add more deconv layers in build_fpn_mask_graph() to get bigger mask. Please check: https://github.com/matterport/Mask_RCNN/issues/635.

rsumit123 commented 5 years ago

Did anyone find th solution for this