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一样)

Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集

修改之后保存



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文件部分内容

Faster-Rcnn用CPU 并训练数据集


然后运行

cd py-faster-rcnn/tools   

./demo.py --cpu

会出来以下目标检测图片

Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集Faster-Rcnn用CPU 并训练数据集


https://haoyu.love/blog404.html

相关文章:

  • 2022-12-23
  • 2021-07-15
  • 2022-01-20
  • 2021-09-20
  • 2021-08-25
猜你喜欢
  • 2021-05-29
  • 2021-05-14
  • 2022-01-25
  • 2021-06-27
  • 2021-05-31
  • 2021-12-26
  • 2021-09-03
相关资源
相似解决方案