custom=detector.CustomObjects(person=True)
detections = detector.detectCustomObjectsFromImage(
custom_objects=custom,
input_image=file_path,
output_image_path=o_path
)
As per example of documentation, i did this but it gives AttributeError.
Then i tried following:
from imageai.Detection.Custom import CustomObjectDetection
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath(os.path.join(execution_path, "yolov3.pt")) # Update the model file extension if necessary
detector.loadModel() # error on this line
custom = detector.CustomObjects(person=True)
But then it gave TypeError on loadModel() line.:
TypeError: expected str, bytes or os.PathLike object, not NoneType
Any solutions?
custom=detector.CustomObjects(person=True) detections = detector.detectCustomObjectsFromImage( custom_objects=custom, input_image=file_path, output_image_path=o_path ) As per example of documentation, i did this but it gives AttributeError. Then i tried following: from imageai.Detection.Custom import CustomObjectDetection detector = CustomObjectDetection() detector.setModelTypeAsYOLOv3() detector.setModelPath(os.path.join(execution_path, "yolov3.pt")) # Update the model file extension if necessary detector.loadModel() # error on this line custom = detector.CustomObjects(person=True) But then it gave TypeError on loadModel() line.: TypeError: expected str, bytes or os.PathLike object, not NoneType Any solutions?