Skip to content

Commit

Permalink
added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Jan 14, 2025
1 parent 728f1c9 commit ac1ecab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_data/test_augmentations/test_batched.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ def test_mixup(
config = [{"name": "MixUp", "params": {"p": 1.0}}]
augmentations = AlbumentationsEngine(256, 256, targets, config)
augmentations.apply([(image.copy(), deepcopy(labels)) for _ in range(2)])


def test_batched_p_0(
image: np.ndarray, labels: Labels, targets: Dict[str, TaskType]
):
config = [
{
"name": "Mosaic4",
"params": {"p": 0, "out_width": 640, "out_height": 640},
},
{"name": "MixUp", "params": {"p": 0}},
]
augmentations = AlbumentationsEngine(256, 256, targets, config)
augmentations.apply([(image.copy(), deepcopy(labels)) for _ in range(8)])

0 comments on commit ac1ecab

Please sign in to comment.