Use ``T.AugmentationList(augmentations)(inputs)`` instead.
(augmentations: List[Union[Transform, Augmentation]], inputs)
| 683 | |
| 684 | |
| 685 | def apply_augmentations(augmentations: List[Union[Transform, Augmentation]], inputs): |
| 686 | """ |
| 687 | Use ``T.AugmentationList(augmentations)(inputs)`` instead. |
| 688 | """ |
| 689 | if isinstance(inputs, np.ndarray): |
| 690 | # handle the common case of image-only Augmentation, also for backward compatibility |
| 691 | image_only = True |
| 692 | inputs = AugInput(inputs) |
| 693 | else: |
| 694 | image_only = False |
| 695 | tfms = inputs.apply_augmentations(augmentations) |
| 696 | return inputs.image if image_only else inputs, tfms |
| 697 | |
| 698 | |
| 699 | apply_transform_gens = apply_augmentations |
no test coverage detected