Faster-Rcnn用CPU 並訓練數據集

ubuntu 14.04下 caffe環境中 faster rcnn安裝與運行

本文是在caffe安裝完成後的基礎上安裝faster rcnn,前提:配置caffe並編譯成功,pycafffe編譯成功,opencv編譯成功

我的錯誤就是安裝caffe時沒安裝opencv 進而導致一個下午都在找錯!!!

1.在命令窗口下載faster rcnn源碼:git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git

2、生成Cython模塊

/home/username/caffe-faster-rcnn  username是虛擬機主機名

 打開命令窗口輸入cp Makefile.config.example Makefile.config 

然後打開Makefile.config修改如下:(與配置caffe一樣)


修改之後保存



3.編譯pycaffe

cd /home/username/py-faster-rcnn/caffe-fast-rcnn  

make  && make pycaffe 

mkdir build 
cd build 
cmake .. 
make -j8 
make test 
make runtest -j8 
make pycaffe

4.運行Demo

下載fast_rcnn訓練好的模型http://pan.baidu.com/s/1jIcfmrO 密碼:l8nb下載,解壓到py-faster-rcnn/data文件下即可

修改/py-faster-rcnn/lib/fast_rcnn/nms_wrapper.py文件部分內容



然後運行

cd py-faster-rcnn/tools   

./demo.py --cpu

會出來以下目標檢測圖片



https://haoyu.love/blog404.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章