A Tensorflow2.x implementation of EfficientDet
A Tensorflow2.x implementation of EfficientDet as described in EfficientDet: Scalable and Efficient Object Detection, The project is based on official implementation of google/automl/efficientdet.
[2021-03-03]
[2021-03-02]
[2021-03-01]
git clone https://github.com/wangermeng2021/EfficientDet-tensorflow2.git
cd EfficientDet-tensorflow2
pip install -r requirements.txt
Model | APtest | AP50 | AP75 | APS | APM | APL | APval | #params | #FLOPs | |
---|---|---|---|---|---|---|---|---|---|---|
EfficientDet-D0 (ckpt) | 34.6 | 53.0 | 37.1 | 12.4 | 39.0 | 52.7 | 34.3 | 3.9M | 2.54B | |
EfficientDet-D1 (ckpt) | 40.5 | 59.1 | 43.7 | 18.3 | 45.0 | 57.5 | 40.2 | 6.6M | 6.10B | |
EfficientDet-D2 (ckpt) | 43.0 | 62.3 | 46.2 | 22.5 | 47.0 | 58.4 | 42.5 | 8.1M | 11.0B | |
EfficientDet-D3 (ckpt) | 47.5 | 66.2 | 51.5 | 27.9 | 51.4 | 62.0 | 47.2 | 12.0M | 24.9B | |
EfficientDet-D4 (ckpt) | 49.7 | 68.4 | 53.9 | 30.7 | 53.2 | 63.2 | 49.3 | 20.7M | 55.2B | |
EfficientDet-D5 (ckpt) | 51.5 | 70.5 | 56.1 | 33.9 | 54.7 | 64.1 | 51.2 | 33.7M | 130B | |
EfficientDet-D6 (ckpt) | 52.6 | 71.5 | 57.2 | 34.9 | 56.0 | 65.4 | 52.1 | 51.9M | 226B | |
EfficientDet-D7 (ckpt) | 53.7 | 72.4 | 58.4 | 35.8 | 57.0 | 66.3 | 53.4 | 51.9M | 325B | |
EfficientDet-D7x (ckpt) | 55.1 | 74.3 | 59.9 | 37.2 | 57.9 | 68.0 | 54.4 | 77.0M | 410B |
Download pretrain weight and place it under directory ‘./pretrain’.
For training on pothole dataset(No need to download dataset,it’s already included in project):
python train.py --model-type d0 --use-pretrain True --dataset-type voc --dataset dataset/pothole_voc --num-classes 1 --class-names dataset/pothole.names --voc-train-set dataset_1,train --voc-val-set dataset_1,val --epochs 200 --batch-size 8 --augment ssd_random_crop
model | pothole | VOC | COCO |
---|---|---|---|
efficientdet-d0(512) | 0.798 | ||
Scaled-YoloV4-p5(416) | 0.826 |
Evaluation on Pothole dataset:
For detection on Pothole dataset:
python3 detect.py --model-dir export/best_model_d0_189_0.798/1 --pic-dir images/pothole --class-names dataset/pothole.names --score-threshold 0.1
detection result: