Skip to content

Commit

Permalink
Improve docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodAxe committed May 16, 2024
1 parent 1f69534 commit 03c876b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
17 changes: 4 additions & 13 deletions src/super_gradients/training/transforms/obb/obb_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/super_gradients/training/transforms/obb/obb_mixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 03c876b

Please sign in to comment.