{"action":"created","issue":{"url":"https://api.github.com/repos/happynear/FaceVerification/issues/11","labels_url":"https://api.github.com/repos/happynear/FaceVerification/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/happynear/FaceVerification/issues/11/comments","events_url":"https://api.github.com/repos/happynear/FaceVerification/issues/11/events","html_url":"https://github.com/happynear/FaceVerification/issues/11","id":116286625,"number":11,"title":"Follow your step，but only get 73% verification correct rate","user":{"login":"Wyyghst","id":13027621,"avatar_url":"https://avatars.githubusercontent.com/u/13027621?v=3","gravatar_id":"","url":"https://api.github.com/users/Wyyghst","html_url":"https://github.com/Wyyghst","followers_url":"https://api.github.com/users/Wyyghst/followers","following_url":"https://api.github.com/users/Wyyghst/following{/other_user}","gists_url":"https://api.github.com/users/Wyyghst/gists{/gist_id}","starred_url":"https://api.github.com/users/Wyyghst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wyyghst/subscriptions","organizations_url":"https://api.github.com/users/Wyyghst/orgs","repos_url":"https://api.github.com/users/Wyyghst/repos","events_url":"https://api.github.com/users/Wyyghst/events{/privacy}","received_events_url":"https://api.github.com/users/Wyyghst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-11T08:11:00Z","updated_at":"2015-11-24T07:35:01Z","closed_at":null,"body":"First, thank you for your contribution.\r\n\r\nI follow your step, used CASIA data and 'mnist_siamese_solver.prototxt', 'CASIA_train_test.prototxt' in 'caffe_proto' folder training CNN without mean file by caffe. After 500,000 iterations, validation set accuracy rate is about 72%. Cnn seems already fitting.\r\n\r\nThen, I write matlab code to extracting features and L2 Classification for LFW dataset. But only get 73% verification correct rate.\r\n\r\nThe matlab code is:\r\n```matlab\r\ndr_lfw_features = [];\r\nfor i= 1:length(fileLines)\r\n    im = imread( fileLines{i} );    \r\n    im = rgb2gray(im);\r\n    im = imresize(im, [100 100]);\r\n    im = single(im);\r\n    im = im /128.0;\r\n    im = im';\r\n    drop5_data = net.forward({im});\r\n    drop5_data = reshape(drop5_data{1}, 1, 320);\r\n    fprintf('iamge is %s, i = %d\\n', fileLines{i}, i);\r\n    dr_lfw_features = [dr_lfw_features; drop5_data];\r\nend\r\n\r\nload('pairlist_lfw.mat');\r\ntest_Intra = pairlist_lfw.IntraPersonPair;\r\ntest_Extra = pairlist_lfw.ExtraPersonPair;\r\ntest_pair = [test_Intra; test_Extra];\r\n\r\nF1_index = test_pair(:,1);\r\nF2_index = test_pair(:,2);\r\n\r\nAllFeature1 = dr_lfw_features(F1_index, :);\r\nAllFeature2 = dr_lfw_features(F2_index, :);\r\n\r\nnum = length(AllFeature1);\r\nF1 = AllFeature1;\r\nF1 = bsxfun(@rdivide, F1, sqrt(sum(F1.^2,2)));\r\nF2 = AllFeature2;\r\nF2 = bsxfun(@rdivide, F2, sqrt(sum(F2.^2,2)));\r\nthresh2 = zeros(num,1);\r\nfor i = 1:num\r\n    thresh2(i) = pdist2( F1(i,:),F2(i,:) );\r\nend;\r\nfigure;\r\nhist(thresh2(1:3000), 500);\r\nfigure;\r\nhist(thresh2(3001:end), 500);\r\n\r\naccuracies = zeros(10,1);\r\nfor i=1:10\r\n    test_idx = [(i-1) * 300 + 1 : i*300, (i-1) * 300 + 3001 : i*300 + 3000];\r\n    train_idx = 1:6000;\r\n    train_idx(test_idx) = [];\r\n    bestc=256;\r\n    same_label = ones(6000,1);\r\n    same_label(3001:6000) = 0;\r\n    cmd = [' -t 0 -h 0'];\r\n    model = svmtrain(same_label(train_idx),thresh2(train_idx),cmd);\r\n    [class, accuracy, deci] = svmpredict(same_label(test_idx),thresh2(test_idx),model);\r\n    accuracies(i) = accuracy(1);\r\nend;\r\nmean(accuracies)\r\ncmd = [' -t 0 -h 0'];\r\nmodel = svmtrain(same_label,thresh2,cmd);\r\n[class, accuracy, deci] = svmpredict(same_label,thresh2,model);\r\n```\r\nBy hist histogram, you can see the same data threshold and different data threshold obviously inseparable.\r\n\r\nI think there are errors in this matlab code, do you have any good suggestions?"},"comment":{"url":"https://api.github.com/repos/happynear/FaceVerification/issues/comments/159183432","html_url":"https://github.com/happynear/FaceVerification/issues/11#issuecomment-159183432","issue_url":"https://api.github.com/repos/happynear/FaceVerification/issues/11","id":159183432,"user":{"login":"Wyyghst","id":13027621,"avatar_url":"https://avatars.githubusercontent.com/u/13027621?v=3","gravatar_id":"","url":"https://api.github.com/users/Wyyghst","html_url":"https://github.com/Wyyghst","followers_url":"https://api.github.com/users/Wyyghst/followers","following_url":"https://api.github.com/users/Wyyghst/following{/other_user}","gists_url":"https://api.github.com/users/Wyyghst/gists{/gist_id}","starred_url":"https://api.github.com/users/Wyyghst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wyyghst/subscriptions","organizations_url":"https://api.github.com/users/Wyyghst/orgs","repos_url":"https://api.github.com/users/Wyyghst/repos","events_url":"https://api.github.com/users/Wyyghst/events{/privacy}","received_events_url":"https://api.github.com/users/Wyyghst/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T07:35:01Z","updated_at":"2015-11-24T07:35:01Z","body":"@zirohut \r\naligned version data is the data in Normalized_Faces folder. I used aligned version CASIA data training cnn, but lfw data is downloaded from the official website without alignment. Due to different preprocessing for training and test data, I get 73% face verification correct. Later, I used data that all from Normalized_Faces folder, and can get 96% face verification correct.\r\nDo you encountered the same problem with me?"}}