Giter VIP home page Giter VIP logo

tinydet's Introduction

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                 

Citation

If you find our paper and code useful in your research, please consider giving a star ⭐ and citation 📝 :

@article{chen2023tinydet,
  title={TinyDet: accurately detecting small objects within 1 GFLOPs},
  author={Chen, Shaoyu and Cheng, Tianheng and Fang, Jiemin and Zhang, Qian and Li, Yuan and Liu, Wenyu and Wang, Xinggang},
  journal={Science China Information Sciences},
  volume={66},
  number={1},
  pages={1--2},
  year={2023},
  publisher={Springer}
}  

tinydet's People

Contributors

outsidercsy avatar xinggangw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tinydet's Issues

运行python setup.py build develop报错

你好,我按照README.md文档安装环境,但是到python setup.py build develop,这一步骤的时候,它报错了。错误如下:
/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include/ATen/NativeFunctions.h:47:1: required from here
/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:103:39: warning: initializing ‘c10::ArrayRef<double>::Data’ from ‘std::initializer_list<double>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
:/usr/local/cuda-11.7:/usr/local/cuda-11.7:/usr/local/cuda-11.7/bin/nvcc -I/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include -I/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include/TH -I/home/csn/anaconda3/envs/tinydet/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-11.7:/usr/local/cuda-11.7:/usr/local/cuda-11.7/include -I/home/csn/anaconda3/envs/tinydet/include/python3.7m -c mmdet/ops/nms/src/nms_kernel.cu -o build/temp.linux-x86_64-cpython-37/mmdet/ops/nms/src/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_cuda -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
error: command ':/usr/local/cuda-11.7:/usr/local/cuda-11.7:/usr/local/cuda-11.7/bin/nvcc' failed: No such file or directory: ':/usr/local/cuda-11.7:/usr/local/cuda-11.7:/usr/local/cuda-11.7/bin/nvcc'
我可以确认本地cuda-11.7的路径全部配置在环境变量里面了,并且可以读写,运行。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.