Validation utilities.
Function | get |
Gets the given sample field and optionally validates its type and value. |
Function | get |
Gets the given sample fields and optionally validates their types and values. |
Function | validate |
Validates that the provided samples are a fiftyone.core.collections.SampleCollection . |
Function | validate |
Validates that the fiftyone.core.collections.SampleCollection has fields with the specified fiftyone.core.labels.Label types. |
Function | validate |
Validates that the provided samples are an image fiftyone.core.collections.SampleCollection . |
Function | validate |
Validates that the sample's media is an image. |
Function | validate |
Validates that the provided samples are a fiftyone.core.collections.SampleCollection that is not grouped. |
Function | validate |
Validates that the provided samples are a video fiftyone.core.collections.SampleCollection . |
Function | validate |
Validates that the sample's media is a video. |
Variable | foc |
Undocumented |
Variable | fov |
Undocumented |
Function | _validate |
Undocumented |
Function | _validate |
Undocumented |
Gets the given sample field and optionally validates its type and value.
Parameters | |
sample | a fiftyone.core.sample.Sample |
field | the name of the field to get |
allowedNone | an optional iterable of
fiftyone.core.labels.Label types to enforce that the field
value has |
allowTrue | whether to allow the field to be None |
Returns | |
the field value | |
Raises | |
ValueError if the field does not exist or does not meet the specified | |
criteria |
Gets the given sample fields and optionally validates their types and values.
Parameters | |
sample | a fiftyone.core.sample.Sample |
field | an iterable of field names to get |
allowedNone | an optional iterable of
fiftyone.core.labels.Label types to enforce that the
field values have |
sameFalse | whether to enforce that all fields have same type |
allowTrue | whether to allow the fields to be None |
Returns | |
a tuple of field values | |
Raises | |
ValueError if a field does not exist or does not meet the specified | |
criteria |
Validates that the provided samples are a
fiftyone.core.collections.SampleCollection
.
Parameters | |
sample | a sample collection |
mediaNone | an optional media type or iterable of media types that the collection must have |
Raises | |
ValueError | if the provided samples are not a |
fiftyone.core.collections.SampleCollection |
Validates that the fiftyone.core.collections.SampleCollection
has fields with the specified fiftyone.core.labels.Label
types.
Parameters | |
sample | a
fiftyone.core.collections.SampleCollection |
field | a field name or iterable of field names |
allowed | a fiftyone.core.labels.Label type or
iterable of allowed fiftyone.core.labels.Label types |
sameFalse | whether to enforce that all fields have same type. This condition is enforced separately for sample- and frame-level fields |
Raises | |
ValueError if the required conditions are not met |
Validates that the provided samples are an image
fiftyone.core.collections.SampleCollection
.
Parameters | |
sample | a sample collection |
Raises | |
ValueError | if the provided samples are not an image |
fiftyone.core.collections.SampleCollection |
Validates that the sample's media is an image.
Parameters | |
sample | a fiftyone.core.sample.Sample |
Raises | |
ValueError if the sample's media is not an image |
Validates that the provided samples are a
fiftyone.core.collections.SampleCollection
that is not grouped.
Parameters | |
sample | a sample collection |
Raises | |
ValueError | if the provided samples are a grouped |
fiftyone.core.collections.SampleCollection |
Validates that the provided samples are a video
fiftyone.core.collections.SampleCollection
.
Parameters | |
sample | a sample collection |
Raises | |
ValueError | if the provided samples are not a video |
fiftyone.core.collections.SampleCollection |
Validates that the sample's media is a video.
Parameters | |
sample | a fiftyone.core.sample.Sample |
Raises | |
ValueError if the sample's media is not a video |