From 8528be86a32b54d5bc688db79941b2d059db69c3 Mon Sep 17 00:00:00 2001 From: John Loverich Date: Tue, 21 May 2024 17:30:36 -0700 Subject: [PATCH] Disable second image with same query --- .../single_image_dataset.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/high_order_implicit_representation/single_image_dataset.py b/high_order_implicit_representation/single_image_dataset.py index 05cf164..48598a2 100644 --- a/high_order_implicit_representation/single_image_dataset.py +++ b/high_order_implicit_representation/single_image_dataset.py @@ -349,10 +349,11 @@ def data_generator(self): arr = np.copy(np.asarray(img)) yield caption, torch.from_numpy(arr) - jpg_1 = row["jpg_1"] - img = Image.open(io.BytesIO(jpg_1)) - arr = np.copy(np.asarray(img)) - yield caption, torch.from_numpy(arr) + # I don't want the same caption twice + #jpg_1 = row["jpg_1"] + #img = Image.open(io.BytesIO(jpg_1)) + #arr = np.copy(np.asarray(img)) + #yield caption, torch.from_numpy(arr) def __call__(self): return self.data_generator()