Вот ссылка на файлы: configPath, weightPath
import cv2
#img = cv2.imread('/home/pyarena/python/OpenCV/objectDetection/image1.jpg')
cap = cv2.VideoCapture(-1)
cap.set(3, 640)#
cap.set(4, 480)#
classNames = []
classFile = 'D:\Мой проект\Объекты\coco.names'
with open(classFile, 'rt') as f:
classNames = f.read().rstrip('\n').split('\n')
configPath = 'ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt'
weightPath = 'frozen_inference_graph.pb'
net = cv2.dnn_DetectionModel(weightPath, configPath)
net.setInputSize(320, 320)
net.setInputScale(1.0/ 127.5)
net.setInputMean((127.5, 127.5, 127.5))
net.setInputSwapRB(True)
Вот ошибка:
File "", line 21, in <module>
net = cv2.dnn_DetectionModel(weightPath, configPath)
SystemError: <class 'cv2.dnn.DetectionModel'> returned a result with an error set