scott-mao / TinyDet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TinyDet: Accurately Detecting Small Objects within 1 GFLOPs

Requirements

  • Python 3.5 or higher
  • PyTorch 1.2 or higher
  • CUDA 9.2 or higher
  • GCC(G++) 4.9 or higher

Installation

a. Create a conda virtual environment and activate it (Optional but recommended).

conda create --name tinydet python=3.7
conda activate tinydet

b. Install pytorch and torchvision.

conda install pytorch=1.2.0  torchvision=0.4.0  -c pytorch

c. Install mmdet (other dependencies wil be installed automatically).

pip install -r requirements.txt
python setup.py build develop

d. Install PSRoI align.

cd mmdet_extra/ps_roi_align_ori
python setup.py build_ext --inplace
cd ../..

e. Prepare dataset and checkpoint file.

Download coco dataset and checkpoint file

Folder structure:

TinyDet
├── mmdet
├── mmdet_extra
├── tools
├── scripts
├── configs
├── data
│   ├── coco
│   │   ├── annotations
│   │   ├── train2017
│   │   ├── val2017
│   │   ├── test2017
├── pth_file
│   ├── mobilenetv3_bc.pt
│   ├── mobilenetv3_d.pt
│   ├── tinydet_L.pth
│   ├── tinydet_M.pth
│   ├── tinydet_S.pth

Inference

python -m torch.distributed.launch --nproc_per_node=1 ./tools/test.py \
            ./configs/tinydet_M.py     \
            ./pth_file/tinydet_M.pth             \
            --launcher pytorch                 

About


Languages

Language:Python 84.3%Language:Cuda 10.2%Language:C++ 4.5%Language:Cython 0.4%Language:C 0.3%Language:Shell 0.2%