hpc203 / yolov5-face-landmarks-opencv

yolov5检测人脸和关键点,只依赖opencv库就可以运行,程序包含C++和Python两个版本的
62 stars 15 forks source link

unable to convert to onnx #4

Open gouravvemula0 opened 3 years ago

gouravvemula0 commented 3 years ago

Traceback (most recent call last): File "/media/githubprj/face/yolov5-face/main_export_onnx.py", line 110, in onnxmodel,img = test_export(opt) File "/media/githubprj/face/yolov5-face/main_export_onnx.py", line 69, in test_export x = m(x) # run result = self.forward(*input, **kwargs) File "/media/githubprj/face/yolov5-face/models/common.py", line 227, in forward return torch.cat(x, self.d) TypeError: expected Tensor as element 1 in argument 0, but got NoneType

I got the error while converting to onnx of the pretrained model yolov5n.pt

qingqinghu1026 commented 3 years ago

碰到了同样的问题,有解决了的吗

hpc203 commented 3 years ago

https://github.com/hpc203/yolov5-face-landmarks-opencv-v2 使用v2版本里的main_export_onnx.py