Imageai: Object Detection with 10 lines of code : I did everything as mentioned, but i get the following error. Value Error: Ensure you specified correct input image, input type, output type and/or output image path the input files are there in the same directory.. what am i missing here? Please find the code below : from imageai.Detection import ObjectDetection import os execution_path = os.getcwd() detector = ObjectDetection() detector.setModelTypeAsRetinaNet() detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.0.1.h5")) detector.loadModel() detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image.jpg"), output_image_path=os.path.join(execution_path , "imagenew.jpg")) for eachObject in detections: print(eachObject["name"] , " : " , eachObject["percentage_probability"] )

Created on 5 Sep 2018  路  3Comments  路  Source: OlafenwaMoses/ImageAI

Most helpful comment

I did and l still get the same error

All 3 comments

Hello, ensure the picture whose path you stated in the detectObjectsFromImage() function is in the same folder a the python file.

I did and l still get the same error

Hi all, pls copy the image in the working folder. It will work for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

palacinka picture palacinka  路  3Comments

Troyhard picture Troyhard  路  3Comments

huangl6 picture huangl6  路  6Comments

aless2003 picture aless2003  路  5Comments

pytesnim picture pytesnim  路  5Comments