Answer the question
In order to leave comments, you need to log in
Bugs with ImageAI. What to do?
Hello.
Wanted to experiment with ImageAI.
According to Gosha Dudar's guide: https://youtu.be/Uj4O2_dwRiA?t=848
I
wrote a small script for recognizing objects in a photo.
Here is the script:
import os
from imageai.Detection import ObjectDetection
exec_path = os.getcwd()
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath(os.path.join(
exec_path, "resnet50_coco_best_v2.1.0")
)
detector.loadModel()
list = detector.detectObjectsFromImage(
input_image=os.path.join(exec_path, "objects.jpg"),
output_image_path=os.path.join(exec_path, "new_objects.jpg")
)
2021-07-16 09:54:59.334907: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-07-16 09:54:59.335257: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "C:/Users/Дом/PycharmProjects/openobj/venv/main.py", line 3, in <module>
from imageai.Detection import ObjectDetection
File "C:\Users\Дом\PycharmProjects\openobj\venv\lib\site-packages\imageai\Detection\__init__.py", line 17, in <module>
from imageai.Detection.YOLO.utils import letterbox_image, yolo_eval, preprocess_input, retrieve_yolo_detections, draw_boxes
File "C:\Users\Дом\PycharmProjects\openobj\venv\lib\site-packages\imageai\Detection\YOLO\utils.py", line 2, in <module>
from keras import backend as K
File "C:\Users\Дом\PycharmProjects\openobj\venv\lib\site-packages\keras\__init__.py", line 20, in <module>
from . import initializers
File "C:\Users\Дом\PycharmProjects\openobj\venv\lib\site-packages\keras\initializers\__init__.py", line 124, in <module>
populate_deserializable_objects()
File "C:\Users\Дом\PycharmProjects\openobj\venv\lib\site-packages\keras\initializers\__init__.py", line 82, in populate_deserializable_objects
generic_utils.populate_dict_with_module_objects(
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
Process finished with exit code 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question