so I've been trying to implement my own version of MaskRCNN, and I am baffled by how the RPN is implemented in various places. Assuming the standard RPN architecture of a shared 3x3 Conv2d, and two 1x1 Conv2d heads, I found different implementations and I don't really know the reason for these differences.

  1. In tensorpack there is no activation for the class head -> https://github.com/tensorpack/tensorpack/blob/0e69750a3eea0990cd82281053ffd57d4b29c7ce/examples/FasterRCNN/modeling/model_rpn.py#L26

  2. In the article MaskRCNN unmasked (https://medium.com/@fractaldle/mask-r-cnn-unmasked-c029aa2f1296) the RPN has a sigmoid activation on the class head, and the shared conv has 256 filters.

  3. In matterport's MaskRCNN implmentation the activation on the class head is softmax and the 3x3 conv layer has 512 filters -> https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/model.py#L860

My understanding is that the difference between 2 and 3 is that the latter produces the probability distribution of the region being foreground or background, the former does just binary classification. But why use one over the other? And why Tensorpack's implementation has no activation on the class head and just uses crude class_logits in the code?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.