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
@@ -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
Tip!

Press p or to see the previous file or, n or to see the next file