wy1iu / sphereface

Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.
MIT License
1.58k stars 543 forks source link

Different results between matcaffe and C++ caffe? #72

Open zuoqing1988 opened 6 years ago

zuoqing1988 commented 6 years ago

First of all, thanks for sharing the code. I have trained a model with accuracy 99.27% following the instructions. However, when I use it in C++ programs, I find there is slight difference between C++ and matlab. Loading the same 96*112 cropped image (even .bmp format), the extracted features are not exactly the same between C++ and matlab. I have written a C++ code following the matlab code `test\code\evaluation.m', and the ACC is 99.08%. Though this accuracy is also acceptable, I wonder why this happens.

code code.zip

zjz5250 commented 6 years ago

@zuoqing1988 你好,我可以参考下你的C++代码吗?多谢啦

zuoqing1988 commented 6 years ago

@zjz5250 代码我附上去了,你随便改改就能用

zjz5250 commented 6 years ago

下载不了,能发我邮箱吗,81467372@qq.com。多谢啦

zuoqing1988 commented 6 years ago

@zjz5250 发了

haoranD commented 6 years ago

in caffe-sphereface , i change the cmakefile.txt and makefileconfig, and successfully make all,but making test was failed,so can't finish the installation.but my own caffe is ok

help!please

src/caffe/test/test_neuron_layer.cpp:17:38: fatal error: caffe/layers/log_layer.hpp: can't find compilation terminated. Makefile:581: recipe for target '.build_release/src/caffe/test/test_neuron_layer.o' failed make: [.build_release/src/caffe/test/test_neuron_layer.o] Error 1 make:

youthM commented 5 years ago

请问能参考你的.cpp文件吗? @zuoqing1988

zuoqing1988 commented 5 years ago

请问能参考你的.cpp文件吗? @zuoqing1988 一层有个高亮的code.zip点击就可以下载

zuoqing1988 commented 5 years ago

https://github.com/zuoqing1988/ZQCNN/blob/master/SamplesZQlibFaceID/SampleEvaluationOnLFWSphereFaceMiniCaffe/SampleEvaluationOnLFWSpherefaceMiniCaffe.cpp

youthM commented 5 years ago

https://github.com/zuoqing1988/ZQCNN/blob/master/SamplesZQlibFaceID/SampleEvaluationOnLFWSphereFaceMiniCaffe/SampleEvaluationOnLFWSpherefaceMiniCaffe.cpp 想问一下minicaffe和caffe有什么区别?

youthM commented 5 years ago

https://github.com/zuoqing1988/ZQCNN/blob/master/SamplesZQlibFaceID/SampleEvaluationOnLFWSphereFaceMiniCaffe/SampleEvaluationOnLFWSpherefaceMiniCaffe.cpp

超级感谢~

zuoqing1988 commented 5 years ago

一个精简的caffe,只能forward,不能训练

youthM commented 5 years ago

一个精简的caffe,只能forward,不能训练

那minicaffe上的程序可以直接在caffe上运行吗?

zuoqing1988 commented 5 years ago

声明Net时不一样,随便改改就行

youthM commented 5 years ago

声明Net时不一样,随便改改就行

好的,谢谢!