RangiLyu / nanodet

NanoDet-Plus⚡Super fast and lightweight anchor-free object detection model. 🔥Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphone🔥
Apache License 2.0
5.68k stars 1.03k forks source link

error: when i use cv2.dnn.readNetFromONNX() to read the onnx model transformed from export_onn.py #268

Open zhanght021 opened 3 years ago

zhanght021 commented 3 years ago

我将提供的模型nanodet_m.ckpt用export_onnx.py转化成onnx模型,并且经过onnxsimplifier,后面在python中用cv2.readNetFromONNX()读取网络的时候出现 Error: Unspecified error (> (expected: 'shape.depth() == CV_32S') where 'shapes.depth()' is 5 (CV_32FC1) must be equal to 'CV_32S' is 4 (CV_32SC1) in void_cdecl cv::dnn::dnn4_v20200609::ONNXImporter::populateNet(class cv::dnn::dnn4_v20200609::Net)

zhanght021 commented 3 years ago

请问这个是哪里出问题了吗

czq454507269 commented 3 years ago

请问这个是哪里出问题了吗

同学请问是如何解决的?

zhanght021 commented 3 years ago

我把opencv升级到了最新版本大概是4.5之后的版本,就好了@czq454507269

imneonizer commented 3 years ago

Try this https://github.com/hpc203/nanodet-opncv-dnn-cpp-python