Welcome to our weekly FiftyOne tips and tricks blog where we recap interesting questions and answers that have recently popped up on Slack, GitHub, Stack Overflow, and Reddit.
Wait, what’s FiftyOne?
FiftyOne is an open source machine learning toolset that enables data science teams to improve the performance of their computer vision models by helping them curate high quality datasets, evaluate models, find mistakes, visualize embeddings, and get to production faster.
[@portabletext/react] Unknown block type "externalImage", specify a component for it in the `components.types` prop
“Can I load TIFF images using FiftyOne and Python in .ipynb notebook?”
The image types that FiftyOne supports are based on the underlying support of the browser you are using to run the FiftyOne App. The TIFF format is only supported out of the box by a few browsers like Safari. For other browsers, you will need to check if there is an extension that adds TIFF support, like this one for Firefox.
“Does Fiftyone have a MSCOCO analysis implementation that include things like localization error, background error, and similarity?”
Yes! By default, evaluate_detections()will use COCO-style evaluation to analyze predictions when the specified label fields are Detections or Polylines. Although FiftyOne doesn’t directly expose a function that computes these metrics, you can construct dataset views that will allow you to compute many of these cases. For example stratifying by bounding box area. Another option is to export the relevant labels in COCO format and pass them to pycocotools.
“I can’t seem to reference images correctly due to issues with the root path. Currently, it seems that Sample.filepath should be an absolute path, instead of a relative path with regards to the current working directory. I would like to use the current working directory as a relative base path for Sample.filepath. Is there some way to define the relative path to which Sample.filepath is compared to?”
The best way to do that is to modify the filepaths based on your current working directory. However, you can also use dataset.set_field() to create a temporary view that updates filepaths using a ViewExpression rather than changing them permanently with set_values() each time. For example:
from fiftyone import ViewField as F from fiftyone import ViewExpression as E
“Can FiftyOne import a dataset that has been labeled using the LabelMe tool? Furthermore, is it possible to export the dataset in a different format after importing?”