我正在使用 imageAI 库研究植物叶子检测模型。当我创建模型的实例时,会发生以下错误。我无法理解错误。这是我的代码:
from imageai.Detection import ObjectDetection
detector = ObjectDetection()
错误:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-3bc804fbfef2> in <module>()
1 from imageai.Detection import ObjectDetection
----> 2 detector = ObjectDetection()
/usr/local/lib/python3.6/dist-packages/imageai/Detection/__init__.py in __init__(self)
86 self.__yolo_model_image_size = (416, 416)
87 self.__yolo_boxes, self.__yolo_scores, self.__yolo_classes = "", "", ""
---> 88 self.sess = K.get_session()
89
90 # Unique instance variables for TinyYOLOv3.
AttributeError: module 'keras.backend' has no attribute 'get_session'