Closed prince6show closed 5 years ago
Hi @prince6show ! 'pooling2_output' exists in saved (trained) model. load_net() is in start_test.py script, which assumes you already trained CNNs for real/fake classification. This repo doesn't contain pretrained models, so before using start_test, you firstly need to train some model(s).
@prince6show did you use alexnet architecture from utils/net_generator.py for your CNN? If so, 'pooling2_output' should exist in your sym, and it corresponds to the output of the 3rd pooling, right before the fully connected layers: https://github.com/mnikitin/Learn-Convolutional-Neural-Network-for-Face-Anti-Spoofing/blob/master/utils/net_generator.py#L25 . In case you used your own architecture, or changed layer names, you need accordingly change the value of net_output.
If it doesn't help, could you please provide the list of all symbol names you have in sym.get_internals() ?
Scale: 1.0; Fold: 1. Preparing CNN features ...
[12:04:41] c:\jenkins\workspace\mxnet\mxnet\src\operator\nn\cudnn./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
Scale: 1.0; Fold: 1. Training and estimation SVM with C=0.000977 ...
Traceback (most recent call last):
File "F:/DeepLearning/FaceAntiSpoofing/LearnConvolutionalNeuralNetworkforFaceAnti-Spoofing/start_test.py", line 143, in
Process finished with exit code 1
Scale: 1.0; Fold: 1. Preparing CNN features ... [12:04:41] c:\jenkins\workspace\mxnet\mxnet\src\operator\nn\cudnn./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable) Scale: 1.0; Fold: 1. Training and estimation SVM with C=0.000977 ... Traceback (most recent call last): File "F:/DeepLearning/FaceAntiSpoofing/LearnConvolutionalNeuralNetworkforFaceAnti-Spoofing/start_test.py", line 143, in test_net_casia('data/casia/CA_scales', 'experiments/casia/CA_scales', 5, svm_c) File "F:/DeepLearning/FaceAntiSpoofing/LearnConvolutionalNeuralNetworkforFaceAnti-Spoofing/start_test.py", line 131, in test_net_casia cur_eer_dev, thr = estimate_eer(data_dev, labels_dev, model) File "F:/DeepLearning/FaceAntiSpoofing/LearnConvolutionalNeuralNetworkforFaceAnti-Spoofing/start_test.py", line 71, in estimate_eer eer, thr = get_eer_stats(scores, labels) File "F:\DeepLearning\FaceAntiSpoofing\LearnConvolutionalNeuralNetworkforFaceAnti-Spoofing\utils\statistics.py", line 37, in get_eer_stats eer = (min_dist_stats[0] + min_dist_stats[1]) / 2.0 IndexError: list index out of range
Process finished with exit code 1
Such error could arise only in case your 'scores' list is empty, which means there are still some problems with scores computation.
@mnikitin Sometimes there are all identical value in the 'scores' list .
@prince6show How did you convert the video into the corresponding frame picture? After I converted, there were always uncaligned pictures clipped.
net_output = 'pooling2_output' Why ???why not fc2
@prince6show hello! I've already answered this question here: https://github.com/mnikitin/Learn-Convolutional-Neural-Network-for-Face-Anti-Spoofing/issues/10#issuecomment-474015526
ValueError: Cannot find output that matches name "pooling2_output" net_output = 'pooling2_output' in line 20 Where the pooling2_output exists in?