Skip to content

Recipes

Training Recipes

We defined recipes to ensure that anyone can reproduce our results in the most simple way.

Setup

To run recipes you first need to clone the super-gradients repository:

git clone https://github.com/Deci-AI/super-gradients

You then need to move to the root of the clone project (where you find "requirements.txt" and "setup.py") and install super-gradients:

pip install -e .

Finally, append super-gradients to the python path: (Replace "YOUR-LOCAL-PATH" with the path to the downloaded repo)

export PYTHONPATH=$PYTHONPATH:<YOUR-LOCAL-PATH>/super-gradients/

How to run a recipe

The recipes are defined in .yaml format and we use the hydra library to allow you to easily customize the parameters. The basic basic syntax is as follow:

python -m super_gradients.train_from_recipe --config-name=<CONFIG-NAME> dataset_params.data_dir=<PATH-TO-DATASET>
Note: this script needs to be launched from the root folder of super_gradients Note: if you stored your dataset in the path specified by the recipe you can drop "dataset_params.data_dir=".

Explore our recipes

You can find all of our recipes here. You will find information about the performance of a recipe as well as the command to execute it in the header of its config file.

Example: Training of YoloX Small on Coco 2017, using 8 GPU

python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_s dataset_params.data_dir=/home/coco2017

List of commands

All the commands to launch the recipes described here are listed below. Please make to "dataset_params.data_dir=" if you did not store the dataset in the path specified by the recipe (as showed in the example above).

- Classification

Cifar10 resnet
python -m super_gradients.train_from_recipe --config-name=cifar10_resnet +experiment_name=cifar10
ImageNet efficientnet
python -m super_gradients.train_from_recipe --config-name=imagenet_efficientnet
mobilenetv2
python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv2
mobilenetv3 small
python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_small
mobilenetv3 large
python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_large
regnetY200
python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY200
regnetY400
python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY400
regnetY600
python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY600
regnetY800
python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY800
repvgg
python -m super_gradients.train_from_recipe --config-name=imagenet_repvgg
resnet50
python -m super_gradients.train_from_recipe --config-name=imagenet_resnet50
resnet50_kd
python -m super_gradients.train_from_kd_recipe --config-name=imagenet_resnet50_kd
vit_base
python -m super_gradients.train_from_recipe --config-name=imagenet_vit_base
vit_large
python -m super_gradients.train_from_recipe --config-name=imagenet_vit_large

- Detection

Coco2017 ssd_lite_mobilenet_v2
python -m super_gradients.train_from_recipe --config-name=coco2017_ssd_lite_mobilenet_v2
yolox_n
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_n
yolox_t
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_t
yolox_s
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_s
yolox_m
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_m
yolox_l
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_l
yolox_x
python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_x

- Segmentation

Cityscapes DDRNet23
python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet
DDRNet23-Slim
python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim
RegSeg48
python -m super_gradients.train_from_recipe --config-name=cityscapes_regseg48
STDC1-Seg50
python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50
STDC2-Seg50
python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50 architecture=stdc2_seg
STDC1-Seg75
python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75
STDC2-Seg75
python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75 external_checkpoint_path=<stdc2-backbone-pretrained-path> architecture=stdc2_seg