A PyTorch implementation of EfficientDet from the 2019 paper by Mingxing Tan Ruoming Pang Quoc V. Le Google Research, Brain Team. The official and original: comming soon.
- Python 3.6+
- PyTorch 1.3+
- Torchvision 0.4.0+ (We need high version because Torchvision support nms now.)
- requirements.txt
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh datasets/scripts/VOC2007.sh
sh datasets/scripts/VOC2012.sh
- To train EfficientDet using the train script simply specify the parameters listed in
train.py
as a flag or manually change them.
python train.py --network effcientdet-d0 # Example
- With VOC Dataset:
# DataParallel
python train.py --dataset VOC --dataset_root /root/data/VOCdevkit/ --network effcientdet-d0 --batch_size 32
# DistributedDataParallel with backend nccl
python train.py --dataset VOC --dataset_root /root/data/VOCdevkit/ --network effcientdet-d0 --batch_size 32 --multiprocessing-distributed
- With COCO Dataset:
# DataParallel
python train.py --dataset COCO --dataset_root ~/data/coco/ --network effcientdet-d0 --batch_size 32
# DistributedDataParallel with backend nccl
python train.py --dataset COCO --dataset_root ~/data/coco/ --network effcientdet-d0 --batch_size 32 --multiprocessing-distributed
To evaluate a trained network:
- With VOC Dataset:
python eval_voc.py --dataset_root ~/data/VOCdevkit --weight ./checkpoint_VOC_efficientdet-d0_261.pth
- With COCO Dataset comming soon.
python demo.py --threshold 0.5 --iou_threshold 0.5 --score --weight checkpoint_VOC_efficientdet-d1_34.pth --file_name demo.png
Output:
We have accumulated the following to-do list, which we hope to complete in the near future
- Still to come:
- EfficientDet-[D0-7]
- GPU-Parallel
- NMS
- Soft-NMS
- Pretrained model
- Demo
- Model zoo
- TorchScript
- Mobile
- C++ Onnx
Note: Unfortunately, this is just a hobby of ours and not a full-time job, so we'll do our best to keep things up to date, but no guarantees. That being said, thanks to everyone for your continued help and feedback as it is really appreciated. We will try to address everything as soon as possible.
- tanmingxing, rpang, qvl, et al. "EfficientDet: Scalable and Efficient Object Detection." EfficientDet.
- A list of other great EfficientDet ports that were sources of inspiration:
@article{efficientdetpytoan,
Author = {Toan Dao Minh},
Title = {A Pytorch Implementation of EfficientDet Object Detection},
Journal = {github.com/toandaominh1997/EfficientDet.Pytorch},
Year = {2019}
}