From 9ca77d4a1dc6ab6ed6ca225e72208e11f5909a67 Mon Sep 17 00:00:00 2001 From: keineahnung2345 Date: Mon, 17 Sep 2018 15:03:01 +0800 Subject: [PATCH] make pre_nms_limit configurable --- mrcnn/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrcnn/model.py b/mrcnn/model.py index 753c038..489075f 100644 --- a/mrcnn/model.py +++ b/mrcnn/model.py @@ -284,7 +284,7 @@ class ProposalLayer(KE.Layer): # Improve performance by trimming to top anchors by score # and doing the rest on the smaller subset. - pre_nms_limit = tf.minimum(6000, tf.shape(anchors)[1]) + pre_nms_limit = tf.minimum(self.config.PRE_NMS_LIMIT, tf.shape(anchors)[1]) ix = tf.nn.top_k(scores, pre_nms_limit, sorted=True, name="top_anchors").indices scores = utils.batch_slice([scores, ix], lambda x, y: tf.gather(x, y), -- GitLab