pixano.features.schemas.annotations.keypoints
KeyPoints(created_at=None, updated_at=None, **data)
Bases: Annotation
A set of keypoints.
Attributes:
Name | Type | Description |
---|---|---|
template_id |
str
|
Id of the keypoint template. |
coords |
list[float]
|
List of 2D coordinates of the keypoints. |
states |
list[str]
|
Status for each keypoint. ("visible", "invisible", "hidden"). |
Source code in pixano/features/schemas/base_schema.py
map_back2front_vertices()
Utility function to map back format for KeyPoint to front vertices format.
Raises:
Type | Description |
---|---|
ValueError
|
If keypoints is ill-formed. |
Returns:
Type | Description |
---|---|
list
|
keypoint list for vertices front format. |
Source code in pixano/features/schemas/annotations/keypoints.py
none()
classmethod
Utility function to get a None
equivalent.
Should be removed as soon as Lance manages None
value.
Returns:
Type | Description |
---|---|
KeyPoints
|
"None" KeyPoints. |
Source code in pixano/features/schemas/annotations/keypoints.py
KeyPoints3D(created_at=None, updated_at=None, **data)
Bases: Annotation
A set of 3D keypoints.
Attributes:
Name | Type | Description |
---|---|---|
template_id |
str
|
id of keypoint template. |
coords |
list[float]
|
List of 3D coordinates of the keypoints. |
states |
list[str]
|
Status for each keypoint. |
Source code in pixano/features/schemas/base_schema.py
map_back2front_vertices()
Utility function to map back format for KeyPoint3D to front vertices format.
Warn
Not implemented for 3D keypoints.
Source code in pixano/features/schemas/annotations/keypoints.py
none()
classmethod
Utility function to get a None
equivalent.
Should be removed as soon as Lance manages None
value.
Returns:
Type | Description |
---|---|
KeyPoints3D
|
"None" KeyPoints3D. |
Source code in pixano/features/schemas/annotations/keypoints.py
create_keypoints(template_id, coords, states, id='', item_ref=ItemRef.none(), view_ref=ViewRef.none(), entity_ref=EntityRef.none(), source_ref=SourceRef.none())
Create a KeyPoints
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_id
|
str
|
id of keypoint template. |
required |
coords
|
list[float]
|
List of 2D coordinates of the keypoints. |
required |
states
|
list[str]
|
Status for each keypoint. ("visible", "invisible", "hidden"). |
required |
id
|
str
|
Keypoints ID. |
''
|
item_ref
|
ItemRef
|
Item reference. |
none()
|
view_ref
|
ViewRef
|
View reference. |
none()
|
entity_ref
|
EntityRef
|
Entity reference. |
none()
|
source_ref
|
SourceRef
|
Source reference. |
none()
|
Returns:
Type | Description |
---|---|
KeyPoints
|
The created |
Source code in pixano/features/schemas/annotations/keypoints.py
create_keypoints3d(template_id, coords, states, id='', item_ref=ItemRef.none(), view_ref=ViewRef.none(), entity_ref=EntityRef.none(), source_ref=SourceRef.none())
Create a KeyPoints3D
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_id
|
str
|
The id of the keypoint template. |
required |
coords
|
list[float]
|
The 3D coordinates of the keypoints. |
required |
states
|
list[Literal['visible', 'invisble', 'hidden']]
|
The visibility status for each keypoint. |
required |
id
|
str
|
Keypoints3D ID. |
''
|
item_ref
|
ItemRef
|
Item reference. |
none()
|
view_ref
|
ViewRef
|
View reference. |
none()
|
entity_ref
|
EntityRef
|
Entity reference. |
none()
|
source_ref
|
SourceRef
|
Source reference. |
none()
|
Returns:
Type | Description |
---|---|
KeyPoints3D
|
The created |
Source code in pixano/features/schemas/annotations/keypoints.py
is_keypoints(cls, strict=False)
Check if a class is a KeyPoints
or subclass of KeyPoints
.
is_keypoints3d(cls, strict=False)
Check if a class is Keypoints3D
or a subclass of Keypoints3D
.