以下配置在18年3月27日可用:
1安裝系統環境+caffe
按照步驟https://blog.csdn.net/M_WBCG/article/details/70306319
(1)關于(for req in $(cat requirements.txt); do pip install $req; done )這句話因為很多時候一起安裝,有一些可能沒安裝成功,需要多執行幾次,或者在pip前面加個 sudo 。
(2)遇到這個問題,需要sudo apt-get install --no-install-recommends libboost-all-dev
./include/caffe/common.hpp:4:32: fatal error: boost/shared_ptr.hpp: 沒有那個檔案或目錄
(https://blog.csdn.net/zhang_yang_43/article/details/78357446)
(3)需要安裝numpy
sudo apt-get install python-numpy
2安裝fast-cnn
按照步驟https://blog.csdn.net/genius_zz/article/details/54348232
(1)還需要安裝
pip install --upgrade pip
sudo apt-get install python-tk
(2)配置檔案
如同上面的caffe步驟,仍然需要換成
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
(3)下載下傳資料
可用下面代碼(但是我自己下不了,太大了,找了網友的百度盤下載下傳了連結:http://pan.baidu.com/s/1pJVburD 密碼:11m0【https://blog.csdn.net/samylee/article/details/50965935】,下載下傳後tar- xzvf XXXXXX.tgz解壓到fastrcnn/data下)
$ cd $FRCN_ROOT($FRCN_ROOT指路fast-rcnn的路徑)
$ ./data/scripts/fetch_fast_rcnn_models.sh
之後跑代碼,可顯示衆多網友部落格的那幾個圖
以下是相關的demo測試
備注:
windows (https://blog.csdn.net/u012538490/article/details/53727041+https://blog.csdn.net/light169/article/details/54694146)
測試效果如下:
越大的模型時間越久,效果越好。
--net vgg16(最大的模型,時間慢)
--net vgg_cnn_m_1024(中等的模型,時間中等的)
--net caffenet(最小的模型,時間挺快的)