mmdetection安装

前言

MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。具有以下优点:

1.模块化设计

MMDetection 将检测框架解耦成不同的模块组件,通过组合不同的模块组件,用户可以便捷地构建自定义的检测模型

  • 丰富的即插即用的算法和模型

    MMDetection 支持了众多主流的和最新的检测算法,例如 Faster R-CNN,Mask R-CNN,RetinaNet 等。

  • 速度快

    基本的框和 mask 操作都实现了 GPU 版本,训练速度比其他代码库更快或者相当。

  • 性能高

    MMDetection 这个算法库源自于 COCO 2018 目标检测竞赛的冠军团队 MMDet 团队开发的代码,我们在之后持续进行了改进和提升。

安装步骤

1.确保环境Python 3.7+, CUDA 9.2+ 和 PyTorch 1.5+.

2.运用MIM安装mmcv

pip install -U openmim
mim install mmcv-full

3.git克隆mmdetection并安装

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -v -e .
mmdetection安装_第1张图片 安装完成

常见错误

下面这种问题可以看出是由于CUDA版本和PyTorch版本问题导致mmcv-full安装失败,重新安装对应的pytorch版本10.2就能解决问题了!

RuntimeError:
      The detected CUDA version (11.1) mismatches the version that was used to compile
      PyTorch (10.2). Please make sure to use the same CUDA versions.
      [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

mmdetection安装_第2张图片

你可能感兴趣的:(深度学习,目标检测,计算机视觉)