일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 객체 탐지
- VOC 변환
- TensorFlow Object Detection Error
- 기능과 역할
- Custom Animation
- Object Detection Dataset 생성
- DOTA dataset
- 커스텀 애니메이션 적용
- DACON
- Docker
- 논문분석
- 사회초년생 추천독서
- AI Security
- Paper Analysis
- TensorFlow Object Detection Model Build
- 개발흐름
- Git
- Towards Deep Learning Models Resistant to Adversarial Attacks
- object detection
- Linux build
- 크롤링
- CARLA simulator
- TensorFlow Object Detection API install
- 리눅스 빌드
- Carla
- 논문 분석
- InstructPix2Pix
- paper review
- TensorFlow Object Detection 사용예시
- Branch 활용 개발
Archives
- Today
- Total
JSP's Deep learning
[Deep learning - Useful library] mmdetection 설치 및 테스트 본문
Deap learning/Useful library
[Deep learning - Useful library] mmdetection 설치 및 테스트
_JSP_ 2023. 3. 29. 23:36mmdetection이란?
Tensorflow object detection API처럼 다양한 객체 탐지 모델을 제공하고 학습, 추론, 파인튜닝, 모델 수정 등 다양한 기능을 제공하는 open source이며, pytorch을 기반으로 구성되어있다.
1. mmdetection 다운로드
git clone https://github.com/open-mmlab/mmdetection.git
2. Dockerfile 빌드
- GPU 이름 확인
nvidia-smi --query | fgrep 'Product Name'
- CUDA GPU와 호환되는 Compute Capability 확인(링크)
- GTX3090 :
8.6
- GTX3090 :
- pytorch docker image을 통한 버전확인
- pytorch :
1.9.0
- cuda :
11.1
- cudnn :
8
- pytorch :
- Dockerfile 수정
ARG PYTORCH="1.9.0"
ARG CUDA="11.1"
ARG CUDNN="8"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
ENV TORCH_CUDA_ARCH_LIST="8.6"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
# To fix GPG key error when running apt-get update
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install MMCV
RUN pip install --no-cache-dir --upgrade pip wheel setuptools
RUN pip install --no-cache-dir mmcv-full==1.3.17 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html
# Install MMDetection
RUN conda clean --all
RUN git clone https://github.com/open-mmlab/mmdetection.git /mmdetection
WORKDIR /mmdetection
ENV FORCE_CUDA="1"
- 빌드
cd mmdetection/docker
docker build -t mmdetection .
3. 실행
docker run -itd --net=host --gpus all --shm-size=8gb --name mmdet mmdetection:latest /bin/bash
4. 패키지 설치
pip install -r requirements/build.txt
pip install --no-cache-dir -e .
pip install jupyter notebook
apt-get update
apt-get install wget
5. 데모 테스트
- jupyter notebook 접속
nohup jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' &
- model checkpoint 다운로드
mkdir checkpoints
cd checkpoints
wget https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
- demo 실행 및 결과 확인
'Deap learning > Useful library' 카테고리의 다른 글
[Deep Learning - Useful library] Jupyter Notebook (0) | 2023.05.22 |
---|---|
[Deep learning - Useful Library] 0. pycaret 머신러닝 라이브러리 (0) | 2022.06.04 |
Comments