From cdc5ac30e9802d87888fb753775f8b250373c5b2 Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 13 Nov 2020 20:11:57 -0700 Subject: [PATCH] oddity --- codes/data/single_image_dataset.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/codes/data/single_image_dataset.py b/codes/data/single_image_dataset.py index 855b00fa..9fa2b038 100644 --- a/codes/data/single_image_dataset.py +++ b/codes/data/single_image_dataset.py @@ -60,11 +60,13 @@ if __name__ == '__main__': os.makedirs("debug", exist_ok=True) for i in range(0, len(ds)): o = ds[random.randint(0, len(ds))] - for k, v in o.items(): - if 'LQ' in k and 'path' not in k and 'center' not in k: - #if 'full' in k: - #masked = v[:3, :, :] * v[3] - #torchvision.utils.save_image(masked.unsqueeze(0), "debug/%i_%s_masked.png" % (i, k)) - #v = v[:3, :, :] - import torchvision - torchvision.utils.save_image(v.unsqueeze(0), "debug/%i_%s.png" % (i, k)) \ No newline at end of file + #for k, v in o.items(): + k = 'GT' + v = o[k] + #if 'LQ' in k and 'path' not in k and 'center' not in k: + #if 'full' in k: + #masked = v[:3, :, :] * v[3] + #torchvision.utils.save_image(masked.unsqueeze(0), "debug/%i_%s_masked.png" % (i, k)) + #v = v[:3, :, :] + import torchvision + torchvision.utils.save_image(v.unsqueeze(0), "debug/%i_%s.png" % (i, k)) \ No newline at end of file