All Projects β†’ PingoLH β†’ Pytorch Hardnet

PingoLH / Pytorch Hardnet

Licence: mit
35% faster than ResNet: Harmonic DenseNet, A low memory traffic network

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch Hardnet

Awesome Computer Vision Models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 278 (-5.12%)
Mutual labels:  object-detection, semantic-segmentation, densenet
Torchdistill
PyTorch-based modular, configuration-driven framework for knowledge distillation. πŸ†18 methods including SOTA are implemented so far. 🎁 Trained models, training logs and configurations are available for ensuring the reproducibiliy.
Stars: ✭ 177 (-39.59%)
Mutual labels:  object-detection, semantic-segmentation, imagenet
Paz
Hierarchical perception library in Python for pose estimation, object detection, instance segmentation, keypoint estimation, face recognition, etc.
Stars: ✭ 131 (-55.29%)
Mutual labels:  object-detection, semantic-segmentation
Self Driving Golf Cart
Be Driven 🚘
Stars: ✭ 147 (-49.83%)
Mutual labels:  object-detection, semantic-segmentation
Nncf
PyTorch*-based Neural Network Compression Framework for enhanced OpenVINOβ„’ inference
Stars: ✭ 218 (-25.6%)
Mutual labels:  object-detection, semantic-segmentation
Frostnet
FrostNet: Towards Quantization-Aware Network Architecture Search
Stars: ✭ 85 (-70.99%)
Mutual labels:  object-detection, semantic-segmentation
Pytorch cpp
Deep Learning sample programs using PyTorch in C++
Stars: ✭ 114 (-61.09%)
Mutual labels:  object-detection, semantic-segmentation
Sarosperceptionkitti
ROS package for the Perception (Sensor Processing, Detection, Tracking and Evaluation) of the KITTI Vision Benchmark Suite
Stars: ✭ 193 (-34.13%)
Mutual labels:  object-detection, semantic-segmentation
Jacinto Ai Devkit
Training & Quantization of embedded friendly Deep Learning / Machine Learning / Computer Vision models
Stars: ✭ 49 (-83.28%)
Mutual labels:  object-detection, semantic-segmentation
awesome-computer-vision-models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 419 (+43%)
Mutual labels:  densenet, semantic-segmentation
SharpPeleeNet
ImageNet pre-trained SharpPeleeNet can be used in real-time Semantic Segmentation/Objects Detection
Stars: ✭ 13 (-95.56%)
Mutual labels:  imagenet, semantic-segmentation
Raster Vision
An open source framework for deep learning on satellite and aerial imagery.
Stars: ✭ 1,248 (+325.94%)
Mutual labels:  object-detection, semantic-segmentation
Artos
Adaptive Real-Time Object Detection System with HOG and CNN Features
Stars: ✭ 64 (-78.16%)
Mutual labels:  object-detection, imagenet
Sightseq
Computer vision tools for fairseq, containing PyTorch implementation of text recognition and object detection
Stars: ✭ 116 (-60.41%)
Mutual labels:  object-detection, densenet
Mask rcnn ros
The ROS Package of Mask R-CNN for Object Detection and Segmentation
Stars: ✭ 53 (-81.91%)
Mutual labels:  object-detection, semantic-segmentation
Swin-Transformer
This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows".
Stars: ✭ 8,046 (+2646.08%)
Mutual labels:  imagenet, semantic-segmentation
Medicaldetectiontoolkit
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Stars: ✭ 917 (+212.97%)
Mutual labels:  object-detection, semantic-segmentation
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (+235.15%)
Mutual labels:  object-detection, densenet
Skin Lesions Classification DCNNs
Transfer Learning with DCNNs (DenseNet, Inception V3, Inception-ResNet V2, VGG16) for skin lesions classification
Stars: ✭ 47 (-83.96%)
Mutual labels:  imagenet, densenet
super-gradients
Easily train or fine-tune SOTA computer vision models with one open source training library
Stars: ✭ 429 (+46.42%)
Mutual labels:  imagenet, semantic-segmentation

Pytorch-HarDNet

Harmonic DenseNet: A low memory traffic network (ICCV 2019 paper)

See also CenterNet-HarDNet for Object Detection in 44.3 mAP / 45 fps on COCO dataset

and FC-HarDNet for Semantic Segmentation

  • Fully utilize your cuda cores!
  • Unlike CNN models using a lot of Conv1x1 to reduce model size and number of MACs, HarDNet mainly uses Conv3x3 (with only one Conv1x1 layer for each HarDNet block) to increase the computational density.
  • Increased computational density changes a model from Memory-Bound to Compute-Bound

Architecture

HarDNet Block:

  • k = growth rate (as in DenseNet)
  • m = channel weighting factor (1.6~1.7)
  • Conv3x3 for all layers (no bottleneck layer)
  • Conv-BN-ReLU for all layers intead of BN-ReLU-Conv used in DenseNet
  • See MIPT-Oulu/pytorch_bn_fusion to get rid of BatchNorm for inference.
  • No global dense connection (input of a HarDBlk is NOT reused as a part of output)

HarDNet68/85:

  • Enhanced local feature extraction to benefit the detection of small objects
  • A transitional Conv1x1 layer is employed after each HarDNet block (HarDBlk)

Results

Method MParam GMACs Inference
Time*
ImageNet
Top-1
COCO mAP
with SSD512
HarDNet68 17.6 4.3 22.5 ms 76.5 31.7
ResNet-50 25.6 4.1 31.0 ms 76.2 -
HarDNet85 36.7 9.1 38.0 ms 78.0 35.1
ResNet-101 44.6 7.8 51.2 ms 78.0 31.2
VGG-16 138 15.5 49 ms 73.4 28.8

* Inference time measured on an NVidia 1080ti with pytorch 1.1.0
300 iteraions of random 1024x1024 input images are averaged.

Results of Depthwise Separable (DS) version of HarDNet

Method MParam GMACs Inference
Time**
ImageNet
Top-1
HarDNet39DS 3.5 0.44 32.5 ms 72.1
MobileNetV2 3.5 0.3 37.9 ms 72.0
HarDNet68DS 4.2 0.8 52.6 ms 74.3
MobileNetV2 1.4x 6.1 0.6 57.8 ms 74.7

** Inference time measured on an NVidia Jetson nano with TensorRT
500 iteraions of random 320x320 input images are averaged.

Train HarDNet models for ImageNet

Training prodedure is branched from https://github.com/pytorch/examples/tree/master/imagenet

Training:

python main.py -a hardnet68 [imagenet-folder with train and val folders]

arch = hardnet39ds | hardnet68ds | hardnet68 | hardnet85

Evaluating:

python main.py -a hardnet68 --pretrained -e [imagenet-folder with train and val folders]

for HarDNet85, please download pretrained weights from here

Hyperparameters

  • epochs 150 ~ 250
  • initial lr = 0.05
  • batch size = 256
  • weight decay = 6e-5
  • cosine learning rate decay
  • nestrov = True
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].