如何解决裁剪和保存 Tensorflow 对象检测 API 中的检测
我使用带有 Mobile-Net 模型的预训练 SSD 来使用 Tensorflow 对象检测 API 执行对象检测。 viz_utils.visualize_boxes_and_labels_on_image_array 的代码如下:
viz_utils.visualize_boxes_and_labels_on_image_array(
image_np_with_detections,detections['detection_boxes'][0].numpy(),(detections['detection_classes'][0].numpy() + label_id_offset).astype(int),detections['detection_scores'][0].numpy(),category_index,use_normalized_coordinates=True,max_boxes_to_draw=200,min_score_thresh=.5,agnostic_mode=False,)
###########
detection_boxes = detections['detection_boxes'][0].numpy()
detection_classes = detections['detection_classes'][0].numpy().astype(int) + label_id_offset
detection_scores = detections['detection_scores'][0].numpy()
# Scale to pixel co-ordinates
height,width = image_np.shape[:2]
detection_boxes[:,(0,2)] *= height
detection_boxes[:,(1,3)] *= width
我的问题是如何裁剪检测并将它们存储在不同的文件夹中。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。