MMDetection-inference by mim
MMDection 설치후 Inference수행
https://github.com/sixxchung/mmdetection/blob/master/docs/en/get_started.md
- Prerequisites 파일 설치
- 새로운 conda 환경 설치 (vscode : default 환경설정)
- clone mm
- mim을 사용하여 mmdetection 설치
Inference 수행 (Pretrained 모델을 활용)
mim은 위와 같이 mim install mmdet 으로 설치도 할수 있지만,
mim 의 download 명령을 사용하면,
특정 Config와 해당 Checkpoint를 다운로드 받을 수 있다.
- faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth 다운로드
- faster_rcnn_r50_fpn_1x_coco.py 다운로드 (config)
이미지
- init_detector : config파일과 checkpoint 파일을 이용해 detector를 생성
- inference_detection : 만든 detector를 가지고, inference해 본다.
- show_result_pyplot: 시각화해서 보여준다.
