yolov5-face
yolov5-face copied to clipboard
您好,大佬,如何把人脸检测的模型转成torchscript模型啊
您好,大佬,如何把人脸检测的模型转成torchscript模型啊 @djmmoss @muhammad-tayyab @hylrh2008 @bobo0810 @wjtan99
您好,大佬,如何把人脸检测的模型转成torchscript模型啊 @djmmoss @muhammad-tayyab @hylrh2008 @bobo0810 @wjtan99
参考https://github.com/bobo0810/Classification/blob/main/Models/Backend/torchscript.py
@好的,大佬,多谢啊,我试一下啊 ,大佬我好像有你的微信。@ @bobo0810
Traceback (most recent call last):
File "D:/python_code/yolov5-face-master/detect_face_jit.py", line 152, in
Traceback of TorchScript, original code (most recent call last):
D:\python_code\yolov5-face-master\models\yolo.py(88): forward
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\nn\modules\module.py(709): _slow_forward
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\nn\modules\module.py(725): _call_impl
D:\python_code\yolov5-face-master\models\yolo.py(196): forward_once
D:\python_code\yolov5-face-master\models\yolo.py(180): forward
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\nn\modules\module.py(709): _slow_forward
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\nn\modules\module.py(725): _call_impl
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\jit_trace.py(934): trace_module
E:\python_code\pytorch-image-classification\venv\lib\site-packages\torch\jit_trace.py(733): trace
D:/python_code/yolov5-face-master/export2.py(89):
转换成功,但是推理的时候会报错,这个怎么解决啊,大佬@ @bobo0810
尝试debug排查原因吧
好的,多谢大佬 @bobo0810
The model will generate face feature points (16 size vector) in addition to bounding box and non-max-suppression is a bit different than standard Yolov5. So if you plan to use torchscript model in another app, you need to add that functionality too, otherwise you will not be able to get good quality detections
Thank you for your reply. I understand. @muhammad-tayyab