Home

Awesome

EAutoDet

Implementation of EAutoDet, an efficient NAS method for Object Detection. Code is developed based on YOLOV5

Environment

The environment of this project is the same as YOLOv5. Also, you can build a singularity image by:

singularity build <name/of/image>.sig envs/singularity.def

Performance

We define four search spaces, denoted as EAutoDet-s (small), EAutoDet-m (mediun), EAutoDet-l (large), and EAutoDet-x (extra-large). We also train YOLOv5 from scratch and compare with our discovered models. FPS are evaluated on the Darknet platform, which is written in C and CUDA.

ModelmAP(0.5:0.95)Params (M)FPS
YOLOv5-s36.97.3113
YOLOv5-m43.921.488
YOLOv5-l46.847.159
YOLOv5-x49.187.843
EAutoDet-s40.19.1120
EAutoDet-m45.228.170
EAutoDet-l47.934.459
EAutoDet-x49.286.041

Quick Start

How to search an architecture

You can search an EAutoDet-s on the 0-th GPU for 50 epochs by running the following codes:

bash scripts/search.sh 0

If you want to search on other spaces, you can change the value of cfg_file in scripts/bash.sh and run the above code.

If you want to search with a large batch size on multiple GPUs, run the following code to search on 4 GPUs:

bash scripts/search.sh 0 1 2 3

How to train the discovered architecture

After searching, the code will save the genotype of discovered architectures in the directory runs/train-$ID/exp/genotypes/, where $ID is the timestamp of your search process. Then you can evluate the discovered architecture by training the discovered architecture for 300 epochs from scratch. Run the following code to train on a single GPU.

bash scritps/full_train.sh 0

Notice that before running the above code, you should change $ID in scripts/full_train.sh as the timestamp of your search process.

If you want to train with a large batch sizei on multiple GPUs, run the following code to train on 4 GPUs:

bash scripts/full_train.sh 0 1 2 3

How to evaluate the trained model

You can the following code to test on the test set of COCO:

bash scripts/eval.sh 0

Then you can submit the results (json file) to COCO evaluation website

How to evaluate FPS

You can change the discovered architecture configuration (yaml file) to Darknet configuration and then test on Darknet platform, the codes are coming soon.

Citations

<pre><code>@article{EAutoDet, author = {Xiaoxing Wang and Jiale Lin and Junchi Yan and Juanping Zhao and Xiaokang Yang}, title = {EAutoDet: Efficient Architecture Search for Object Detection}, journal = {CoRR}, volume = {abs/2203.10747}, year = {2022}, }</code></pre>