答案 0 :(得分:1)
第190行:在/util/visualization.py
内部:
for display_str in display_str_list[::-1]:
text_width, text_height = font.getsize(display_str)
margin = np.ceil(0.05 * text_height)
print("\n"+display_str+"\n")
#draw.rectangle(
#[(left, text_bottom - text_height - 2 * margin), (left + text_width,
# text_bottom)],
#fill=color)
#draw.text(
# (left + margin, text_bottom - text_height - margin),
# display_str,
# fill='black',
# font=font)
text_bottom -= text_height - 2 * margin
您可以注释绘制文本的线条和周围的矩形。
答案 1 :(得分:0)
vis_util.visualize_boxes_and_labels_on_image_array(
image_np,
output_dict['detection_boxes'],
output_dict['detection_classes'],
output_dict['detection_scores'],
category_index,
max_boxes_to_draw=10,
min_score_thresh=.6,
instance_masks=output_dict.get('detection_masks'),
use_normalized_coordinates=True,
**skip_scores=True**,#removes scores
**skip_labels=True**,#removes lables
line_thickness=5)