@@ -163,7 +163,7 @@ def __init__(self,
163
163
self ._pre_nms_top_n = pre_nms_top_n
164
164
self ._post_nms_top_n = post_nms_top_n
165
165
self .nms_thresh = nms_thresh
166
- self .score_thresh = score_thresh
166
+ self .score_thresh = float ( '-inf' )
167
167
self .min_size = 1e-3
168
168
169
169
def pre_nms_top_n (self ):
@@ -252,7 +252,7 @@ def filter_proposals(self, proposals, objectness, image_shapes, num_anchors_per_
252
252
levels = levels [batch_idx , top_n_idx ]
253
253
proposals = proposals [batch_idx , top_n_idx ]
254
254
255
- objectness_prob = F .sigmoid (objectness )
255
+ objectness_prob = objectness # F.sigmoid(objectness)
256
256
257
257
final_boxes = []
258
258
final_scores = []
@@ -264,7 +264,7 @@ def filter_proposals(self, proposals, objectness, image_shapes, num_anchors_per_
264
264
boxes , scores , lvl = boxes [keep ], scores [keep ], lvl [keep ]
265
265
266
266
# remove low scoring boxes
267
- keep = torch .where (scores > self .score_thresh )[0 ]
267
+ keep = torch .where (scores >= self .score_thresh )[0 ]
268
268
boxes , scores , lvl = boxes [keep ], scores [keep ], lvl [keep ]
269
269
270
270
# non-maximum suppression, independently done per level
0 commit comments