I have the following lines of code for vehicle recognition:
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)
In model_path I have yolov3 model, in input_path I have some jpg images with cars, people, bikes, etc... and output_path is an empty folder I want to fill it with the car extracted image that has the best accuracy in every image from input_path. How can I do that? I think that the last line is the problem.