PS C:\Users\hyxx\Downloads\dataset> python src\validate_on_lfw.py lfw/lfw_mtcnnpy_160 models\facenet\20170512-110547\2
0180408-102900
2019-04-10 17:31:28.602844: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU suppo
rts instructions that this TensorFlow binary was not compiled to use: AVX2
Skipped 6000 image pairs
Model directory: models\facenet\20170512-110547\20180408-102900
Metagraph file: model-20180408-102900.meta
Checkpoint file: model-20180408-102900.ckpt-90
len(paths): lfw/lfw_mtcnnpy_160
Runnning forward pass on LFW images
Traceback (most recent call last):
File “src\validate_on_lfw.py”, line 122, in
main(parse_arguments(sys.argv[1:]))
File “src\validate_on_lfw.py”, line 92, in main
actual_issame, nrof_folds=args.lfw_nrof_folds)
File “C:\Users\hyxx\Downloads\dataset\src\lfw.py”, line 40, in evaluate
np.asarray(actual_issame), nrof_folds=nrof_folds)
File “C:\Users\hyxx\Downloads\dataset\src\facenet.py”, line 420, in calculate_roc
for fold_idx, (train_set, test_set) in enumerate(k_fold.split(indices)):
File “C:\Users\hyxx\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\model_selection_split.py”, line
330, in split
n_samples))
ValueError: Cannot have number of splits n_splits=10 greater than the number of samples: 0.
Skipped 6000 image pairs
遇到该问题的解决办法:在lfw.py的文件中修改如下,将文件lfw/lfw_mtcnnpy_160 下的文件名称 和path0和path1得出的路径文件一样即可,本人将file_ext之前的‘0.’改成‘.’解决。
也就是和照片名字一样了。