MMdetection 安装总结(防踩坑)
mmdetection介绍
mmdetection是商汤科技和香港中文大学开源的一个基于PyTorch 实现的深度学习目标检测工具箱。
重要的是,很多论文和比赛都会用这个框架去打比赛,那么对于我们直接套用他们的代码,和基于大佬们的基础上去优化更加的方便。
在国产中算是非常优秀的一个框架,当然最近huggingface等框架的出现,也让MMdetection受到一些冲击
网上很多版本不对应自己CUDA等,不能直接生搬硬套,因此安装和配置环境最关键的是要版本对应,否则会浪费大量的时间!!!
1.创建conda环境
conda create -n mmdetection python=3.7
conda activate mmdetection
2.重点!CUDA pytorch mmcv版本选择
conda install pytorch==1.8.0 cudatoolkit=10.1 torchvision -c pytorch
官方提供了一个参考图,须按照这种方式安装,亲测很顺利
官方教程:https://mmdetection.readthedocs.io/en/latest/get_started.html#installation
我的安装MMCV的命令
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html
PS:需要在官方教程中找到对应环境的命令
3.mmdetection 安装和编译
gcc版本要对应
参考:https://blog.csdn.net/qq_40677266/article/details/121322583
gcc版本问题
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e . # or "python setup.py develop"
4.测试mmdetection
python tools/train.py ./configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py
&spm=1001.2101.3001.5002&articleId=126367666&d=1&t=3&u=9068c7f70c9e475a8334b52aef0857be)
1万+

被折叠的 条评论
为什么被折叠?



