module documentation
Utilities for working with Hugging Face Transformers.
Class |
|
FiftyOne wrapper around a transformers model. |
Class |
|
Configuration for a FiftyOneTransformer . |
Class |
|
FiftyOne wrapper around a transformers model for depth estimation. |
Class |
|
Configuration for a FiftyOneTransformerForDepthEstimation . |
Class |
|
FiftyOne wrapper around a transformers model for image classification. |
Class |
|
Configuration for a FiftyOneTransformerForImageClassification . |
Class |
|
FiftyOne wrapper around a transformers model for object detection. |
Class |
|
Configuration for a FiftyOneTransformerForObjectDetection . |
Class |
|
FiftyOne wrapper around a transformers model for semantic segmentation. |
Class |
|
Configuration for a FiftyOneTransformerForSemanticSegmentation . |
Class |
|
FiftyOne wrapper around a transformers model. |
Class |
|
Configuration for a FiftyOneZeroShotTransformer . |
Class |
|
FiftyOne wrapper around a transformers model for zero-shot image classification. |
Class |
|
Configuration for a FiftyOneZeroShotTransformerForImageClassification . |
Class |
|
FiftyOne wrapper around a transformers model for zero shot object detection. |
Class |
|
Configuration for a FiftyOneZeroShotTransformerForObjectDetection . |
Class |
|
Mixin for Transformers that can generate embeddings. |
Class |
|
Mixin for Transformers that can generate embeddings. |
Class |
|
Mixin for Transformers that can perform zero-shot prediction. |
Function | convert |
Converts the given Hugging Face transformers model into a FiftyOne model. |
Function | get |
Returns the string model type for the given model. |
Function | to |
Converts the Transformers classification results to FiftyOne format. |
Function | to |
Converts the Transformers detection results to FiftyOne format. |
Function | to |
Converts the Transformers depth estimation results to FiftyOne format. |
Function | to |
Converts the Transformers semantic segmentation results to FiftyOne format. |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Variable | logger |
Undocumented |
Variable | torch |
Undocumented |
Variable | transformers |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _convert |
Undocumented |
Function | _create |
Undocumented |
Function | _create |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _has |
Undocumented |
Function | _has |
Undocumented |
Function | _has |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _to |
Undocumented |
Converts the given Hugging Face transformers model into a FiftyOne model.
Parameters | |
model | a transformers model |
task:None | the task of the model. Supported values are "image-classification", "object-detection", "semantic-segmentation", and "depth-estimation". If not specified, the task is automatically inferred from the model |
Returns | |
a fiftyone.core.models.Model | |
Raises | |
ValueError | if the model could not be converted |
Returns the string model type for the given model.
If the model is a zero-shot model, the task is appended to the model type.
Parameters | |
model | a transformers.model model |
task:None | an optional task type |
Returns | |
the model type string |
Converts the Transformers classification results to FiftyOne format.
Parameters | |
results | Transformers classification results |
id2label | Transformers ID to label mapping |
Returns | |
a single or list of fiftyone.core.labels.Classification |
Converts the Transformers detection results to FiftyOne format.
Parameters | |
results | Transformers detection results |
id2label | Transformers ID to label mapping |
image | the list of image sizes |
Returns | |
a single or list of fiftyone.core.labels.Detections |
Converts the Transformers depth estimation results to FiftyOne format.
Parameters | |
results | Transformers depth estimation results |
Returns | |
a single or list of fiftyone.core.labels.Heatmap |
Converts the Transformers semantic segmentation results to FiftyOne format.
Parameters | |
results | Transformers semantic segmentation results |
Returns | |
a single or list of fiftyone.core.labels.Segmentation |