From fcc8a827f1645e9a1fffd9a68d310c8b89d16c14 Mon Sep 17 00:00:00 2001 From: Stefan Klut Date: Wed, 13 Dec 2023 10:33:31 +0100 Subject: [PATCH] Fix NotImplementedError in RandomSaturation class --- datasets/augmentations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datasets/augmentations.py b/datasets/augmentations.py index 9913d26..6a80268 100644 --- a/datasets/augmentations.py +++ b/datasets/augmentations.py @@ -634,7 +634,7 @@ def __init__(self, intensity_min: float = 0.5, intensity_max: float = 1.5, image elif self.image_format == "BGR": self.weights = rgb_weights[::-1] else: - raise NotImplementedError + raise NotImplementedError(f"Image format {self.image_format} not supported") def get_transform(self, image: np.ndarray) -> T.Transform: grayscale = np.tile(image.dot(self.weights), (3, 1, 1)).transpose((1, 2, 0)).astype(np.float32) @@ -1031,7 +1031,6 @@ def build_augmentation(cfg: CfgNode, mode: str = "train") -> list[T.Augmentation ) # Orientation - augmentation.append( RandomApply( RandomOrientation(