deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.49k stars 5.43k forks source link

AttributeError: 'NoneType' object has no attribute 'prepare' #1565

Open faisalshahbaz opened 3 years ago

faisalshahbaz commented 3 years ago

Hello,

I got an error in insightface package of retinaFace.

import insightface
model = insightface.model_zoo.get_model('retinaface_r50_v1')
model.prepare(ctx_id=-1, nms=0.4)

error:

AttributeError: 'NoneType' object has no attribute 'prepare'

lz381 commented 3 years ago

I had the same problem - get_model doesn't seem to be throwing the error when downloading the model.

I fixed it by manually downloading the models and copying them over to the specified folder as detailed here.

devinhee commented 3 years ago

I had the same problem - get_model doesn't seem to be throwing the error when downloading the model.

I fixed it by manually downloading the models and copying them over to the specified folder as detailed here.

I got the same error, and I downloaded the model files and put them into the folder, but it did't fix my problem. Anyway thanks.

gangeqian commented 3 years ago

download our antelope model release by command: insightface-cli model.download antelope but not include retinaface_r50_v1.onnx I could get the mxnet model of retinaface_r50_v1-0000.params and retinaface_r50_v1-symbol.json, but mxnet2onnx get error. where can I get the onnx models?

WYao02 commented 2 years ago

download the models put it into ~/.insightface/model then degrade insightface==0.1.5

kiashann commented 8 months ago

Hi everyone. How did you use face recognition models for comparing the faces of two people after this code? What is the nms argument?

import insightface model = insightface.model_zoo.get_model('retinaface_r50_v1') model.prepare(ctx_id=-1, nms=0.4)