xilinx ssdpedestrian 部署过程

1、cf_ssdpedestrian_coco_360_640_0.97_5.9G
2、Caffe_Xilinx 编译
1.    安装依赖
# apt-get install  libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev  python-dev python-pip gfortran  cython python-numpy python-scipy python-skimage python-matplotlib python-h5py python-leveldb python-networkx python-pandas python-dateutil python-protobuf python-gflags python-yaml python-pil libboost-dev libboost-filesystem-dev libboost-thread-dev libopenblas-dev libboost-all-dev python-opencv  #安装依赖

2.    # cp Makefile.config.example Makefile.config

3.    # vim Makefile.config

4.    # 修改Makefile.config(共2处)
a)    # USE_CUDNN := 1              修改为:USE_CUDNN := 1
b)    # WITH_PYTHON_LAYER := 1      修改为:WITH_PYTHON_LAYER := 1

5.    # cp -ar /usr/include/hdf5/serial/* /usr/include

6.    # ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so /usr/lib/libhdf5_hl.so

7.    # ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so /usr/lib/libhdf5.so

8.    # make all -j 32

9.    # make pycaffe

10.    # vim /etc/profile
加一行
export PYTHONPATH=/caffe_xilinx/python:$PYTHONPATH
# source /etc/profile

12.    # python
Import caffe(如下图)


3、准备数据
可以先准备几张图片
路径一定要修改对
caffe路径下
Caffe_root/data/VOC0712/create_list.sh
Caffe_root/data/VOC0712/create_data.sh
创建一个VOC2007 VOC2012
VOC2007/Annotations ImageSets/Main/train.txt test.txt  JPEGImages
VOC2012/ 可以不填  
train.txt和test.txt是包含图片文件名的不带后缀的文档
修改labelmap_voc.prototxt 为person 和blackground
修改VOC0712下的 create_list.sh root_dir=
create_data.sh root_dir=
运行后会生成lmdb

4、cf_ssdpedestrian_coco_360_640_0.97_5.9G/float/trainval.caffemodel
train.prototxt
#source: "/group/modelzoo/test_dataset/coco/coco2014_lmdb/train2014_lmdb"
#label_map_file: "labelmap.prototxt"
#source: "/group/modelzoo/test_dataset/coco/coco2014_lmdb/test2014_lmdb"
#label_map_file: "labelmap.prototxt"
修改source label_map_file路径
5、cf_ssdpedestrian_coco_360_640_0.97_5.9G/code/train/solver.prototxt,
不需要修改,
train.sh 相应的修改caffe路径和模型路径

 

你可能感兴趣的:(计算机视觉,caffe)