From 03c876b08c6f656955688c2032c440dc3a5c291b Mon Sep 17 00:00:00 2001 From: Eugene Khvedchenya Date: Thu, 16 May 2024 10:38:16 +0300 Subject: [PATCH] Improve docstrings --- .../training/transforms/obb/obb_compose.py | 17 ++++------------- .../training/transforms/obb/obb_mixup.py | 6 +++--- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/super_gradients/training/transforms/obb/obb_compose.py b/src/super_gradients/training/transforms/obb/obb_compose.py index f1080578bf..bcc03b68b5 100644 --- a/src/super_gradients/training/transforms/obb/obb_compose.py +++ b/src/super_gradients/training/transforms/obb/obb_compose.py @@ -44,24 +44,15 @@ def _apply_transforms(cls, sample: OBBSample, transforms: List[AbstractOBBDetect ``` transforms: - - KeypointsBrightnessContrast: - brightness_range: [ 0.8, 1.2 ] - contrast_range: [ 0.8, 1.2 ] - prob: 0.5 - - KeypointsHSV: - hgain: 20 - sgain: 20 - vgain: 20 - prob: 0.5 - - KeypointsLongestMaxSize: + - OBBDetectionLongestMaxSize: max_height: ${dataset_params.image_size} max_width: ${dataset_params.image_size} - - KeypointsMixup: + - OBBDetectionMixup: prob: ${dataset_params.mixup_prob} ``` - In the example above all samples in mixup will be forwarded through KeypointsBrightnessContrast, KeypointsHSV, - KeypointsLongestMaxSize and only then mixed up. + In the example above all samples in mixup will be forwarded through OBBDetectionLongestMaxSize, + and only then mixed up. :param sample: Input data sample :param transforms: List of transformations to apply diff --git a/src/super_gradients/training/transforms/obb/obb_mixup.py b/src/super_gradients/training/transforms/obb/obb_mixup.py index bebea89c88..adc4bbad02 100644 --- a/src/super_gradients/training/transforms/obb/obb_mixup.py +++ b/src/super_gradients/training/transforms/obb/obb_mixup.py @@ -21,18 +21,18 @@ class OBBDetectionMixup(AbstractOBBDetectionTransform): # and then apply KeypointsMixup to get a single sample. train_dataset_params: transforms: - - KeypointsLongestMaxSize: + - OBBDetectionLongestMaxSize: max_height: ${dataset_params.image_size} max_width: ${dataset_params.image_size} - - KeypointsPadIfNeeded: + - OBBDetectionPadIfNeeded: min_height: ${dataset_params.image_size} min_width: ${dataset_params.image_size} image_pad_value: [127, 127, 127] mask_pad_value: 1 padding_mode: center - - KeypointsMixup: + - OBBDetectionMixup: prob: 0.5 ```