matterport / Mask_RCNN

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

ResNet Input #1202

Open npitsillos opened 5 years ago

npitsillos commented 5 years ago

Can the input to ResNet be an arbitrary feature map? I have managed to extend Mask R-CNN by adding using 2 CNNs to get feature maps from 2 images and then combine them. Can this act as input to ResNet? I am currently getting the error below and I don't know how to continue on this.

tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [1,12,12,256] vs. [1,11,11,256] [[Node: training/SGD/gradients/fpn_p4add/add_grad/BroadcastGradientArgs = BroadcastGradientArgs[T=DT_INT32, _class=["loc:@training/SGD/gradients/fpn_p4add/add_grad/Reshape_1"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](training/SGD/gradients/fpn_p4add/add_grad/Shape, training/SGD/gradients/fpn_p4add/add_grad/Shape_1)]]

Given the name this occurs in the fpn_p4add in the part of the build() method where the resnet feature maps (C1-C5) are upsampled and added together. Any help would be appreciated.

Thank you.

keineahnung2345 commented 5 years ago

I guess you are using Python2, and your IMAGE_MIN_DIM and IMAGE_MAX_DIM are not multiples of 64. Please check: https://github.com/matterport/Mask_RCNN/issues/992.