TreB1eN / InsightFace_Pytorch

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

No such file or directory: 'data/facebank/facebank.pth' #24

Open YueXiNPU opened 5 years ago

YueXiNPU commented 5 years ago

When I try to run the 3.3, python infer_on_video.py. I encounter the above problem. Anyone can help me out?

ruiming46zrm commented 5 years ago

in the "face_verify.py" , you firstly should make the arg.update == true , then run this py , in the facebank you will see facebank.pth , after then , reset the arg.update == false , go on this code

TreB1eN commented 5 years ago

also you can check on this

YueXiNPU commented 5 years ago

Thank you very much. I have solved it. Thanks

Malathi15 commented 5 years ago

@ruiming46zrm I got the same error while running "face_verify.py". I tried as you said still got the same error. can you help me to solve this!

aayush1205 commented 4 years ago

This issue still exists. Can you please help me solve this. Moreover, @ruiming46zrm can you please elaborate on the method.

youthM commented 4 years ago

Thank you very much. I have solved it. Thanks

how do you solve it? @YueXiNPU

yiming-lzx commented 4 years ago

in the "face_verify.py" , you firstly should make the arg.update == true , then run this py , in the facebank you will see facebank.pth , after then , reset the arg.update == false , go on this code

how do you solve it?

LiYangSir commented 4 years ago

add dafault=True

16 parser.add_argument("-u", "--update", help="whether perform update the facebank",action="store_true",default=True)

Jinzifeng commented 4 years ago

Thank you very much. I have solved it. Thanks

could you share how do you solve this problem? I tried the method but it doesn't work, and one new problem occurs like this: File "/media/luminous/6400d1cb-edcd-4607-817b-1b69856b6144/jzf/InsightFace_Pytorch-master/mtcnn.py", line 92, in detect_faces keep = nms(bounding_boxes[:, 0:5], nms_thresholds[0]) TypeError: 'NoneType' object is not subscriptable

Jinzifeng commented 4 years ago

@YueXiNPU @ruiming46zrm

bixiwen commented 4 years ago

utils.py:

65 add str(): torch.save(embeddings, str(conf.facebank_path/'facebank.pth'))

then: python face_verify.py --update

WW2401 commented 3 years ago

@bixiwen Hi, when I met the error No such file or directory: 'data/facebank/facebank.pth', I ran python face_verify.py --update, I met another problem as follows. Do you know the reason? ir_se_50 model generated learner loaded Traceback (most recent call last): File "face_verify.py", line 36, in targets, names = prepare_facebank(conf, learner.model, mtcnn, tta = args.tta) File "/home/InsightFace_Pytorch/utils.py", line 49, in prepare_facebank img = mtcnn.align(img) File "/home/InsightFacePytorch/mtcnn.py", line 23, in align , landmarks = self.detect_faces(img) File "/home/InsightFace_Pytorch/mtcnn.py", line 85, in detect_faces boxes = run_first_stage(image, self.pnet, scale=s, threshold=thresholds[0]) File "/home/InsightFace_Pytorch/mtcnn_pytorch/src/first_stage.py", line 35, in run_first_stage output = net(img) File "/home/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, kwargs) File "/home/InsightFace_Pytorch/mtcnn_pytorch/src/get_nets.py", line 67, in forward x = self.features(x) File "/home/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, *kwargs) File "/home/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward input = module(input) File "/home/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(input, kwargs) File "/home/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward self.padding, self.dilation, self.groups) RuntimeError: CUDNN_STATUS_MAPPING_ERROR

WW2401 commented 3 years ago

Thank you very much. I have solved it. Thanks

Hi, how do you solve it?