Giter VIP home page Giter VIP logo

realtime_object_detection's Introduction

Realtime_Object_Detection

Codebase for realtime object detection

News: With the help of this codebase, we win the second place in the 2019 DAC System Design Contest.

Introduction

This codebase is modified based on mmdetection and the difference between them is that some two stage object detection algorithms are removed and some small and compact backbones are added.

The purpose of this codebase is to facilitate network quantization and pruning, eventually applying deployment on different hardware devices.

Installation

Requirements

  • Linux
  • Python 3.5+
  • CUDA 9.0+
  • NCCL 2+
  • GCC 4.9+

Step by step installation

a. Create a conda virtual environment and activate it.

conda create -n realtime_object_detection python=3.7 -y
source activate realtime_object_detection

b. Install some requirements.

pip install torch torchvision
pip install cython

c. Clone the realtime_object_detection repository.

git clone https://github.com/waterbearbee/realtime_object_detection
cd realtime_object_detection

d. Compile cuda extensions.

sh ./compile.sh

e. Install other dependencies.

python3 setup.py develop

Getting Started

Training

Train with a single GPU

python3 ./tools/train.py ${CONFIG_FILE} 

Train with multiple GPUs

python3 -m torch.distributed.launch --nproc_per_node=${GPU_NUM} ./tools/train.py ${CONFIG_FILE} --launcher pytorch

Testing

Test with a single GPU

python3 ./tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] --eval bbox 

Test with multiple GPUs

python3 -m torch.distributed.launch --nproc_per_node=${GPU_NUM} ./tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} --out ${RESULT_FILE} --eval bbox --launcher pytorch

DAC Competition Results (RetinaNet)

Backbone Neck Head box AP
MobileNetv2_x1_0 P3-P5 2conv(64c) 84.2
MobileNetv2_x0_5 P3-P5 2conv(64c) 79.9
MobileNetv2_x0_25 P3-P5 2conv(64c) 74.4
ShuffleNetV2_x1_0 P3-P5 2conv(64c) 80.6
ShuffleNetV2_x0_5 P3-P5 2conv(64c) 75.0

realtime_object_detection's People

Contributors

waterbearbee avatar

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.