ImageAIDocumentation icon indicating copy to clipboard operation
ImageAIDocumentation copied to clipboard

AttributeError: 'ObjectDetection' object has no attribute 'detectCustomObjectsFromImage'

Open iamyash7 opened this issue 2 years ago • 0 comments

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?

iamyash7 avatar Jun 02 '23 12:06 iamyash7