본문 바로가기
728x90
[MMDetection] Train & Test - Configs - MMDetection repositories는 MMEngine's config system을 이용 - Reference: https://mmdetection.readthedocs.io/en/latest/user_guides/config.html Model Config - backbone, neck과 같은 neural network 구성요소들과 data_preprocessor, train_cfg, test_cfg들이 요구됨. - data_preprocessor는 DataLoader에 의한 data output을 처리함. - train_cfg, test_cfg는 학습과 평가를 하는 hyperparameter를 훈련하고 테스트하기 위한 구성요소 # 모델 설정 model = dict( type="detect.. 2024. 1. 13.
[MMDetection] Customization - Models Customize Models - 모델은 5가지 타입으로 구성됨 - backbone: FCN network로 featurer map들을 추출함 - neck: backbone과 head의 사이에 있는 구성요소 - head: 특정한 task를 위한 구성요소 - roi extractor: feature map들에서 RoI 특징을 뽑아내는 부분 - loss: loss를 계산하기 위한 head의 구성요소 새로운 구성요소 추가하기 Backbone 추가하기 1. 새로운 backbone 생성: mmdet/models/backbones/모델명.py import torch.nn as nn from mmdet.registry import MODELS @MODELS.register_module() class 모델명(nn.Mo.. 2024. 1. 13.
[MMDetection] 기본 개념 Data Flow Structures Models Datasets Data Transforms - 데이터 변환 파이프라인 설계하기 - 예시 # 학습 파이프라인 train_pipeline = [ dict(type='LoadImageFromFile', backend_args=backend_args), # 파일에서 이미지 불러오기 dict( type='LoadAnnotations', # 현재 이미지에 맞는 annotation 불러오기 with_bbox=True), dict( type='Resize', # 이미지와 annotation 사이즈 변경 scale=(1333, 800), keep_ratio=True ), dict( type='RandomFlip', # 이미지와 annotation 랜덤으로 뒤집기 pro.. 2024. 1. 13.
[MMDetection] 환경설정 1. MMDetection 설치 및 실행 - pytorch cuda버전별 설치: https://pytorch.org/get-started/previous-versions/ - mmdet cuda버전별 설치: https://mmdetection.readthedocs.io/en/latest/get_started.html#customize-installation - 운영체제와 CUDA버전에 맞는 pytorch 설치 # CUDA 11.6 pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 - MIM을 이용하여 MMEngine과.. 2024. 1. 13.
[MMDetection] 개요 MMDetection - MMDetection은 객체 탐지를 위한 toolbox로 객체 탐지, 인스턴스 세그멘테이션 그리고 판옵틱 세그멘테이션 등을 포함한 구성요소나 모듈을 포함함. - 7개의 부분으로 구성: apis, structures, datasets, models, engine, evaluation, visualization. - github: https://github.com/open-mmlab/mmdetection 구성요소 - apis: 모델 추론에 사용되는 고수준 API제공 - datasets: 객체 탐지, 세그멘테이션을 지원하는 다양하 데이터셋 - transforms: 데이터 증강에 필요한 툴을 포함 - samplers: strategy별 다양한 데이터로더 - models: detector.. 2024. 1. 13.
반응형