insightface icon indicating copy to clipboard operation
insightface copied to clipboard

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

Open faisalshahbaz opened this issue 4 years ago • 5 comments

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'

faisalshahbaz avatar Jun 04 '21 11:06 faisalshahbaz

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.

lz381 avatar Jun 06 '21 17:06 lz381

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.

devinhee avatar Jun 10 '21 08:06 devinhee

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?

gangeqian avatar Jun 18 '21 06:06 gangeqian

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

WYao02 avatar Aug 04 '22 12:08 WYao02

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)

kiashann avatar Feb 29 '24 13:02 kiashann