class FiftyOneTransformerForObjectDetection(FiftyOneTransformer): (source)
Constructor: FiftyOneTransformerForObjectDetection(config)
FiftyOne wrapper around a transformers model for object detection.
Parameters | |
config | a FiftyOneTransformerConfig |
Method | predict |
Performs prediction on the given data. |
Method | predict |
Performs prediction on the given iterable of data. |
Method | _load |
Undocumented |
Method | _predict |
Undocumented |
Inherited from FiftyOneTransformer
:
Method | __init__ |
Undocumented |
Instance Variable | config |
Undocumented |
Instance Variable | device |
Undocumented |
Instance Variable | image |
Undocumented |
Instance Variable | model |
Undocumented |
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 | _load |
Undocumented |
Inherited from TransformerEmbeddingsMixin
(via FiftyOneTransformer
):
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 FiftyOneTransformer
, TransformerEmbeddingsMixin
):
Method | get |
Returns the embeddings generated by the last forward pass of the model. |
Inherited from Model
(via FiftyOneTransformer
, TransformerEmbeddingsMixin
, EmbeddingsMixin
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | preprocess |
Undocumented |
Property | can |
Whether this instance can generate prompt embeddings. |
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 |
fiftyone.core.models.Model.predict_all
Performs prediction on the given iterable of data.
Image models should support, at minimum, processing args values that are either lists of uint8 numpy arrays (HWC) or numpy array tensors (NHWC).
Video models should support, at minimum, processing args values that are lists of eta.core.video.VideoReader instances.
Subclasses can override this method to increase efficiency, but, by
default, this method simply iterates over the data and applies
predict
to each.
Parameters | |
args | an iterable of data |
Returns | |
a list of fiftyone.core.labels.Label instances or a list
of dicts of fiftyone.core.labels.Label instances
containing the predictions |