nemo_curator.stages.image.embedders.clip_embedder
nemo_curator.stages.image.embedders.clip_embedder
Module Contents
Classes
API
Bases: ProcessingStage[ImageBatch, ImageBatch]
Stage for generating image embeddings using CLIP model.
This class processes image batches through a CLIP model to generate embeddings for each image. It assumes image data is already loaded in ImageObject.image_data and stores embeddings in ImageObject.embedding.
Process an image batch to generate embeddings.
Parameters:
ImageBatch containing list of ImageObject instances with pre-loaded image_data
Returns: ImageBatch
ImageBatch with embeddings stored in ImageObject.embedding
Initialize the CLIP image embedding model.
Download the weights for the CLIP model on the node.
Yield batches of images from the task.
Parameters:
ImageBatch containing list of ImageObject instances with pre-loaded image_data