intention:
i have to test my own dataset to check both recognition and verification.
what i did:
i downloaded pre-trained lfw model and i made my own dataset as same folder structure. i had 3 folders of each 3 images(totally 9.) . After running validation_on_lfw.py file. i got the following issue.
bug:
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:910] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 970
major: 5 minor: 2 memoryClockRate (GHz) 1.2405
pciBusID 0000:01:00.0
Total memory: 3.94GiB
Free memory: 3.55GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0)
Skipped 6000 image pairs
Model directory: /home/hubino/Videos/Tensorflow/facenet/models/20170512-110547
Metagraph file: model-20170512-110547.meta
Checkpoint file: model-20170512-110547.ckpt-250000
Runnning forward pass on LFW images
Traceback (most recent call last):
File "src/validate_on_lfw.py", line 113, in
main(parse_arguments(sys.argv[1:]))
File "src/validate_on_lfw.py", line 83, in main
actual_issame, nrof_folds=args.lfw_nrof_folds)
File "/home/hubino/Videos/Tensorflow/facenet/src/lfw.py", line 40, in evaluate
np.asarray(actual_issame), nrof_folds=nrof_folds)
File "/home/hubino/Videos/Tensorflow/facenet/src/facenet.py", line 420, in calculate_roc
for fold_idx, (train_set, test_set) in enumerate(k_fold.split(indices)):
File "/usr/local/lib/python2.7/dist-packages/sklearn/model_selection/_split.py", line 320, in split
n_samples))
ValueError: Cannot have number of splits n_splits=10 greater than the number of samples: 0.
I had the same issue, I'm not 100% sure if this is a solution but this is what worked for me. I simply realigned the LFW dir and the error disappeared, I hope this is of any help to you.
i meet the same issue,
have you solved the issue?
can you share your method?
thanks
I've met the same issue and fixed it.
so, error is because line: "Skipped 6000 image pairs"
your ~/path/pairs.txt in wrong format
@nickyua thanks for your reply !
@nickyua how did you fix the formatting of the pairs.txt file?
@MaartenBloemen i just try your method
but it not worked for me,the issue arised again when epoch 40
now i will try to check the txt file
hava you soluted the issue?
@nickyua Can you explain it more clearly?thanks!
@luckyboysmith I haven't had the issue since I realigned the LFW dataset, make sure the images are 160X160 pixels. That's what was wrong with my dataset I aligned it making the pictures 182X182 pixels. Also as nickyua said when you see "Skipping 6000 image pairs" it wont work.
@MaartenBloemen how to realigned the LFW dir,thank you
@autsljk run the alignment script on de unaligned dir.
I simply created own output directory for aligned images: ~/datasets/lfw_aligned_160
and validated with: python validate_on_lfw.py ~/datasets/lfw_aligned_160 ~/models/20170512-110547
It could be because of png/jpg. If validate_on_lfw.py expect png and your dataset is jpg, it will fail to load image and cause the error.
Adding parameter "--lfw_file_ext jpg" can solve the issue.
when I run the Facenet code for LFW test as " Validate on LFW step by step"
i got the following issue: Skipped 45 image pairs
How can I fix this problem
Most helpful comment
I had the same issue, I'm not 100% sure if this is a solution but this is what worked for me. I simply realigned the LFW dir and the error disappeared, I hope this is of any help to you.