class KeypointSkeleton(EmbeddedDocument): (source)
Constructor: KeypointSkeleton(*args, **kwargs)
Description of a keypoint skeleton.
Keypoint skeletons can be associated with
fiftyone.core.labels.Keypoint
or
fiftyone.core.labels.Keypoints
fields whose
points
attributes all
contain a fixed number of semantically ordered points.
The edges argument contains lists of integer indexes that define the connectivity of the points in the skeleton, and the optional labels argument defines the label strings for each node in the skeleton.
For example, the skeleton below is defined by edges between the following nodes:
left hand <-> left shoulder <-> right shoulder <-> right hand left eye <-> right eye <-> mouth
Example:
import fiftyone as fo # A skeleton for an object made of 7 points skeleton = fo.KeypointSkeleton( labels=[ "left hand" "left shoulder", "right shoulder", "right hand", "left eye", "right eye", "mouth", ], edges=[[0, 1, 2, 3], [4, 5, 6]], )
Parameters | |
labels | an optional list of label strings for each node |
edges | a list of lists of integer indexes defining the connectivity between nodes |
Class Variable | edges |
Undocumented |
Class Variable | labels |
Undocumented |
Class Variable | meta |
Undocumented |
Inherited from EmbeddedDocument
:
Method | __init__ |
Undocumented |
Inherited from MongoEngineBaseDocument
(via EmbeddedDocument
, BaseEmbeddedDocument
):
Class Method | from |
Loads the document from a BSON/JSON dictionary. |
Method | __deepcopy__ |
Undocumented |
Method | __delattr__ |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | clear |
Clears the field from the document. |
Method | field |
Undocumented |
Method | field |
Undocumented |
Method | get |
Gets the field of the document. |
Method | has |
Determines whether the document has a field of the given name. |
Method | set |
Sets the value of a field of the document. |
Method | to |
Serializes this document to a BSON/JSON dictionary. |
Property | field |
An ordered tuple of the public fields of this document. |
Method | _get |
Undocumented |
Method | _get |
Returns an ordered tuple of field names of this document. |
Method | _get |
Returns an ordered tuple of field names that should be included in the repr of the document. |
Method | _to |
Undocumented |
Instance Variable | _fields |
Undocumented |
Inherited from SerializableDocument
(via EmbeddedDocument
, BaseEmbeddedDocument
, MongoEngineBaseDocument
):
Class Method | from |
Loads the document from a JSON string. |
Method | __eq__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | copy |
Returns a deep copy of the document. |
Method | fancy |
Generates a customizable string representation of the document. |
Method | iter |
Returns an iterator over the (name, value) pairs of the public fields of the document. |
Method | merge |
Merges the contents of the given document into this document. |
Method | to |
Serializes the document to a JSON string. |