torchgeo icon indicating copy to clipboard operation
torchgeo copied to clipboard

Download NAIP Imagery

Open patriksabol opened this issue 2 years ago • 7 comments

Issue

How to download NAIP imagery for Chesapeak13? Labels for Chesapeake13 are downloaded automatically, but there is no information, how to download correspond NAIP imagery. In tutorial, there is link to blob to download 4 particular raster, but what about the rest?

Fix

I suggest to add this information to documentation.

patriksabol avatar Jun 16 '23 13:06 patriksabol

Setting dataset = Chesapeake13(root="data", download=True) downloads the labels and imagery. Are you sure it didn't download the imagery? I just tested and it works fine for me.

The root directory should contain the following files after downloading:

image

isaaccorley avatar Jun 16 '23 14:06 isaaccorley

I think it is only mask of 13 classes. It does not contain any imagery. Chesapeake 13 inherits from Chesapeake, where here it says, it is no imagery dataset. Moreover,

$ gdalinfo Baywide_13Class_20132014.tif
Band 1 Block=128x128 Type=Byte, ColorInterp=Palette
  Min=1.000 Max=12.000 
  Minimum=1.000, Maximum=12.000, Mean=3.588, StdDev=1.478
  NoData Value=0
  Overviews: 249563x439170, 124782x219585, 62391x109793, 31196x54897, 15598x27449, 7799x13725, 3900x6863, 1950x3432, 975x1716, 488x858, 244x429
  Metadata:
    RepresentationType=THEMATIC
    STATISTICS_COVARIANCES=2.184897016039103
    STATISTICS_MAXIMUM=12
    STATISTICS_MEAN=3.587997581131
    STATISTICS_MINIMUM=1
    STATISTICS_SKIPFACTORX=1
    STATISTICS_SKIPFACTORY=1
    STATISTICS_STDDEV=1.4781397146546
  Image Structure Metadata:
    NBITS=4
  Color Table (RGB with 16 entries)
    0: 0,0,0,0
    1: 0,197,255,255
    2: 0,168,132,255
    3: 38,115,0,255
    4: 76,230,0,255
    5: 163,255,115,255
    6: 255,170,0,255
    7: 255,0,0,255
    8: 156,156,156,255
    9: 0,0,0,255
   10: 115,115,0,255
   11: 230,230,0,255
   12: 255,255,115,255
   13: 197,0,255,255
   14: 0,0,0,255
   15: 0,0,0,255

Which tiles should I download to match these 13-class labels? What is the purpose of NAIPChesapeakeDataModule, if it downloads Chesapeake13 labels, but no NAIP Imagery?

patriksabol avatar Jun 16 '23 15:06 patriksabol

Ah I see what you mean. The purpose of the dataset is to be combined with NAIP or any other image dataset that has overlapping areas so that you can retrieve image and masks together. Maybe @adamjstewart or @calebrob6 can answer where the imagery can be downloaded other than from any of the numerous online NAIP sources.

isaaccorley avatar Jun 16 '23 16:06 isaaccorley

Thank you for clarification! My intention is to get exact imagery, on which the labeling (Chesapeake13) was done. Could be those from ChesapeakeCVPR zip?

patriksabol avatar Jun 16 '23 16:06 patriksabol

@calebrob6 created the ChesapeakeCVPR dataset so he may know.

As @isaaccorley mentioned, the purpose of Chesapeake13 and NAIP is for training models and making predictions, not for benchmarking purposes. Those datasets are uncurated collections of imagery and masks.

It's possible that no NAIP tiles overlap and all Chesapeake labels were generated from a single year of imagery, in which case downloading all NAIP tiles that cover the states in Chesapeake would be enough to reproduce the dataset. But @calebrob6 is the expert on this one.

adamjstewart avatar Jun 16 '23 19:06 adamjstewart

@calebrob6 any thoughts on this one?

adamjstewart avatar Sep 06 '23 20:09 adamjstewart