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

参考连接:mmdetection安装教程 | 踩坑总结

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值