尝试在 OpenCV 的 dnn_DetectionModel 中加载配置和权重文件,但显示此错误。使用 OpenCV 升级到最新版本,pip install --upgrade opencv-python
但仍然显示错误。这些文件都在同一个文件夹中
import cv2 as cv
config_file= 'ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt'
frozen_model= 'frozen_inference_graph.pb'
model= cv.dnn_DetectionModel(frozen_model, config_file)
class 'cv2.dnn_DetectionModel'> returned a result with an error set