From a54fabf5e0726969b981131674ebdda2048e726a Mon Sep 17 00:00:00 2001 From: Ashwin Nair Date: Fri, 18 Mar 2022 04:39:57 +0400 Subject: [PATCH] SpaceNet2 update (#469) --- tests/data/spacenet/sn2_AOI_2_Vegas.tar.gz | Bin 1224 -> 1174 bytes tests/datasets/test_spacenet.py | 2 +- torchgeo/datasets/spacenet.py | 31 +-------------------- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/tests/data/spacenet/sn2_AOI_2_Vegas.tar.gz b/tests/data/spacenet/sn2_AOI_2_Vegas.tar.gz index e36ec5360232e842b75e862aa837cc7721c154d8..fe01659fe2ef286bbfab4b318f112f4fbb5fd3a7 100644 GIT binary patch literal 1174 zcmV;H1Zn#piwFP!000001MQqmY~w@}$Hz%kx}ietfn_B?GUk9lZSai0l1QxDtwdD` zcB>jKE3r$I?YbdsY8S^9s+J=0A;JkbK*f;*S~$TjXC%0QIB`K-_Qa_|oH@V+G2=Mf ziQCi(iHBzM{-epf*v~Vz$G?f^b<~DS%8M6P%A|bJsa6_KqZFi4S(d>{Y#AzFwuP`x zux?>&Vd{r9Y+6V*(m0v8wi`jkmt|CGyz+X@?e3Sfe?--Y^*{S=pC{$3+qL?&npODO#z4bpPL?c8ssUOh{i$MR2(4hVQyqynf8^^c7I@mPz zuKmyK&i>a;O!-$u+<-Cf|CN=e&=f6a5t6b}x8I#clhl@}{dF^o zWNNQc`&M&0totKs-)?5YV?UExS2hz%oswc{;Tij_>mTo*ZI?;+?X_>8d-^=Iq z&+1#a`NE~e7ng0hpucgb{rLH3VksL--83lw)J_}%`sd%k8t^Yfz<(<}dHKU{^qW7P zZI?;+4fwyyKedk^0FwAOH8ajXeFFskMW{Fa+4Iv2|L<}9vty3p{|q|Je&HQPO`HLL$8xiv-pK~c>`{Zaa{_%Xh za@DCPgbn+P|EcWvU)5BI|A^3#`adl4RmXd^;T^h3iSK`h=6{xM!TX;O-N-4y&X%K; zWaU|>5^Vdp{(PmARatEAp|z|Qj7oSz`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dataset. - - Args: - root: root dir of dataset - - Returns: - list of dicts containing paths for each pair of image and label - """ - files = [] - pat = re.compile("img1" + re.escape(os.sep)) - for collection in self.collections: - images = glob.glob(os.path.join(root, collection, "*", self.filename)) - images = sorted(images) - for imgpath in images: - if collection == "sn2_AOI_2_Vegas" and pat.search(imgpath): - lbl_path = os.path.join( - os.path.dirname(os.path.dirname(imgpath)), - "_common", - "labels.geojson", - ) - else: - lbl_path = os.path.join( - os.path.dirname(imgpath) + "-labels", self.label_glob - ) - files.append({"image_path": imgpath, "label_path": lbl_path}) - return files - class SpaceNet4(SpaceNet): """SpaceNet 4: Off-Nadir Buildings Dataset.