Add get_paths() to base_unsupervised_image_dataset

This commit is contained in:
James Betker 2020-10-19 11:30:06 -06:00
parent 981d64413b
commit 9b9a6e5925

View File

@ -51,6 +51,12 @@ class BaseUnsupervisedImageDataset(data.Dataset):
start += len(c) start += len(c)
self.len = start 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. # Utility method for translating a point when the dimensions of an image change.
def resize_point(self, point, orig_dim, new_dim): def resize_point(self, point, orig_dim, new_dim):
oh, ow = orig_dim oh, ow = orig_dim