onda create -n mmdet python=3.6 -y
conda activate mmdet
pip install torch torchvision
pip install mmcv
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
python setup.py develop
可能遇到pip下载速度慢:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch torchvision mmcv
更换gcc、g++版本方法
sudo apt-get install gcc-8 g+±8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±4.9 20
gcc --version
g++ --version
切换版本时,使用
sudo update-alternatives --config g++
sudo update-alternatives --config gcc
安装mmdection可能出现的问题
VOC数据集运行train.py,可能出现aborted,core dump
此时,修改mmdet/dataset/voc.py中CLASSES,添加face
并删除一个类别(添加一个,删除一个,总个数保持不变)
然后修改faster_rcnn_r50_fpn_1x_voc0712.py,去掉数据
集非VOC2007部分。