caffe中计算图像的均值

首先要编译compute_image_mean.cpp文件,生成compute_image_mean.exe文件,具体生成方式类似于

http://blog.csdn.net/quincuntial/article/details/50611459中的生成Convert.exe文件。

在用上面连接生成lmdb文件后,写个批处理文件ComputImageMean.bat,内容为

代码语言:javascript
复制
ComputeImageMean.exe traindb mean.binaryproto
pause

运行后,会生成一个mean.binaryproto文件,里面就是图像的均值。