Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#864 Feature/sg 736 deci yolo rf100 yolo nas

Merged
Ghost merged 1 commits into Deci-AI:feature/SG-736_deci_yolo_rf100 from deci-ai:feature/SG-736_deci_yolo_rf100_yolo_nas
32 changed files with 213 additions and 213 deletions
  1. 9
    9
      documentation/source/YoloSGQuickstart.md
  2. BIN
      documentation/source/images/yolo_nas_frontier.png
  3. 0
    0
      documentation/source/images/yolo_nas_qs_predict.png
  4. BIN
      documentation/source/images/yolo_sg_frontier.png
  5. 12
    12
      documentation/source/qat_ptq_yolo_nas.md
  6. 5
    5
      src/super_gradients/common/object_names.py
  7. 2
    2
      src/super_gradients/examples/predict/detection_predict.py
  8. 2
    2
      src/super_gradients/examples/predict/detection_predict_image_folder.py
  9. 2
    2
      src/super_gradients/examples/predict/detection_predict_streaming.py
  10. 2
    2
      src/super_gradients/examples/predict/detection_predict_video.py
  11. 13
    13
      src/super_gradients/recipes/arch_params/yolo_nas_l_arch_params.yaml
  12. 13
    13
      src/super_gradients/recipes/arch_params/yolo_nas_m_arch_params.yaml
  13. 13
    13
      src/super_gradients/recipes/arch_params/yolo_nas_s_arch_params.yaml
  14. 8
    8
      src/super_gradients/recipes/coco2017_yolo_nas_s.yaml
  15. 5
    5
      src/super_gradients/recipes/roboflow_yolo_nas_m.yaml
  16. 5
    5
      src/super_gradients/recipes/roboflow_yolo_nas_s.yaml
  17. 1
    1
      src/super_gradients/recipes/roboflow_yolo_nas_s_qat.yaml
  18. 4
    4
      src/super_gradients/training/dataloaders/__init__.py
  19. 6
    6
      src/super_gradients/training/dataloaders/dataloaders.py
  20. 21
    21
      src/super_gradients/training/models/__init__.py
  21. 26
    0
      src/super_gradients/training/models/detection_models/yolo_nas/__init__.py
  22. 2
    2
      src/super_gradients/training/models/detection_models/yolo_nas/dfl_heads.py
  23. 2
    2
      src/super_gradients/training/models/detection_models/yolo_nas/panneck.py
  24. 9
    9
      src/super_gradients/training/models/detection_models/yolo_nas/yolo_nas_variants.py
  25. 24
    24
      src/super_gradients/training/models/detection_models/yolo_nas/yolo_stages.py
  26. 0
    26
      src/super_gradients/training/models/detection_models/yolo_sg/__init__.py
  27. 3
    3
      src/super_gradients/training/pretrained_models.py
  28. 4
    4
      src/super_gradients/training/processing/processing.py
  29. 2
    2
      tests/deci_core_integration_test_suite_runner.py
  30. 2
    2
      tests/integration_tests/__init__.py
  31. 14
    14
      tests/integration_tests/yolo_nas_integration_test.py
  32. 2
    2
      tests/unit_tests/replace_head_test.py
@@ -1,22 +1,22 @@
-# YoloSG Quickstart
+# YOLO-NAS Quickstart
 <div>
-<img src="images/yolo_sg_frontier.png" width="750">
+<img src="images/yolo_nas_frontier.png" width="750">
 </div>
 We developed a new deep learning architecture that competes with YOLOv8 using their efficient AutoNAC algorithm. 
 We incorporated quantization-aware RepVGG blocks into the model architecture to ensure compatibility with Post-Training Quantization, making it more flexible and usable for different hardware configurations.
 
 
-In this tutorial, we will go briefly over the basic functionalities of YoloSG.
+In this tutorial, we will go briefly over the basic functionalities of YOLO-NAS.
 
 
 
-## Instantiate a YoloSG Model
+## Instantiate a YOLO-NAS Model
 
 ```python
 from super_gradients.training import models
 from super_gradients.common.object_names import Models
 
-net = models.get(Models.YoloSG_S, pretrained_weights="coco")
+net = models.get(Models.YoloNAS_S, pretrained_weights="coco")
 ```
 
 ## Predict
@@ -24,12 +24,12 @@ net = models.get(Models.YoloSG_S, pretrained_weights="coco")
 prediction = net.predict("https://www.aljazeera.com/wp-content/uploads/2022/12/2022-12-03T205130Z_851430040_UP1EIC31LXSAZ_RTRMADP_3_SOCCER-WORLDCUP-ARG-AUS-REPORT.jpg?w=770&resize=770%2C436&quality=80")
 ```
 <div>
-<img src="images/yolo_sg_qs_predict.png" width="750">
+<img src="images/yolo_nas_qs_predict.png" width="750">
 </div>
 
 ## Export to ONNX
 ```python
-models.convert_to_onnx(model=net, input_shape=(3,640,640), out_path="yolo_sg_s.onnx")
+models.convert_to_onnx(model=net, input_shape=(3,640,640), out_path="yolo_nas_s.onnx")
 ```
 
 
@@ -58,11 +58,11 @@ Follow the setup instructions for RF100:
 
         - Install CoCo API: https://github.com/pdollar/coco/tree/master/PythonAPI
 ```
-We will use the ```roboflow_yolo_sg_s```configuration to train the small variant of our YoloSG, YoloSG-S.
+We will use the ```roboflow_yolo_nas_s```configuration to train the small variant of our YOLO-NAS, YOLO-NAS-S.
 
 To launch training on one of the RF100 datasets, we pass it through the dataset_name argument:
 ```
-python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_sg_s  dataset_name=<DATASET_NAME> dataset_params.data_dir=<PATH_TO_RF100_ROOT> ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>
+python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_nas_s  dataset_name=<DATASET_NAME> dataset_params.data_dir=<PATH_TO_RF100_ROOT> ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>
 ```
 
 Replace <DATASET_NAME> with any of the [RF100 datasets](https://github.com/roboflow/roboflow-100-benchmark/blob/8587f81ef282d529fe5707c0eede74fe91d472d0/metadata/datasets_stats.csv) that you wish to train on.
Discard
Discard
Discard
Discard
@@ -1,10 +1,10 @@
-# PTQ and QAT with YoloSG
+# PTQ and QAT with YOLO-NAS
 <div>
 <img src="images/soccer.png" width="750">
 </div>
 
-In this tutorial, we will guide you step by step on how to prepare our YoloSG for production!
-We will leverage YoloSG architecture which includes quantization-friendly blocks, and train a YoloSG model on Roboflow's [Soccer Player Detection Dataset](https://universe.roboflow.com/roboflow-100/soccer-players-5fuqs)
+In this tutorial, we will guide you step by step on how to prepare our YOLO-NAS for production!
+We will leverage YOLO-NAS architecture which includes quantization-friendly blocks, and train a YOLO-NAS model on Roboflow's [Soccer Player Detection Dataset](https://universe.roboflow.com/roboflow-100/soccer-players-5fuqs)
 in a way that would maximize our throughput without compromising on the model's accuracy.
 
 The steps will be:
@@ -59,7 +59,7 @@ pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidi
 Although this might come as a surprise - the name quantization-aware training needs to be more accurate and be performed on a trained checkpoint rather than from scratch.
 So in practice, we need to train our model on our dataset fully, then after we perform calibration, we fine-tune our model once again, which will be our final step.
 As we discuss in our [Training with configuration files](), we clone the SG repo, then use the repo's configuration files in our training examples.
-We will use the ```src/super_gradients/recipes/roboflow_yolo_sg_s.yaml```configuration to train the small variant of our DeciModel, DeciModel S.
+We will use the ```src/super_gradients/recipes/roboflow_yolo_nas_s.yaml```configuration to train the small variant of our DeciModel, DeciModel S.
 
 So we navigate to our ```train_from_recipe``` script:
 
@@ -74,7 +74,7 @@ export PYTHONPATH=$PYTHONPATH:<YOUR-LOCAL-PATH>/super_gradients/
 
 To launch training on one of the RF100 datasets, we pass it through the dataset_name argument:
 ```
-python -m train_from_recipe --config-name=roboflow_yolo_sg_s  dataset_name=soccer-players-5fuqs dataset_params.data_dir=<PATH_TO_RF100_ROOT> ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY> experiment_name=yolo_sg_s_soccer_players
+python -m train_from_recipe --config-name=roboflow_yolo_nas_s  dataset_name=soccer-players-5fuqs dataset_params.data_dir=<PATH_TO_RF100_ROOT> ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY> experiment_name=yolo_nas_s_soccer_players
 
 ...
 
@@ -166,7 +166,7 @@ SUMMARY OF EPOCH 100
         └── Epoch N-1      = 0.9567 (= 0.0)
 ```
 
-And so our best checkpoint resides in <YOUR_CHECKPOINTS_ROOT_DIRECTORY>/yolo_sg_s_soccer_players/ckpt_best.pth reaches 0.967 mAP!
+And so our best checkpoint resides in <YOUR_CHECKPOINTS_ROOT_DIRECTORY>/yolo_nas_s_soccer_players/ckpt_best.pth reaches 0.967 mAP!
 
 Let's visualize some results:
 ```python
@@ -182,12 +182,12 @@ So this time, we navigate to the `qat_from_recipe` example directory:
 cd <YOUR-LOCAL-PATH>/super_gradients/src/super_gradients/examples/qat_from_recipe_example
 ```
 
-Before we launch, let's see how we can easily create a configuration from our `roboflow_yolo_sg_s` config to get the most out of QAT and PTQ.
-We added a new config that inherits from our previous one, called `roboflow_yolo_sg_s_qat.yaml`. Let's peek at it:
+Before we launch, let's see how we can easily create a configuration from our `roboflow_yolo_nas_s` config to get the most out of QAT and PTQ.
+We added a new config that inherits from our previous one, called `roboflow_yolo_nas_s_qat.yaml`. Let's peek at it:
 ```yaml
 
 defaults:
-  - roboflow_yolo_sg_s
+  - roboflow_yolo_nas_s
   - quantization_params: default_quantization_params
   - _self_
 
@@ -195,7 +195,7 @@ checkpoint_params:
   checkpoint_path: ???
   strict_load: no_key_matching
 
-experiment_name: soccer_players_qat_yolo_sg_s
+experiment_name: soccer_players_qat_yolo_nas_s
 
 pre_launch_callbacks_list:
     - QATRecipeModificationCallback:
@@ -225,7 +225,7 @@ Let's break it down:
     
 Now we can launch PTQ and QAT from the command line:
 ```commandline
-python -m qat_from_recipe --config-name=roboflow_yolo_sg_s_qat experiment_name=soccer_players_qat_yolo_sg_s dataset_name=soccer-players-5fuqs dataset_params.data_dir=<PATH_TO_RF100_ROOT> checkpoint_params.checkpoint_path=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>/yolo_sg_s_soccer_players/ckpt_best.pth ckpt_ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>
+python -m qat_from_recipe --config-name=roboflow_yolo_nas_s_qat experiment_name=soccer_players_qat_yolo_nas_s dataset_name=soccer-players-5fuqs dataset_params.data_dir=<PATH_TO_RF100_ROOT> checkpoint_params.checkpoint_path=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>/yolo_nas_s_soccer_players/ckpt_best.pth ckpt_ckpt_root_dir=<YOUR_CHECKPOINTS_ROOT_DIRECTORY>
 ...
 
 [2023-04-02 11:37:56,848][super_gradients.training.pre_launch_callbacks.pre_launch_callbacks][INFO] - Modifying recipe to suit QAT rules of thumb. Remove QATRecipeModificationCallback to disable.
@@ -367,4 +367,4 @@ SUMMARY OF EPOCH 10
 ```
 
 We not only observed no decline in the accuracy of our quantized model, but we also gained an improvement of 0.08 mAP!
-The QAT model is available in our checkpoints directory, already converted to .onnx format under  <YOUR_CHECKPOINTS_ROOT_DIRECTORY>/soccer_players_qat_yolo_sg_s/soccer_players_qat_yolo_sg_s_16x3x640x640_qat.onnx, ready to be converted to [converted and deployed to int8 using TRT](https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html#onnx-export).
+The QAT model is available in our checkpoints directory, already converted to .onnx format under  <YOUR_CHECKPOINTS_ROOT_DIRECTORY>/soccer_players_qat_yolo_nas_s/soccer_players_qat_yolo_nas_s_16x3x640x640_qat.onnx, ready to be converted to [converted and deployed to int8 using TRT](https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html#onnx-export).
Discard
@@ -304,9 +304,9 @@ class Models:
     DEKR_W32_NO_DC = "dekr_w32_no_dc"
     POSE_PP_YOLO_L = "pose_ppyolo_l"
     POSE_DDRNET_39 = "pose_ddrnet39"
-    YoloSG_S = "yolo_sg_s"
-    YoloSG_M = "yolo_sg_m"
-    YoloSG_L = "yolo_sg_l"
+    YOLO_NAS_S = "yolo_nas_s"
+    YOLO_NAS_M = "yolo_nas_m"
+    YOLO_NAS_L = "yolo_nas_l"
 
 
 class ConcatenatedTensorFormats:
@@ -329,8 +329,8 @@ class Dataloaders:
     COCO2017_VAL = "coco2017_val"
     COCO2017_TRAIN_YOLOX = "coco2017_train_yolox"
     COCO2017_VAL_YOLOX = "coco2017_val_yolox"
-    COCO2017_TRAIN_YoloSG = "coco2017_train_yolo_sg"
-    COCO2017_VAL_YoloSG = "coco2017_val_yolo_sg"
+    COCO2017_TRAIN_YOLO_NAS = "coco2017_train_yolo_nas"
+    COCO2017_VAL_YOLO_NAS = "coco2017_val_yolo_nas"
     COCO2017_TRAIN_PPYOLOE = "coco2017_train_ppyoloe"
     COCO2017_VAL_PPYOLOE = "coco2017_val_ppyoloe"
     COCO2017_TRAIN_SSD_LITE_MOBILENET_V2 = "coco2017_train_ssd_lite_mobilenet_v2"
Discard
@@ -1,8 +1,8 @@
 from super_gradients.common.object_names import Models
 from super_gradients.training import models
 
-# Note that currently only YoloX, PPYoloE and YoloSG are supported.
-model = models.get(Models.YoloSG_L, pretrained_weights="coco")
+# Note that currently only YoloX, PPYoloE and YOLO-NAS are supported.
+model = models.get(Models.YOLO_NAS_L, pretrained_weights="coco")
 
 IMAGES = [
     "../../../../documentation/source/images/examples/countryside.jpg",
Discard
@@ -1,8 +1,8 @@
 from super_gradients.common.object_names import Models
 from super_gradients.training import models
 
-# Note that currently only YoloX, PPYoloE and YoloSG are supported.
-model = models.get(Models.YoloSG_L, pretrained_weights="coco")
+# Note that currently only YoloX, PPYoloE and YOLO-NAS are supported.
+model = models.get(Models.YoloNAS_L, pretrained_weights="coco")
 
 image_folder_path = "../../../../documentation/source/images/examples"
 
Discard
@@ -2,8 +2,8 @@ import torch
 from super_gradients.common.object_names import Models
 from super_gradients.training import models
 
-# Note that currently only YoloX, PPYoloE and YoloSG are supported.
-model = models.get(Models.YoloSG_S, pretrained_weights="coco")
+# Note that currently only YoloX, PPYoloE and YOLO-NAS are supported.
+model = models.get(Models.YOLO_NAS_L, pretrained_weights="coco")
 
 # We want to use cuda if available to speed up inference.
 model = model.to("cuda" if torch.cuda.is_available() else "cpu")
Discard
@@ -3,8 +3,8 @@ import torch
 from super_gradients.common.object_names import Models
 from super_gradients.training import models
 
-# Note that currently only YoloX, PPYoloE and YoloSG are supported.
-model = models.get(Models.YoloSG_L, pretrained_weights="coco")
+# Note that currently only YoloX, PPYoloE and YOLO-NAS are supported.
+model = models.get(Models.YOLO_NAS_L, pretrained_weights="coco")
 
 # We want to use cuda if available to speed up inference.
 model = model.to("cuda" if torch.cuda.is_available() else "cpu")
Discard
@@ -2,32 +2,32 @@ backbone:
   NStageBackbone:
 
     stem:
-      YoloSGStem:
+      YoloNASStem:
         out_channels: 48
 
     stages:
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 96
           num_blocks: 2
           activation_type: relu
           hidden_channels: 96
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 192
           num_blocks: 3
           activation_type: relu
           hidden_channels: 128
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 384
           num_blocks: 5
           activation_type: relu
           hidden_channels: 256
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 768
           num_blocks: 2
           activation_type: relu
@@ -44,10 +44,10 @@ backbone:
     out_layers: [stage1, stage2, stage3, context_module]
 
 neck:
-  YoloSGPANNeckWithC2:
+  YoloNASPANNeckWithC2:
 
     neck1:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 192
         num_blocks: 4
         hidden_channels: 128
@@ -57,7 +57,7 @@ neck:
         reduce_channels: True
 
     neck2:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 96
         num_blocks: 4
         hidden_channels: 128
@@ -67,7 +67,7 @@ neck:
         reduce_channels: True
 
     neck3:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 192
         num_blocks: 4
         hidden_channels: 128
@@ -76,7 +76,7 @@ neck:
         depth_mult: 1
 
     neck4:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 384
         num_blocks: 4
         hidden_channels: 256
@@ -89,17 +89,17 @@ heads:
     num_classes: 80
     reg_max: 16
     heads_list:
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 128
           width_mult: 1
           first_conv_group_size: 0
           stride: 8
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 256
           width_mult: 1
           first_conv_group_size: 0
           stride: 16
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 512
           width_mult: 1
           first_conv_group_size: 0
Discard
@@ -2,32 +2,32 @@ backbone:
   NStageBackbone:
 
     stem:
-      YoloSGStem:
+      YoloNASStem:
         out_channels: 48
 
     stages:
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 96
           num_blocks: 2
           activation_type: relu
           hidden_channels: 64
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 192
           num_blocks: 3
           activation_type: relu
           hidden_channels: 128
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 384
           num_blocks: 5
           activation_type: relu
           hidden_channels: 256
           concat_intermediates: True
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 768
           num_blocks: 2
           activation_type: relu
@@ -44,10 +44,10 @@ backbone:
     out_layers: [stage1, stage2, stage3, context_module]
 
 neck:
-  YoloSGPANNeckWithC2:
+  YoloNASPANNeckWithC2:
 
     neck1:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 192
         num_blocks: 2
         hidden_channels: 192
@@ -57,7 +57,7 @@ neck:
         reduce_channels: True
 
     neck2:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 96
         num_blocks: 3
         hidden_channels: 64
@@ -67,7 +67,7 @@ neck:
         reduce_channels: True
 
     neck3:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 192
         num_blocks: 2
         hidden_channels: 192
@@ -76,7 +76,7 @@ neck:
         depth_mult: 1
 
     neck4:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 384
         num_blocks: 3
         hidden_channels: 256
@@ -89,17 +89,17 @@ heads:
     num_classes: 80
     reg_max: 16
     heads_list:
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 128
           width_mult: 0.75
           first_conv_group_size: 0
           stride: 8
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 256
           width_mult: 0.75
           first_conv_group_size: 0
           stride: 16
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 512
           width_mult: 0.75
           first_conv_group_size: 0
Discard
@@ -2,32 +2,32 @@ backbone:
   NStageBackbone:
 
     stem:
-      YoloSGStem:
+      YoloNASStem:
         out_channels: 48
 
     stages:
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 96
           num_blocks: 2
           activation_type: relu
           hidden_channels: 32
           concat_intermediates: False
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 192
           num_blocks: 3
           activation_type: relu
           hidden_channels: 64
           concat_intermediates: False
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 384
           num_blocks: 5
           activation_type: relu
           hidden_channels: 96
           concat_intermediates: False
 
-      - YoloSGStage:
+      - YoloNASStage:
           out_channels: 768
           num_blocks: 2
           activation_type: relu
@@ -44,10 +44,10 @@ backbone:
     out_layers: [stage1, stage2, stage3, context_module]
 
 neck:
-  YoloSGPANNeckWithC2:
+  YoloNASPANNeckWithC2:
 
     neck1:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 192
         num_blocks: 2
         hidden_channels: 64
@@ -57,7 +57,7 @@ neck:
         reduce_channels: True
 
     neck2:
-      YoloSGUpStage:
+      YoloNASUpStage:
         out_channels: 96
         num_blocks: 2
         hidden_channels: 48
@@ -67,7 +67,7 @@ neck:
         reduce_channels: True
 
     neck3:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 192
         num_blocks: 2
         hidden_channels: 64
@@ -76,7 +76,7 @@ neck:
         depth_mult: 1
 
     neck4:
-      YoloSGDownStage:
+      YoloNASDownStage:
         out_channels: 384
         num_blocks: 2
         hidden_channels: 64
@@ -89,17 +89,17 @@ heads:
     num_classes: 80
     reg_max: 16
     heads_list:
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 128
           width_mult: 0.5
           first_conv_group_size: 0
           stride: 8
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 256
           width_mult: 0.5
           first_conv_group_size: 0
           stride: 16
-      - YoloSGDFLHead:
+      - YoloNASDFLHead:
           inter_channels: 512
           width_mult: 0.5
           first_conv_group_size: 0
Discard
@@ -1,4 +1,4 @@
-# YoloSG-S Detection training on COCO2017 Dataset:
+# YoloNAS-S Detection training on COCO2017 Dataset:
 # This training recipe is for demonstration purposes only. Pretrained models were trained using a different recipe.
 # So it will not be possible to reproduce the results of the pretrained models using this recipe.
 
@@ -6,18 +6,18 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
-#         yolo_sg_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolo_sg_s
+#         yolo_nas_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolo_nas_s
 #
 
 defaults:
-  - training_hyperparams: coco2017_yolo_sg_train_params
-  - dataset_params: coco_detection_yolo_sg_dataset_params
-  - arch_params: yolo_sg_s_arch_params
+  - training_hyperparams: coco2017_yolo_nas_train_params
+  - dataset_params: coco_detection_yolo_nas_dataset_params
+  - arch_params: yolo_nas_s_arch_params
   - checkpoint_params: default_checkpoint_params
   - _self_
 
-train_dataloader: coco2017_train_yolo_sg
-val_dataloader: coco2017_val_yolo_sg
+train_dataloader: coco2017_train_yolo_nas
+val_dataloader: coco2017_val_yolo_nas
 
 load_checkpoint: False
 resume: False
@@ -33,7 +33,7 @@ training_hyperparams:
   resume: ${resume}
   mixed_precision: True
 
-architecture: yolo_sg_s
+architecture: yolo_nas_s
 
 multi_gpu: DDP
 num_gpus: 8
Discard
@@ -1,16 +1,16 @@
-# A recipe to fine-tune YoloSG on Roboflow datasets.
+# A recipe to fine-tune YoloNAS on Roboflow datasets.
 # Checkout the datasets at https://universe.roboflow.com/roboflow-100?ref=blog.roboflow.com
 #
 # `dataset_name` refers to the official name of the dataset.
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 #
-# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_sg_m dataset_name=digits-t2eg6
+# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_nas_m dataset_name=digits-t2eg6
 
 defaults:
-  - training_hyperparams: coco2017_yolo_sg_train_params
+  - training_hyperparams: coco2017_yolo_nas_train_params
   - dataset_params: roboflow_detection_dataset_params
   - checkpoint_params: default_checkpoint_params
-  - arch_params: yolo_sg_m_arch_params
+  - arch_params: yolo_nas_m_arch_params
   - _self_
 
 train_dataloader: roboflow_train_yolox
@@ -28,7 +28,7 @@ dataset_params:
 
 num_classes: ${roboflow_dataset_num_classes:${dataset_name}}
 
-architecture: yolo_sg_m
+architecture: yolo_nas_m
 arch_params:
   num_classes: ${num_classes}
 
Discard
@@ -1,16 +1,16 @@
-# A recipe to fine-tune YoloSG on Roboflow datasets.
+# A recipe to fine-tune YoloNAS on Roboflow datasets.
 # Checkout the datasets at https://universe.roboflow.com/roboflow-100?ref=blog.roboflow.com
 #
 # `dataset_name` refers to the official name of the dataset.
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 #
-# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_sg_s dataset_name=digits-t2eg6
+# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_nas_s dataset_name=digits-t2eg6
 
 defaults:
-  - training_hyperparams: coco2017_yolo_sg_train_params
+  - training_hyperparams: coco2017_yolo_nas_train_params
   - dataset_params: roboflow_detection_dataset_params
   - checkpoint_params: default_checkpoint_params
-  - arch_params: yolo_sg_s_arch_params
+  - arch_params: yolo_nas_s_arch_params
   - _self_
 
 train_dataloader: roboflow_train_yolox
@@ -28,7 +28,7 @@ dataset_params:
 
 num_classes: ${roboflow_dataset_num_classes:${dataset_name}}
 
-architecture: yolo_sg_s
+architecture: yolo_nas_s
 arch_params:
   num_classes: ${num_classes}
 
Discard
@@ -1,5 +1,5 @@
 defaults:
-  - roboflow_yolo_sg_s
+  - roboflow_yolo_nas_s
   - quantization_params: default_quantization_params
   - _self_
 
Discard
@@ -9,8 +9,8 @@ from .dataloaders import (
     coco2017_val_ppyoloe,
     coco2017_pose_train,
     coco2017_pose_val,
-    coco2017_train_yolo_sg,
-    coco2017_val_yolo_sg,
+    coco2017_train_yolo_nas,
+    coco2017_val_yolo_nas,
     imagenet_train,
     imagenet_val,
     imagenet_efficientnet_train,
@@ -68,8 +68,8 @@ __all__ = [
     "coco2017_val_ppyoloe",
     "coco2017_pose_train",
     "coco2017_pose_val",
-    "coco2017_train_yolo_sg",
-    "coco2017_val_yolo_sg",
+    "coco2017_train_yolo_nas",
+    "coco2017_val_yolo_nas",
     "imagenet_train",
     "imagenet_val",
     "imagenet_efficientnet_train",
Discard
@@ -172,10 +172,10 @@ def coco2017_val(dataset_params: Dict = None, dataloader_params: Dict = None) ->
     )
 
 
-@register_dataloader(Dataloaders.COCO2017_TRAIN_YoloSG)
-def coco2017_train_yolo_sg(dataset_params: Dict = None, dataloader_params: Dict = None) -> DataLoader:
+@register_dataloader(Dataloaders.COCO2017_TRAIN_YOLO_NAS)
+def coco2017_train_yolo_nas(dataset_params: Dict = None, dataloader_params: Dict = None) -> DataLoader:
     return get_data_loader(
-        config_name="coco_detection_yolo_sg_dataset_params",
+        config_name="coco_detection_yolo_nas_dataset_params",
         dataset_cls=COCODetectionDataset,
         train=True,
         dataset_params=dataset_params,
@@ -183,10 +183,10 @@ def coco2017_train_yolo_sg(dataset_params: Dict = None, dataloader_params: Dict
     )
 
 
-@register_dataloader(Dataloaders.COCO2017_VAL_YoloSG)
-def coco2017_val_yolo_sg(dataset_params: Dict = None, dataloader_params: Dict = None) -> DataLoader:
+@register_dataloader(Dataloaders.COCO2017_VAL_YOLO_NAS)
+def coco2017_val_yolo_nas(dataset_params: Dict = None, dataloader_params: Dict = None) -> DataLoader:
     return get_data_loader(
-        config_name="coco_detection_yolo_sg_dataset_params",
+        config_name="coco_detection_yolo_nas_dataset_params",
         dataset_cls=COCODetectionDataset,
         train=False,
         dataset_params=dataset_params,
Discard
@@ -69,18 +69,18 @@ from super_gradients.training.models.detection_models.ssd import SSDMobileNetV1,
 from super_gradients.training.models.detection_models.yolo_base import YoloBase, YoloPostPredictionCallback
 from super_gradients.training.models.detection_models.yolox import YoloX_N, YoloX_T, YoloX_S, YoloX_M, YoloX_L, YoloX_X, CustomYoloX
 from super_gradients.training.models.detection_models.customizable_detector import CustomizableDetector
-from super_gradients.training.models.detection_models.yolo_sg import (
-    YoloSGStage,
-    YoloSGStem,
-    YoloSGDownStage,
-    YoloSGUpStage,
-    YoloSGBottleneck,
-    YoloSGDFLHead,
+from super_gradients.training.models.detection_models.yolo_nas import (
+    YoloNASStage,
+    YoloNASStem,
+    YoloNASDownStage,
+    YoloNASUpStage,
+    YoloNASBottleneck,
+    YoloNASDFLHead,
     NDFLHeads,
-    YoloSGPANNeckWithC2,
-    YoloSG_S,
-    YoloSG_M,
-    YoloSG_L,
+    YoloNASPANNeckWithC2,
+    YoloNAS_S,
+    YoloNAS_M,
+    YoloNAS_L,
 )
 
 # Segmentation models
@@ -129,17 +129,17 @@ from super_gradients.common.registry.registry import ARCHITECTURES
 
 __all__ = [
     "SPP",
-    "YoloSG_S",
-    "YoloSG_M",
-    "YoloSG_L",
-    "YoloSGStage",
-    "YoloSGUpStage",
-    "YoloSGStem",
-    "YoloSGDownStage",
-    "YoloSGDFLHead",
-    "YoloSGBottleneck",
+    "YoloNAS_S",
+    "YoloNAS_M",
+    "YoloNAS_L",
+    "YoloNASStage",
+    "YoloNASUpStage",
+    "YoloNASStem",
+    "YoloNASDownStage",
+    "YoloNASDFLHead",
+    "YoloNASBottleneck",
     "NDFLHeads",
-    "YoloSGPANNeckWithC2",
+    "YoloNASPANNeckWithC2",
     "SgModule",
     "Beit",
     "BeitLargePatch16_224",
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  1. from super_gradients.training.models.detection_models.yolo_nas.dfl_heads import YoloNASDFLHead, NDFLHeads
  2. from super_gradients.training.models.detection_models.yolo_nas.panneck import YoloNASPANNeckWithC2
  3. from super_gradients.training.models.detection_models.yolo_nas.yolo_stages import (
  4. YoloNASStage,
  5. YoloNASStem,
  6. YoloNASDownStage,
  7. YoloNASUpStage,
  8. YoloNASBottleneck,
  9. )
  10. from super_gradients.training.models.detection_models.yolo_nas.yolo_nas_variants import YoloNAS_S, YoloNAS_M, YoloNAS_L
  11. __all__ = [
  12. "YoloNASBottleneck",
  13. "YoloNASUpStage",
  14. "YoloNASDownStage",
  15. "YoloNASStem",
  16. "YoloNASStage",
  17. "NDFLHeads",
  18. "YoloNASDFLHead",
  19. "YoloNASPANNeckWithC2",
  20. "YoloNAS_S",
  21. "YoloNAS_M",
  22. "YoloNAS_L",
  23. ]
Discard
@@ -17,10 +17,10 @@ from super_gradients.training.utils.bbox_utils import batch_distance2bbox
 
 
 @register_detection_module()
-class YoloSGDFLHead(BaseDetectionModule, SupportsReplaceNumClasses):
+class YoloNASDFLHead(BaseDetectionModule, SupportsReplaceNumClasses):
     def __init__(self, in_channels: int, inter_channels: int, width_mult: float, first_conv_group_size: int, num_classes: int, stride: int, reg_max: int):
         """
-        Initialize the YoloSGDFLHead
+        Initialize the YoloNASDFLHead
         :param in_channels: Input channels
         :param inter_channels: Intermediate number of channels
         :param width_mult: Width multiplier
Discard
@@ -9,8 +9,8 @@ from super_gradients.training.utils.utils import HpmStruct
 import super_gradients.common.factories.detection_modules_factory as det_factory
 
 
-@register_detection_module("YoloSGPANNeckWithC2")
-class YoloSGPANNeckWithC2(BaseDetectionModule):
+@register_detection_module("YoloNASPANNeckWithC2")
+class YoloNASPANNeckWithC2(BaseDetectionModule):
     """
     A PAN (path aggregation network) neck with 4 stages (2 up-sampling and 2 down-sampling stages)
     where the up-sampling stages include a higher resolution skip
Discard
@@ -12,10 +12,10 @@ from super_gradients.training.utils import HpmStruct, get_param
 from super_gradients.training.models.detection_models.pp_yolo_e import PPYoloEPostPredictionCallback
 
 
-@register_model(Models.YoloSG_S)
-class YoloSG_S(CustomizableDetector):
+@register_model(Models.YOLO_NAS_S)
+class YoloNAS_S(CustomizableDetector):
     def __init__(self, arch_params: Union[HpmStruct, DictConfig], in_channels: int = 3):
-        default_arch_params = get_arch_params("yolo_sg_s_arch_params")
+        default_arch_params = get_arch_params("yolo_nas_s_arch_params")
         merged_arch_params = HpmStruct(**copy.deepcopy(default_arch_params))
         merged_arch_params.override(**arch_params.to_dict())
         super().__init__(
@@ -38,10 +38,10 @@ class YoloSG_S(CustomizableDetector):
         return self.heads.num_classes
 
 
-@register_model(Models.YoloSG_M)
-class YoloSG_M(CustomizableDetector):
+@register_model(Models.YOLO_NAS_M)
+class YoloNAS_M(CustomizableDetector):
     def __init__(self, arch_params: Union[HpmStruct, DictConfig], in_channels: int = 3):
-        default_arch_params = get_arch_params("yolo_sg_m_arch_params")
+        default_arch_params = get_arch_params("yolo_nas_m_arch_params")
         merged_arch_params = HpmStruct(**copy.deepcopy(default_arch_params))
         merged_arch_params.override(**arch_params.to_dict())
         super().__init__(
@@ -64,10 +64,10 @@ class YoloSG_M(CustomizableDetector):
         return self.heads.num_classes
 
 
-@register_model(Models.YoloSG_L)
-class YoloSG_L(CustomizableDetector):
+@register_model(Models.YOLO_NAS_L)
+class YoloNAS_L(CustomizableDetector):
     def __init__(self, arch_params: Union[HpmStruct, DictConfig], in_channels: int = 3):
-        default_arch_params = get_arch_params("yolo_sg_l_arch_params")
+        default_arch_params = get_arch_params("yolo_nas_l_arch_params")
         merged_arch_params = HpmStruct(**copy.deepcopy(default_arch_params))
         merged_arch_params.override(**arch_params.to_dict())
         super().__init__(
Discard
@@ -11,19 +11,19 @@ from super_gradients.common.factories.activations_type_factory import Activation
 from super_gradients.modules import QARepVGGBlock, Conv
 from super_gradients.modules.utils import width_multiplier
 
-__all__ = ["YoloSGStage", "YoloSGUpStage", "YoloSGStem", "YoloSGDownStage", "YoloSGBottleneck"]
+__all__ = ["YoloNASStage", "YoloNASUpStage", "YoloNASStem", "YoloNASDownStage", "YoloNASBottleneck"]
 
 
-class YoloSGBottleneck(nn.Module):
+class YoloNASBottleneck(nn.Module):
     """
-    A bottleneck block for YoloSG. Consists of two consecutive blocks and optional residual connection.
+    A bottleneck block for YoloNAS. Consists of two consecutive blocks and optional residual connection.
     """
 
     def __init__(
         self, input_channels: int, output_channels: int, block_type: Type[nn.Module], activation_type: Type[nn.Module], shortcut: bool, use_alpha: bool
     ):
         """
-        Initialize the YoloSGBottleneck block
+        Initialize the YoloNASBottleneck block
 
         :param input_channels: Number of input channels
         :param output_channels: Number of output channels
@@ -66,9 +66,9 @@ class SequentialWithIntermediates(nn.Sequential):
         return [super(SequentialWithIntermediates, self).forward(input)]
 
 
-class YoloSGCSPLayer(nn.Module):
+class YoloNASCSPLayer(nn.Module):
     """
-    Cross-stage layer module for YoloSG.
+    Cross-stage layer module for YoloNAS.
     """
 
     def __init__(
@@ -97,13 +97,13 @@ class YoloSGCSPLayer(nn.Module):
         :param hidden_channels: If not None, sets the number of hidden channels used inside the bottleneck blocks.
         :param concat_intermediates:
         """
-        super(YoloSGCSPLayer, self).__init__()
+        super(YoloNASCSPLayer, self).__init__()
         if hidden_channels is None:
             hidden_channels = int(out_channels * expansion)
         self.conv1 = Conv(in_channels, hidden_channels, 1, stride=1, activation_type=activation_type)
         self.conv2 = Conv(in_channels, hidden_channels, 1, stride=1, activation_type=activation_type)
         self.conv3 = Conv(hidden_channels * (2 + concat_intermediates * num_bottlenecks), out_channels, 1, stride=1, activation_type=activation_type)
-        module_list = [YoloSGBottleneck(hidden_channels, hidden_channels, block_type, activation_type, shortcut, use_alpha) for _ in range(num_bottlenecks)]
+        module_list = [YoloNASBottleneck(hidden_channels, hidden_channels, block_type, activation_type, shortcut, use_alpha) for _ in range(num_bottlenecks)]
         self.bottlenecks = SequentialWithIntermediates(concat_intermediates, *module_list)
 
     def forward(self, x: Tensor) -> Tensor:
@@ -115,14 +115,14 @@ class YoloSGCSPLayer(nn.Module):
 
 
 @register_detection_module()
-class YoloSGStem(BaseDetectionModule):
+class YoloNASStem(BaseDetectionModule):
     """
-    Stem module for YoloSG. Consists of a single QARepVGGBlock with stride of two.
+    Stem module for YoloNAS. Consists of a single QARepVGGBlock with stride of two.
     """
 
     def __init__(self, in_channels: int, out_channels: int):
         """
-        Initialize the YoloSGStem module
+        Initialize the YoloNASStem module
         :param in_channels: Number of input channels
         :param out_channels: Number of output channels
         """
@@ -139,9 +139,9 @@ class YoloSGStem(BaseDetectionModule):
 
 
 @register_detection_module()
-class YoloSGStage(BaseDetectionModule):
+class YoloNASStage(BaseDetectionModule):
     """
-    A single stage module for YoloSG. It consists of a downsample block (QARepVGGBlock) followed by YoloSGCSPLayer.
+    A single stage module for YoloNAS. It consists of a downsample block (QARepVGGBlock) followed by YoloNASCSPLayer.
     """
 
     @resolve_param("activation_type", ActivationsTypeFactory())
@@ -155,18 +155,18 @@ class YoloSGStage(BaseDetectionModule):
         concat_intermediates: bool = False,
     ):
         """
-        Initialize the YoloSGStage module
+        Initialize the YoloNASStage module
         :param in_channels: Number of input channels
         :param out_channels: Number of output channels
-        :param num_blocks: Number of bottleneck blocks in the YoloSGCSPLayer
+        :param num_blocks: Number of bottleneck blocks in the YoloNASCSPLayer
         :param activation_type: Activation type for all blocks
         :param hidden_channels: If not None, sets the number of hidden channels used inside the bottleneck blocks.
-        :param concat_intermediates: If True, concatenates the intermediate values from the YoloSGCSPLayer.
+        :param concat_intermediates: If True, concatenates the intermediate values from the YoloNASCSPLayer.
         """
         super().__init__(in_channels)
         self._out_channels = out_channels
         self.downsample = QARepVGGBlock(in_channels, out_channels, stride=2, activation_type=activation_type, use_residual_connection=False)
-        self.blocks = YoloSGCSPLayer(
+        self.blocks = YoloNASCSPLayer(
             out_channels,
             out_channels,
             num_blocks,
@@ -186,9 +186,9 @@ class YoloSGStage(BaseDetectionModule):
 
 
 @register_detection_module()
-class YoloSGUpStage(BaseDetectionModule):
+class YoloNASUpStage(BaseDetectionModule):
     """
-    Upsampling stage for YoloSG.
+    Upsampling stage for YoloNAS.
     """
 
     @resolve_param("activation_type", ActivationsTypeFactory())
@@ -205,7 +205,7 @@ class YoloSGUpStage(BaseDetectionModule):
         reduce_channels: bool = False,
     ):
         """
-        Initialize the YoloSGUpStage module
+        Initialize the YoloNASUpStage module
         :param in_channels: Number of input channels
         :param out_channels: Number of output channels
         :param width_mult: Multiplier for the number of channels in the stage.
@@ -241,7 +241,7 @@ class YoloSGUpStage(BaseDetectionModule):
         self.reduce_after_concat = Conv(num_inputs * out_channels, out_channels, 1, 1, activation_type) if reduce_channels else nn.Identity()
 
         after_concat_channels = out_channels if reduce_channels else out_channels + skip_in_channels
-        self.blocks = YoloSGCSPLayer(
+        self.blocks = YoloNASCSPLayer(
             after_concat_channels,
             out_channels,
             num_blocks,
@@ -274,7 +274,7 @@ class YoloSGUpStage(BaseDetectionModule):
 
 
 @register_detection_module()
-class YoloSGDownStage(BaseDetectionModule):
+class YoloNASDownStage(BaseDetectionModule):
     @resolve_param("activation_type", ActivationsTypeFactory())
     def __init__(
         self,
@@ -288,7 +288,7 @@ class YoloSGDownStage(BaseDetectionModule):
         concat_intermediates: bool = False,
     ):
         """
-        Initializes a YoloSGDownStage.
+        Initializes a YoloNASDownStage.
 
         :param in_channels: Number of input channels.
         :param out_channels: Number of output channels.
@@ -308,7 +308,7 @@ class YoloSGDownStage(BaseDetectionModule):
 
         self.conv = Conv(in_channels, out_channels // 2, 3, 2, activation_type)
         after_concat_channels = out_channels // 2 + skip_in_channels
-        self.blocks = YoloSGCSPLayer(
+        self.blocks = YoloNASCSPLayer(
             in_channels=after_concat_channels,
             out_channels=out_channels,
             num_bottlenecks=num_blocks,
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  1. from super_gradients.training.models.detection_models.yolo_sg.dfl_heads import YoloSGDFLHead, NDFLHeads
  2. from super_gradients.training.models.detection_models.yolo_sg.panneck import YoloSGPANNeckWithC2
  3. from super_gradients.training.models.detection_models.yolo_sg.yolo_stages import (
  4. YoloSGStage,
  5. YoloSGStem,
  6. YoloSGDownStage,
  7. YoloSGUpStage,
  8. YoloSGBottleneck,
  9. )
  10. from super_gradients.training.models.detection_models.yolo_sg.yolo_sg_variants import YoloSG_S, YoloSG_M, YoloSG_L
  11. __all__ = [
  12. "YoloSGBottleneck",
  13. "YoloSGUpStage",
  14. "YoloSGDownStage",
  15. "YoloSGStem",
  16. "YoloSGStage",
  17. "NDFLHeads",
  18. "YoloSGDFLHead",
  19. "YoloSGPANNeckWithC2",
  20. "YoloSG_S",
  21. "YoloSG_M",
  22. "YoloSG_L",
  23. ]
Discard
@@ -60,9 +60,9 @@ MODEL_URLS = {
     "ppyoloe_l_coco": "https://deci-pretrained-models.s3.amazonaws.com/ppyolo_e/coco2017_pp_yoloe_l_best_model_21uffbb8.pth",  # 0.4948
     "ppyoloe_x_coco": "https://deci-pretrained-models.s3.amazonaws.com/ppyolo_e/coco2017_pp_yoloe_x_best_model_z03if91o.pth",  # 0.5115
     #
-    "yolo_sg_s_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_sg/yolo_sg_s_coco2017.pth",
-    "yolo_sg_m_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_sg/yolo_sg_m_coco2017.pth",
-    "yolo_sg_l_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_sg/yolo_sg_l_coco2017.pth",
+    "yolo_nas_s_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_nas/yolo_nas_s_coco2017.pth",
+    "yolo_nas_m_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_nas/yolo_nas_m_coco2017.pth",
+    "yolo_nas_l_coco": "https://deci-pretrained-models.s3.amazonaws.com/yolo_nas/yolo_nas_l_coco2017.pth",
 }
 
 PRETRAINED_NUM_CLASSES = {
Discard
@@ -305,8 +305,8 @@ def default_ppyoloe_coco_processing_params() -> dict:
     return params
 
 
-def default_yolo_sg_coco_processing_params() -> dict:
-    """Processing parameters commonly used for training YoloSG on COCO dataset.
+def default_yolo_nas_coco_processing_params() -> dict:
+    """Processing parameters commonly used for training YoloNAS on COCO dataset.
     TODO: remove once we load it from the checkpoint
     """
 
@@ -337,6 +337,6 @@ def get_pretrained_processing_params(model_name: str, pretrained_weights: str) -
             return default_yolox_coco_processing_params()
         elif "ppyoloe" in model_name:
             return default_ppyoloe_coco_processing_params()
-        elif "yolo_sg" in model_name:
-            return default_yolo_sg_coco_processing_params()
+        elif "yolo_nas" in model_name:
+            return default_yolo_nas_coco_processing_params()
     return dict()
Discard
@@ -1,7 +1,7 @@
 import sys
 import unittest
 
-from tests.integration_tests import EMAIntegrationTest, LRTest, PoseEstimationDatasetIntegrationTest, YoloSGIntegrationTest
+from tests.integration_tests import EMAIntegrationTest, LRTest, PoseEstimationDatasetIntegrationTest, YoloNASIntegrationTest
 
 
 class CoreIntegrationTestSuiteRunner:
@@ -19,7 +19,7 @@ class CoreIntegrationTestSuiteRunner:
         self.integration_tests_suite.addTest(self.test_loader.loadTestsFromModule(EMAIntegrationTest))
         self.integration_tests_suite.addTest(self.test_loader.loadTestsFromModule(LRTest))
         self.integration_tests_suite.addTest(self.test_loader.loadTestsFromModule(PoseEstimationDatasetIntegrationTest))
-        self.integration_tests_suite.addTest(self.test_loader.loadTestsFromModule(YoloSGIntegrationTest))
+        self.integration_tests_suite.addTest(self.test_loader.loadTestsFromModule(YoloNASIntegrationTest))
 
 
 if __name__ == "__main__":
Discard
@@ -3,6 +3,6 @@
 from tests.integration_tests.ema_train_integration_test import EMAIntegrationTest
 from tests.integration_tests.lr_test import LRTest
 from tests.integration_tests.pose_estimation_dataset_test import PoseEstimationDatasetIntegrationTest
-from tests.integration_tests.yolosg_integration_test import YoloSGIntegrationTest
+from tests.integration_tests.yolo_nas_integration_test import YoloNASIntegrationTest
 
-__all__ = ["EMAIntegrationTest", "LRTest", "PoseEstimationDatasetIntegrationTest", "YoloSGIntegrationTest"]
+__all__ = ["EMAIntegrationTest", "LRTest", "PoseEstimationDatasetIntegrationTest", "YoloNASIntegrationTest"]
Discard
@@ -1,16 +1,16 @@
 import unittest
 from super_gradients.training import models
-from super_gradients.training.dataloaders import coco2017_val_yolo_sg
+from super_gradients.training.dataloaders import coco2017_val_yolo_nas
 from super_gradients.training import Trainer
 from super_gradients.training.metrics import DetectionMetrics
 from super_gradients.training.models.detection_models.pp_yolo_e import PPYoloEPostPredictionCallback
 
 
-class YoloSGIntegrationTest(unittest.TestCase):
-    def test_yolo_sg_s_coco(self):
-        trainer = Trainer("test_yolo_sg_s")
-        model = models.get("yolo_sg_s", num_classes=80, pretrained_weights="coco")
-        dl = coco2017_val_yolo_sg()
+class YoloNASIntegrationTest(unittest.TestCase):
+    def test_yolo_nas_s_coco(self):
+        trainer = Trainer("test_yolo_nas_s")
+        model = models.get("yolo_nas_s", num_classes=80, pretrained_weights="coco")
+        dl = coco2017_val_yolo_nas()
         metric = DetectionMetrics(
             normalize_targets=True,
             post_prediction_callback=PPYoloEPostPredictionCallback(score_threshold=0.03, nms_top_k=1000, max_predictions=300, nms_threshold=0.65),
@@ -19,10 +19,10 @@ class YoloSGIntegrationTest(unittest.TestCase):
         metric_values = trainer.test(model=model, test_loader=dl, test_metrics_list=[metric])
         self.assertAlmostEqual(metric_values[metric.map_str], 0.475, delta=0.001)
 
-    def test_yolo_sg_m_coco(self):
-        trainer = Trainer("test_yolo_sg_m")
-        model = models.get("yolo_sg_m", num_classes=80, pretrained_weights="coco")
-        dl = coco2017_val_yolo_sg()
+    def test_yolo_nas_m_coco(self):
+        trainer = Trainer("test_yolo_nas_m")
+        model = models.get("yolo_nas_m", num_classes=80, pretrained_weights="coco")
+        dl = coco2017_val_yolo_nas()
         metric = DetectionMetrics(
             normalize_targets=True,
             post_prediction_callback=PPYoloEPostPredictionCallback(score_threshold=0.03, nms_top_k=1000, max_predictions=300, nms_threshold=0.65),
@@ -31,10 +31,10 @@ class YoloSGIntegrationTest(unittest.TestCase):
         metric_values = trainer.test(model=model, test_loader=dl, test_metrics_list=[metric])
         self.assertAlmostEqual(metric_values[metric.map_str], 0.5155, delta=0.001)
 
-    def test_yolo_sg_l_coco(self):
-        trainer = Trainer("test_yolo_sg_l")
-        model = models.get("yolo_sg_l", num_classes=80, pretrained_weights="coco")
-        dl = coco2017_val_yolo_sg()
+    def test_yolo_nas_l_coco(self):
+        trainer = Trainer("test_yolo_nas_l")
+        model = models.get("yolo_nas_l", num_classes=80, pretrained_weights="coco")
+        dl = coco2017_val_yolo_nas()
         metric = DetectionMetrics(
             normalize_targets=True,
             post_prediction_callback=PPYoloEPostPredictionCallback(score_threshold=0.03, nms_top_k=1000, max_predictions=300, nms_threshold=0.65),
Discard
@@ -22,9 +22,9 @@ class ReplaceHeadUnitTest(unittest.TestCase):
             (_, pred_scores), _ = model.forward(input)
             self.assertEqual(pred_scores.size(2), 100)
 
-    def test_yolo_sg_replace_head(self):
+    def test_yolo_nas_replace_head(self):
         input = torch.randn(1, 3, 640, 640).to(self.device)
-        for model in [Models.YoloSG_S, Models.YoloSG_M, Models.YoloSG_L]:
+        for model in [Models.YOLO_NAS_S, Models.YOLO_NAS_M, Models.YOLO_NAS_L]:
             model = models.get(model, pretrained_weights="coco").to(self.device).eval()
             model.replace_head(new_num_classes=100)
             (_, pred_scores), _ = model.forward(input)
Discard