Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
7310b0f8
Commit
7310b0f8
authored
Nov 25, 2020
by
Jonathan Huang
Committed by
TF Object Detection Team
Nov 25, 2020
Browse files
Plumb mask alpha through visualize_boxes_and_labels_on_image_array function.
PiperOrigin-RevId: 344310944
parent
577867c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
research/object_detection/utils/visualization_utils.py
research/object_detection/utils/visualization_utils.py
+4
-1
No files found.
research/object_detection/utils/visualization_utils.py
View file @
7310b0f8
...
@@ -1112,6 +1112,7 @@ def visualize_boxes_and_labels_on_image_array(
...
@@ -1112,6 +1112,7 @@ def visualize_boxes_and_labels_on_image_array(
min_score_thresh
=
.
5
,
min_score_thresh
=
.
5
,
agnostic_mode
=
False
,
agnostic_mode
=
False
,
line_thickness
=
4
,
line_thickness
=
4
,
mask_alpha
=
.
4
,
groundtruth_box_visualization_color
=
'black'
,
groundtruth_box_visualization_color
=
'black'
,
skip_boxes
=
False
,
skip_boxes
=
False
,
skip_scores
=
False
,
skip_scores
=
False
,
...
@@ -1157,6 +1158,7 @@ def visualize_boxes_and_labels_on_image_array(
...
@@ -1157,6 +1158,7 @@ def visualize_boxes_and_labels_on_image_array(
class-agnostic mode or not. This mode will display scores but ignore
class-agnostic mode or not. This mode will display scores but ignore
classes.
classes.
line_thickness: integer (default: 4) controlling line width of the boxes.
line_thickness: integer (default: 4) controlling line width of the boxes.
mask_alpha: transparency value between 0 and 1 (default: 0.4).
groundtruth_box_visualization_color: box color for visualizing groundtruth
groundtruth_box_visualization_color: box color for visualizing groundtruth
boxes
boxes
skip_boxes: whether to skip the drawing of bounding boxes.
skip_boxes: whether to skip the drawing of bounding boxes.
...
@@ -1232,7 +1234,8 @@ def visualize_boxes_and_labels_on_image_array(
...
@@ -1232,7 +1234,8 @@ def visualize_boxes_and_labels_on_image_array(
draw_mask_on_image_array
(
draw_mask_on_image_array
(
image
,
image
,
box_to_instance_masks_map
[
box
],
box_to_instance_masks_map
[
box
],
color
=
color
color
=
color
,
alpha
=
mask_alpha
)
)
if
instance_boundaries
is
not
None
:
if
instance_boundaries
is
not
None
:
draw_mask_on_image_array
(
draw_mask_on_image_array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment