Question: How was the scrfd onnx model generated? #189

Open
opened 2022-01-05 16:34:48 +01:00 by lschaupp · 1 comment
lschaupp commented 2022-01-05 16:34:48 +01:00 (Migrated from github.com)

I tried to generate my own scrfd onnx model which succeeded by following the documentation in the insightful github repo.
However once I have generated the new model (currently just trying to replicate the scrfd_10g_bnkps.onnx model, I am getting the following error while using it with simswap:

x1 = points[:, 0] - distance[:, 0]
ValueError: operands could not be broadcast together with shapes (12800,) (1,4) 

during onnx export:

   single_stage.py in-onnx-export 
   <class 'tuple'>
   torch.Size([1, 12800, 1])
   torch.Size([1, 3200, 1])
   torch.Size([1, 800, 1])
   torch.Size([1, 12800, 4])
   torch.Size([1, 3200, 4])
   torch.Size([1, 800, 4])
   torch.Size([1, 12800, 10])
   torch.Size([1, 3200, 10])
   torch.Size([1, 800, 10])

I have used the following model configurations:
scrfd_10g with keypoints model, used the confuguration file below from their tool script:

 python tools/scrfd2onnx.py ./insightface/detection/scrfd/configs/scrfd/scrfd_10g_bnkps.py ./model_kp.pth --input-img test.jpg

Can anyone help?

I tried to generate my own scrfd onnx model which succeeded by following the documentation in the insightful github repo. However once I have generated the new model (currently just trying to replicate the scrfd_10g_bnkps.onnx model, I am getting the following error while using it with simswap: x1 = points[:, 0] - distance[:, 0] ValueError: operands could not be broadcast together with shapes (12800,) (1,4) during onnx export: ``` single_stage.py in-onnx-export <class 'tuple'> torch.Size([1, 12800, 1]) torch.Size([1, 3200, 1]) torch.Size([1, 800, 1]) torch.Size([1, 12800, 4]) torch.Size([1, 3200, 4]) torch.Size([1, 800, 4]) torch.Size([1, 12800, 10]) torch.Size([1, 3200, 10]) torch.Size([1, 800, 10]) ``` I have used the following model configurations: scrfd_10g with keypoints model, used the confuguration file below from their tool script: python tools/scrfd2onnx.py ./insightface/detection/scrfd/configs/scrfd/scrfd_10g_bnkps.py ./model_kp.pth --input-img test.jpg Can anyone help?
nadongjin commented 2022-03-23 16:43:29 +01:00 (Migrated from github.com)

same problem as me
did you solve it? : )

same problem as me did you solve it? : )
Sign in to join this conversation.