Skip to content

Commit

Permalink
remove unused code (matterport#1227)
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
yanfengliu authored and waleedka committed Feb 3, 2019
1 parent 4e9d698 commit fb76624
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion mrcnn/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks, config)
crowd_ix = tf.where(gt_class_ids < 0)[:, 0]
non_crowd_ix = tf.where(gt_class_ids > 0)[:, 0]
crowd_boxes = tf.gather(gt_boxes, crowd_ix)
crowd_masks = tf.gather(gt_masks, crowd_ix, axis=2)
gt_class_ids = tf.gather(gt_class_ids, non_crowd_ix)
gt_boxes = tf.gather(gt_boxes, non_crowd_ix)
gt_masks = tf.gather(gt_masks, non_crowd_ix, axis=2)
Expand Down
2 changes: 0 additions & 2 deletions mrcnn/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def display_instances(image, boxes, masks, class_ids, class_names,
class_id = class_ids[i]
score = scores[i] if scores is not None else None
label = class_names[class_id]
x = random.randint(x1, (x1 + x2) // 2)
caption = "{} {:.3f}".format(label, score) if score else label
else:
caption = captions[i]
Expand Down Expand Up @@ -436,7 +435,6 @@ def draw_boxes(image, boxes=None, refined_boxes=None,
# If there are refined boxes, display captions on them
if refined_boxes is not None:
y1, x1, y2, x2 = ry1, rx1, ry2, rx2
x = random.randint(x1, (x1 + x2) // 2)
ax.text(x1, y1, caption, size=11, verticalalignment='top',
color='w', backgroundcolor="none",
bbox={'facecolor': color, 'alpha': 0.5,
Expand Down

0 comments on commit fb76624

Please sign in to comment.