robokudo.annotators.clip_annotator

Classes

ClipAnnotator

A simple CLIP annotator that uses a given vocabulary to annotate all incoming object hypothesis.

Module Contents

class robokudo.annotators.clip_annotator.ClipAnnotator(name: str = 'ClipAnnotator')

Bases: robokudo.annotators.core.BaseAnnotator

A simple CLIP annotator that uses a given vocabulary to annotate all incoming object hypothesis.

device

Torch device to be used by the annotator.

clip_model

CLIP model used for feature extraction.

clip_preprocess

CLIP preprocessor used for feature extraction.

vocabulary: typing_extensions.List[str] = ['Milk Container', 'Conflakes', 'Pancake Batter', 'Instant Coffee', 'Crepe Pan', 'Dish Soap']

The vocabulary used for object classification

vocabulary_index: faiss.IndexFlatIP

A faiss index for text features used in similarity search.

update() py_trees.common.Status