From 77a47782a9162e7b1ff090addce97de3246e782b Mon Sep 17 00:00:00 2001 From: Dmytro Mishkin Date: Sun, 19 Nov 2017 09:07:34 +0100 Subject: [PATCH 1/3] Added urls to Harris patches on Phototour --- torchvision/datasets/phototour.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/torchvision/datasets/phototour.py b/torchvision/datasets/phototour.py index a0299496fa1..5f1e3e24da4 100644 --- a/torchvision/datasets/phototour.py +++ b/torchvision/datasets/phototour.py @@ -24,6 +24,21 @@ class PhotoTour(data.Dataset): """ urls = { + 'notredame_harris': [ + 'http://matthewalunbrown.com/patchdata/notredame_harris.zip', + 'notredame_harris.zip', + '69f8c90f78e171349abdf0307afefe4d' + ], + 'yosemite_harris': [ + 'http://matthewalunbrown.com/patchdata/yosemite_harris.zip', + 'yosemite_harris.zip', + 'a73253d1c6fbd3ba2613c45065c00d46' + ], + 'liberty_harris': [ + 'http://matthewalunbrown.com/patchdata/liberty_harris.zip', + 'liberty_harris.zip', + 'c731fcfb3abb4091110d0ae8c7ba182c' + ], 'notredame': [ 'http://icvl.ee.ic.ac.uk/vbalnt/notredame.zip', 'notredame.zip', @@ -40,9 +55,9 @@ class PhotoTour(data.Dataset): 'fdd9152f138ea5ef2091746689176414' ], } - mean = {'notredame': 0.4854, 'yosemite': 0.4844, 'liberty': 0.4437} - std = {'notredame': 0.1864, 'yosemite': 0.1818, 'liberty': 0.2019} - lens = {'notredame': 468159, 'yosemite': 633587, 'liberty': 450092} + mean = {'notredame': 0.4854, 'yosemite': 0.4844, 'liberty': 0.4437, 'notredame_harris': 0.4854, 'yosemite_harris': 0.4844, 'liberty_harris': 0.4437} + std = {'notredame': 0.1864, 'yosemite': 0.1818, 'liberty': 0.2019, 'notredame_harris': 0.1864, 'yosemite_harris': 0.1818, 'liberty_harris': 0.2019} + lens = {'notredame': 468159, 'yosemite': 633587, 'liberty': 450092, 'liberty_harris': 379587, 'yosemite_harris': 450912 , 'notredame_harris': 325295} image_ext = 'bmp' info_file = 'info.txt' @@ -57,7 +72,6 @@ def __init__(self, root, name, train=True, transform=None, download=False): self.train = train self.transform = transform - self.mean = self.mean[name] self.std = self.std[name] From 6f734e32f778d3a397fac9e60d6a0f3f099a4e1a Mon Sep 17 00:00:00 2001 From: Dmytro Mishkin Date: Sun, 19 Nov 2017 13:43:55 +0100 Subject: [PATCH 2/3] fixed formatting --- torchvision/datasets/phototour.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/torchvision/datasets/phototour.py b/torchvision/datasets/phototour.py index 5f1e3e24da4..22bc8521c77 100644 --- a/torchvision/datasets/phototour.py +++ b/torchvision/datasets/phototour.py @@ -55,9 +55,12 @@ class PhotoTour(data.Dataset): 'fdd9152f138ea5ef2091746689176414' ], } - mean = {'notredame': 0.4854, 'yosemite': 0.4844, 'liberty': 0.4437, 'notredame_harris': 0.4854, 'yosemite_harris': 0.4844, 'liberty_harris': 0.4437} - std = {'notredame': 0.1864, 'yosemite': 0.1818, 'liberty': 0.2019, 'notredame_harris': 0.1864, 'yosemite_harris': 0.1818, 'liberty_harris': 0.2019} - lens = {'notredame': 468159, 'yosemite': 633587, 'liberty': 450092, 'liberty_harris': 379587, 'yosemite_harris': 450912 , 'notredame_harris': 325295} + mean = {'notredame': 0.4854, 'yosemite': 0.4844, 'liberty': 0.4437, + 'notredame_harris': 0.4854, 'yosemite_harris': 0.4844, 'liberty_harris': 0.4437} + std = {'notredame': 0.1864, 'yosemite': 0.1818, 'liberty': 0.2019, + 'notredame_harris': 0.1864, 'yosemite_harris': 0.1818, 'liberty_harris': 0.2019} + lens = {'notredame': 468159, 'yosemite': 633587, 'liberty': 450092, + 'liberty_harris': 379587, 'yosemite_harris': 450912, 'notredame_harris': 325295} image_ext = 'bmp' info_file = 'info.txt' From 2401259a295e117784443e737186a0c4de9dd463 Mon Sep 17 00:00:00 2001 From: Dmytro Mishkin Date: Sun, 19 Nov 2017 17:20:49 +0100 Subject: [PATCH 3/3] fixed flake8 complains --- torchvision/datasets/phototour.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torchvision/datasets/phototour.py b/torchvision/datasets/phototour.py index 22bc8521c77..49367bd08ac 100644 --- a/torchvision/datasets/phototour.py +++ b/torchvision/datasets/phototour.py @@ -58,10 +58,9 @@ class PhotoTour(data.Dataset): mean = {'notredame': 0.4854, 'yosemite': 0.4844, 'liberty': 0.4437, 'notredame_harris': 0.4854, 'yosemite_harris': 0.4844, 'liberty_harris': 0.4437} std = {'notredame': 0.1864, 'yosemite': 0.1818, 'liberty': 0.2019, - 'notredame_harris': 0.1864, 'yosemite_harris': 0.1818, 'liberty_harris': 0.2019} + 'notredame_harris': 0.1864, 'yosemite_harris': 0.1818, 'liberty_harris': 0.2019} lens = {'notredame': 468159, 'yosemite': 633587, 'liberty': 450092, 'liberty_harris': 379587, 'yosemite_harris': 450912, 'notredame_harris': 325295} - image_ext = 'bmp' info_file = 'info.txt' matches_files = 'm50_100000_100000_0.txt'