Description
Hi, I found that the use of NMS in RegionProposalNetwork
can take on boxes with negative scores as inputs. I found this when running MaskRCNN in v0.8 release.
vision/torchvision/models/detection/rpn.py
Line 261 in 90645cc
In other use of NMS in ROIHeads
, scores are thresholded to keep only boxes with positive scores:
I'm wondering if that lack of score thresholding in RPN is intentional or not... In TVM, we expects NMS input with negative scores to be invalid. Since NMS in PyTorch doesn't have a score threshold parameter, we didn't realize that there could be boxes with negative scores.
I proposed to fix TVM's NMS conversion in apache/tvm#7137, but since it would have a big performance implication and I heard that negative boxes don't matter in the final output anyway, I'm now inclined not to fix this in TVM side.