【目标检测】open-mmlab/mmdetection环境搭建与代码运行测试

目录

  • 一、前言
    • 1、安装anaconda3 2019.10版本
    • 2、创建虚拟环境
    • 3、安装whl
    • 4、安装其他必要的库
    • 5、安装pytorch
    • 6、编译mmdetection
    • 7、成功

一、前言

今天开一个专栏,主要是从在服务器上安装Anaconda+Pycharm+Tensorflow+Pytorch开始,然后看【目标检测】相关的论文,相应地介绍详细的原理和实现,最后有时间的话再写一篇综述吧。目前主要是看Faster RCNN和YOLO v3-v5。

https://mmdetection.readthedocs.io/en/latest/tutorials/config.html

1、安装anaconda3 2019.10版本

2、创建虚拟环境

conda create -n open-mmlab python=3.7 -y

3、安装whl

pip install torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl \
Pillow-6.2.2-cp37-cp37m-manylinux1_x86_64.whl \
six-1.14.0-py2.py3-none-any.whl \
numpy-1.17.0-cp37-cp37m-manylinux1_x86_64.whl \
opencv_python-4.2.0.34-cp37-cp37m-manylinux1_x86_64.whl \
opencv_python_headless-4.2.0.34-cp37-cp37m-manylinux1_x86_64.whl \
Shapely-1.7.0-cp37-cp37m-manylinux1_x86_64.whl \
scipy-1.4.1-cp37-cp37m-manylinux1_x86_64.whl \
Cython-0.29.16-cp37-cp37m-manylinux1_x86_64.whl \
addict-2.2.1-py3-none-any.whl \
imageio-2.8.0-py3-none-any.whl \
python_dateutil-2.8.1-py2.py3-none-any.whl \
cycler-0.10.0-py2.py3-none-any.whl \
kiwisolver-1.3.1-cp37-cp37m-manylinux1_x86_64.whl \
pyparsing-3.0.0a1-py3-none-any.whl \
matplotlib-3.2.1-cp37-cp37m-manylinux1_x86_64.whl \
PyWavelets-1.1.1-cp37-cp37m-manylinux1_x86_64.whl \
networkx-2.4-py3-none-any.whl \
decorator-4.4.2-py2.py3-none-any.whl \
scikit_image-0.16.2-cp37-cp37m-manylinux1_x86_64.whl \
torchvision-0.5.0-cp37-cp37m-linux_x86_64.whl \
pytest_runner-5.2-py2.py3-none-any.whl \
yapf-0.30.0-py2.py3-none-any.whl \
imagecorruptions-1.1.0-py3-none-any.whl

4、安装其他必要的库

cd PyYAML-5.3.1
pip install -e .
cd cocoapi-master/pycocotools/
pip install -e .
cd terminaltables-3.1.0/
pip install -e .
cd mmcv-0.4.4
pip install -e .

5、安装pytorch

pip install torch-1.2.0-cp37-cp37m-manylinux1_x86_64.whl torchvision-0.4.0-cp37-cp37m-manylinux1_x86_64.whl

6、编译mmdetection

sh clean.sh
rm -rf mmdet.egg-info/
python setup.py develop

7、成功

分布式训练测试命令:

CUDA_VISIBLE_DEVICES=4,5,6,7 tools/dist_train.sh configs/faster_rcnn/faster_rcnn_r50_fpn_2x_coco.py 4

你可能感兴趣的:(目标检测,深度学习,tensorflow,pytorch,神经网络)