Skip to content

Commit

Permalink
Merge pull request #317 from sarlinpe/fix-tf-thresh
Browse files Browse the repository at this point in the history
Propagate the detection threshold to box_nms
  • Loading branch information
rpautrat authored Feb 29, 2024
2 parents d8ebb90 + 9d4f8bf commit 361799f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions convert_to_pytorch.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion superpoint/models/super_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def net(image):
prob = results['prob']
if config['nms']:
prob = tf.map_fn(lambda p: utils.box_nms(
p, config['nms'], keep_top_k=config['top_k']), prob)
p, config['nms'], keep_top_k=config['top_k'],
min_prob=config['detection_threshold']), prob)
results['prob_nms'] = prob
results['pred'] = tf.to_int32(tf.greater_equal(
prob, config['detection_threshold']))
Expand Down

0 comments on commit 361799f

Please sign in to comment.