1. 程式人生 > >caffe,mobilenet,利用FDDB ,評價自己的模型,親測有效。

caffe,mobilenet,利用FDDB ,評價自己的模型,親測有效。

上述部落格看完,了,對過程有了瞭解之後,可以再看下下面的補充 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.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路徑中