Views
No views yet
| Parameter | Value |
|---|---|
| Architecture | ViT-B encoder |
| Crop size | 384 px |
| Frames per clip | 64 |
| Distilled from | ViT-G teacher |
1import torch
2from transformers import AutoVideoProcessor, VJEPA2Model
3
4model_id = "davevanveen/vjepa2.1-vitb-fpc64-384"
5
6processor = AutoVideoProcessor.from_pretrained(model_id)
7model = VJEPA2Model.from_pretrained(model_id)
8model.eval()
9
10# video: list of PIL images or a (T, H, W, C) numpy array
11# Here we use a random tensor as a placeholder
12video_frames = torch.randint(0, 256, (64, 384, 384, 3), dtype=torch.uint8).numpy()
13
14inputs = processor(videos=[video_frames], return_tensors="pt")
15with torch.no_grad():
16 outputs = model(**inputs)
17
18# Patch-level features: (batch, num_patches, hidden_dim)
19features = outputs.last_hidden_state
20print(features.shape)1@article{vjepa2_2025,
2 title = {V-JEPA 2: Self-Supervised Video Models Enable Understanding, Prediction and Planning},
3 author = {Assran, Mahmoud and others},
4 year = {2025},
5 url = {https://github.com/facebookresearch/vjepa2}
6}