Sursentia
Tiles processor that uses the Sursentia model to predict landcover and solar panels.
Model input channels
ChannelName.R: Red channel, raster channel, ground sampling distance of 0.1 to 0.5 meters per pixel, standardized values with a mean of 0.392 and a standard deviation of 0.198ChannelName.G: Green channel, raster channel, ground sampling distance of 0.1 to 0.5 meters per pixel, standardized values with a mean of 0.423 and a standard deviation of 0.173ChannelName.B: Blue channel, raster channel, ground sampling distance of 0.1 to 0.5 meters per pixel, standardized values with a mean of 0.373 and a standard deviation of 0.157- Use the
SursentiaPreprocessorto preprocess the input channels
Model output channels
- 'sursentia_landcover': Landcover channel, raster channel, ground sampling distance of the input channels, the values are 0 (buildings), 1 (buildings with green roofs), 2 (impervious surfaces), 3 (non-impervious surfaces), and 4 (water bodies)
- 'sursentia_solar': Solar panels channel, raster channel, ground sampling distance of the input channels, the values are 0 (background) and 1 (solar panels)
- Use the
SursentiaMapFieldProcessorto map the fields of the layers
Additional dependencies
Sursentia requires the sursentia dependency group and torch.
Implements the TilesProcessor protocol.
| PARAMETER | DESCRIPTION |
|---|---|
r_channel_name
|
Channel name of the red channel
TYPE:
|
g_channel_name
|
Channel name of the green channel
TYPE:
|
b_channel_name
|
Channel name of the blue channel
TYPE:
|
landcover_channel_name
|
Channel name of the landcover channel (if None, the landcover head of the model is not used)
TYPE:
|
solar_channel_name
|
Channel name of the solar panels channel (if None, the solar head of the model is not used)
TYPE:
|
batch_size
|
Batch size of the sliding window inference
TYPE:
|
version
|
Version of the model (
TYPE:
|
device
|
Device to run the model on ( |
cache_dir_path
|
Path to cache directory of the model
TYPE:
|
remove_channels
|
If True, the channels are removed
TYPE:
|
from_config
classmethod
Creates the Sursentia model from the configuration.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Configuration
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Sursentia
|
Sursentia |
__call__
Runs the Sursentia model.
| PARAMETER | DESCRIPTION |
|---|---|
tiles
|
Tiles
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tiles
|
Tiles |
SursentiaConfig
Bases: pydantic.BaseModel
Configuration for the from_config class method of Sursentia
Create the configuration from a config file
- Use '1.0' instead of
SursentiaVersion.V1_0 - Use 'cpu' or 'gpu' instead of
Device.CPUorDevice.GPU - Use null instead of None
- Use false or true instead of False or True
Example
You can create the configuration from a config file.
package: 'aviary_models'
name: 'Sursentia'
config:
r_channel_name: 'r'
g_channel_name: 'g'
b_channel_name: 'b'
landcover_channel_name: 'sursentia_landcover'
solar_channel_name: 'sursentia_solar'
batch_size: 1
version: '1.0'
device: 'cpu'
cache_dir_path: 'cache'
remove_channels: true
| ATTRIBUTE | DESCRIPTION |
|---|---|
r_channel_name |
Channel name of the red channel -
defaults to
TYPE:
|
g_channel_name |
Channel name of the green channel -
defaults to
TYPE:
|
b_channel_name |
Channel name of the blue channel -
defaults to
TYPE:
|
landcover_channel_name |
Channel name of the landcover channel (if None, the landcover head of the model is not used) - defaults to 'sursentia_landcover'
TYPE:
|
solar_channel_name |
Channel name of the solar panels channel (if None, the solar head of the model is not used) - defaults to 'sursentia_solar'
TYPE:
|
batch_size |
Batch size of the sliding window inference - defaults to 1
TYPE:
|
version |
Version of the model (
TYPE:
|
device |
Device to run the model on (
TYPE:
|
cache_dir_path |
Path to the cache directory of the model - defaults to 'cache'
TYPE:
|
remove_channels |
If True, the channels are removed - defaults to True
TYPE:
|
SursentiaPreprocessor
Tiles processor that preprocesses the input channels of the Sursentia model.
Implements the TilesProcessor protocol.
| PARAMETER | DESCRIPTION |
|---|---|
r_channel_name
|
Channel name of the red channel
TYPE:
|
g_channel_name
|
Channel name of the green channel
TYPE:
|
b_channel_name
|
Channel name of the blue channel
TYPE:
|
new_r_channel_name
|
New channel name of the red channel
TYPE:
|
new_g_channel_name
|
New channel name of the green channel
TYPE:
|
new_b_channel_name
|
New channel name of the blue channel
TYPE:
|
max_num_threads
|
Maximum number of threads
TYPE:
|
from_config
classmethod
Creates a sursentia preprocessor from the configuration.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Configuration |
| RETURNS | DESCRIPTION |
|---|---|
SursentiaPreprocessor
|
Sursentia preprocessor |
__call__
Preprocesses the input channels.
| PARAMETER | DESCRIPTION |
|---|---|
tiles
|
Tiles
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tiles
|
Tiles |
SursentiaPreprocessorConfig
Bases: pydantic.BaseModel
Configuration for the from_config class method of SursentiaPreprocessor
Create the configuration from a config file
- Use null instead of None
Example
You can create the configuration from a config file.
package: 'aviary_models'
name: 'SursentiaPreprocessor'
config:
r_channel_name: 'r'
g_channel_name: 'g'
b_channel_name: 'b'
new_r_channel_name: null
new_g_channel_name: null
new_b_channel_name: null
max_num_threads: null
| ATTRIBUTE | DESCRIPTION |
|---|---|
r_channel_name |
Channel name of the red channel -
defaults to
TYPE:
|
g_channel_name |
Channel name of the green channel -
defaults to
TYPE:
|
b_channel_name |
Channel name of the blue channel -
defaults to
TYPE:
|
new_r_channel_name |
New channel name of the red channel - defaults to None
TYPE:
|
new_g_channel_name |
New channel name of the green channel - defaults to None
TYPE:
|
new_b_channel_name |
New channel name of the blue channel - defaults to None
TYPE:
|
max_num_threads |
Maximum number of threads - defaults to None
TYPE:
|
SursentiaMapFieldProcessor
Vector processor that maps the fields of the layers of the Sursentia model.
Landcover mapping
- 0: 'Gebäude'
- 1: 'Gründach'
- 2: 'versiegelte Fläche'
- 3: 'nicht versiegelte Fläche'
- 4: 'Gewässer'
Solar mapping
- 0: 'Hintergrund'
- 1: 'Solaranlage'
Implements the VectorProcessor protocol.
| PARAMETER | DESCRIPTION |
|---|---|
field
|
Field
TYPE:
|
landcover_layer_name
|
Layer name of the landcover layer (if None, the landcover layer is not used)
TYPE:
|
solar_layer_name
|
Layer name of the solar layer (if None, the solar layer is not used)
TYPE:
|
new_landcover_layer_name
|
New layer name of the landcover layer
TYPE:
|
new_solar_layer_name
|
New layer name of the solar layer
TYPE:
|
from_config
classmethod
Creates a sursentia map field processor from the configuration.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Configuration |
| RETURNS | DESCRIPTION |
|---|---|
SursentiaMapFieldProcessor
|
Sursentia map field processor |
__call__
Maps the fields of the layers.
| PARAMETER | DESCRIPTION |
|---|---|
vector
|
Vector
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Vector
|
Vector |
SursentiaMapFieldProcessorConfig
Bases: pydantic.BaseModel
Configuration for the from_config class method of SursentiaMapFieldProcessor
Create the configuration from a config file
- Use null instead of None
Example
You can create the configuration from a config file.
package: 'aviary_models'
name: 'SursentiaMapFieldProcessor'
config:
field: 'my_field'
landcover_layer_name: 'sursentia_landcover'
solar_layer_name: 'sursentia_solar'
new_landcover_layer_name: null
new_solar_layer_name: null
| ATTRIBUTE | DESCRIPTION |
|---|---|
field |
Field
TYPE:
|
landcover_layer_name |
Layer name of the landcover layer (if None, the landcover layer is not used) - defaults to 'sursentia_landcover'
TYPE:
|
solar_layer_name |
Layer name of the solar layer (if None, the solar layer is not used) - defaults to 'sursentia_solar'
TYPE:
|
new_landcover_layer_name |
New layer name of the landcover layer - defaults to None
TYPE:
|
new_solar_layer_name |
New layer name of the solar layer - defaults to None
TYPE:
|
Device
Bases: Enum
| ATTRIBUTE | DESCRIPTION |
|---|---|
CPU |
CPU device
|
GPU |
GPU device
|
SursentiaVersion
Bases: Enum
| ATTRIBUTE | DESCRIPTION |
|---|---|
V1_0 |
Version 1.0
|