This project is a kind of implementation of EfficientDet(CVPR 2020) using mmdetection.
This project is a kind of implementation of EfficientDet using mmdetection.
It is based on the
Variant | mAP(val2017) | Params | FLOPs | mAP(val2017) in paper | Params in paper | FLOPs in paper |
---|---|---|---|---|---|---|
D0 | 32.02 | 3.87M | 2.55B | 33.5 | 3.9M | 2.5B |
D1 | 37.78 | 6.62M | 6.12B | 39.1 | 6.6M | 6.1B |
D2 | —— | 8.09M | 11B | 42.5 | 8.1M | 11B |
D3 | —— | 12.02M | 24.88B | 45.9 | 12M | 25B |
D4 | —— | 20.7M | 55.13B | 49.0 | 21M | 55B |
D5 | —— | 33.63M | 135.31B | 50.5 | 34M | 135B |
D6 | —— | —— | —— | 51.3 | 52M | 226B |
Install mmdetection
This implementation is based on mmdetection(v1.1.0+8732ed9). Please refer to INSTALL.md for installation and dataset preparation.
Copy the codes to mmdetection directory
cp -r mmdet/ ${MMDETECTION_PATH}/
cp -r configs/ ${MMDETECTION_PATH}/
Prepare data
The directories should be arranged like this:
> mmdetection
> ├── mmdet
> ├── tools
> ├── configs
> ├── data
> │ ├── coco
> │ │ ├── annotations
> │ │ ├── train2017
> │ │ ├── val2017
> │ │ ├── test2017
Train D0 with 4 GPUs
CONFIG_FILE=configs/efficientdet/efficientdet_d0_4gpu.py
./ tools/dist_train.py ${CONFIG_FILE} 4
Calculate parameters and flops
python tools/get_flops.py ${CONFIG_FILE} --shape $SIZE $SIZE
Test
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} --out ${OUTPUT_FILE} --eval bbox
More usages can reference mmdetection documentation.