Sursentia
Bases: IDMixin
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) for v1.0 and 0 (flat roofs), 1 (green roofs), 2 (pitched roofs), 3 (traffic areas), 4 (pools), 5 (tracks), 6 (other impervious surfaces), 7 (vegetation), 8 (agricultural areas), 9 (water bodies), 10 (other non-impervious surfaces), and 11 (non-impervious paths) for v2.0
- '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:
|
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:
|
id
property
| RETURNS | DESCRIPTION |
|---|---|
uuid.UUID
|
ID |
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' or '2.0' instead of
SursentiaVersion.V1_0orSursentiaVersion.V2_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'
version: '2.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:
|
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
Bases: IDMixin
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:
|
id
property
| RETURNS | DESCRIPTION |
|---|---|
uuid.UUID
|
ID |
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
Bases: IDMixin
Vector processor that maps the fields of the layers of the Sursentia model.
Landcover mapping (v1.0): - 0: 'Gebäude' - 1: 'Gründach' - 2: 'versiegelte Fläche' - 3: 'nicht versiegelte Fläche' - 4: 'Gewässer'
Landcover mapping (v2.0): - 0: 'Flachdach' - 1: 'Gründach' - 2: 'Schrägdach' - 3: 'Verkehrsfläche' - 4: 'Pool' - 5: 'Gleis' - 6: 'sonstige versiegelte Fläche' - 7: 'Vegetation' - 8: 'Agrarfläche' - 9: 'Gewässer' - 10: 'sonstige nicht versiegelte Fläche' - 11: 'nicht versiegelter Weg'
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:
|
version
|
Version of the model (
TYPE:
|
id
property
| RETURNS | DESCRIPTION |
|---|---|
uuid.UUID
|
ID |
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 '1.0' or '2.0' instead of
SursentiaVersion.V1_0orSursentiaVersion.V2_0 - 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
version: '2.0'
| 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:
|
version |
Version of the model (
TYPE:
|
Device
Bases: Enum
| ATTRIBUTE | DESCRIPTION |
|---|---|
CPU |
CPU device
|
GPU |
GPU device
|
SursentiaVersion
Bases: Enum
| ATTRIBUTE | DESCRIPTION |
|---|---|
V1_0 |
Version 1.0
|
V2_0 |
Version 2.0
|