class FiftyOneZeroShotTransformerForObjectDetection(FiftyOneZeroShotTransformer): (source)
Constructor: FiftyOneZeroShotTransformerForObjectDetection(config)
FiftyOne wrapper around a transformers model for zero shot object detection.
Parameters | |
config | a FiftyOneZeroShotTransformerConfig |
Method | __init__ |
Undocumented |
Method | predict |
Performs prediction on the given data. |
Instance Variable | classes |
Undocumented |
Instance Variable | config |
Undocumented |
Instance Variable | device |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | processor |
Undocumented |
Method | _load |
Undocumented |
Method | _load |
Undocumented |
Method | _predict |
Undocumented |
Method | _process |
Undocumented |
Instance Variable | _text |
Undocumented |
Inherited from FiftyOneZeroShotTransformer
:
Property | media |
The media type processed by the model. |
Property | preprocess |
Whether to apply transforms during inference (True) or to assume that they have already been applied (False). |
Property | ragged |
True/False whether transforms may return tensors of different sizes. If True, then passing ragged lists of data to predict_all is not allowed. |
Property | transforms |
The preprocessing function that will/must be applied to each input before prediction, or None if no preprocessing is performed. |
Method | _get |
Undocumented |
Inherited from ZeroShotTransformerEmbeddingsMixin
(via FiftyOneZeroShotTransformer
):
Method | embed |
Generates an embedding for the given data. |
Method | embed |
Generates embeddings for the given iterable of data. |
Property | has |
Whether this instance has embeddings. |
Method | _embed |
Undocumented |
Inherited from EmbeddingsMixin
(via FiftyOneZeroShotTransformer
, ZeroShotTransformerEmbeddingsMixin
):
Method | get |
Returns the embeddings generated by the last forward pass of the model. |
Inherited from ZeroShotTransformerPromptMixin
(via FiftyOneZeroShotTransformer
, ZeroShotTransformerEmbeddingsMixin
, EmbeddingsMixin
):
Method | embed |
Generates an embedding for the given text prompt. |
Method | embed |
Generates an embedding for the given text prompts. |
Property | can |
Whether this instance can generate prompt embeddings. |
Method | _embed |
Undocumented |
Inherited from Model
(via FiftyOneZeroShotTransformer
, ZeroShotTransformerEmbeddingsMixin
, EmbeddingsMixin
, ZeroShotTransformerPromptMixin
, PromptMixin
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | predict |
Performs prediction on the given iterable of data. |
Method | preprocess |
Undocumented |
Property | has |
Whether this instance can generate logits for its predictions. |
Performs prediction on the given data.
Image models should support, at minimum, processing arg values that are uint8 numpy arrays (HWC).
Video models should support, at minimum, processing arg values that are eta.core.video.VideoReader instances.
Parameters | |
arg | the data |
Returns | |
a fiftyone.core.labels.Label instance or dict of
fiftyone.core.labels.Label instances containing the
predictions |