Description
V-JEPA, or Video Joint Embedding Predictive Architecture, is an official PyTorch codebase developed by Meta AI Research (FAIR) for self-supervised visual representation learning from video. This method focuses on learning robust visual representations by passively observing video pixels from datasets like VideoMix2M. Unlike generative models that rely on pixel reconstruction, V-JEPA employs an unsupervised feature prediction objective. It does not require pretrained image encoders, text, negative examples, human annotations, or pixel-level reconstruction, making it a purely unsupervised approach.
The core of V-JEPA's methodology involves a predictor that operates in a latent space, rather than a pixel decoder. This predictor makes predictions for missing regions of a video based on the observed parts. To visualize these predictions, a conditional diffusion model is used to decode the latent space predictions into interpretable pixels. Crucially, during this decoding process, the pretrained V-JEPA encoder and predictor networks remain frozen, ensuring that the learned representations are preserved.
The codebase is structured to facilitate both pretraining and evaluation. Configuration files in the `configs` directory specify experiment parameters, allowing users to customize paths for logs, checkpoints, and training data. The `app` directory contains the training loops, with `main.py` for local debugging and `main_distributed.py` for launching distributed training on clusters using tools like submitit and SLURM. The `evals` directory houses evaluation scripts for tasks such as image and video classification, also supporting both local and distributed execution.
Data preparation involves creating CSV files for video datasets, where each line specifies the absolute path to a video file and an integer class label (which is disregarded during unsupervised pretraining but used for supervised evaluations). Image datasets are prepared using the standard PyTorch ImageFolder class, requiring a specific directory structure. The project provides pretrained models, including ViT-L and ViT-H variants, along with attentive probes for various downstream tasks like K400, SSv2, ImageNet1K, Places205, and iNat21, showcasing the versatility of the learned representations.
V-JEPA's Core Features
Self-supervised learning from video using Joint Embedding Predictive Architecture (JEPA)
Unsupervised feature prediction objective in latent space
No reliance on pixel-level reconstruction or human annotations
Versatile visual representations for downstream video and image tasks
Official PyTorch codebase with provided models and configurations
Supports local and distributed training and evaluation
Includes pretrained models (ViT-L, ViT-H) and attentive probes
Flexible data preparation for video and image datasets
Codebase includes scripts for pretraining and evaluation
Visualizations via conditional diffusion models in latent space
Getting Started with V-JEPA
Clone Repository: Obtain the V-JEPA codebase from GitHub.
Install Dependencies: Set up a Python environment (e.g., using conda) and install required packages.
Configure Experiments: Update paths in configuration files within the `configs` directory for data, logs, and checkpoints.
Prepare Data: Format video and image datasets according to the specified CSV or ImageFolder structure.
Launch Pretraining: Execute local or distributed pretraining using `app/main.py` or `app/main_distributed.py`.
Launch Evaluations: Run local or distributed evaluations for downstream tasks using `evals/main.py` or `evals/main_distributed.py`.
Utilize Pretrained Models: Download and integrate provided pretrained V-JEPA models for your applications.
V-JEPA's Use Cases
- Video Representation Learning
- Image Classification
- Video Classification
- Downstream Task Adaptation
- Research and Development
- Feature Prediction








