OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.48k stars 2.18k forks source link

Can't find this function,detectCustomObjectsFromImage. #814

Closed Haicaji closed 1 year ago

Haicaji commented 1 year ago

When I tried Custom Object Detection,I encountered an error report: AttributeError: 'ObjectDetection' object has no attribute 'detectCustomObjectsFromImage' In this line of code: detections = detector.detectCustomObjectsFromImage(custom_objects=custom_objects, input_image=os.path.join(execution_path , "image3.jpg"), output_image_path=os.path.join(execution_path , "image3custom.jpg"), minimum_percentage_probability=30) I can't find this function,detectCustomObjectsFromImage.

What's more,I found a mistake in custom_objects = detector.CustomObjects(car=True, motorcycle=True). 'motorcycle' should be 'motorbike'.

Could you give me a hand? Thanks a lot.

toolhater commented 1 year ago

Try DetectCustomObjectsFromImage starting with a capital D

Haicaji commented 1 year ago

I looked at the code of the detectObjectsFromImage function and found that it actually has the function of detectingCustomObjects FromImage. So we should change detectingCustomObjects FromImage to detectObjectsFromImage in the original code to run normally