MMDetection (1): Installation

MMDetection installation

Introduction

MMDetection is an open source toolbox for object detection based on PyTorch. It is part of the OpenMMLab project.

The main branch code currently supports PyTorch versions above 1.5.

Website: https://github.com/open-mmlab/mmdetection

main features

  • Modular Design
    MMDetection decouples the detection framework into different module components. By combining different module components, users can easily build custom detection models.

  • Rich plug-and-play algorithms and models
    MMDetection supports many mainstream and latest detection algorithms, such as Faster R-CNN, Mask R-CNN, RetinaNet, etc.

  • Fast
    The basic box and mask operations are implemented in GPU versions, and the training speed is faster or comparable to other code bases, including Detectron2, maskrcnn-benchmark and SimpleDet.

  • High-performance
    MMDetection This algorithm library is derived from the code developed by the MMDet team, the champion team of the COCO 2018 target detection competition, and we have continued to improve and enhance it afterwards.

Install

  • Dependency :
    Linux and macOS (Windows theoretically supported)
    Python 3.6+
    PyTorch 1.3+
    CUDA 9.2+ (if installed based on PyTorch source code, CUDA 9.0 can also be supported)
    GCC 5+
  • Configuration environment 1
    Install pytorch and torchvision
    Visit the website: https://pytorch.org/get-started/previous-versions/
    Installation method For example (cuda10.2 installs pytorch1.9.0 and torchvision0.10.0):
pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  • Configuration environment 2
 pip install openmim
mim install mmcv-full
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e .
  • Install mmdetection
 pip install openmim
mim install mmdet

MIM can automatically install OpenMMLab projects and corresponding dependencies.

  • Configuration example
    cuda 10.2
    python 3.7.11
    pytorch 1.10.2
    torchvision 0.11.3
    mmdetection 2.25.1
    mmcv-full 1.3.17

Guess you like

Origin blog.csdn.net/gaoqing_dream163/article/details/126453476