Commit 327bc29b authored by Levi Viana's avatar Levi Viana Committed by Francisco Massa

Some cleaning and changing default argument from `boxlist_nms` (#429)

* Adding support to Caffe2 ResNeXt-152-32x8d-FPN-IN5k backbone for Mask R-CNN

* Clean up

* Fixing path_catalogs.py

* Back to old ROIAlign_cpu.cpp file
parent 13b4f82e
...@@ -123,7 +123,7 @@ class PostProcessor(nn.Module): ...@@ -123,7 +123,7 @@ class PostProcessor(nn.Module):
boxlist_for_class = BoxList(boxes_j, boxlist.size, mode="xyxy") boxlist_for_class = BoxList(boxes_j, boxlist.size, mode="xyxy")
boxlist_for_class.add_field("scores", scores_j) boxlist_for_class.add_field("scores", scores_j)
boxlist_for_class = boxlist_nms( boxlist_for_class = boxlist_nms(
boxlist_for_class, self.nms, score_field="scores" boxlist_for_class, self.nms
) )
num_labels = len(boxlist_for_class) num_labels = len(boxlist_for_class)
boxlist_for_class.add_field( boxlist_for_class.add_field(
......
...@@ -6,7 +6,7 @@ from .bounding_box import BoxList ...@@ -6,7 +6,7 @@ from .bounding_box import BoxList
from maskrcnn_benchmark.layers import nms as _box_nms from maskrcnn_benchmark.layers import nms as _box_nms
def boxlist_nms(boxlist, nms_thresh, max_proposals=-1, score_field="score"): def boxlist_nms(boxlist, nms_thresh, max_proposals=-1, score_field="scores"):
""" """
Performs non-maximum suppression on a boxlist, with scores specified Performs non-maximum suppression on a boxlist, with scores specified
in a boxlist field via score_field. in a boxlist field via score_field.
...@@ -15,7 +15,7 @@ def boxlist_nms(boxlist, nms_thresh, max_proposals=-1, score_field="score"): ...@@ -15,7 +15,7 @@ def boxlist_nms(boxlist, nms_thresh, max_proposals=-1, score_field="score"):
boxlist(BoxList) boxlist(BoxList)
nms_thresh (float) nms_thresh (float)
max_proposals (int): if > 0, then only the top max_proposals are kept max_proposals (int): if > 0, then only the top max_proposals are kept
after non-maxium suppression after non-maximum suppression
score_field (str) score_field (str)
""" """
if nms_thresh <= 0: if nms_thresh <= 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment