参考:https://github.com/open-mmlab/mmdetection/blob/master/docs/install.md
MMCV: https://mmcv.readthedocs.io/en/stable/index.html
配置要求:
• Linux (Windows is not officially supported)
• Python 3.5+ (Python 2 is not supported)
• PyTorch 1.1 or higher
• CUDA 9.0 or higher
• NCCL 2
• GCC(G++) 4.9 or higher
• mmcv
• OS: Ubuntu 16.04/18.04 and CentOS 7.2
• CUDA: 9.0/9.2/10.0
• NCCL: 2.1.15/2.2.13/2.3.7/2.4.2
GCC(G++): 4.9/5.3/5.4/7.3
1、安装虚拟环境
conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
2、CUDA select注意:
- If you have CUDA 10.1 installed under /usr/local/cuda and would like to install PyTorch 1.5, you need to install the prebuilt PyTorch with CUDA 10.1.
conda install pytorch cudatoolkit=10.1 torchvision -c pytorch - If you have CUDA 9.2 installed under /usr/local/cuda and would like to install PyTorch 1.3.1., you need to install the prebuilt PyTorch with CUDA 9.2.
conda install pytorch=1.3.1 cudatoolkit=9.2 torchvision=0.4.2 -c pytorch
3、git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
4、pip install -r requirements/build.txt
pip install “git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI”
pip install -v -e . # or “python setup.py develop”
注意事项:
numpy不可过高,cocoapi会出错在1.18版本(参考blog)
参考其他文章:
- http://www.luyixian.cn/news_show_343927.aspx
- https://s3.ap-northeast-2.amazonaws.com/open-mmlab/mmdetection/models/faster_rcnn_r50_fpn_1x_20181010-3d1b3351.pth
- https://cloud.tencent.com/developer/article/1435484
- 初级使用 https://zhuanlan.zhihu.com/p/101212969
- https://zhuanlan.zhihu.com/p/101225733