Open IFV opened 4 years ago
Hi, I had the same exact error. I was using the following versions:
python 3.7.4 tensorflow 2.3.0 keras 2.4.3
Solved it by downgrading tensorflow to 1.13.1 and keras to 2.2.4. However, that causes issues with other packages I have installed (eg. jrpytensorflow) that need later versions. Hope this helps for now.
Hi!
I am using the example from the official documentation [1]. Here is my script:
from imageai.Detection import ObjectDetection import os
execution_path = os.getcwd()
detector = ObjectDetection() detector.setModelTypeAsYOLOv3() detector.setModelPath( os.path.join(execution_path , "yolo.h5")) detector.loadModel() detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "test.jpg"), output_image_path=os.path.join(execution_path , "test_new.jpg"), minimum_percentage_probability=30)
for eachObject in detections: print(eachObject["name"] , " : ", eachObject["percentage_probability"], " : ", eachObject["box_points"] ) print("--------------------------------")
The error I'm getting is:
Using: python=v3.7.6 tensorflow=v2.2.0 keras=v2.2.4 [1] https://imageai.readthedocs.io/en/latest/index.html