Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX conversion #200

Open
Fritskee opened this issue Sep 27, 2022 · 4 comments
Open

ONNX conversion #200

Fritskee opened this issue Sep 27, 2022 · 4 comments

Comments

@Fritskee
Copy link

Has anybody successfully converted the MTCNN to ONNX?
Keep getting the error:

~\Anaconda3\envs\facenet\lib\site-packages\facenet_pytorch\models\utils\detect_face.py in detect_face(imgs, minsize, pnet, rnet, onet, threshold, factor, device)
     81         offset += boxes_scale.shape[0]
     82 
---> 83     boxes = torch.cat(boxes, dim=0)
     84     image_inds = torch.cat(image_inds, dim=0)
     85 

RuntimeError: torch.cat(): expected a non-empty list of Tensors
@beybars1
Copy link

Any updates?

@chaitanyakkumar
Copy link

Please update if it has been solved

@beybars1
Copy link

beybars1 commented Aug 9, 2023

You need to use a real image to convert the model (preferably a face), and this error will be reported if you use the data generated by torch.randn

He is right.

@sceddd
Copy link

sceddd commented Aug 3, 2024

so in case if the model is not good enough to detect a face it will probably throw this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@Fritskee @beybars1 @chaitanyakkumar @sceddd and others