vertebrae.extractors.huggingface_video

Optional Hugging Face video embedding extractor.

Classes

HFVideoExtractor

Hugging Face video backbone extractor with explicit pooling.

Module Contents

class vertebrae.extractors.huggingface_video.HFVideoExtractor(name, model_id, processor_id=None, pooling='mean', hidden_layer=None, outputs=None, structured_outputs=None, batch_size=4, num_frames=16, clip_duration_sec=None, clip_start_sec=None, device=None, revision=None, trust_remote_code=False, processor_kwargs=None, model_kwargs=None, checkpoint_paths=None, cache_identity=None)[source]

Hugging Face video backbone extractor with explicit pooling.

Parameters:
  • name (str)

  • model_id (str)

  • processor_id (Optional[str])

  • pooling (str)

  • hidden_layer (Optional[int])

  • outputs (Optional[List[Dict[str, Any]]])

  • structured_outputs (Optional[List[Dict[str, Any]]])

  • batch_size (int)

  • num_frames (int)

  • clip_duration_sec (Optional[float])

  • clip_start_sec (Optional[float])

  • device (Optional[str])

  • revision (Optional[str])

  • trust_remote_code (bool)

  • processor_kwargs (Optional[Dict[str, Any]])

  • model_kwargs (Optional[Dict[str, Any]])

  • checkpoint_paths (Optional[List[str]])

  • cache_identity (Optional[str])

fit(X, y=None)[source]

No-op fit for frozen Hugging Face video models.

Parameters:
  • X (Any)

  • y (Any)

Return type:

HFVideoExtractor

transform(X)[source]

Encode video inputs into dense embeddings.

Parameters:

X (Any)

Return type:

numpy.ndarray

fit_transform(X, y=None)[source]

Encode video inputs into dense embeddings.

Parameters:
  • X (Any)

  • y (Any)

Return type:

numpy.ndarray

recipe()[source]

Return a serializable Hugging Face video recipe.

Return type:

Dict[str, Any]