MeteorsHub / HW_face

A small face recognition task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieve via cosine distance Use classifier_cos.py had error

molyswu opened this issue · comments

Hi ,MeteorKepler
Using Retrieve via cosine distance Use classifier_cos.py had error:
I try to : python classifier_cos.py dataset/HW_1_Face/mtcnn_160/train dataset/HW_1_Face/mtcnn_160/test saved_models/model_path_it_should_be/20180927-133255/model-20180927-133255.ckpt-100 --batch_size=100 --image_size=160
Model directory: saved_models/model_path_it_should_be/20180927-133255/model-20180927-133255.ckpt-100
Traceback (most recent call last):
File "classifier_cos.py", line 130, in
main(parse_arguments(sys.argv[1:]))
File "classifier_cos.py", line 36, in main
facenet.load_model(args.model)
File "/home/yjzx/Downloads/wts/face/HW_face/facenet.py", line 404, in load_model
meta_file, ckpt_file = get_model_filenames(model_exp)
File "/home/yjzx/Downloads/wts/face/HW_face/facenet.py", line 424, in get_model_filenames
files = os.listdir(model_dir)
OSError: [Errno 2] No such file or directory: 'saved_models/model_path_it_should_be/20180927-133255/model-20180927-133255.ckpt-100'

Thank you for your help !

Model directory: saved_models/model_path_it_should_be/20180927-133255/model-20180927-133255.ckpt-100
Traceback (most recent call last):
File "classifier_cos.py", line 130, in
main(parse_arguments(sys.argv[1:]))
File "classifier_cos.py", line 36, in main
facenet.load_model(args.model)
File "/home/yjzx/Downloads/wts/face/HW_face/facenet.py", line 404, in load_model
meta_file, ckpt_file = get_model_filenames(model_exp)
File "/home/yjzx/Downloads/wts/face/HW_face/facenet.py", line 424, in get_model_filenames
files = os.listdir(model_dir)
OSError: [Errno 2] No such file or directory: 'saved_models/model_path_it_should_be/20180927-133255/model-20180927-133255.ckpt-100'

As the readme instructs, the 'model_path_it_should_be' need to be set to the real directory in your workspace:
Remember to change the 3rd argument to trained model path of last step or the one you have downloaded.