You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multi-modal datasets like GeoLifeCLEF's comprise numerous bioclimatic and pedologic variables that can be aggregated to construct rasters, scaling up to countries or continents.
These rasters are then divided into smaller patches that are being fed into the deep learning module by calling the private method environmental_raster.Raster._extract_patch through the PatchExtractor class constructor, by indexing an instance of said class.
During the process, the python module rasterio is used to process input data (Tiff, gTiff...) into a custom, useable dataset object.
Problem
Currently, the size of the wanted patch is passed as parameter in the PatchExtractor class constructor (which is then passed on to the Raster class constructor) and is only interpreted as pixel size.
For example : PatchExtractor("./my_rasters", 256) will instanciate a patch of size 256x256 pixels where each pixel maps a certain geographical area in the raster (depending on the resolution of the raster).
However, in order to work on or querry a specific patch, one would need to know the mapping between pixel coordinates and geographic coordinates, which is not trivial.
Solution
Introduce a new way of registering patch sizes in the malpolon.data.environmental_raster.Raster class so that users can choose the unit they want to work with.
Maybe add a new parameter size_type: str = "px" with values taken in ["px", "km", "m", "arcseg"] (or similar) and define a coordinates conversion method that would return the corresponding pixel coordinates mapping.
The text was updated successfully, but these errors were encountered:
Multi-modal datasets like GeoLifeCLEF's comprise numerous bioclimatic and pedologic variables that can be aggregated to construct rasters, scaling up to countries or continents.
These rasters are then divided into smaller patches that are being fed into the deep learning module by calling the private method
environmental_raster.Raster._extract_patch
through thePatchExtractor
class constructor, by indexing an instance of said class.During the process, the python module
rasterio
is used to process input data (Tiff, gTiff...) into a custom, useable dataset object.Currently, the size of the wanted patch is passed as parameter in the
PatchExtractor
class constructor (which is then passed on to theRaster
class constructor) and is only interpreted as pixel size.For example :
PatchExtractor("./my_rasters", 256)
will instanciate a patch of size 256x256 pixels where each pixel maps a certain geographical area in the raster (depending on the resolution of the raster).However, in order to work on or querry a specific patch, one would need to know the mapping between pixel coordinates and geographic coordinates, which is not trivial.
Introduce a new way of registering patch sizes in the
malpolon.data.environmental_raster.Raster
class so that users can choose the unit they want to work with.Maybe add a new parameter
size_type: str = "px"
with values taken in["px", "km", "m", "arcseg"]
(or similar) and define a coordinates conversion method that would return the corresponding pixel coordinates mapping.The text was updated successfully, but these errors were encountered: