【发布时间】:2021-09-22 06:43:58
【问题描述】:
我有以下几行用于车辆识别的代码:
import glob
import imageio
import keras
import tensorflow
from imageai.Detection import ObjectDetection
detector = ObjectDetection()
model_path = 'C:/Users/yolo/models/yolo.h5'
input_path = 'C:/Users/yolo/input'
output_path = 'C:/Users/yolo/output'
detector.setModelTypeAsYOLOv3()
detector.setModelPath(model_path)
detector.loadModel()
detection = detector.detectObjectsFromImage(input_image = input_path, input_type = "stream", output_image_path = output_path)
在model_path 我有yolov3 模型,在input_path 我有一些带有汽车、人、自行车等的jpg 图像...而output_path 是一个空文件夹,我想用提取的汽车图像填充它在来自input_path 的每张图像中具有最佳精度。我怎样才能做到这一点?我认为最后一行是问题所在。
【问题讨论】:
标签: python deep-learning computer-vision object-detection