diff --git a/hsv.png b/hsv.png index bc15ae4..7bd6959 100644 Binary files a/hsv.png and b/hsv.png differ diff --git a/hsv.py b/hsv.py index 720ba79..156403d 100644 --- a/hsv.py +++ b/hsv.py @@ -12,6 +12,7 @@ if __name__ == "__main__": plot_preds( xkcd_hsv[:, 0], xkcd_rgb, fname="hsv", roll=False, dpi=300, figsize=(6, 6) ) - rgb = np.eye(3) + rgb = np.vstack([np.eye(3), np.eye(3) + np.eye(3)[:, [1, 2, 0]]]) print("Pure RGB in Hue-Space:") + print(rgb) print(rgb_to_hsv(rgb)[:, 0]) diff --git a/utils.py b/utils.py index 3dcc80d..b3be461 100644 --- a/utils.py +++ b/utils.py @@ -34,7 +34,7 @@ def extract_colors(): return rgb_tensor, xkcd_color_names -PURE_RGB = preprocess_data( - torch.tensor([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=torch.float32) +PURE_RGB = preprocess_data(torch.eye(3) + torch.eye(3)[:, [1, 2, 0]]) +PURE_HSV = torch.tensor( + [[0], [1 / 3], [2 / 3], [5 / 6], [1 / 6], [0.5]], dtype=torch.float32 ) -PURE_HSV = torch.tensor([[0], [1 / 3], [2 / 3]], dtype=torch.float32)