ONNXSegmentationModel
Bases: SegmentationModel
ONNX model for segmentation
Implements the Model
protocol.
PARAMETER | DESCRIPTION |
---|---|
path
|
path to the model
TYPE:
|
ground_sampling_distance
|
ground sampling distance in meters
TYPE:
|
buffer_size
|
buffer size in meters (specifies the area around the tile that is additionally fetched)
TYPE:
|
device
|
device (
TYPE:
|
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:
|
ground_sampling_distance
|
ground sampling distance in meters
TYPE:
|
buffer_size
|
buffer size in meters (specifies the area around the tile that is additionally fetched)
TYPE:
|
device
|
device (
TYPE:
|
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:
|
ground_sampling_distance
|
ground sampling distance in meters
TYPE:
|
buffer_size
|
buffer size in meters (specifies the area around the tile that is additionally fetched)
TYPE:
|
device
|
device (
TYPE:
|
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 |