
Raises RasterioIOError when the source is set if the file does not exist resampling (int): One of the values from.interleave (str): type of interleave 'band' or 'pixel' (default='pixel').indexes (int or tuple of ints): one or more raster bands to sampled.
#Keras data generator example generator#
height (int): array size produced by generator.width (int): array size produced by generator.SDG also moves more configutationĪnd setting to the instance and with the. The SDG is similar to the ImageDataGenerator albeit missing the. Generator that can be passed to the Keras model. The geometry associated with the datafame is expected to beĪ polygon but extraction is done using a windowed read based on the bounds.Īs with the ImageDataGenerator, the flow_from_dataframe method returns the Small, preprocessed images files, SDG makes use of a GeoDataFrame to identifyĮach sample area. Keras Spatial is based on the rasterio package, raster data source mayĮither local files or remote resources referenced by URL.īecause the SDG reads directly from larger raster data sources rather than Reprojection and resampling is handled automatically as needed. Than pixels and easily integrate data from different coordinates systems.

The SDG allows user to work in spatial coorindates rather Keras Spatial provides a SpatialDataGenerator (SDG) modeled on the Keras flow_from_dataframe ( geodataframe, 128, 128, batch_size = 32 ) model ( generator. regular_grid ( 200, 200 ) generator = sdg.
#Keras data generator example install#
Or directly from GitHub $ pip install git+ -process-dependency-links To install the package from PyPi repository you can execute the following command: pip install keras-spatial

Automatic reprojection and resampling as needed.Sample extraction from local or remote data sources - no intermediate files.In normalization amoung other data augmentation functions. Imbalanced label distributions, and storing sample attributes used On different aspects such as the existance of nodata, handling The dataframe can also be used to filter samples based Any necessary reprojectionsĬentral to the use of Keras Spatial is a GeoPandas GeoDataFrame whichĭefines a virtual sample set, a list of samples that drives the data Individual raster files prior to model execution. Keras Spatial provides a data generator that reads samples directlyįrom a raster data source and eliminates the need to create small, The preprocessing of spatial data for deep learning applications. Keras Spatial includes data generators and tools designed to simplify
