From 8959057c710d2dce69938fa8b0e0f4b470045e3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 06:54:14 +0000 Subject: [PATCH] Deployed bd7029c with MkDocs version: 1.6.0 --- .nojekyll | 0 404.html | 1490 ++++ api_reference/bounding_box/index.html | 2450 ++++++ api_reference/data/data_fetcher/index.html | 2305 ++++++ api_reference/data/data_loader/index.html | 1761 +++++ .../data/data_preprocessor/index.html | 3007 ++++++++ api_reference/data/dataset/index.html | 1731 +++++ api_reference/enums/index.html | 1964 +++++ api_reference/exceptions/index.html | 1678 +++++ .../geodata/coordinates_filter/index.html | 2709 +++++++ .../geodata/geodata_postprocessor/index.html | 4316 +++++++++++ .../geodata/grid_generator/index.html | 1914 +++++ api_reference/index.html | 1578 ++++ api_reference/inference/exporter/index.html | 2259 ++++++ api_reference/inference/model/index.html | 3097 ++++++++ .../postprocessing_pipeline/index.html | 2058 +++++ .../pipeline/segmentation_pipeline/index.html | 2468 ++++++ api_reference/process_area/index.html | 2878 +++++++ api_reference/types/index.html | 1830 +++++ assets/_mkdocstrings.css | 119 + assets/aviary_logo_black.svg | 7 + assets/aviary_logo_white.svg | 7 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.fe8b6f2b.min.js | 29 + assets/javascripts/bundle.fe8b6f2b.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/stylesheets/main.3cba04c6.min.css | 1 + assets/stylesheets/main.3cba04c6.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + aviary/index.html | 1654 ++++ cli_reference/index.html | 1581 ++++ .../postprocessing_pipeline/index.html | 1679 +++++ .../segmentation_pipeline/index.html | 1694 +++++ how_to_guides/index.html | 1568 ++++ .../index.html | 1715 +++++ .../index.html | 1755 +++++ index.html | 1551 ++++ objects.inv | Bin 0 -> 2212 bytes overrides/partials/content.html | 41 + overrides/partials/logo.html | 25 + search/search_index.json | 1 + sitemap.xml | 128 + sitemap.xml.gz | Bin 0 -> 447 bytes stylesheets/color.css | 90 + stylesheets/extra.css | 54 + 81 files changed, 62452 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api_reference/bounding_box/index.html create mode 100644 api_reference/data/data_fetcher/index.html create mode 100644 api_reference/data/data_loader/index.html create mode 100644 api_reference/data/data_preprocessor/index.html create mode 100644 api_reference/data/dataset/index.html create mode 100644 api_reference/enums/index.html create mode 100644 api_reference/exceptions/index.html create mode 100644 api_reference/geodata/coordinates_filter/index.html create mode 100644 api_reference/geodata/geodata_postprocessor/index.html create mode 100644 api_reference/geodata/grid_generator/index.html create mode 100644 api_reference/index.html create mode 100644 api_reference/inference/exporter/index.html create mode 100644 api_reference/inference/model/index.html create mode 100644 api_reference/pipeline/postprocessing_pipeline/index.html create mode 100644 api_reference/pipeline/segmentation_pipeline/index.html create mode 100644 api_reference/process_area/index.html create mode 100644 api_reference/types/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/aviary_logo_black.svg create mode 100644 assets/aviary_logo_white.svg create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.fe8b6f2b.min.js create mode 100644 assets/javascripts/bundle.fe8b6f2b.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/stylesheets/main.3cba04c6.min.css create mode 100644 assets/stylesheets/main.3cba04c6.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 aviary/index.html create mode 100644 cli_reference/index.html create mode 100644 cli_reference/postprocessing_pipeline/index.html create mode 100644 cli_reference/segmentation_pipeline/index.html create mode 100644 how_to_guides/index.html create mode 100644 how_to_guides/installation/how_to_install_aviary_with_docker/index.html create mode 100644 how_to_guides/installation/how_to_install_aviary_with_venv/index.html create mode 100644 index.html create mode 100644 objects.inv create mode 100644 overrides/partials/content.html create mode 100644 overrides/partials/logo.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 stylesheets/color.css create mode 100644 stylesheets/extra.css diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..16691931 --- /dev/null +++ b/404.html @@ -0,0 +1,1490 @@ + + + +
+ + + + + + + + + + + + + + +
BoundingBox
+
+
+
+ dataclass
+
+
+
+ Bases: Iterable[Coordinate]
A bounding box specifies the spatial extent of an area of interest.
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
x_min |
+
+
+
+ minimum x coordinate +
+
+ TYPE:
+ |
+
y_min |
+
+
+
+ minimum y coordinate +
+
+ TYPE:
+ |
+
x_max |
+
+
+
+ maximum x coordinate +
+
+ TYPE:
+ |
+
y_max |
+
+
+
+ maximum y coordinate +
+
+ TYPE:
+ |
+
x_min: Coordinate
+
+
+ property
+ writable
+
+
+RETURNS | +DESCRIPTION | +
---|---|
+
+ Coordinate
+
+ |
+
+
+
+ minimum x coordinate + |
+
y_min: Coordinate
+
+
+ property
+ writable
+
+
+RETURNS | +DESCRIPTION | +
---|---|
+
+ Coordinate
+
+ |
+
+
+
+ minimum y coordinate + |
+
x_max: Coordinate
+
+
+ property
+ writable
+
+
+RETURNS | +DESCRIPTION | +
---|---|
+
+ Coordinate
+
+ |
+
+
+
+ maximum x coordinate + |
+
y_max: Coordinate
+
+
+ property
+ writable
+
+
+RETURNS | +DESCRIPTION | +
---|---|
+
+ Coordinate
+
+ |
+
+
+
+ maximum y coordinate + |
+
from_gdf
+
+
+ classmethod
+
+
+Creates a bounding box from a geodataframe.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ BoundingBox
+
+ |
+
+
+
+ bounding box + |
+
buffer
+
+Buffers the bounding box.
+ + +Examples:
+Assume the area of interest is specified by x_min
=363084, y_min
=5715326, x_max
=363340 and
+y_max
=5715582.
You can expand the area of interest by buffering the bounding box.
+>>> bounding_box = BoundingBox(
+... x_min=363084,
+... y_min=5715326,
+... x_max=363340,
+... y_max=5715582,
+... )
+>>> bounding_box.buffer(buffer_size=64)
+BoundingBox(x_min=363020, y_min=5715262, x_max=363404, y_max=5715646)
+
PARAMETER | +DESCRIPTION | +
---|---|
buffer_size |
+
+
+
+ buffer size in meters +
+
+ TYPE:
+ |
+
inplace |
+
+
+
+ if True, the bounding box is buffered inplace +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ BoundingBox
+
+ |
+
+
+
+ buffered bounding box + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid buffer size (abs( |
+
quantize
+
+Quantizes the coordinates to the specified value.
+ + +Examples:
+Assume the area of interest is specified by x_min
=363084, y_min
=5715326, x_max
=363340 and
+y_max
=5715582.
You can align the area of interest to a grid by quantizing the bounding box.
+>>> bounding_box = BoundingBox(
+... x_min=363084,
+... y_min=5715326,
+... x_max=363340,
+... y_max=5715582,
+... )
+>>> bounding_box.quantize(value=64)
+BoundingBox(x_min=363072, y_min=5715264, x_max=363392, y_max=5715584)
+
PARAMETER | +DESCRIPTION | +
---|---|
value |
+
+
+
+ value to quantize the coordinates to in meters +
+
+ TYPE:
+ |
+
inplace |
+
+
+
+ if True, the bounding box is quantized inplace +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ BoundingBox
+
+ |
+
+
+
+ quantized bounding box + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid value ( |
+
to_gdf
+
+Converts the bounding box to a geodataframe.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
epsg_code |
+
+
+
+ EPSG code +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ bounding box + |
+
DataFetcher
+
+
+
+ Bases: Protocol
Protocol for data fetchers
+Data fetchers are callables that fetch data from a source given a minimum x and y coordinate. +These coordinates correspond to the bottom left corner of a tile. +The data fetcher is used by the dataset to fetch data for each tile.
+ + +
__call__
+
+Fetches data from the source.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
x_min |
+
+
+
+ minimum x coordinate +
+
+ TYPE:
+ |
+
y_min |
+
+
+
+ minimum y coordinate +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ data + |
+
VRTFetcher
+
+
+ Bases: FromConfigMixin
Data fetcher for virtual rasters
+Implements the DataFetcher
protocol.
PARAMETER | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the virtual raster (.vrt file) +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
ground_sampling_distance |
+
+
+
+ ground sampling distance in meters +
+
+ TYPE:
+ |
+
interpolation_mode |
+
+
+
+ interpolation mode (
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in meters (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
drop_channels |
+
+
+
+ channel indices to drop (supports negative indexing) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a vrt fetcher from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ VRTFetcher
+
+ |
+
+
+
+ vrt fetcher + |
+
__call__
+
+Fetches data from the virtual raster.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
x_min |
+
+
+
+ minimum x coordinate +
+
+ TYPE:
+ |
+
y_min |
+
+
+
+ minimum y coordinate +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ data + |
+
VRTFetcherConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of VRTFetcher
ATTRIBUTE | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the virtual raster (.vrt file) +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
ground_sampling_distance |
+
+
+
+ ground sampling distance in meters +
+
+ TYPE:
+ |
+
interpolation_mode |
+
+
+
+ interpolation mode ('bilinear' or 'nearest') +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in meters (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
drop_channels |
+
+
+
+ channel indices to drop (supports negative indexing) +
+
+ TYPE:
+ |
+
DataLoader
+
+
+ Bases: Iterator[tuple[npt.NDArray, Coordinate, Coordinate]]
A data loader is an iterator that yields batches from the dataset. +The data loader is used by the pipeline to fetch the batches for inference.
+ + +Examples:
+Assume the dataset is already created.
+You can create a data loader and iterate over the batches.
+>>> data_loader = DataLoader(
+... dataset=dataset,
+... batch_size=1,
+... num_workers=4,
+... num_prefetched_batches=1,
+... )
+...
+>>> for data, x_min, y_min in data_loader:
+... ...
+
PARAMETER | +DESCRIPTION | +
---|---|
dataset |
+
+
+
+ dataset +
+
+ TYPE:
+ |
+
batch_size |
+
+
+
+ batch size +
+
+ TYPE:
+ |
+
num_workers |
+
+
+
+ number of workers +
+
+ TYPE:
+ |
+
num_prefetched_batches |
+
+
+
+ number of prefetched batches +
+
+ TYPE:
+ |
+
DataPreprocessor
+
+
+
+ Bases: ABC
, FromConfigMixin
Abstract class for data preprocessors
+Data preprocessors are callables that preprocess data. +The data preprocessor is used by the dataset to preprocess the fetched data for each tile.
+ + +
__call__
+
+
+ abstractmethod
+
+
+Preprocesses the data.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
data |
+
+
+
+ data +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ preprocessed data + |
+
CompositePreprocessor
+
+
+ Bases: DataPreprocessor
Data preprocessor that composes multiple data preprocessors
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
data_preprocessors |
+
+
+
+ data preprocessors +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a composite preprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CompositePreprocessor
+
+ |
+
+
+
+ composite preprocessor + |
+
__call__
+
+Preprocesses the data with each data preprocessor.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
data |
+
+
+
+ data +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ preprocessed data + |
+
CompositePreprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of CompositePreprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
data_preprocessors_configs |
+
+
+
+ configurations of the data preprocessors +
+
+ TYPE:
+ |
+
DataPreprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for data preprocessors
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the data preprocessor +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the data preprocessor +
+
+ TYPE:
+ |
+
NormalizePreprocessor
+
+
+ Bases: DataPreprocessor
Data preprocessor that applies min-max normalization
+ + +Examples:
+Assume the data is a 3-channel image of data type uint8.
+You can scale the data to the range 0 to 1 by normalizing the data.
+>>> normalize_preprocessor = NormalizePreprocessor(
+... min_values=[0.] * 3,
+... max_values=[255.] * 3,
+... )
+>>> preprocessed_data = normalize_preprocessor(data)
+
PARAMETER | +DESCRIPTION | +
---|---|
min_values |
+
+
+
+ minimum values of the data (per channel) +
+
+ TYPE:
+ |
+
max_values |
+
+
+
+ maximum values of the data (per channel) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a normalize preprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ NormalizePreprocessor
+
+ |
+
+
+
+ normalize preprocessor + |
+
__call__
+
+Preprocesses the data by applying min-max normalization.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
data |
+
+
+
+ data +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray[np.float32]
+
+ |
+
+
+
+ preprocessed data + |
+
NormalizePreprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of NormalizePreprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
min_values |
+
+
+
+ minimum values of the data (per channel) +
+
+ TYPE:
+ |
+
max_values |
+
+
+
+ maximum values of the data (per channel) +
+
+ TYPE:
+ |
+
StandardizePreprocessor
+
+
+ Bases: DataPreprocessor
Data preprocessor that applies standardization
+ + +Examples:
+Assume the data is a 3-channel image of data type float32.
+You can scale the data to have a mean of 0 and a standard deviation of 1 by standardizing the data. +In this example, the mean and standard deviation values from the ImageNet dataset are used.
+>>> standardize_preprocessor = StandardizePreprocessor(
+... mean_values=[.485, .456, .406],
+... std_values=[.229, .224, .225],
+... )
+>>> preprocessed_data = standardize_preprocessor(data)
+
PARAMETER | +DESCRIPTION | +
---|---|
mean_values |
+
+
+
+ mean values of the data (per channel) +
+
+ TYPE:
+ |
+
std_values |
+
+
+
+ standard deviation values of the data (per channel) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a standardize preprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ StandardizePreprocessor
+
+ |
+
+
+
+ standardize preprocessor + |
+
__call__
+
+Preprocesses the data by applying standardization.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
data |
+
+
+
+ data +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray[np.float32]
+
+ |
+
+
+
+ preprocessed data + |
+
StandardizePreprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of StandardizePreprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
mean_values |
+
+
+
+ mean values of the data (per channel) +
+
+ TYPE:
+ |
+
std_values |
+
+
+
+ standard deviation values of the data (per channel) +
+
+ TYPE:
+ |
+
Dataset
+
+A dataset is an iterable that returns a sample for each tile by calling the data fetcher and +the data preprocessor. The dataset is used by the data loader to fetch the samples for each batch.
+ + +Examples:
+Assume the data fetcher, the data preprocessor and the coordinates are already created.
+You can create a dataset and iterate over the samples.
+>>> dataset = Dataset(
+... data_fetcher=data_fetcher,
+... data_preprocessor=data_preprocessor,
+... coordinates=coordinates,
+... )
+...
+>>> for data, x_min, y_min in dataset:
+... ...
+
PARAMETER | +DESCRIPTION | +
---|---|
data_fetcher |
+
+
+
+ data fetcher +
+
+ TYPE:
+ |
+
data_preprocessor |
+
+
+
+ data preprocessor +
+
+ TYPE:
+ |
+
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
Device
+
+
+
+ Bases: Enum
ATTRIBUTE | +DESCRIPTION | +
---|---|
CPU |
+
+
+
+ CPU device ++ + |
+
CUDA |
+
+
+
+ CUDA device ++ + |
+
GeospatialFilterMode
+
+
+
+ Bases: Enum
ATTRIBUTE | +DESCRIPTION | +
---|---|
DIFFERENCE |
+
+
+
+ difference mode ++ + |
+
INTERSECTION |
+
+
+
+ intersection mode ++ + |
+
InterpolationMode
+
+
+
+ Bases: Enum
ATTRIBUTE | +DESCRIPTION | +
---|---|
BILINEAR |
+
+
+
+ bilinear mode ++ + |
+
NEAREST |
+
+
+
+ nearest mode ++ + |
+
SetFilterMode
+
+
+
+ Bases: Enum
ATTRIBUTE | +DESCRIPTION | +
---|---|
DIFFERENCE |
+
+
+
+ difference mode ++ + |
+
INTERSECTION |
+
+
+
+ intersection mode ++ + |
+
UNION |
+
+
+
+ union mode ++ + |
+
AviaryUserError
+
+
+
+ Bases: Exception
AviaryUserWarning
+
+
+
+ Bases: Warning
CoordinatesFilter
+
+
+
+ Bases: ABC
Abstract class for coordinates filters
+Coordinates filters are callables that filter coordinates. +The coordinates filter can be used to filter the coordinates of the bottom left corner of each tile. +E.g., to remove tiles that don't intersect with an area of interest or tiles that are already processed.
+ + +
__call__
+
+
+ abstractmethod
+
+
+Filters the coordinates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
CompositeFilter
+
+
+ Bases: CoordinatesFilter
Coordinates filter that composes multiple coordinates filters
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates_filters |
+
+
+
+ coordinates filters +
+
+ TYPE:
+ |
+
__call__
+
+Filters the coordinates with each coordinates filter.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
DuplicatesFilter
+
+
+
+ Bases: CoordinatesFilter
Coordinates filter that removes duplicates
+ + + + +
__call__
+
+Filters the coordinates by removing duplicates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
GeospatialFilter
+
+
+ Bases: CoordinatesFilter
Coordinates filter that filters based on geospatial data
+ + +DIFFERENCE
: Removes coordinates of tiles that are within the polygons in the geodataframeINTERSECTION
: Removes coordinates of tiles that don't intersect with the polygons in the geodataframePARAMETER | +DESCRIPTION | +
---|---|
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
mode |
+
+
+
+ geospatial filter mode (
+
+ TYPE:
+ |
+
__call__
+
+Filters the coordinates based on the polygons in the geodataframe.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
MaskFilter
+
+
+ Bases: CoordinatesFilter
Coordinates filter that filters based on a boolean mask
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
mask |
+
+
+
+ boolean mask +
+
+ TYPE:
+ |
+
__call__
+
+Filters the coordinates based on the boolean mask.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
SetFilter
+
+
+ Bases: CoordinatesFilter
Coordinates filter that filters based on other coordinates
+ + +DIFFERENCE
: Removes coordinates that are in the other coordinatesINTERSECTION
: Removes coordinates that are not in the other coordinatesUNION
: Combines the coordinates with the other coordinates and removes duplicatesPARAMETER | +DESCRIPTION | +
---|---|
other |
+
+
+
+ other coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
mode |
+
+
+
+ set filter mode (
+
+ TYPE:
+ |
+
__call__
+
+Filters the coordinates based on the other coordinates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ filtered coordinates (x_min, y_min) of each tile + |
+
GeodataPostprocessor
+
+
+
+ Bases: ABC
, FromConfigMixin
Abstract class for geodata postprocessors
+Geodata postprocessors are callables that postprocess geodata. +The geodata postprocessor is used by the pipeline to postprocess the resulting geodata, +which is the vectorized output of the model's inference.
+ + +
__call__
+
+
+ abstractmethod
+
+
+Postprocesses the geodata.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
ClipPostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that clips the polygons based on the mask extent
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
mask |
+
+
+
+ geodataframe of the mask (may contain multiple polygons) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a clip postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ClipPostprocessor
+
+ |
+
+
+
+ clip postprocessor + |
+
__call__
+
+Postprocesses the geodata by clipping the polygons based on the mask extent.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
ClipPostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of ClipPostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
mask |
+
+
+
+ path to the geodataframe of the mask (may contain multiple polygons) +
+
+ TYPE:
+ |
+
CompositePostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that composes multiple geodata postprocessors
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
geodata_postprocessors |
+
+
+
+ geodata postprocessors +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a composite postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CompositePostprocessor
+
+ |
+
+
+
+ composite postprocessor + |
+
__call__
+
+Postprocesses the geodata with each geodata postprocessor.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
CompositePostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of CompositePostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
geodata_postprocessors_configs |
+
+
+
+ configurations of the geodata postprocessors +
+
+ TYPE:
+ |
+
FieldNamePostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that renames the fields
+ + +Examples:
+Assume the geodataframe has the field 'class'.
+You can rename the field 'class' to 'type'.
+>>> field_name_postprocessor = FieldNamePostprocessor(
+... mapping={
+... 'class': 'type',
+... },
+... )
+...
+>>> gdf = field_name_postprocessor(gdf)
+
PARAMETER | +DESCRIPTION | +
---|---|
mapping |
+
+
+
+ mapping of the field names (old field name: new field name) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a field name postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ FieldNamePostprocessor
+
+ |
+
+
+
+ field name postprocessor + |
+
__call__
+
+Postprocesses the geodata by renaming the fields.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
FieldNamePostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of FieldNamePostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
mapping |
+
+
+
+ mapping of the field names (old field name: new field name) +
+
+ TYPE:
+ |
+
FillPostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that fills holes in the polygons
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
max_area |
+
+
+
+ maximum area of the holes to retain in square meters +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a fill postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ FillPostprocessor
+
+ |
+
+
+
+ fill postprocessor + |
+
__call__
+
+Postprocesses the geodata by filling holes in the polygons.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
FillPostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of FillPostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
max_area |
+
+
+
+ maximum area of the holes to retain in square meters +
+
+ TYPE:
+ |
+
SievePostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that sieves the polygons
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
min_area |
+
+
+
+ minimum area of the polygons to retain in square meters +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a sieve postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SievePostprocessor
+
+ |
+
+
+
+ sieve postprocessor + |
+
__call__
+
+Postprocesses the geodata by sieving the polygons.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
SievePostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of SievePostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
min_area |
+
+
+
+ minimum area of the polygons to retain in square meters +
+
+ TYPE:
+ |
+
SimplifyPostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that simplifies the polygons by applying the Douglas-Peucker algorithm
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
tolerance |
+
+
+
+ tolerance of the Douglas-Peucker algorithm in meters (a lower value will result +in less simplification, a higher value will result in more simplification, +a value equal to the ground sampling distance is recommended) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a simplify postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SimplifyPostprocessor
+
+ |
+
+
+
+ simplify postprocessor + |
+
__call__
+
+Postprocesses the geodata by simplifying the polygons.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
SimplifyPostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of SimplifyPostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
tolerance |
+
+
+
+ tolerance of the Douglas-Peucker algorithm in meters (a lower value will result +in less simplification, a higher value will result in more simplification, +a value equal to the ground sampling distance is recommended) +
+
+ TYPE:
+ |
+
ValuePostprocessor
+
+
+ Bases: GeodataPostprocessor
Geodata postprocessor that maps the values of a field
+ + +Examples:
+Assume the geodataframe has the values 0, 1 and 2 in the field 'class'.
+You can map the values 0, 1 and 2 to 'class_1', 'class_2' and 'class_3'.
+>>> value_postprocessor = ValuePostprocessor(
+... mapping={
+... 0: 'class_1',
+... 1: 'class_2',
+... 2: 'class_3',
+... },
+... field_name='class',
+... )
+...
+>>> gdf = value_postprocessor(gdf)
+
PARAMETER | +DESCRIPTION | +
---|---|
mapping |
+
+
+
+ mapping of the values (old value: new value) +
+
+ TYPE:
+ |
+
field_name |
+
+
+
+ name of the field +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a value postprocessor from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ValuePostprocessor
+
+ |
+
+
+
+ value postprocessor + |
+
__call__
+
+Postprocesses the geodata by mapping the values of a field.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ postprocessed geodataframe + |
+
ValuePostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of ValuePostprocessor
ATTRIBUTE | +DESCRIPTION | +
---|---|
mapping |
+
+
+
+ mapping of the values (old value: new value) +
+
+ TYPE:
+ |
+
field_name |
+
+
+
+ name of the field +
+
+ TYPE:
+ |
+
GridGenerator
+
+A grid generator generates a grid of tiles. +The grid generator can be used to compute the coordinates of the bottom left corner of each tile +or to generate a geodataframe of the grid for aggregation.
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
bounding_box |
+
+
+
+ bounding box +
+
+ TYPE:
+ |
+
epsg_code |
+
+
+
+ EPSG code +
+
+ TYPE:
+ |
+
compute_coordinates
+
+Computes the coordinates of the bottom left corner of each tile.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
quantize |
+
+
+
+ if True, the bounding box is quantized to
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ coordinates (x_min, y_min) of each tile + |
+
generate_grid
+
+Generates a geodataframe of the grid.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
quantize |
+
+
+
+ if True, the bounding box is quantized to
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ grid + |
+
aviary's Python API is structured into the following namespaces:
+aviary
+ Core types
aviary.data
+ Data fetching and processing
aviary.geodata
+ Geodata processing
aviary.inference
+ Models and exporters
aviary.pipeline
+ Pre-built pipelines
Exporter
+
+
+
+ Bases: Protocol
Protocol for exporters
+Exporters are callables that export predictions. +The exporter is used by the pipeline to export the batched output of the model's inference.
+ + +
__call__
+
+Exports the predictions.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
preds |
+
+
+
+ batched predictions +
+
+ TYPE:
+ |
+
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
SegmentationExporter
+
+
+ Bases: FromConfigMixin
Exporter for segmentation predictions
+Implements the Exporter
protocol.
The predictions (i.e. raster data) are transformed to geospatial data (i.e. vector data).
+The resulting geodataframe contains the geometry of the polygons and their class that is stored
+in the field field_name
as the pixel value of the prediction.
+The segmentation exporter creates a geopackage named output.gpkg
and exports the geodataframe
+of each tile dynamically.
+The coordinates of the bottom left corner of the processed tiles are exported dynamically to a JSON file
+named processed_coordinates.json
.
PARAMETER | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the output directory +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
ground_sampling_distance |
+
+
+
+ ground sampling distance in meters +
+
+ TYPE:
+ |
+
epsg_code |
+
+
+
+ EPSG code +
+
+ TYPE:
+ |
+
field_name |
+
+
+
+ name of the field in the geodataframe +
+
+ TYPE:
+ |
+
num_workers |
+
+
+
+ number of workers +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a segmentation exporter from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationExporter
+
+ |
+
+
+
+ segmentation exporter + |
+
__call__
+
+Exports the predictions.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
preds |
+
+
+
+ batched predictions +
+
+ TYPE:
+ |
+
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
SegmentationExporterConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of SegmentationExporter
ATTRIBUTE | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the output directory +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
ground_sampling_distance |
+
+
+
+ ground sampling distance in meters +
+
+ TYPE:
+ |
+
epsg_code |
+
+
+
+ EPSG code +
+
+ TYPE:
+ |
+
field_name |
+
+
+
+ name of the field in the geodataframe +
+
+ TYPE:
+ |
+
num_workers |
+
+
+
+ number of workers +
+
+ TYPE:
+ |
+
Model
+
+
+
+ Bases: Protocol
Protocol for models
+Models are callables that transform inputs into predictions.
+ + +
__call__
+
+Runs the model.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
inputs |
+
+
+
+ batched inputs +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ batched predictions + |
+
SegmentationModel
+
+Model for segmentation
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the model +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
from_huggingface
+
+
+ classmethod
+
+
+Creates a segmentation model from the Hugging Face Hub.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
repo |
+
+
+
+ repository (Hugging Face Hub, e.g., 'user/repo') +
+
+ TYPE:
+ |
+
path |
+
+
+
+ path to the model (Hugging Face Hub) +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
from_aviary
+
+
+ classmethod
+
+
+Creates a segmentation model from the name of a model in aviary.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the model +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
from_config
+
+
+ classmethod
+
+
+Creates a segmentation model from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid configuration + |
+
__call__
+
+Runs the model.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
inputs |
+
+
+
+ batched inputs +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ batched predictions + |
+
SegmentationModelConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of SegmentationModel
name
repo
and path
path
ATTRIBUTE | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the model (local or Hugging Face Hub) +
+
+ TYPE:
+ |
+
repo |
+
+
+
+ repository (Hugging Face Hub, e.g., 'user/repo') +
+
+ TYPE:
+ |
+
name |
+
+
+
+ name of the model +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+ device ('cpu' or 'cuda') +
+
+ TYPE:
+ |
+
ONNXSegmentationModel
+
+
+ Bases: SegmentationModel
ONNX model for segmentation
+Implements the Model
protocol.
PARAMETER | +DESCRIPTION | +
---|---|
path |
+
+
+
+ path to the model +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
from_huggingface
+
+
+ classmethod
+
+
+Creates a segmentation model from the Hugging Face Hub.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
repo |
+
+
+
+ repository (Hugging Face Hub, e.g., 'user/repo') +
+
+ TYPE:
+ |
+
path |
+
+
+
+ path to the model (Hugging Face Hub) +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
from_aviary
+
+
+ classmethod
+
+
+Creates a segmentation model from the name of a model in aviary.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the model +
+
+ TYPE:
+ |
+
buffer_size |
+
+
+
+ buffer size in pixels (specifies the area around the tile that is additionally fetched) +
+
+ TYPE:
+ |
+
device |
+
+
+
+
+ device ( |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
from_config
+
+
+ classmethod
+
+
+Creates a segmentation model from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationModel
+
+ |
+
+
+
+ segmentation model + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid configuration + |
+
__call__
+
+Runs the model.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
inputs |
+
+
+
+ batched inputs +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ npt.NDArray
+
+ |
+
+
+
+ batched predictions + |
+
PostprocessingPipeline
+
+Pre-built postprocessing pipeline
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
geodata_postprocessor |
+
+
+
+ geodata postprocessor +
+
+ TYPE:
+ |
+
path |
+
+
+
+ path to export the geodataframe (if None, the geodataframe is not exported) +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a postprocessing pipeline from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ PostprocessingPipeline
+
+ |
+
+
+
+ postprocessing pipeline + |
+
__call__
+
+Runs the postprocessing pipeline.
+ +
PostprocessingPipelineConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of PostprocessingPipeline
ATTRIBUTE | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ path to the geodataframe +
+
+ TYPE:
+ |
+
geodata_postprocessor_config |
+
+
+
+ configuration of the geodata postprocessor +
+
+ TYPE:
+ |
+
path |
+
+
+
+ path to export the geodataframe +
+
+ TYPE:
+ |
+
GeodataPostprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for geodata postprocessors
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the geodata postprocessor +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the geodata postprocessor +
+
+ TYPE:
+ |
+
SegmentationPipeline
+
+Pre-built segmentation pipeline
+ + + +PARAMETER | +DESCRIPTION | +
---|---|
data_fetcher |
+
+
+
+ data fetcher +
+
+ TYPE:
+ |
+
data_preprocessor |
+
+
+
+ data preprocessor +
+
+ TYPE:
+ |
+
process_area |
+
+
+
+ process area +
+
+ TYPE:
+ |
+
model |
+
+
+
+ model +
+
+ TYPE:
+ |
+
exporter |
+
+
+
+ exporter +
+
+ TYPE:
+ |
+
batch_size |
+
+
+
+ batch size +
+
+ TYPE:
+ |
+
num_workers |
+
+
+
+ number of workers +
+
+ TYPE:
+ |
+
from_config
+
+
+ classmethod
+
+
+Creates a segmentation pipeline from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ SegmentationPipeline
+
+ |
+
+
+
+ segmentation pipeline + |
+
__call__
+
+Runs the segmentation pipeline.
+ +
SegmentationPipelineConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of SegmentationPipeline
ATTRIBUTE | +DESCRIPTION | +
---|---|
data_fetcher_config |
+
+
+
+ configuration of the data fetcher +
+
+ TYPE:
+ |
+
data_preprocessor_config |
+
+
+
+ configuration of the data preprocessor +
+
+ TYPE:
+ |
+
process_area_config |
+
+
+
+ configuration of the process area +
+
+ TYPE:
+ |
+
segmentation_model_config |
+
+
+
+ configuration of the model +
+
+ TYPE:
+ |
+
exporter_config |
+
+
+
+ configuration of the exporter +
+
+ TYPE:
+ |
+
batch_size |
+
+
+
+ batch size +
+
+ TYPE:
+ |
+
num_workers |
+
+
+
+ number of workers +
+
+ TYPE:
+ |
+
DataFetcherConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for data fetchers
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the data fetcher +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the data fetcher +
+
+ TYPE:
+ |
+
DataPreprocessorConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for data preprocessors
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the data preprocessor +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the data preprocessor +
+
+ TYPE:
+ |
+
ModelConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for models
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the model +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the model +
+
+ TYPE:
+ |
+
ExporterConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for exporters
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
name |
+
+
+
+ name of the exporter +
+
+ TYPE:
+ |
+
config |
+
+
+
+ configuration of the exporter +
+
+ TYPE:
+ |
+
ProcessArea
+
+
+
+ dataclass
+
+
+
+ Bases: Iterable[Coordinates]
A process area specifies the area of interest by a set of coordinates of the bottom left corner of each tile.
+ + +ATTRIBUTE | +DESCRIPTION | +
---|---|
coordinates |
+
+
+
+ coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
coordinates: CoordinatesSet
+
+
+ property
+ writable
+
+
+RETURNS | +DESCRIPTION | +
---|---|
+
+ CoordinatesSet
+
+ |
+
+
+
+ coordinates (x_min, y_min) of each tile + |
+
from_bounding_box
+
+
+ classmethod
+
+
+Creates a process area from a bounding box.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
bounding_box |
+
+
+
+ bounding box +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
quantize |
+
+
+
+ if True, the bounding box is quantized to
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ process area + |
+
from_gdf
+
+
+ classmethod
+
+
+Creates a process area from a geodataframe.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
gdf |
+
+
+
+ geodataframe +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
quantize |
+
+
+
+ if True, the bounding box is quantized to
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ process area + |
+
from_json
+
+
+ classmethod
+
+
+Creates a process area from a JSON string.
+ + +Examples:
+Assume the JSON string is '[[363084, 5715326], [363212, 5715326], [363084, 5715454], [363212, 5715454]]'.
+You can create a process area from the JSON string.
+>>> process_area = ProcessArea.from_json(
+... json_string= (
+... '[[363084, 5715326], '
+... '[363212, 5715326], '
+... '[363084, 5715454], '
+... '[363212, 5715454]]'
+... ),
+... )
+
PARAMETER | +DESCRIPTION | +
---|---|
json_string |
+
+
+
+ JSON string +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ process area + |
+
from_config
+
+
+ classmethod
+
+
+Creates a process area from the configuration.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
config |
+
+
+
+ configuration +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ process area + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid configuration + |
+
append
+
+Appends the coordinates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
other |
+
+
+
+ other coordinates +
+
+ TYPE:
+ |
+
inplace |
+
+
+
+ if True, the coordinates are appended inplace +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ process area + |
+
chunk
+
+Chunks the coordinates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
num_chunks |
+
+
+
+ number of chunks +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ list[ProcessArea]
+
+ |
+
+
+
+ list of process areas + |
+
filter
+
+Filters the coordinates.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
coordinates_filter |
+
+
+
+ coordinates filter +
+
+ TYPE:
+ |
+
inplace |
+
+
+
+ if True, the coordinates are filtered inplace +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ ProcessArea
+
+ |
+
+
+
+ filtered process area + |
+
to_gdf
+
+Converts the coordinates to a geodataframe.
+ + +PARAMETER | +DESCRIPTION | +
---|---|
epsg_code |
+
+
+
+ EPSG code +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
RETURNS | +DESCRIPTION | +
---|---|
+
+ gpd.GeoDataFrame
+
+ |
+
+
+
+ geodataframe + |
+
RAISES | +DESCRIPTION | +
---|---|
+
+ AviaryUserError
+
+ |
+
+
+
+ Invalid tile size ( |
+
to_json
+
+Converts the coordinates to a JSON string.
+ + +RETURNS | +DESCRIPTION | +
---|---|
+
+ str
+
+ |
+
+
+
+ JSON string + |
+
ProcessAreaConfig
+
+
+
+ Bases: pydantic.BaseModel
Configuration for the from_config
class method of ProcessArea
json_string
gdf
and tile_size
bounding_box
and tile_size
ATTRIBUTE | +DESCRIPTION | +
---|---|
bounding_box |
+
+
+
+ bounding box (x_min, y_min, x_max, y_max) +
+
+ TYPE:
+ |
+
gdf |
+
+
+
+ path to the geodataframe +
+
+ TYPE:
+ |
+
json_string |
+
+
+
+ path to the JSON file containing the coordinates (x_min, y_min) of each tile +
+
+ TYPE:
+ |
+
processed_coordinates_json_string |
+
+
+
+ path to the JSON file containing the coordinates (x_min, y_min) +of the processed tiles +
+
+ TYPE:
+ |
+
tile_size |
+
+
+
+ tile size in meters +
+
+ TYPE:
+ |
+
quantize |
+
+
+
+ if True, the bounding box is quantized to
+
+ TYPE:
+ |
+
BufferSize: TypeAlias = int
+
+Coordinate: TypeAlias = int
+
+Coordinates: TypeAlias = tuple[Coordinate, Coordinate]
+
+CoordinatesSet: TypeAlias = npt.NDArray[np.int32]
+
+EPSGCode: TypeAlias = int
+
+GroundSamplingDistance: TypeAlias = float
+
+TileSize: TypeAlias = int
+
+