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

#875 Feature/sg 761 yolo nas

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-761-yolo-nas
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  1. backbone:
  2. NStageBackbone:
  3. stem:
  4. YoloNASStem:
  5. out_channels: 48
  6. stages:
  7. - YoloNASStage:
  8. out_channels: 96
  9. num_blocks: 2
  10. activation_type: relu
  11. hidden_channels: 96
  12. concat_intermediates: True
  13. - YoloNASStage:
  14. out_channels: 192
  15. num_blocks: 3
  16. activation_type: relu
  17. hidden_channels: 128
  18. concat_intermediates: True
  19. - YoloNASStage:
  20. out_channels: 384
  21. num_blocks: 5
  22. activation_type: relu
  23. hidden_channels: 256
  24. concat_intermediates: True
  25. - YoloNASStage:
  26. out_channels: 768
  27. num_blocks: 2
  28. activation_type: relu
  29. hidden_channels: 512
  30. concat_intermediates: True
  31. context_module:
  32. SPP:
  33. output_channels: 768
  34. activation_type: relu
  35. k: [5,9,13]
  36. out_layers: [stage1, stage2, stage3, context_module]
  37. neck:
  38. YoloNASPANNeckWithC2:
  39. neck1:
  40. YoloNASUpStage:
  41. out_channels: 192
  42. num_blocks: 4
  43. hidden_channels: 128
  44. width_mult: 1
  45. depth_mult: 1
  46. activation_type: relu
  47. reduce_channels: True
  48. neck2:
  49. YoloNASUpStage:
  50. out_channels: 96
  51. num_blocks: 4
  52. hidden_channels: 128
  53. width_mult: 1
  54. depth_mult: 1
  55. activation_type: relu
  56. reduce_channels: True
  57. neck3:
  58. YoloNASDownStage:
  59. out_channels: 192
  60. num_blocks: 4
  61. hidden_channels: 128
  62. activation_type: relu
  63. width_mult: 1
  64. depth_mult: 1
  65. neck4:
  66. YoloNASDownStage:
  67. out_channels: 384
  68. num_blocks: 4
  69. hidden_channels: 256
  70. activation_type: relu
  71. width_mult: 1
  72. depth_mult: 1
  73. heads:
  74. NDFLHeads:
  75. num_classes: 80
  76. reg_max: 16
  77. heads_list:
  78. - YoloNASDFLHead:
  79. inter_channels: 128
  80. width_mult: 1
  81. first_conv_group_size: 0
  82. stride: 8
  83. - YoloNASDFLHead:
  84. inter_channels: 256
  85. width_mult: 1
  86. first_conv_group_size: 0
  87. stride: 16
  88. - YoloNASDFLHead:
  89. inter_channels: 512
  90. width_mult: 1
  91. first_conv_group_size: 0
  92. stride: 32
  93. bn_eps: 1e-3
  94. bn_momentum: 0.03
  95. inplace_act: True
  96. _convert_: all
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  1. backbone:
  2. NStageBackbone:
  3. stem:
  4. YoloNASStem:
  5. out_channels: 48
  6. stages:
  7. - YoloNASStage:
  8. out_channels: 96
  9. num_blocks: 2
  10. activation_type: relu
  11. hidden_channels: 64
  12. concat_intermediates: True
  13. - YoloNASStage:
  14. out_channels: 192
  15. num_blocks: 3
  16. activation_type: relu
  17. hidden_channels: 128
  18. concat_intermediates: True
  19. - YoloNASStage:
  20. out_channels: 384
  21. num_blocks: 5
  22. activation_type: relu
  23. hidden_channels: 256
  24. concat_intermediates: True
  25. - YoloNASStage:
  26. out_channels: 768
  27. num_blocks: 2
  28. activation_type: relu
  29. hidden_channels: 384
  30. concat_intermediates: False
  31. context_module:
  32. SPP:
  33. output_channels: 768
  34. activation_type: relu
  35. k: [5,9,13]
  36. out_layers: [stage1, stage2, stage3, context_module]
  37. neck:
  38. YoloNASPANNeckWithC2:
  39. neck1:
  40. YoloNASUpStage:
  41. out_channels: 192
  42. num_blocks: 2
  43. hidden_channels: 192
  44. width_mult: 1
  45. depth_mult: 1
  46. activation_type: relu
  47. reduce_channels: True
  48. neck2:
  49. YoloNASUpStage:
  50. out_channels: 96
  51. num_blocks: 3
  52. hidden_channels: 64
  53. width_mult: 1
  54. depth_mult: 1
  55. activation_type: relu
  56. reduce_channels: True
  57. neck3:
  58. YoloNASDownStage:
  59. out_channels: 192
  60. num_blocks: 2
  61. hidden_channels: 192
  62. activation_type: relu
  63. width_mult: 1
  64. depth_mult: 1
  65. neck4:
  66. YoloNASDownStage:
  67. out_channels: 384
  68. num_blocks: 3
  69. hidden_channels: 256
  70. activation_type: relu
  71. width_mult: 1
  72. depth_mult: 1
  73. heads:
  74. NDFLHeads:
  75. num_classes: 80
  76. reg_max: 16
  77. heads_list:
  78. - YoloNASDFLHead:
  79. inter_channels: 128
  80. width_mult: 0.75
  81. first_conv_group_size: 0
  82. stride: 8
  83. - YoloNASDFLHead:
  84. inter_channels: 256
  85. width_mult: 0.75
  86. first_conv_group_size: 0
  87. stride: 16
  88. - YoloNASDFLHead:
  89. inter_channels: 512
  90. width_mult: 0.75
  91. first_conv_group_size: 0
  92. stride: 32
  93. bn_eps: 1e-3
  94. bn_momentum: 0.03
  95. inplace_act: True
  96. _convert_: all
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  1. backbone:
  2. NStageBackbone:
  3. stem:
  4. YoloNASStem:
  5. out_channels: 48
  6. stages:
  7. - YoloNASStage:
  8. out_channels: 96
  9. num_blocks: 2
  10. activation_type: relu
  11. hidden_channels: 32
  12. concat_intermediates: False
  13. - YoloNASStage:
  14. out_channels: 192
  15. num_blocks: 3
  16. activation_type: relu
  17. hidden_channels: 64
  18. concat_intermediates: False
  19. - YoloNASStage:
  20. out_channels: 384
  21. num_blocks: 5
  22. activation_type: relu
  23. hidden_channels: 96
  24. concat_intermediates: False
  25. - YoloNASStage:
  26. out_channels: 768
  27. num_blocks: 2
  28. activation_type: relu
  29. hidden_channels: 192
  30. concat_intermediates: False
  31. context_module:
  32. SPP:
  33. output_channels: 768
  34. activation_type: relu
  35. k: [5,9,13]
  36. out_layers: [stage1, stage2, stage3, context_module]
  37. neck:
  38. YoloNASPANNeckWithC2:
  39. neck1:
  40. YoloNASUpStage:
  41. out_channels: 192
  42. num_blocks: 2
  43. hidden_channels: 64
  44. width_mult: 1
  45. depth_mult: 1
  46. activation_type: relu
  47. reduce_channels: True
  48. neck2:
  49. YoloNASUpStage:
  50. out_channels: 96
  51. num_blocks: 2
  52. hidden_channels: 48
  53. width_mult: 1
  54. depth_mult: 1
  55. activation_type: relu
  56. reduce_channels: True
  57. neck3:
  58. YoloNASDownStage:
  59. out_channels: 192
  60. num_blocks: 2
  61. hidden_channels: 64
  62. activation_type: relu
  63. width_mult: 1
  64. depth_mult: 1
  65. neck4:
  66. YoloNASDownStage:
  67. out_channels: 384
  68. num_blocks: 2
  69. hidden_channels: 64
  70. activation_type: relu
  71. width_mult: 1
  72. depth_mult: 1
  73. heads:
  74. NDFLHeads:
  75. num_classes: 80
  76. reg_max: 16
  77. heads_list:
  78. - YoloNASDFLHead:
  79. inter_channels: 128
  80. width_mult: 0.5
  81. first_conv_group_size: 0
  82. stride: 8
  83. - YoloNASDFLHead:
  84. inter_channels: 256
  85. width_mult: 0.5
  86. first_conv_group_size: 0
  87. stride: 16
  88. - YoloNASDFLHead:
  89. inter_channels: 512
  90. width_mult: 0.5
  91. first_conv_group_size: 0
  92. stride: 32
  93. bn_eps: 1e-3
  94. bn_momentum: 0.03
  95. inplace_act: True
  96. _convert_: all
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  1. # YoloNAS-S Detection training on COCO2017 Dataset:
  2. # This training recipe is for demonstration purposes only. Pretrained models were trained using a different recipe.
  3. # So it will not be possible to reproduce the results of the pretrained models using this recipe.
  4. # Instructions:
  5. # 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)
  6. # 1. Move to the project root (where you will find the ReadMe and src folder)
  7. # 2. Run the command you want:
  8. # yolo_nas_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolo_nas_s
  9. #
  10. defaults:
  11. - training_hyperparams: coco2017_yolo_nas_train_params
  12. - dataset_params: coco_detection_yolo_nas_dataset_params
  13. - arch_params: yolo_nas_s_arch_params
  14. - checkpoint_params: default_checkpoint_params
  15. - _self_
  16. - variable_setup
  17. train_dataloader: coco2017_train_yolo_nas
  18. val_dataloader: coco2017_val_yolo_nas
  19. load_checkpoint: False
  20. resume: False
  21. dataset_params:
  22. train_dataloader_params:
  23. batch_size: 32
  24. arch_params:
  25. num_classes: 80
  26. training_hyperparams:
  27. resume: ${resume}
  28. mixed_precision: True
  29. architecture: yolo_nas_s
  30. multi_gpu: DDP
  31. num_gpus: 8
  32. experiment_suffix: ""
  33. experiment_name: coco2017_${architecture}${experiment_suffix}
Discard
@@ -30,15 +30,15 @@ train_dataset_params:
         mixup_scale: [ 0.5, 1.5 ]         # random rescale range for the additional sample in mixup
         mixup_scale: [ 0.5, 1.5 ]         # random rescale range for the additional sample in mixup
         prob: 0.5                       # probability to apply per-sample mixup
         prob: 0.5                       # probability to apply per-sample mixup
         flip_prob: 0.5                  # probability to apply horizontal flip
         flip_prob: 0.5                  # probability to apply horizontal flip
-    - DetectionStandardizeImage:
-        max_value: 255.
     - DetectionPaddedRescale:
     - DetectionPaddedRescale:
         input_dim: [640, 640]
         input_dim: [640, 640]
         max_targets: 120
         max_targets: 120
         pad_value: 114
         pad_value: 114
+    - DetectionStandardize:
+        max_value: 255.
     - DetectionTargetsFormatTransform:
     - DetectionTargetsFormatTransform:
         max_targets: 256
         max_targets: 256
-        output_format: LABEL_NORMALIZED_CXCYWH
+        output_format: LABEL_CXCYWH
 
 
   tight_box_rotation: False
   tight_box_rotation: False
   class_inclusion_list:
   class_inclusion_list:
@@ -67,13 +67,13 @@ val_dataset_params:
     - DetectionPadToSize:
     - DetectionPadToSize:
         output_size: [640, 640]
         output_size: [640, 640]
         pad_value: 114
         pad_value: 114
-    - DetectionStandardizeImage:
+    - DetectionStandardize:
         max_value: 255.
         max_value: 255.
     - DetectionImagePermute
     - DetectionImagePermute
     - DetectionTargetsFormatTransform:
     - DetectionTargetsFormatTransform:
         max_targets: 50
         max_targets: 50
         input_dim: [640, 640]
         input_dim: [640, 640]
-        output_format: LABEL_NORMALIZED_CXCYWH
+        output_format: LABEL_CXCYWH
   tight_box_rotation: False
   tight_box_rotation: False
   class_inclusion_list:
   class_inclusion_list:
   max_num_samples:
   max_num_samples:
@@ -83,6 +83,7 @@ val_dataloader_params:
   batch_size: 25
   batch_size: 25
   num_workers: 8
   num_workers: 8
   drop_last: False
   drop_last: False
+  shuffle: False
   pin_memory: True
   pin_memory: True
   collate_fn:
   collate_fn:
     _target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
     _target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
Discard
@@ -9,18 +9,27 @@ train_dataset_params:
   input_dim: [640, 640]
   input_dim: [640, 640]
   cache_dir:
   cache_dir:
   cache: False
   cache: False
+  ignore_empty_annotations: False
   transforms:
   transforms:
+    - DetectionMosaic:
+        input_dim: ${dataset_params.train_dataset_params.input_dim}
+        prob: 1.
     - DetectionRandomAffine:
     - DetectionRandomAffine:
         degrees: 0.                  # rotation degrees, randomly sampled from [-degrees, degrees]
         degrees: 0.                  # rotation degrees, randomly sampled from [-degrees, degrees]
         translate: 0.1                # image translation fraction
         translate: 0.1                # image translation fraction
         scales: [ 0.5, 1.5 ]              # random rescale range (keeps size by padding/cropping) after mosaic transform.
         scales: [ 0.5, 1.5 ]              # random rescale range (keeps size by padding/cropping) after mosaic transform.
         shear: 0.0                    # shear degrees, randomly sampled from [-degrees, degrees]
         shear: 0.0                    # shear degrees, randomly sampled from [-degrees, degrees]
         target_size: ${dataset_params.train_dataset_params.input_dim}
         target_size: ${dataset_params.train_dataset_params.input_dim}
-        filter_box_candidates: True   # whether to filter out transformed bboxes by edge size, area ratio, and aspect ratio.
+        filter_box_candidates: False  # whether to filter out transformed bboxes by edge size, area ratio, and aspect ratio.
         wh_thr: 2                     # edge size threshold when filter_box_candidates = True (pixels)
         wh_thr: 2                     # edge size threshold when filter_box_candidates = True (pixels)
         area_thr: 0.1                 # threshold for area ratio between original image and the transformed one, when filter_box_candidates = True
         area_thr: 0.1                 # threshold for area ratio between original image and the transformed one, when filter_box_candidates = True
         ar_thr: 20                    # aspect ratio threshold when filter_box_candidates = True
         ar_thr: 20                    # aspect ratio threshold when filter_box_candidates = True
         border_value: 128
         border_value: 128
+#    - DetectionMixup:
+#        input_dim: ${dataset_params.train_dataset_params.input_dim}
+#        mixup_scale: [ 0.5, 1.5 ]         # random rescale range for the additional sample in mixup
+#        prob: 1.0                       # probability to apply per-sample mixup
+#        flip_prob: 0.5                  # probability to apply horizontal flip
     - DetectionHSV:
     - DetectionHSV:
         prob: 1.0                       # probability to apply HSV transform
         prob: 1.0                       # probability to apply HSV transform
         hgain: 5                        # HSV transform hue gain (randomly sampled from [-hgain, hgain])
         hgain: 5                        # HSV transform hue gain (randomly sampled from [-hgain, hgain])
@@ -30,8 +39,11 @@ train_dataset_params:
         prob: 0.5                       # probability to apply horizontal flip
         prob: 0.5                       # probability to apply horizontal flip
     - DetectionPaddedRescale:
     - DetectionPaddedRescale:
         input_dim: ${dataset_params.train_dataset_params.input_dim}
         input_dim: ${dataset_params.train_dataset_params.input_dim}
-        max_targets: 120
+        max_targets: 300
+    - DetectionStandardize:
+        max_value: 255.
     - DetectionTargetsFormatTransform:
     - DetectionTargetsFormatTransform:
+        max_targets: 300
         input_dim: ${dataset_params.train_dataset_params.input_dim}
         input_dim: ${dataset_params.train_dataset_params.input_dim}
         output_format: LABEL_CXCYWH
         output_format: LABEL_CXCYWH
   tight_box_rotation: False
   tight_box_rotation: False
@@ -43,8 +55,8 @@ train_dataset_params:
 train_dataloader_params:
 train_dataloader_params:
   shuffle: True
   shuffle: True
   batch_size: 16
   batch_size: 16
-  num_workers: 0
-  sampler:
+  min_samples: 512
+  num_workers: 4
   drop_last: False
   drop_last: False
   pin_memory: True
   pin_memory: True
   worker_init_fn:
   worker_init_fn:
@@ -60,11 +72,16 @@ val_dataset_params:
   input_dim: [640, 640]
   input_dim: [640, 640]
   cache_dir:
   cache_dir:
   cache: False
   cache: False
+  ignore_empty_annotations: False
   transforms:
   transforms:
   - DetectionPaddedRescale:
   - DetectionPaddedRescale:
       input_dim: ${dataset_params.val_dataset_params.input_dim}
       input_dim: ${dataset_params.val_dataset_params.input_dim}
+      max_targets: 300
+      pad_value: 114
+  - DetectionStandardize:
+      max_value: 255.
   - DetectionTargetsFormatTransform:
   - DetectionTargetsFormatTransform:
-      max_targets: 50
+      max_targets: 300
       input_dim: ${dataset_params.val_dataset_params.input_dim}
       input_dim: ${dataset_params.val_dataset_params.input_dim}
       output_format: LABEL_CXCYWH
       output_format: LABEL_CXCYWH
   tight_box_rotation: False
   tight_box_rotation: False
@@ -74,10 +91,10 @@ val_dataset_params:
   verbose: 0
   verbose: 0
 
 
 val_dataloader_params:
 val_dataloader_params:
-  batch_size: 64
-  num_workers: 0
-  sampler:
+  batch_size: 32
+  num_workers: 4
   drop_last: False
   drop_last: False
+  shuffle: False
   pin_memory: True
   pin_memory: True
   collate_fn: # collate function for valset
   collate_fn: # collate function for valset
     _target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
     _target_: super_gradients.training.utils.detection_utils.CrowdDetectionCollateFN
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
  1. # A recipe to fine-tune YoloNAS on Roboflow datasets.
  2. # Checkout the datasets at https://universe.roboflow.com/roboflow-100?ref=blog.roboflow.com
  3. #
  4. # `dataset_name` refers to the official name of the dataset.
  5. # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
  6. #
  7. # Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_nas_m dataset_name=digits-t2eg6
  8. defaults:
  9. - training_hyperparams: coco2017_yolo_nas_train_params
  10. - dataset_params: roboflow_detection_dataset_params
  11. - checkpoint_params: default_checkpoint_params
  12. - arch_params: yolo_nas_m_arch_params
  13. - _self_
  14. - variable_setup
  15. train_dataloader: roboflow_train_yolox
  16. val_dataloader: roboflow_val_yolox
  17. dataset_name: ??? # Placeholder for the name of the dataset you want to use (e.g. "digits-t2eg6")
  18. dataset_params:
  19. dataset_name: ${dataset_name}
  20. train_dataloader_params:
  21. batch_size: 12
  22. val_dataloader_params:
  23. batch_size: 16
  24. num_classes: ${roboflow_dataset_num_classes:${dataset_name}}
  25. architecture: yolo_nas_m
  26. arch_params:
  27. num_classes: ${num_classes}
  28. load_checkpoint: False
  29. checkpoint_params:
  30. pretrained_weights: coco
  31. result_path: # By defaults saves results in checkpoints directory
  32. resume: False
  33. training_hyperparams:
  34. resume: ${resume}
  35. zero_weight_decay_on_bias_and_bn: True
  36. lr_warmup_epochs: 3
  37. warmup_mode: linear_epoch_step
  38. initial_lr: 4e-4
  39. cosine_final_lr_ratio: 0.1
  40. optimizer_params:
  41. weight_decay: 0.0001
  42. ema: True
  43. ema_params:
  44. decay: 0.9
  45. max_epochs: 100
  46. mixed_precision: True
  47. criterion_params:
  48. num_classes: ${num_classes}
  49. phase_callbacks: []
  50. loss:
  51. ppyoloe_loss:
  52. num_classes: ${num_classes}
  53. reg_max: 16
  54. valid_metrics_list:
  55. - DetectionMetrics_050:
  56. score_thres: 0.1
  57. top_k_predictions: 300
  58. num_cls: ${num_classes}
  59. normalize_targets: True
  60. post_prediction_callback:
  61. _target_: super_gradients.training.models.detection_models.pp_yolo_e.PPYoloEPostPredictionCallback
  62. score_threshold: 0.01
  63. nms_top_k: 1000
  64. max_predictions: 300
  65. nms_threshold: 0.7
  66. metric_to_watch: 'mAP@0.50'
  67. multi_gpu: Off
  68. num_gpus: 1
  69. experiment_suffix: ""
  70. experiment_name: ${architecture}_roboflow_${dataset_name}${experiment_suffix}
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
  1. # A recipe to fine-tune YoloNAS on Roboflow datasets.
  2. # Checkout the datasets at https://universe.roboflow.com/roboflow-100?ref=blog.roboflow.com
  3. #
  4. # `dataset_name` refers to the official name of the dataset.
  5. # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
  6. #
  7. # Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolo_nas_s dataset_name=digits-t2eg6
  8. defaults:
  9. - training_hyperparams: coco2017_yolo_nas_train_params
  10. - dataset_params: roboflow_detection_dataset_params
  11. - checkpoint_params: default_checkpoint_params
  12. - arch_params: yolo_nas_s_arch_params
  13. - _self_
  14. - variable_setup
  15. train_dataloader: roboflow_train_yolox
  16. val_dataloader: roboflow_val_yolox
  17. dataset_name: ??? # Placeholder for the name of the dataset you want to use (e.g. "digits-t2eg6")
  18. dataset_params:
  19. dataset_name: ${dataset_name}
  20. train_dataloader_params:
  21. batch_size: 16
  22. val_dataloader_params:
  23. batch_size: 16
  24. num_classes: ${roboflow_dataset_num_classes:${dataset_name}}
  25. architecture: yolo_nas_s
  26. arch_params:
  27. num_classes: ${num_classes}
  28. load_checkpoint: False
  29. checkpoint_params:
  30. pretrained_weights: coco
  31. result_path: # By defaults saves results in checkpoints directory
  32. resume: False
  33. training_hyperparams:
  34. resume: ${resume}
  35. zero_weight_decay_on_bias_and_bn: True
  36. lr_warmup_epochs: 3
  37. warmup_mode: linear_epoch_step
  38. initial_lr: 5e-4
  39. cosine_final_lr_ratio: 0.1
  40. optimizer_params:
  41. weight_decay: 0.0001
  42. ema: True
  43. ema_params:
  44. decay: 0.9
  45. max_epochs: 100
  46. mixed_precision: True
  47. criterion_params:
  48. num_classes: ${num_classes}
  49. phase_callbacks: []
  50. loss:
  51. ppyoloe_loss:
  52. num_classes: ${num_classes}
  53. reg_max: 16
  54. valid_metrics_list:
  55. - DetectionMetrics_050:
  56. score_thres: 0.1
  57. top_k_predictions: 300
  58. num_cls: ${num_classes}
  59. normalize_targets: True
  60. post_prediction_callback:
  61. _target_: super_gradients.training.models.detection_models.pp_yolo_e.PPYoloEPostPredictionCallback
  62. score_threshold: 0.01
  63. nms_top_k: 1000
  64. max_predictions: 300
  65. nms_threshold: 0.7
  66. metric_to_watch: 'mAP@0.50'
  67. multi_gpu: Off
  68. num_gpus: 1
  69. experiment_suffix: ""
  70. experiment_name: ${architecture}_roboflow_${dataset_name}${experiment_suffix}
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  1. defaults:
  2. - roboflow_yolo_nas_s
  3. - quantization_params: default_quantization_params
  4. - _self_
  5. checkpoint_params:
  6. checkpoint_path: ???
  7. strict_load: no_key_matching
  8. pre_launch_callbacks_list:
  9. - QATRecipeModificationCallback:
  10. batch_size_divisor: 2
  11. max_epochs_divisor: 10
  12. lr_decay_factor: 0.01
  13. warmup_epochs_divisor: 10
  14. cosine_final_lr_ratio: 0.01
  15. disable_phase_callbacks: True
  16. disable_augmentations: False
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  1. defaults:
  2. - default_train_params
  3. max_epochs: 300
  4. warmup_mode: "linear_batch_step"
  5. warmup_initial_lr: 1e-6
  6. lr_warmup_steps: 1000
  7. lr_warmup_epochs: 0
  8. initial_lr: 2e-4
  9. lr_mode: cosine
  10. cosine_final_lr_ratio: 0.1
  11. zero_weight_decay_on_bias_and_bn: True
  12. batch_accumulate: 1
  13. save_ckpt_epoch_list: [100, 200, 250]
  14. loss:
  15. ppyoloe_loss:
  16. use_static_assigner: False
  17. num_classes: ${arch_params.num_classes}
  18. reg_max: 16
  19. optimizer: AdamW
  20. optimizer_params:
  21. weight_decay: 0.00001
  22. ema: True
  23. ema_params:
  24. decay: 0.9997
  25. decay_type: threshold
  26. mixed_precision: False
  27. sync_bn: True
  28. valid_metrics_list:
  29. - DetectionMetrics:
  30. score_thres: 0.1
  31. top_k_predictions: 300
  32. num_cls: ${arch_params.num_classes}
  33. normalize_targets: True
  34. post_prediction_callback:
  35. _target_: super_gradients.training.models.detection_models.pp_yolo_e.PPYoloEPostPredictionCallback
  36. score_threshold: 0.01
  37. nms_top_k: 1000
  38. max_predictions: 300
  39. nms_threshold: 0.7
  40. pre_prediction_callback:
  41. metric_to_watch: 'mAP@0.50:0.95'
  42. greater_metric_to_watch_is_better: True
  43. _convert_: all
Discard