neuralset.extractors.video.HuggingFaceVideo¶
- pydantic model neuralset.extractors.video.HuggingFaceVideo[source][source]¶
Extract video embeddings using a native HuggingFace video model.
Videos are divided into clips of clip_duration seconds at the specified frequency. Each clip is processed by the video model, and features are aggregated over layers/tokens using the HuggingFace extractor options.
- Parameters:
model_name (str, default="MCG-NJU/videomae-base") – HuggingFace video model identifier. Image models are not accepted here; use HuggingFaceImage for frame-by-frame video embeddings.
clip_duration (float | None, default=None) – Duration (in seconds) of video sub-clips to process. If None, defaults to one timestep (1 / frequency).
max_imsize (int | None, default=None) – Maximum image dimension for downsampling before processing.
num_frames (int) – Number of frames to pass to the video model per clip.
- Fields:
- SUPPORTED_MODELS: ClassVar[tuple[str, ...]] = ('vjepa2', 'videomae', 'google/vivit', 'facebook/timesformer')[source]¶
- requirements: ClassVar[tuple[str, ...]] = ('transformers>=4.29.2', 'huggingface_hub>=0.27.0', 'transformers>=4.29.2', 'huggingface_hub>=0.27.0', 'torchvision>=0.15.2', 'julius>=0.2.7', 'moviepy>=2.1.2')[source]¶