pixano.features.schemas.source
Source(created_at=None, updated_at=None, **data)
Bases: BaseSchema
Source of the annotation.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of the source. |
kind |
str
|
Kind of source. |
metadata |
str
|
Metadata of the source. dict[str, Any] encoded in a string. |
Source code in pixano/features/schemas/base_schema.py
create_ground_truth(metadata={})
classmethod
Create a ground truth source.
Source code in pixano/features/schemas/source.py
SourceKind
Bases: Enum
Kind of source that produced the annotation.
Attributes:
Name | Type | Description |
---|---|---|
MODEL |
Source produced by a model. |
|
HUMAN |
Source produced by a human. |
|
GROUND_TRUTH |
The source is a ground truth. |
|
OTHER |
Source produced by other means. |
create_source(id, name, kind, metadata)
Create a Source
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
Identifier of the source. |
required |
name
|
str
|
Name of the source. |
required |
kind
|
Literal['model', 'human', 'ground_truth', 'other'] | SourceKind
|
Kind of source. |
required |
metadata
|
str | dict[str, Any]
|
Metadata of the source. |
required |
Returns:
Type | Description |
---|---|
Source
|
The created |