OlafenwaMoses / ImageAIDocumentation

Official English Documentation of ImageAI
MIT License
23 stars 30 forks source link

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

Open iamyash7 opened 1 year ago

iamyash7 commented 1 year ago

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?