From 9b9a6e59253318b56d8cd04f20689156ca689cc3 Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 19 Oct 2020 11:30:06 -0600 Subject: [PATCH] Add get_paths() to base_unsupervised_image_dataset --- codes/data/base_unsupervised_image_dataset.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codes/data/base_unsupervised_image_dataset.py b/codes/data/base_unsupervised_image_dataset.py index a00209f6..fdd2284e 100644 --- a/codes/data/base_unsupervised_image_dataset.py +++ b/codes/data/base_unsupervised_image_dataset.py @@ -51,6 +51,12 @@ class BaseUnsupervisedImageDataset(data.Dataset): start += len(c) self.len = start + def get_paths(self): + paths = [] + for c in self.chunks: + paths.extend(c.tiles) + return paths + # Utility method for translating a point when the dimensions of an image change. def resize_point(self, point, orig_dim, new_dim): oh, ow = orig_dim