Datasets:
Tasks:
Image Segmentation
Formats:
imagefolder
Size:
10K - 100K
Tags:
remote-sensing
land-cover
satellite-imagery
aerial-imagery
semantic-segmentation
weak-supervision
License:
Download scripts/chesapeake/make_list.py from rishabh-sat/walkability-project: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/datasets/rishabh-sat/walkability-project/resolve/main/scripts/chesapeake/make_list.py
- Command line
-
hf download hf://datasets/rishabh-sat/walkability-project/scripts/chesapeake/make_list.py
-
curl -L -o make_list.py https://huggingface.co/datasets/rishabh-sat/walkability-project/resolve/main/scripts/chesapeake/make_list.py
872 Bytes
| import sys, urllib.request, xml.etree.ElementTree as ET, re | |
| state=sys.argv[1] | |
| base="https://lilawildlife.blob.core.windows.net/lila-wildlife?restype=container&comp=list&prefix=lcmcvpr2019/cvpr_chesapeake_landcover/&maxresults=5000" | |
| marker=""; out=[] | |
| while True: | |
| url=base+("&marker="+marker if marker else "") | |
| root=ET.fromstring(urllib.request.urlopen(url).read()) | |
| for b in root.iter("Blob"): | |
| n=b.find("Name").text; s=int(b.find("Properties/Content-Length").text) | |
| if re.search(rf"/{state}_1m_\d{{4}}_extended-debuffered-(train|val|test)_tiles/.*_(naip-new|nlcd|lc)\.tif$",n): | |
| out.append((n,s)) | |
| nm=root.find("NextMarker") | |
| if nm is None or not nm.text: break | |
| marker=nm.text | |
| with open(f"{state}_files.txt","w") as f: | |
| for n,s in out: f.write(f"{n}\t{s}\n") | |
| print(len(out),"files",round(sum(s for _,s in out)/1e9,1),"GB") | |