The FiftyOne Model Zoo.
Module | torch |
FiftyOne Zoo models provided by torchvision:torchvision.models . |
From __init__.py
:
Class |
|
Mixin class for Config classes of fiftyone.core.models.Model instances whose models are stored in the FiftyOne Model Zoo. |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class |
|
Class that describes the collection of remotely-sourced models in the FiftyOne Model Zoo. |
Class |
|
Class describing a model in the FiftyOne Model Zoo. |
Class |
|
Class that describes the collection of models in the FiftyOne Model Zoo. |
Function | delete |
Deletes the zoo model from local disk, if necessary. |
Function | delete |
Deletes the specified remote source and all downloaded models associated with it. |
Function | download |
Downloads the specified model from the FiftyOne Model Zoo. |
Function | ensure |
Ensures that the package requirements for the specified zoo model are satisfied. |
Function | find |
Returns the path to the zoo model on disk. |
Function | get |
Returns the ZooModel instance for the specified zoo model. |
Function | install |
Installs any package requirements for the specified zoo model. |
Function | is |
Determines whether the zoo model of the given name is downloaded. |
Function | list |
Returns information about the zoo models that have been downloaded. |
Function | list |
Returns the list of remote model sources that are registered locally. |
Function | list |
Returns the list of available models in the FiftyOne Model Zoo. |
Function | load |
Loads the specified model from the FiftyOne Model Zoo. |
Function | register |
Registers a remote source of models, if necessary. |
Constant | MODELS |
Undocumented |
Variable | logger |
Undocumented |
Function | _download |
Undocumented |
Function | _download |
Undocumented |
Function | _download |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _import |
Undocumented |
Function | _iter |
Undocumented |
Function | _list |
Undocumented |
Function | _load |
Undocumented |
Function | _load |
Undocumented |
Function | _merge |
Undocumented |
Function | _merge |
Undocumented |
Function | _normalize |
Undocumented |
Function | _parse |
Undocumented |
Constant | _BUILTIN |
Undocumented |
Constant | _MODELS |
Undocumented |
Constant | _THIS |
Undocumented |
Deletes the zoo model from local disk, if necessary.
Parameters | |
name | the name of the zoo model, which can have @<ver> appended to refer to a specific version of the model |
Deletes the specified remote source and all downloaded models associated with it.
Parameters | |
url | the remote source to delete, which can be:
|
Downloads the specified model from the FiftyOne Model Zoo.
If the model is already downloaded, it is not re-downloaded unless overwrite == True is specified.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the GITHUB_TOKEN environment variable.
Parameters | |
name | the name of the zoo model to download, which can have @<ver> appended to refer to a specific version of the model, or the remote source to download it from, which can be:
|
modelNone | the specific model to download, if name_or_url is a remote source |
overwrite:False | whether to overwrite any existing files |
Returns | |
tuple of |
|
Ensures that the package requirements for the specified zoo model are satisfied.
Parameters | |
name | the name of the zoo model, which can have @<ver> appended to refer to a specific version of the model |
errorNone | the error level to use when installing/ensuring requirements, defined as:
By default, fo.config.requirement_error_level is used |
logTrue | whether to generate a log message when a requirement is satisfied |
Returns the path to the zoo model on disk.
The model must be downloaded. Use download_zoo_model
to download
models.
Parameters | |
name | the name of the zoo model, which can have @<ver> appended to refer to a specific version of the model |
Returns | |
the path to the model on disk | |
Raises | |
ValueError | if the model does not exist or has not been downloaded |
Installs any package requirements for the specified zoo model.
Parameters | |
name | the name of the zoo model, which can have @<ver> appended to refer to a specific version of the model |
errorNone | the error level to use, defined as:
By default, fo.config.requirement_error_level is used |
Determines whether the zoo model of the given name is downloaded.
Parameters | |
name | the name of the zoo model, which can have @<ver> appended to refer to a specific version of the model |
Returns | |
True/False |
Returns information about the zoo models that have been downloaded.
Returns | |
a dict mapping model names to (model path, ZooModel ) tuples |
Returns the list of remote model sources that are registered locally.
Returns | |
the list of remote sources |
Returns the list of available models in the FiftyOne Model Zoo.
Also includes models from any remote sources that you've registered.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz # # List all zoo models # names = foz.list_zoo_models() print(names) # # List all zoo models with the specified tag(s) # names = foz.list_zoo_models(tags="torch") print(names)
Parameters | |
tags:None | only include models that have the specified tag or list of tags |
source:None | only include models available via the given remote source |
Returns | |
a list of model names |
Loads the specified model from the FiftyOne Model Zoo.
By default, the model will be downloaded if necessary, and any documented package requirements will be checked to ensure that they are installed.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the GITHUB_TOKEN environment variable.
Parameters | |
name | the name of the zoo model to load, which can have @<ver> appended to refer to a specific version of the model, or the remote source to load it from, which can be:
|
modelNone | the specific model to load, if name_or_url is a remote source |
downloadTrue | whether to download the model if necessary |
ensureTrue | whether to ensure any requirements are installed before loading the model |
installFalse | whether to install any requirements before loading the model |
errorNone | the error level to use when installing/ensuring requirements, defined as:
By default, fo.config.requirement_error_level is used |
cache:True | whether to store a weak reference to the model so that running this method again will return the same instance while the model is still in use |
**kwargs | keyword arguments to inject into the model's Config instance |
Returns | |
a fiftyone.core.models.Model |
Registers a remote source of models, if necessary.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the GITHUB_TOKEN environment variable.
Parameters | |
url | the remote source to register, which can be:
|
overwrite:False | whether to overwrite any existing files |