All Projects → zzzxxxttt → Pytorch_simple_centernet_45

zzzxxxttt / Pytorch_simple_centernet_45

A simple pytorch implementation of CenterNet (Objects as Points)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch simple centernet 45

Sarosperceptionkitti
ROS package for the Perception (Sensor Processing, Detection, Tracking and Evaluation) of the KITTI Vision Benchmark Suite
Stars: ✭ 193 (-7.21%)
Mutual labels:  object-detection
Marvel
Marvel - Face Recognition With Android & OpenCV
Stars: ✭ 199 (-4.33%)
Mutual labels:  object-detection
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (-2.88%)
Mutual labels:  object-detection
Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (-7.21%)
Mutual labels:  object-detection
Thor
thor: C++ helper library, for deep learning purpose
Stars: ✭ 197 (-5.29%)
Mutual labels:  object-detection
Traffic Sign Detection
Traffic Sign Detection. Code for the paper entitled "Evaluation of deep neural networks for traffic sign detection systems".
Stars: ✭ 200 (-3.85%)
Mutual labels:  object-detection
Yolov3 Object Detection With Opencv
This project implements a real-time image and video object detection classifier using pretrained yolov3 models.
Stars: ✭ 191 (-8.17%)
Mutual labels:  object-detection
Imageprocessingprojects
Image processing using python and opencv
Stars: ✭ 205 (-1.44%)
Mutual labels:  object-detection
Nas fpn tensorflow
NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection.
Stars: ✭ 198 (-4.81%)
Mutual labels:  object-detection
Sight
👁 Sightseer: TensorFlow library for state-of-the-art Computer Vision and Object Detection models
Stars: ✭ 203 (-2.4%)
Mutual labels:  object-detection
Viseron
Self-hosted NVR with object detection
Stars: ✭ 192 (-7.69%)
Mutual labels:  object-detection
Oicr
Caffe codes for our papers "Multiple Instance Detection Network with Online Instance Classifier Refinement" and "PCL: Proposal Cluster Learning for Weakly Supervised Object Detection".
Stars: ✭ 196 (-5.77%)
Mutual labels:  object-detection
Yolo Tf
TensorFlow implementation of the YOLO (You Only Look Once)
Stars: ✭ 200 (-3.85%)
Mutual labels:  object-detection
Deepdetect
Deep Learning API and Server in C++14 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
Stars: ✭ 2,306 (+1008.65%)
Mutual labels:  object-detection
Ros people object detection tensorflow
An extensive ROS toolbox for object detection & tracking and face/action recognition with 2D and 3D support which makes your Robot understand the environment
Stars: ✭ 202 (-2.88%)
Mutual labels:  object-detection
Py R Fcn Multigpu
Code for training py-faster-rcnn and py-R-FCN on multiple GPUs in caffe
Stars: ✭ 192 (-7.69%)
Mutual labels:  object-detection
Ml Auto Baseball Pitching Overlay
⚾🤖⚾ Automatic baseball pitching overlay in realtime
Stars: ✭ 200 (-3.85%)
Mutual labels:  object-detection
Tiny Dsod
Tiny-DSOD: Lightweight Object Detection for Resource-Restricted Usage
Stars: ✭ 207 (-0.48%)
Mutual labels:  object-detection
Yolov4 Custom Functions
A Wide Range of Custom Functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny Implemented in TensorFlow, TFLite, and TensorRT.
Stars: ✭ 199 (-4.33%)
Mutual labels:  object-detection
Neuralet
Neuralet is an open-source platform for edge deep learning models on edge TPU, Jetson Nano, and more.
Stars: ✭ 200 (-3.85%)
Mutual labels:  object-detection

Pytorch simple CenterNet-45

If you are looking for another CenterNet, try this!

This repository is a simple pytorch implementation of Objects as Points, some of the code is taken from the official implementation. As the name says, this version is simple and easy to read, all the complicated parts (dataloader, hourglass, training loop, etc) are all rewrote in a simpler way.
By the way the support of nn.parallel.DistributedDataParallel is also added, so this implementation trains significantly faster than the official code (~ 75 img/s vs ~36 img/s on 8 GPUs).

Enjoy!

Requirements:

  • python>=3.5
  • pytorch==0.4.1 or 1.1.0 (DistributedDataParallel training only available using 1.1.0)
  • tensorboardX(optional)

Getting Started

  1. Disable cudnn batch normalization. Open torch/nn/functional.py and find the line with torch.batch_norm and replace the torch.backends.cudnn.enabled with False.

  2. Clone this repo:

    CenterNet_ROOT=/path/to/clone/CenterNet
    git clone https://github.com/zzzxxxttt/pytorch_simple_CenterNet_45 $CenterNet_ROOT
    
  3. Install COCOAPI (the cocoapi in this repo is modified to work with python3):

    cd $CenterNet_ROOT/lib/cocoapi/PythonAPI
    make
    python setup.py install --user
    
  4. Compile deformable convolutional (from DCNv2). If you are using pytorch 0.4.1, rename $CenterNet_ROOT/lib/DCNv2_old to $CenterNet_ROOT/lib/DCNv2, otherwise rename $CenterNet_ROOT/lib/DCNv2_new to $CenterNet_ROOT/lib/DCNv2.

    cd $CenterNet_ROOT/lib/DCNv2
    ./make.sh
    
  5. Compile NMS.

    cd $CenterNet_ROOT/lib/nms
    make
    
  6. For COCO training, Download COCO dataset and put annotations, train2017, val2017, test2017 (or create symlinks) into $CenterNet_ROOT/data/coco

  7. For Pascal VOC training, download VOC0712 in coco format (password: 4iu2) and put annotations, images, VOCdevkit (or create symlinks) into $CenterNet_ROOT/data/voc

  8. To train Hourglass-104, download CornerNet pretrained weights (password: y1z4) and put checkpoint.t7 into $CenterNet_ROOT/ckpt/pretrain.

Train

COCO

single GPU or multi GPU using nn.DataParallel

python train.py --log_name coco_hg_512_dp \
                --dataset coco \
                --arch large_hourglass \
                --lr 5e-4 \
                --lr_step 90,120 \
                --batch_size 48 \
                --num_epochs 140 \  
                --num_workers 10

multi GPU using nn.parallel.DistributedDataParallel

python -m torch.distributed.launch --nproc_per_node NUM_GPUS train.py --dist \
        --log_name coco_hg_512_ddp \
        --dataset coco \
        --arch large_hourglass \
        --lr 5e-4 \
        --lr_step 90,120 \
        --batch_size 48 \
        --num_epochs 140 \
        --num_workers 2

PascalVOC

single GPU or multi GPU using nn.DataParallel

python train.py --log_name pascal_resdcn18_384_dp \
                --dataset pascal \
                --arch resdcn_18 \
                --img_size 384 \
                --lr 1.25e-4 \
                --lr_step 45,60 \
                --batch_size 32 \
                --num_epochs 70 \
                --num_workers 10

multi GPU using nn.parallel.DistributedDataParallel

python -m torch.distributed.launch --nproc_per_node NUM_GPUS train.py --dist \
        --log_name pascal_resdcn18_384_ddp \
        --dataset pascal \
        --arch resdcn_18 \
        --img_size 384 \
        --lr 1.25e-4 \
        --lr_step 45,60 \
        --batch_size 32 \
        --num_epochs 70 \
        --num_workers 2

Evaluate

COCO

python test.py --log_name coco_hg_512_dp \
               --dataset coco \
               --arch large_hourglass

# flip test
python test.py --log_name coco_hg_512_dp \
               --dataset coco \
               --arch large_hourglass \
               --test_flip

# multi scale test
python test.py --log_name coco_hg_512_dp \
               --dataset coco \
               --arch large_hourglass \
               --test_flip \
               --test_scales 0.5,0.75,1,1.25,1.5

PascalVOC

python test.py --log_name pascal_resdcn18_384_dp \
               --dataset pascal \
               --arch resdcn_18 \
               --img_size 384

# flip test
python test.py --log_name pascal_resdcn18_384_dp \
               --dataset pascal \
               --arch resdcn_18 \
               --img_size 384 \
               --test_flip

Results:

COCO:

Model Training image size mAP
Hourglass-104 (DP) 512 39.9/42.3/45.0
Hourglass-104 (DDP) 512 40.5/42.6/45.3

PascalVOC:

Model Training image size mAP model
ResDCN-18 (DDP) 384 71.19/72.99 password: 83rv
ResDCN-18 (DDP) 512 72.76/75.69 password: s8d5

Demo:

python demo.py --img_dir ./demo.jpg \
               --ckpt_dir ./ckpt/pascal_resdcn18_512/checkpoint.t7 \ 
               --dataset pascal \
               --arch resdcn_18 \
               --img_size 512 \

Demo results:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].