一.安装openmpi 1.10.7
1.https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.7.tar.gz
2.
cd openmpi-1.10.7
./configure --with-cuda=/usr/local/cuda-8.0 --enable-mpi-thread-multiple
sudo make -j8
sudo make install
cd -
3.会默认安装到/usr/local/下。
sudo gedit ~/.bashrc
添加
export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
到最后一行
source ~/.bashrc
重启命令行
二.下载编译Person Search
1.git clone --recursive https://github.com/ShuangLI59/person_search.git
2.
cd caffe
mkdir build && cd build
sudo cmake .. -DUSE_MPI=ON
sudo make -j8
sudo make install
cd ../..
3.cd lib && sudo make && cd ..
4.https://drive.google.com/open?id=0B67_d0rLRTQYbVFENlVjdXRSWVE
将下载好的模型拷贝到output/psdb_train/resnet50/
5.运行demo
python2 tools/demo.py --gpu 0
出现bug
ImportError: No module named mpi4py
ImportError: No module named easydict
安装mpi4py
pip install mpi4py
pip install easydict
重新
python2 tools/demo.py --gpu 0
成功~
6.Evaluation
将dataset.zip拷贝到当前目录下
experiments/scripts/prepare_data.sh dataset.zip
在experiments/scripts/eval_test.sh文件中
remove the mpirun -n 8 in L14 and change L16 to --gpu 0
experiments/scripts/eval_test.sh resnet50 50000 resnet50
跑起来啦~