Skip to content

Adois

Tiles processor that uses the adois model to detect and classify impervious surfaces.

adois is a segmentation model that is trained to detect and classify impervious surfaces from digital orthophotos. It differentiates between non-impervious surfaces (e.g., vegetation, soil or water), buildings and impervious surfaces (e.g., pavements, roads, sidewalks, driveways, parking lots or industrial areas). It is recommended to use the model with leaf-off orthophotos (i.e., without foliage on trees or shrubs), so canopies do not cover buildings or impervious surfaces.

Notes
  • Accessing a channel by its name assumes the time step is None
Model input channels
  • ChannelName.R: Red channel, raster channel, ground sampling distance of 0.2 meters, normalized values in range [0, 1]
  • ChannelName.G: Green channel, raster channel, ground sampling distance of 0.2 meters, normalized values in range [0, 1]
  • ChannelName.B: Blue channel, raster channel, ground sampling distance of 0.2 meters, normalized values in range [0, 1]
  • ChannelName.NIR: Near-infrared channel, raster channel, ground sampling distance of 0.2 meters, normalized values in range [0, 1]
Model output channels
  • 'adois': Impervious surfaces channel, raster channel, ground sampling distance of 0.2 meters, the classes are non-impervious surfaces (value 0), buildings (value 1), and impervious surfaces (value 2)
Additional dependencies

adois requires huggingface_hub and onnxruntime as additional dependencies.

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
r_channel_key

Channel name or channel name and time step combination of the red channel

TYPE: ChannelName | str | ChannelKey DEFAULT: ChannelName.R

g_channel_key

Channel name or channel name and time step combination of the green channel

TYPE: ChannelName | str | ChannelKey DEFAULT: ChannelName.G

b_channel_key

Channel name or channel name and time step combination of the blue channel

TYPE: ChannelName | str | ChannelKey DEFAULT: ChannelName.B

nir_channel_key

Channel name or channel name and time step combination of the near-infrared channel

TYPE: ChannelName | str | ChannelKey DEFAULT: ChannelName.NIR

out_channel_key

Channel name or channel name and time step combination of the output channel

TYPE: ChannelName | str | ChannelKey DEFAULT: 'adois'

cache_dir_path

Path to the cache directory of the model

TYPE: Path DEFAULT: Path('cache')

remove_channels

If True, the channels are removed

TYPE: bool DEFAULT: True

from_config classmethod

Creates the adois model from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: AdoisConfig

RETURNS DESCRIPTION
Adois

Adois

__call__

Runs the adois model.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


AdoisConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of Adois

Create the configuration from a config file
  • Use null instead of None
  • Use false or true instead of False or True
Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'Adois'
config:
  r_channel_key: 'r'
  g_channel_key: 'g'
  b_channel_key: 'b'
  nir_channel_key: 'nir'
  out_channel_key: 'adois'
  cache_dir_path: 'cache'
  remove_channels: true
ATTRIBUTE DESCRIPTION
r_channel_key

Channel name or channel name and time step combination of the red channel - defaults to ChannelName.R

TYPE: ChannelName | str | ChannelKey

g_channel_key

Channel name or channel name and time step combination of the green channel - defaults to ChannelName.G

TYPE: ChannelName | str | ChannelKey

b_channel_key

Channel name or channel name and time step combination of the blue channel - defaults to ChannelName.B

TYPE: ChannelName | str | ChannelKey

nir_channel_key

Channel name or channel name and time step combination of the near-infrared channel - defaults to ChannelName.NIR

TYPE: ChannelName | str | ChannelKey

out_channel_key

Channel name or channel name and time step combination of the output channel - defaults to 'adois'

TYPE: ChannelName | str | ChannelKey

cache_dir_path

Path to the cache directory of the model - defaults to 'cache'

TYPE: Path

remove_channels

If True, the channels are removed - defaults to True

TYPE: bool