Advanced Inference Usage#

apply_model() isn’t limited to the task types covered above. It stores whatever Label your model returns, including Regression values, Polylines, TemporalDetections for video-level events, and GeoLocation data. These have fewer end-to-end guides today, so search the Model Zoo catalog (for example, by the video or 3d tags) to find a model for one of these tasks, or implement a custom Model that returns the label type you need.

Sharing a custom model#

Once you have a custom model working, you can register it as a remotely-sourced zoo model so that it can be loaded and applied just like a built-in model:

model = foz.load_zoo_model("your-custom-model")
dataset.apply_model(model, label_field="predictions")

Note

Framework-specific examples are also available for Hugging Face, Ultralytics, and PyTorch Hub models.