ValueError ("Фигуры% s и% s несовместимы"% (self, other)) - PullRequest
0 голосов
/ 27 мая 2020

Я обучил модель йоло с помощью google colab и keras. Я использовал один класс для прогнозирования и пытался использовать эту обученную модель для прогнозирования через модуль imageai на моем локальном компьютере, однако код выдает следующую ошибку:

ValueError("Shapes %s and %s are incompatible" % (self, other))

Мой код:

from imageai.Detection import ObjectDetection

detector = ObjectDetection()

detector.setModelTypeAsYOLOv3()

detector.setModelPath(r"C:\Users\Lenovo\Downloads\trained_weights_final.h5")

detector.loadModel()

detections = detector.detectObjectsFromImage(input_image=r"9_jpg.rf.709205027f4aa5ad2c8793ed387df510.jpg", output_image_path=r"C:\Users\Lenovo\Desktop\detected_image.jpg", minimum_percentage_probability=30)

Кто-нибудь может мне помочь?

...