Closed srikanthgr1 closed 6 years ago
The problem is that the "minimum_percentage_probability" you stated (65) is too high. Try and keep it at 50. See below the result I obtained using the same image and a "minimum_percentage_probability" of 50.
Thank you very much. I am learning all these concepts recently. Sorry abt the wrong questions.
It's okay, and you are most welcome.
I tried running some tests Here is what i found I am not sure whether this is an issue to be report or not but nevertheless I am reporting it assuming this might help you
The below code was used
`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() custom_objects = detector.CustomObjects(person=True, car=True) detections = detector.detectCustomObjectsFromImage(input_image=os.path.join(execution_path , "img1.png"), output_image_path=os.path.join(execution_path , "image1_new.png"), custom_objects=custom_objects, minimum_percentage_probability=65)
for eachObject in detections: print(eachObject["name"] + " : " + eachObject["percentage_probability"] ) print("--------------------------------")`
The output was not as expected. This may be problem with resnet also.