Skip to content

This is a sand box all repository to set up and test the mmdetection library.

Notifications You must be signed in to change notification settings

JohanpG/mmdetection_sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a sand box repository to use the MMDetection library which is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

Environment Details

  • Windows 11 WIP build 22504.1010
  • WSL2
    • Kernel 5.10.60.1
    • Ubuntu 20.04.3 LTS (Installed from windows store)
  • CUDA
    • Toolkit 11.3
    • NvidiaDriver version 472.34
    • Nvidia CUDA Driver 11.4.150
  • Hardware
    • Laptop: Lenovo X1 Xtreme
    • CPU: Intel Core i7-9750H
    • GPU: NVIDIA Geforce GTX 1650 Max-Q Design
    • Memory: 16 gb

Set up Environment

Several elements need to be taken care of on order:

  • Windows WSL enable & Nvidia Drivers installation
  • WSL Kernel update
  • Ubuntu download

Windows

Linux

MMDetection conda installation

  • Follow steps on the set up guide
  • on step #2 use conda install pytorch=1.10.0 cudatoolkit=11.3 torchvision -c pytorch

Copy dataset

  • cp -R /mnt/c/Users/johan/Downloads/val2017/val2017 ~/aigri_projects/mmdetection_sandbox/data/coco
  • cp -R /mnt/c/Users/johan/Downloads/annotations_trainval2017/annotations ~/aigri_projects/mmdetection_sandbox/data/coco

Export to tensor RT

Export to ONNX

  • pip install onnx onnxruntime-gpu
  • Current version of mmdetection does not support onnxruntime-gpu>= 1.9.0 (But since we are using CUDA Toolkit 11.3 and that is supported on > 1.9.0) so a small tweak is needed:
    • Modify file '/home/johan/miniconda3/envs/openmmlab/lib/python3.7/site-packages/mmdet/core/export/model_wrappers.py"
      • Comment lines 115 y 123 add 'sess = ort.InferenceSession(onnx_file, session_options, providers=providers)' on line 124

Covert to TensorRT

Using MMDET on the GPU Cluster with singularity

Loading Modules

- `module load anaconda3`
- `module load cuda-10.2`
- `module load singularity-3.6.4`
- `conda create -n openmmlabjp python=3.7 -y`

conda activate openmmlabjp

conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/ torch1.8.0/index.html

conda install -c anaconda ipykernel

python -m ipykernel install --user --name=openmmlabjp

sbatch conda_singularity.sh

Frequent used Commands

  • sudo apt update
  • sudo apt upgrade
  • sudo apt install gedit -y
  • stat
  • sudo chown -R
  • sudo apt-get --purge -y remove 'cuda*'
  • nvcc --version
  • wsl --update
  • wsl -l -o
  • wsl -l -v
  • uname -a
  • source .bashrc
  • conda update conda
  • conda env list
  • conda create
  • conda activate
  • conda deactivate
  • nvcc --version

About

This is a sand box all repository to set up and test the mmdetection library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published