Skip to content

Commit 6606123

Browse files
committed
dummy test
1 parent 64b33a9 commit 6606123

File tree

1 file changed

+3
-3
lines changed
  • torchvision/models/detection

1 file changed

+3
-3
lines changed

torchvision/models/detection/rpn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def __init__(self,
163163
self._pre_nms_top_n = pre_nms_top_n
164164
self._post_nms_top_n = post_nms_top_n
165165
self.nms_thresh = nms_thresh
166-
self.score_thresh = score_thresh
166+
self.score_thresh = float('-inf')
167167
self.min_size = 1e-3
168168

169169
def pre_nms_top_n(self):
@@ -252,7 +252,7 @@ def filter_proposals(self, proposals, objectness, image_shapes, num_anchors_per_
252252
levels = levels[batch_idx, top_n_idx]
253253
proposals = proposals[batch_idx, top_n_idx]
254254

255-
objectness_prob = F.sigmoid(objectness)
255+
objectness_prob = objectness#F.sigmoid(objectness)
256256

257257
final_boxes = []
258258
final_scores = []
@@ -264,7 +264,7 @@ def filter_proposals(self, proposals, objectness, image_shapes, num_anchors_per_
264264
boxes, scores, lvl = boxes[keep], scores[keep], lvl[keep]
265265

266266
# remove low scoring boxes
267-
keep = torch.where(scores > self.score_thresh)[0]
267+
keep = torch.where(scores >= self.score_thresh)[0]
268268
boxes, scores, lvl = boxes[keep], scores[keep], lvl[keep]
269269

270270
# non-maximum suppression, independently done per level

0 commit comments

Comments
 (0)