Dataset sample fields.
Class |
|
An n-dimensional array field. |
Class |
|
A boolean field. |
Class |
|
A ListField that stores class label strings. |
Class |
|
A string field that holds a hex color string like '#FF6D04'. |
Class |
|
A date field. |
Class |
|
A datetime field. |
Class |
|
A dictionary field that wraps a standard Python dictionary. |
Class |
|
A field that stores instances of a given type of fiftyone.core.odm.BaseEmbeddedDocument object. |
Class |
|
A field that stores a list of a given type of fiftyone.core.odm.BaseEmbeddedDocument objects. |
Class |
|
A generic field. |
Class |
|
A floating point number field. |
Class |
|
A video frame number field. |
Class |
|
A [first, last] frame support in a video. |
Class |
|
A GeoJSON field storing a line of longitude and latitude coordinates. |
Class |
|
A GeoJSON field storing a list of lines. |
Class |
|
A GeoJSON field storing a list of points. |
Class |
|
A GeoJSON field storing a list of polygons. |
Class |
|
A GeoJSON field storing a longitude and latitude coordinate point. |
Class |
|
A GeoJSON field storing a polygon of longitude and latitude coordinates. |
Class |
|
A [min, max] range of the values in a fiftyone.core.labels.Heatmap . |
Class |
|
A 32 bit integer field. |
Class |
|
A list of (x, y) coordinate pairs. |
Class |
|
A list field that wraps a standard Field , allowing multiple instances of the field to be stored as a list in the database. |
Class |
|
A DictField that stores mapping between integer keys or RGB string hex keys and string targets. |
Class |
|
An Object ID field. |
Class |
|
A list of lists of (x, y) coordinate pairs. |
Class |
|
A reference field. |
Class |
|
A unicode string field. |
Class |
|
A UUID field. |
Class |
|
A one-dimensional array field. |
Function | filter |
Filters the schema according to the given constraints. |
Function | flatten |
Returns a flat version of the given schema where all embedded document fields are included as top-level keys. |
Function | get |
Returns a dict of editable metadata for the given field. |
Function | hex |
Converts a hex string like "#ff6d04" to a hex integer. |
Function | int |
Converts a 2D hex integer mask array to an RGB mask array. |
Function | int |
Converts an RRGGBB integer value to hex string like "#ff6d04" . |
Function | is |
Determines whether the provided mask targets use integer keys. |
Function | is |
Determines whether the provided target is an integer. |
Function | is |
Determines whether the provided mask targets use RGB hex string keys. |
Function | is |
Determines whether the provided target is an RGB string. |
Function | matches |
Determines whether the field matches the given constraints. |
Function | rgb |
Converts an RGB mask array to a 2D hex integer mask array. |
Function | validate |
Validates the given field constraints. |
Function | validate |
Validates that the field matches the given constraints. |
Class | _ |
Base class for GeoJSON fields. |
Function | _flatten |
Undocumented |
Function | _make |
Undocumented |
Constant | _ARRAY |
Undocumented |
Constant | _PRIMITIVE |
Undocumented |
Constant | _SUPPORTED |
Undocumented |
Filters the schema according to the given constraints.
Parameters | |
schema | a dict mapping field names to Field instances |
ftype:None | an optional field type or iterable of types to which
to restrict the returned schema. Must be subclass(es) of
Field |
embeddedNone | an optional embedded document type or
iterable of types to which to restrict the returned schema.
Must be subclass(es) of
fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to restrict to (True) or exclude (False) read-only fields. By default, all fields are included |
infoNone | an optional key or list of keys that must be in the field's info dict |
createdNone | an optional datetime specifying a minimum creation date |
includeFalse | whether to include fields that start with _ in the returned schema |
flat:False | whether to return a flattened schema where all embedded document fields are included as top-level keys |
mode:None | whether to apply the above constraints before and/or after flattening the schema. Only applicable when flat is True. Supported values are ("before", "after", "both"). The default is "after" |
Returns | |
a dict mapping field names to Field instances |
Returns a flat version of the given schema where all embedded document fields are included as top-level keys.
Parameters | |
schema | a dict mapping field names to Field instances |
ftype:None | an optional field type or iterable of types to which to
restrict the returned schema. Must be subclass(es) of
Field |
embeddedNone | an optional embedded document type or
iterable of types to which to restrict the returned schema. Must be
subclass(es) of fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to restrict to (True) or exclude (False) read-only fields. By default, all fields are included |
infoNone | an optional key or list of keys that must be in the field's info dict |
createdNone | an optional datetime specifying a minimum creation date |
includeFalse | whether to include fields that start with _ in the returned schema |
Returns | |
a dict mapping flattened paths to Field instances |
Returns a dict of editable metadata for the given field.
Parameters | |
field | a Field |
Returns | |
a dict of field metadata |
Converts a hex string like "#ff6d04"
to a hex integer.
Parameters | |
hex | a hex string |
Returns | |
an integer |
Converts a 2D hex integer mask array to an RGB mask array.
Parameters | |
mask | a 2D integer mask array |
Returns | |
an RGB mask array |
Converts an RRGGBB integer value to hex string like "#ff6d04"
.
Parameters | |
value | an integer value |
Returns | |
a hex string |
Determines whether the provided mask targets use integer keys.
Parameters | |
mask | a mask targets dict |
Returns | |
True/False |
Determines whether the provided target is an integer.
Parameters | |
target | an integer or RGB hex string |
Returns | |
True/False |
Determines whether the provided mask targets use RGB hex string keys.
Parameters | |
mask | a mask targets dict |
Returns | |
True/False |
Determines whether the provided target is an RGB string.
Parameters | |
target | an integer or RGB hex string |
Returns | |
True/False |
Determines whether the field matches the given constraints.
Parameters | |
field | a Field |
ftype:None | an optional field type or iterable of types to enforce.
Must be subclass(es) of Field |
embeddedNone | an optional embedded document type or
iterable of types to enforce. Must be subclass(es) of
fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to optionally enforce that the field is read-only (True) or not read-only (False) |
infoNone | an optional key or list of keys that must be in the field's info dict |
createdNone | an optional datetime specifying a minimum creation date |
Returns | |
True/False |
Converts an RGB mask array to a 2D hex integer mask array.
Parameters | |
mask | an RGB mask array |
Returns | |
a 2D integer mask array |
Validates the given field constraints.
Parameters | |
ftype:None | an optional field type or iterable of types to enforce.
Must be subclass(es) of Field |
embeddedNone | an optional embedded document type or
iterable of types to enforce. Must be subclass(es) of
fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to optionally enforce that the field is read-only (True) or not read-only (False) |
infoNone | an optional key or list of keys that must be in the field's info dict |
createdNone | an optional datetime specifying a minimum creation date |
Returns | |
True/False whether any constraints were provided | |
Raises | |
ValueError | if the constraints are not valid |
Validates that the field matches the given constraints.
Parameters | |
field | a Field |
path:None | the field or embedded.field.name. Only used to generate more informative error messages |
ftype:None | an optional field type or iterable of types to enforce.
Must be subclass(es) of Field |
embeddedNone | an optional embedded document type or
iterable of types to enforce. Must be subclass(es) of
fiftyone.core.odm.BaseEmbeddedDocument |
readNone | whether to optionally enforce that the field is read-only (True) or not read-only (False) |
Raises | |
ValueError | if the constraints are not valid |
Undocumented