FaceVerification
FaceVerification copied to clipboard
input data/diff size does not match target blob shape, input data/diff size: [ 100 100 1 2 ] vs target blob shape: [ 100 100 1 100 ]
大神,运行你的VerificationDemo.m 出现这个问题,请问是什么原因呢?
VerificationDemo Error using CHECK (line 4) input data/diff size does not match target blob shape, input data/diff size: [ 100 100 1 2 ] vs target blob shape: [ 100 100 1 100 ]
Error in caffe.Blob/check_data_size_matches (line 72) CHECK(is_matched, ...
Error in caffe.Blob/check_and_preprocess_data (line 46) self.check_data_size_matches(data);
Error in caffe.Blob/set_data (line 26) data = self.check_and_preprocess_data(data);
Error in caffe.Net/forward (line 122) self.blobs(self.inputs{n}).set_data(input_data{n});
Error in VerificationDemo (line 53) f = net.forward(H);
另外: f = f{1}; fprintf('distance:%f\n',f); if f<same_thresh fprintf('The two faces are from the same people.\n'); else fprintf('The two faces are from different people.\n'); end; f是一个数组,不知道最后的相似度分数是如何计算出来的? 这个判断是不是写反了哦, 小于阈值的是同一个人,反之为不同人。
- 这个m文件用的是 https://github.com/happynear/FaceVerification/blob/master/caffe_proto/CASIA_demo.prototxt
- 用了demo.prototxt,算出来的就是一个数字了;
- 欧氏距离越小越相似。
CASIA_demo.prototxt 的 model是用的这个
CASIA_iter_666000.caffemodel
吗?
对,我这个模型挺老的了,等你把我的跑通,可以试试吴翔的。
还有一个问题,再麻烦下,
Invalid MEX-file 'E:\face\caffee\caffee-windows\caffe-windows\matlab\FaceVerification\MatAlignment.mexw64': 找不到指定的模块。
Error in VerificationDemo2 (line 36) face1 = MatAlignment('alignment',image1);
这一句执行成功了 MatAlignment('init_model','E:\ThirdPartyLibrary\dlib-18.14\shape_predictor_68_face_landmarks.dat');
但是执行这句 face1 = MatAlignment('Alignment',image1); 就出现上面那个错了。
麻烦了。
wuxiang,又是一个大神哦
这个MatAlignment挺难编译的,编译方法跟caffe-windows里的matcaffe差不多,除了caffe 的3rdparty之外,还需要dlib库。把生成好的matAlignment.mexw64拿来才能用。
我先尝试下,谢谢了。
VerificationDemo Read Mat to OpenCV done. 1 face detected. Face alignment done. Convert to mat done. Read Mat to OpenCV done. 1 face detected. Face alignment done. Convert to mat done. distance:0.340565 The two faces are from the same people. 终于调通你的程序了。
大神再咨询个问题,你的model是100_100,meanfile也是,但是wuxiang的model好像是128_128的,能共享下wuxiang的128*128的meanfile吗?
他没有mean file的,除个256就好了。
@iscas-lee 我也在编译这个MatAlignment.cpp,能不能把编译的流程详细的介绍一下,编译好久了,一直不成功,麻烦你了,万分感激
我也没有编译成功,是求助于我一个师兄给我的一个库,但是这个我太方便直接公开给您呢。
哦,好吧,谢谢你了
@iscas-lee 你好,我想问一下你使用MatAlignment.cpp这个对齐程序输进去的图片(比如LFW库的图像)是经过人脸剪裁之后的还是直接没剪裁直接用LFW库原图输进去对齐????谢谢
@tanzf 直接原图送进去的。没有裁剪。 我也不知道这样是不是合适? @happynear 这个输入的图片有什么需要特殊处理下吗?
@iscas-lee 哦,那识别率怎么样呢?LFW库下达到多少?
@tanzf 没有测试过LFW。
哦,好吧,谢谢您了
input data/diff size does not match target blob shape, input data/diff size: [ 100 100 1 2 ] vs target blob shape: [ 100 100 1 100 ] #24请问这个怎么解决的