Metadata stored in dataset samples.
Class |
|
Class for storing metadata about image samples. |
Class |
|
Base class for storing metadata about generic samples. |
Class |
|
Class for storing metadata about 3D scene samples. |
Class |
|
Class for storing metadata about video samples. |
Function | compute |
Populates the metadata field of all samples in the collection. |
Function | compute |
Populates the metadata field of the sample. |
Function | get |
Retrieves the dimensions and number of channels of the given image from a file-like object that is streaming its contents. |
Function | get |
Get the metadata class for a media_type |
Variable | logger |
Undocumented |
Function | _compute |
Undocumented |
Function | _compute |
Undocumented |
Function | _compute |
Undocumented |
Function | _do |
Undocumented |
Function | _get |
Undocumented |
Function | _image |
Returns True if image has flipped width/height dimensions |
Function | _parse |
Undocumented |
Populates the metadata field of all samples in the collection.
Any samples with existing metadata are skipped, unless overwrite == True.
Parameters | |
sample | a
fiftyone.core.collections.SampleCollection |
overwrite:False | whether to overwrite existing metadata |
numNone | a suggested number of threads to use |
skipTrue | whether to gracefully continue without raising an error if metadata cannot be computed for a sample |
warnFalse | whether to log a warning if metadata cannot be computed for a sample |
progress:None | whether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead |
Populates the metadata field of the sample.
Parameters | |
sample | a fiftyone.core.sample.Sample |
overwrite:False | whether to overwrite existing metadata |
skipFalse | whether to gracefully continue without raising an error if metadata cannot be computed |
Retrieves the dimensions and number of channels of the given image from a file-like object that is streaming its contents.
Parameters | |
f | a file-like object that supports read(), seek(), tell() |
Returns | |
(width, height, num_channels) |
Undocumented
Undocumented
Returns True if image has flipped width/height dimensions
EXIF Orientation metadata can specify that an image be rotated or otherwise transposed. PIL.Image does not handle this by default so we have to inspect the EXIF info. See PIL.ImageOps.exif_transpose() for the basis of this function, except we don't actually want to transpose the image when we only need the dimensions.
Tag name reference: https://exiftool.org/TagNames/EXIF.html PIL.ImageOps reference: https://github.com/python-pillow/Pillow/blob/main/src/PIL/ImageOps.py
Parameters | |
img | a PIL.Image |
Returns | |
True if image width/height should be flipped |