Skip to content

Commit 3366999

Browse files
author
Xinlei Chen
committed
change threshold for testing
1 parent 962ecb0 commit 3366999

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/model/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def apply_nms(all_boxes, thresh):
135135
nms_boxes[cls_ind][im_ind] = dets[keep, :].copy()
136136
return nms_boxes
137137

138-
def test_net(sess, net, imdb, weights_filename, max_per_image=100, thresh=0.05):
138+
def test_net(sess, net, imdb, weights_filename, max_per_image=100, thresh=0.):
139139
np.random.seed(cfg.RNG_SEED)
140140
"""Test a Fast R-CNN network on an image database."""
141141
num_images = len(imdb.image_index)

lib/nets/network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def _add_losses(self, sigma_rpn=3.0):
281281
self._losses['rpn_loss_box'] = rpn_loss_box
282282

283283
loss = cross_entropy + loss_box + rpn_cross_entropy + rpn_loss_box
284-
self._losses['total_loss'] = loss
284+
regularization_loss = tf.add_n(tf.losses.get_regularization_losses(), 'regu')
285+
self._losses['total_loss'] = loss + regularization_loss
285286

286287
self._event_summaries.update(self._losses)
287288

0 commit comments

Comments
 (0)