Skip to content

Commit

Permalink
Fix NotImplementedError in RandomSaturation class
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Dec 13, 2023
1 parent a696ebe commit fcc8a82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions datasets/augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1031,7 +1031,6 @@ def build_augmentation(cfg: CfgNode, mode: str = "train") -> list[T.Augmentation
)

# Orientation

augmentation.append(
RandomApply(
RandomOrientation(
Expand Down

0 comments on commit fcc8a82

Please sign in to comment.