FDDB,检测自己的数据集的mobilenet,网络模型的详细步骤,留给新手参考

1、 FDDB评估工具的使用,gunplot安装,修改路径,参考下面博客,
注意,make,如果报错再修改Makefile
https://blog.csdn.net/behind_you/article/details/80540720
https://blog.csdn.net/haluoluo211/article/details/80698000

2、 用里面自带的demo.py修改代码生成文件
详细步骤,以及文件路径安排
https://blog.csdn.net/Xingyb14/article/details/81329833

上述博客看完,了,对过程有了了解之后,可以再看下下面的补充
1、
./evaluate -a …/annoFile.txt -d …/detDir/detection_out2.txt -i …/orginalPics/ /l …/filePath.txt
这个操作就是修改路径的意思
替代操作(一个是32位,下面是64位)

在evaluation中的 evaluate.cpp,文件的78行下的4个路径,直接写绝对路径就可以了
#ifdef _WIN32
string baseDir = “F:/scratch/Data/facesInTheWild/”;
string listFile = “F:/scratch/Data/detectionResults/FDDB/imList.txt”;
string detFile = “F:/scratch/Data/detectionResults/FDDB/MikolajczykDets.txt”;
string annotFile = “F:/scratch/Data/detectionResults/FDDB/ellipseList.txt”;

#else
string baseDir = “/home/lee/shishi/FDDB/originalPics/”;
string listFile = “/home/lee/shishi/FDDB/filePath.txt”;
string detFile = “/home/lee/shishi/FDDB/detection_out2.txt”;
string annotFile = “/home/lee/shishi/FDDB/annotFile.txt”;
#endif

2、如何生成FDDB 的txt文件,
用mobilenet,自带的,demo.py,将读取数据,和输出数据自己进行增加。,输出需要的格式的txt,文件
注意代码上面的两行文件
net_file= ‘/home/caffe/examples/MobilenetSSD/examples/MobileNetSSD_deploy.prototxt’
caffe_model=‘MobileNetSSD_deploy-face-fddb.caffemodel’
第一个文件改成自己的prototxt文件,绝对地址
第二个文件,是通过,自带的mergy_bn.py生成的文件,,如何生成mergy.py,生成自己的网络文件参考,地址 https://blog.csdn.net/cs_fang_dn/article/details/78790790

6).Run merge_bn.py to generate your own deploy caffemodel.
在$caffe_root/examples/MobileNet-SSD目录下执行
python merge_bn.py
其中merge_bn.py文件中:
train_proto = ‘example/MobileNetSSD_train.prototxt’ #这个是3)产生的文件
train_model = ‘snapshot/mobilenet_iter_2000.caffemodel’ #should be your snapshot caffemodel 这个是4)训练保存的结果
deploy_proto = ‘MobileNetSSD_deploy.prototxt’ #这个是3)产生的文件
save_model = ‘MobileNetSSD_deploy_my_test_2000.caffemodel’ #这个是合并的模型文件
最后会就生成了你自己的数据集模型,MobileNetSSD_deploy.prototxt是网络结构文件,MobileNetSSD_deploy_my_test_2000.caffemodel是模型文件
放到,caffe_model路径中
3、注意一点,mobilenetssd,文件中的example ,文件夹下的三个文件

   三个文件需要都改成一样的,这是为了第2点的网络文件,和模型文件,一致,否则生成的txt,文件有问题

猜你喜欢

转载自blog.csdn.net/m0_37192554/article/details/82752180