Overview
▶ MMDetection is an object detection toolbox that contains a rich set of object detection, instance segmentation, and panoptic segmentation methods as well as related components and modules.
▶ MMDetection consists of 7 main parts, apis, structures, datasets, models, engine, evaluation and visualization.
- apis provides high-level APIs for model inference.
- structures provides data structures like bbox, mask, and DetDataSample.
- datasets supports various dataset for object detection, instance segmentation, and panoptic segmentation.
- transforms contains a lot of useful data augmentation transforms.
- samplers defines different data loader sampling strategy.
- models is the most vital part for detectors and contains different components of a detector.
- detectors defines all of the detection model classes.
- data_preprocessors is for preprocessing the input data of the model.
- backbones contains various backbone networks.
- necks contains various neck components.
- dense_heads contains various detection heads that perform dense predictions.
- roi_heads contains various detection heads that predict from RoIs.
- seg_heads contains various segmentation heads.
- losses contains various loss functions.
- task_modules provides modules for detection tasks. E.g. assigners, samplers, box coders, and prior generators.
- layers provides some basic neural network layers.
- engine is a part for runtime components.
- runner provides extensions for MMEngine’s runner.
- schedulers provides schedulers for adjusting optimization hyperparameters.
- optimizers provides optimizers and optimizer wrappers.
- hooks provides various hooks of the runner.
- evaluation provides different metrics for evaluating model performance.
- visualization is for visualizing detection results.
▶ MMDetection은 객체 탐지 툴박스로, 객체 탐지, 인스턴스 분할, 그리고 파노프틱 분할 방법과 관련된 다양한 구성 요소와 모듈을 포함하고 있다.
▶ MMDetection은 주로 7개의 주요 부분으로 구성되어 있다: apis, structures, datasets, models, engine, evaluation, visualization.
- apis는 모델 추론을 위한 고수준 API를 제공한다.
- structures는 bbox, mask, DetDataSample과 같은 데이터 구조를 제공한다.
- datasets는 객체 탐지, 인스턴스 분할, 파노프틱 분할을 위한 다양한 데이터셋을 지원한다.
- transforms는 유용한 데이터 증강 변환을 다수 포함하고 있다.
- samplers는 다양한 데이터 로더 샘플링 전략을 정의한다.
- models는 탐지기(detector)의 다양한 구성 요소를 포함하는 가장 중요한 부분이다.
- detectors는 모든 탐지 모델 클래스를 정의한다.
- data_preprocessors는 모델의 입력 데이터를 전처리한다.
- backbones는 다양한 백본 네트워크를 포함한다.
- necks는 다양한 넥 구성 요소를 포함한다.
- dense_heads는 밀집 예측을 수행하는 다양한 탐지 헤드를 포함한다.
- roi_heads는 RoI에서 예측을 수행하는 다양한 탐지 헤드를 포함한다.
- seg_heads는 다양한 분할 헤드를 포함한다.
- losses는 다양한 손실 함수를 포함한다.
- task_modules는 탐지 작업을 위한 모듈을 제공한다. 예: 할당자(assigners), 샘플러(samplers), 박스 코더(box coders), 사전 생성기(prior generators).
- layers는 몇 가지 기본 신경망 레이어를 제공한다.
- engine은 런타임 구성 요소를 위한 부분이다.
- runner는 MMEngine의 runner를 위한 확장을 제공한다.
- schedulers는 최적화 하이퍼파라미터를 조정하는 스케줄러를 제공한다.
- optimizers는 옵티마이저와 옵티마이저 래퍼를 제공한다.
- hooks는 runner의 다양한 후크를 제공한다.
- evaluation은 모델 성능을 평가하기 위한 다양한 메트릭을 제공한다.
- visualization은 탐지 결과를 시각화하기 위한 부분이다.
Installation
[Step 0] Miniconda 다운로드
Miniconda — Anaconda documentation
These three commands quickly and quietly install the latest 64-bit version of the installer and then clean up after themselves. To install a different version or architecture of Miniconda for Windows, change the name of the .exe installer in the curl comma
docs.anaconda.com
[Step 1] Conda 가상환경 생성 및 활성화
conda create --name openmmlab python=3.8 -y
conda activate openmmlab
[Step 2] PyTorch 설치
# On GPU platforms
conda install pytorch torchvision -c pytorch
# On CPU platforms
conda install pytorch torchvision cpuonly -c pytorch
[Step 3] mim 이용하여 MMEngine, MMCV 설치
pip install -U openmim
mim install mmengine
mim install "mmcv>=2.0.0"
[Step 4] MMDetection 깃클론(git clone)
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -v -e .
# "-v" means verbose, or more output
# "-e" means installing a project in editable mode,
# thus any local modifications made to the code will take effect without reinstallation.
https://mmdetection.readthedocs.io/en/latest/overview.html
'OpenMMLab > MMDetection' 카테고리의 다른 글
[MMDetection] General Object detection with MMDetection 3.0 (0) | 2024.06.18 |
---|