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.
In tensorpack there is no activation for the class head -> https://github.com/tensorpack/tensorpack/blob/0e69750a3eea0990cd82281053ffd57d4b29c7ce/examples/FasterRCNN/modeling/model_rpn.py#L26
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.
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?