如何用caffe训练分类器参考这篇博客https://blog.youkuaiyun.com/sinat_41852207/article/details/88194744
需要: caffe训练好的模型和对应的测试配置文件deploy.prototxt,
一个txt文件,里面有图片名
一个label.txt文件,里面写分类名,我是二分类,所以就两个
最后把分类好的图片放到不同的文件夹下,便于检查
//从文件夹批量读取图片,用caffemodel测试分类效果
#include <opencv2/opencv.hpp>
#include <opencv2/dnn.hpp>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
using namespace cv;
using namespace cv::dnn;
using namespace std;
String modelTxt = "D:/software_engineer/caffe-master/examples/testImg/deploy.prototxt";//caffe的测试网络结构模型
String modelBin = "D:/software_engineer/caffe-master/examples/testImg/cifar10_quick_iter_1