Replies: 5 comments
-
Upon further investigation, Id like to confirm my understanding of how the bounding box works, as we may not need to roll up sentinel data to monthly. The bounding box seems to work by taking a mint and maxt. For our monthly modis data, we have defined the class to only have year and month so I assume the mint and maxt will be the beginning and end of the month. When using a random sampler, is it correct that any of the sentinel data of the right lat/lon position within that month could be sampled? If so we believe it may be fine to leave sentinel at its random daily granularity, assuming that several in each month will be sampled across the whole model training process - keen to hear your thoughts here! Thanks |
Beta Was this translation helpful? Give feedback.
-
Correct, if you want to see the code that does this, it's here.
That depends. The way our samplers currently work is to take the rtree index of bounding boxes and choose a random patch to sample from that bounding box. For x/y, we choose a smaller patch, but for t we simply use the mint/maxt of that bounding box (see code). So if you give the sampler the MODIS dataset, it will return sample patches that span an entire month. But if you give the sampler the (MODIS & Sentinel & LandCover) intersection dataset, then the intersection that is computed will use the smaller time window of each Sentinel image. P.S. If you have a working MODIS dataset we would love to see it contributed to TorchGeo! Same with any other datasets you have that aren't yet in TorchGeo. |
Beta Was this translation helpful? Give feedback.
-
If you want to force things to have a specific time range, your best bet is to make a custom GeoSampler to do that. |
Beta Was this translation helpful? Give feedback.
-
thanks Adam this was very helpful! Our project is due next friday but after that we are definately planning to contribute some new classes :) |
Beta Was this translation helpful? Give feedback.
-
Closing, but let me know if you have any other questions! |
Beta Was this translation helpful? Give feedback.
-
Hello! I am working with sentinel2 data, bands 3,4,8.
We are creating a combined dataset of Sentinel, Modis, and a landcover dataset. Modis data is at the monthly level. Sentinel data is at daily granularity with 3-4 files per month depending on the level of cloud cover we accept.
What would be the best way to approach unifying the time periods? We were thinking of preprocessing the sentinel data to provide an average monthly composite, but wondered if there might be an easier way to do this within a torchgeo class? Is there any functionality similar to this that already exists?
Thanks
Grace
Beta Was this translation helpful? Give feedback.
All reactions