Updated Home (markdown)

Adam J. Stewart 2021-06-30 15:24:28 -05:00
Родитель b284176389
Коммит d5000998da
1 изменённых файлов: 19 добавлений и 1 удалений

20
Home.md

@ -37,7 +37,7 @@ Vision datasets can be combined to increase the size of the dataset. This create
Some datasets use the STAC API. Presumably there are competitors. Datasets stored using the STAC API may allow for a nice base class.
## GeoDataset
### GeoDataset
1. Calculate the intersection of the bounds of the subdatasets to find where to sample from (easy)
2. Choose which coordinate system to use for the joint dataset, i.e. what coordinate system the resulting chips will be in(could be an argument)
@ -46,6 +46,24 @@ Some datasets use the STAC API. Presumably there are competitors. Datasets store
5. This makes the chip_size argument a bit weird -- it is much more natural to specify this in "pixels" so there should be some conversion here
6. In `__getitem__` you now need to crop chips from each dataset and resample/warp to a common grid (not horrible, but needs to be as fast as possible)
## Samplers
Many datasets involve large tiles or maps of data, too large to pass directly to a PyTorch model. Instead, we'll need to load several small chips/patches of the imagery in each batch. PyTorch DataLoaders allow you to specify a Sampler class that provides these indices.
Most of these will need to return a tuple of `(lat, long, width, height, proj, crs, time, etc.)` instead of an int index. This will then be passed to the `__getitem__`.
### RandomChipSampler
Randomly sample chips from the region of interest. Useful for training.
### SequentialChipSampler (CheckerboardChipSampler?)
Takes arguments like stride and chip size, and returns possibly overlapping chips. If stride > chip size, no overlap. Useful for prediction.
### ExistingChipSampler
What if chips are already defined in the dataset? In that case, we will want to use those and index normally.
## Transforms
Torchvision uses PIL, which isn't compatible with multi-spectral imagery. Although some of our imagery isn't multi-spectral, we don't want to have to implement the same transforms for every possible data structure. Instead, we should probably standardize on torch Tensors. This also has the benefit that transforms can be run on the GPU. Does this mean we need to use nn.Module? See https://discuss.pytorch.org/t/state-of-the-art-for-torchvision-datasets-transforms-models-design/123625 for discussion on this.