Segmentation pipeline
The segmentation pipeline is a pre-built pipeline designed to run a segmentation model on your data. It consists of the following components:
- A
DataFetcher
to fetch data from a source - A
ProcessArea
to specify the area of interest - A
DataPreprocessor
to preprocess the fetched data - A
SegmentationModel
to do the inference on the preprocessed data - An
SegmentationExporter
to export the predictions dynamically as geospatial data
These components are set up in a configuration file (.yaml file) that is passed to the pipeline.
The configuration file must have the following structure:
data_fetcher:
name:
config:
process_area:
data_preprocessor:
name:
config:
model:
name:
config:
exporter:
name:
config:
batch_size: 1
num_workers: 4
The name
field must be the name of the class that you want to use for the component.
The config
field must contain its corresponding configuration.
Note that each class has its own configuration, which can be found in the API reference.
To run the segmentation pipeline, run the following command:
aviary segmentation-pipeline path/to/config.yaml
docker run --rm \
-v path/to/config.yaml:/aviary/config.yaml \
aviary segmentation-pipeline /aviary/config.yaml
Note that you need to bind mount all directories and files that are referenced in the configuration file,
so they're accessible inside the Docker container.
Add the following options to the command for each directory:
-v path/to/directory:/aviary/directory
and for each file:
-v path/to/file:/aviary/file
Next steps
Have a look at the how-to guide on how to run the segmentation pipeline with an example configuration file.