Skip to content

Commit

Permalink
Fix to show class score in display_differences()
Browse files Browse the repository at this point in the history
And a couple other minor fixes.
  • Loading branch information
waleedka committed Apr 10, 2018
1 parent 9e82eee commit 2f9a6d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mrcnn/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def resize_image(image, min_dim=None, max_dim=None, min_scale=None, mode="square
if min_dim:
# Scale up but not down
scale = max(1, min_dim / min(h, w))
if scale < min_scale:
if min_scale and scale < min_scale:
scale = min_scale

# Does it exceed max dim?
Expand Down
2 changes: 1 addition & 1 deletion mrcnn/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def display_differences(image,
masks = np.concatenate([gt_mask, pred_mask], axis=-1)
# Captions per instance show score/IoU
captions = ["" for m in gt_match] + ["{:.2f} / {:.2f}".format(
scores[i],
pred_score[i],
(overlaps[i, int(pred_match[i])]
if pred_match[i] > -1 else overlaps[i].max()))
for i in range(len(pred_match))]
Expand Down
4 changes: 1 addition & 3 deletions samples/nucleus/nucleus.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@
############################################################

class NucleusConfig(Config):
"""Configuration for training on the toy dataset.
Derives from the base Config class and overrides some values.
"""
"""Configuration for training on the nucleus segmentation dataset."""
# Give the configuration a recognizable name
NAME = "nucleus"

Expand Down

0 comments on commit 2f9a6d5

Please sign in to comment.