OpenCV3.3 dnn.readNetFromTensorflow()无法加载模块

时间:2017-09-24 04:33:18

标签: opencv3.3

首先,我使用OpenCV3.3和Python3.6。 我用的时候 net=cv2.dnn.readNetFromCaffe('MobileNetSSD.prototxt.txt','MobileNetSSD_deploy.caffemodel')。有效。

问题是当我加载tensorflow模块时,出现错误: 我的代码是

net = cv2.dnn.readNetFromTensorflow('frozen_inference_graph_face.pb')

错误信息是

  Traceback (most recent call last):
      File "F:/real-time-object-detection/real_time_object_detection.py", line 34, in <module>
        net = cv2.dnn.readNetFromTensorflow('frozen_inference_graph_face.pb')
    cv2.error: D:\Build\OpenCV\opencv-3.3.0\modules\dnn\src\tensorflow\tf_importer.cpp:883: error: (-2) Unknown layer type Cast in op ToFloat in function cv::dnn::experimental_dnn_v1::`anonymous-namespace'::TFImporter::populateNet

请帮助我,非常感谢你!

0 个答案:

没有答案