mmdetection在重庆江小白上的训练--使用自定义coco数据集的测试和训练

mmdetection在重庆江小白上的训练--使用自定义coco数据集的测试和训练


本人目标检测小白一枚,未来可能会从事缺陷检测方向的研究与应用,因此提前了解一下目前检测的工具箱mmdetection,在使用mmdetection过程中,自我感觉踩了所有小白要踩得坑,特分享出来,希望对大家有帮助。

1、配置mmdetection

配置mmdetection,安装官方GitHub配置即可,即配即用,简单高效。官方更新了install,我在此给读着分享一下我的配置过程。

1.1 环境要求

转自官方:https://github.com/open-mmlab/mmdetection/blob/master/docs/INSTALL.md
Linux (Windows is not officially supported) 【据其他网友的分享,我在windows下成功配置了mmdetection】
Python 3.5+
PyTorch 1.1 or higher
CUDA 9.0 or higher
NCCL 2
GCC 4.9 or higher
mmcv
We have tested the following versions of OS and softwares:
OS: Ubuntu 16.04/18.04 and CentOS 7.2
CUDA: 9.0/9.2/10.0/10.1
NCCL: 2.1.15/2.2.13/2.3.7/2.4.2
GCC(G++): 4.9/5.3/5.4/7.3

1.2安装mmdetection

a.创建虚拟环境

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

安装后的conda list 结果如下:
在这里插入图片描述
b.安装Pytorch1.1

conda install pytorch=1.1 torchvision -c pytorch

安装好后,可以重启 一下环境,测试一下pytorch安装成功了没

python
import torch

c.安装mmdetection
我们先创建一个文件夹,并cd到这个文件夹下

mkdir chongqingDefectDetection
cd ./chongqingDefectDetection/

然后git mmdetection这个项目,没安装git的可以先安装一下

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection

安装mmdetection需要的包,之前的官方教程将mmcv的安装列了出来,目前的mmcv在requirements.txt中

conda install  cython
pip install -r requirements.txt
pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
pip install -v -e .  # or "python setup.py develop"

注意最后一行命令最后有个“ .
pip list 看到有mmdet就是安装成功了

2、测试

要完成测试,需要checkpoint,需要demo,需要一个.jpg。
先说checkpoint,推荐2个网址:
(1)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值