Skip to content

thuyngch/ATSS-EfficientDet-PyTorch

Repository files navigation

ATSS-EfficientDet-PyTorch

ATSS-EfficientDet (ATSS built on top of EfficientDet) outperforms the original EfficientDet. Weights are released.

This repository is folked from mmdetection, implemented in PyTorch.

Change log

  • 2020/04/17: Release checkpoint of ATSS-EfficientDet-D0 (COCO-val mAP=33.8). Add config file of ATSS-EfficientDet-D1.

Introduction

There are more applications using Deep Learning in Computer Vision like Image Classification, Object Detection, and Semantic Segmentation. However, Deep Learning models, for example CNN, are too slow. Therefore, more effort is paid in order to make these models running faster.

This work was activated by the EfficientDet-family networks in Object Detection, published by Google team, which consume small GFLOPs without accuracy compensation. Besides, ATSS is a sampling method for Anchor-based architectures (e.g., RetinaNet), aiming at boosting the detection accuracy with only single anchor at each location.

This repository is based on mmdetection and tries to:

  • reimplement EfficientDet in PyTorch
  • build ATSS on top of EfficientDet
  • train ATSS-EfficientDet with small versions (D0, D1)

accessibility text accessibility text
Demo images predicted by ATSS-EfficientDet-D0

See more demo images in demo/atss_effdet_d0

Comparison

Model Weight Params (M) FLOPs (G) COCO-val mAP Original COCO-val mAP
ATSS-EfficientDet-D0 atss_effdet_d0.pth 3.83 2.32 33.8 33.5
ATSS-EfficientDet-D1 6.56 5.65 39.1

Installation

Please refer to the official guildeline of mmdetection in INSTALL.md for installation and dataset preparation.

Training and testing

  • To train model:
scripts/train_coco.sh
  • To test model:
scripts/test_coco.sh

Tips for training on a custom dataset

  • Assume your custom dataset has 10 (foreground) classes (and 1 background class), the num_classes should be 11:
  bbox_head=dict(
  	type='ATSSEffDetHead',
  	num_classes=11,
  ...
  ),
  • Load the released weights as the pretraining:
load_from = "work_dirs/atss_effdet_d0.pth"
  • Learning rate vs. batchsize and number of GPUs:
lr_start = (batchsize * GPUs) / 16 * (1e-2)
lr_end = lr_start / 100
  • Number of epochs: The original config file takes 300 epochs to finalize a cosine learning-rate schedule. If you want to train a custom dataset, you should set a smaller number of epochs.

References

Citation

@article{atssefficientdet,
  title   = {ATSS-EfficientDet: ATSS built on top of EfficientDet},
  author  = {Thuy Nguyen-Chinh},
  journal= {https://github.com/thuyngch/ATSS-EfficientDet-PyTorch},
  year={2020}
}

About

ATSS-EfficientDet implemented in PyTorch, outperforming the original EfficientDet. Weights are released.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published