TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.74k stars 423 forks source link

Using Pretrained Model on Non-GPU Devices #102

Closed aayush1205 closed 4 years ago

aayush1205 commented 5 years ago

I have been trying to use the pre-trained model on a laptop with no GPU. Implies, I can't use CUDA. It raises a flag asking me to set map_location = 'cpu' in torch.load function. There are ample instances of the function. Where and what should be the change I should make?

aayush1205 commented 4 years ago

adding the clause to the load function statement will do the job. Also, declaring use_cuda to false globally worked for me. Closing the issue.

brealisty commented 1 year ago

adding the clause to the load function statement will do the job. Also, declaring use_cuda to false globally worked for me. Closing the issue.

I also met this issue,. pthon: 3.6.0 model: model_mobilefacenet.pth config: use_mobilefacenet = True.

and add code line about map_location='cpu', but get anthor error: "list index out of range". any helps?

brealisty commented 1 year ago

adding the clause to the load function statement will do the job. Also, declaring use_cuda to false globally worked for me. Closing the issue.

I also met this issue,. pthon: 3.6.0 model: model_mobilefacenet.pth config: use_mobilefacenet = True.

and add code line about map_location='cpu', but get anthor error: "list index out of range". any helps?

after debuging, the reason is mtcnn don't detect face on facebank data. eg: mask face, picture rotate 90°.