google-deepmind/representations4d
Foundation models for 4D spatial and temporal vision tasks.
4D Representations (google‑deepmind/representations4d)
What it is
A DeepMind research codebase that bundles several self‑supervised video representation models designed for 4‑dimensional perception – 3‑D space plus time. The repo ships the model implementations, pretrained checkpoints, and Colab demos for five papers:
| Model | Core idea | Typical downstream tasks |
|---|---|---|
| Scaling 4D Representations | Large‑scale masked‑auto‑encoding (MAE) on video, scaling from 20 M to 22 B parameters. | Camera pose estimation, depth prediction, object tracking. |
| Moving Off‑the‑Grid (MooG) | Tokens are free to move across space‑time via cross‑attention, learning object‑centric tracks without a fixed pixel grid. | Box and point tracking, scene‑aware video understanding. |
| Recurrent Video Masked Autoencoders (RVM) | Recurrent transformer encoder‑decoder with asymmetric masking; efficient for small models. | Action recognition, segmentation, dense tracking, video reconstruction. |
| Omnivorous DINO | Light‑weight post‑training that aligns a frozen DINOv2 teacher with multi‑modal (e.g., RGB + depth) views. | Cross‑modal retrieval, 3‑D scene understanding, modality‑agnostic transfer. |
| GenCeption | Uses a pre‑trained video diffusion model (WAN) as a perception backbone; tasks are steered by text prompts. | Depth, surface normals, camera pose, expression‑referring segmentation, 3‑D keypoints. |
All models are built on Vision‑Transformer (ViT) backbones (B/L/e variants) or hybrid ConvNet‑Transformer architectures.
Quick start (from the README)
git clone https://github.com/google-deepmind/representations4d.git
cd representations4d
python3 -m venv representations4d_env
source representations4d_env/bin/activate
pip install .
Demos (Colab notebooks)
- Depth estimation with the 4DS‑B‑dist‑e backbone.
- Box & point tracking using MooG.
- Segmentation, key‑point tracking, and masked video reconstruction with RVM.
- Evaluation of RVM on tracking benchmarks.
- Feature‑alignment demo for Omnivorous DINO.
- Multi‑task video perception (depth, segmentation, normals, keypoints) with GenCeption.
Each notebook loads the corresponding checkpoint from the public Google Cloud bucket and runs inference on a short video clip.
Available checkpoints (sizes in GB)
| Name | Architecture | Params | Size | Link |
|---|---|---|---|---|
| 4DS‑B‑dist‑e | ViT‑B | 88 M | 0.33 | scaling4d_dist_b.npz |
| 4DS‑L | ViT‑L | 305 M | 1.2 | scaling4d_l.npz |
| 4DS‑e | ViT‑e | 3.8 B | 14 | scaling4d_e.npz |
| MooG backbone | ConvNet+Transformer | 35 M | 0.14 | moog_ego4d_backbone_ckpt_… .npz |
| MooG box‑track head | Cross‑attention | 35 M | 0.14 | moog_ego4d_box_track_head_ckpt_… .npz |
| RVM (ViT‑S) | Encoder‑decoder | 34 M | 0.27 | pretrain_rvm_small16_256_… .npz |
| … (ViT‑B/L/H) | … | up to 743 M | up to 3.1 | respective links |
| Omnivorous DINOv2 (student) | ViT‑B | 86.5 M | 1.6 | omnivorous_dinov2‑vit_b.safetensors |
| GenCeption (WAN 14 B) | Transformer | 14 B | 26.7 | genception_14b_transformer.npz |
| GenCeption (WAN 1.3 B) | Transformer | 1.3 B | 2.7 | genception_1.3b_transformer.npz |
| GenCeption VAE | 100 M | 0.48 | diffusion_pytorch_model.safetensors |
How to use a model (high‑level)
- Pick a checkpoint from the table.
- Load it with the provided
representations4dPython API (e.g.,from representations4d import load_model). - Feed a video tensor (
[T, H, W, 3]normalized to[0,1]). - Call the model’s
forwardmethod to obtain latent tokens or task‑specific outputs (depth map, key‑point heatmaps, etc.). - For text‑prompted tasks (GenCeption) also pass a string prompt.
The repo includes utility scripts for preprocessing video frames, visualising token trajectories (MooG), and evaluating on standard benchmarks (e.g., ScanNet depth, Ego4D tracking).
Citation
If you use any of the models or the code, cite the corresponding paper(s) listed in the README (e.g., Scaling 4D Representations, Moving Off‑the‑Grid, RVM, Omnivorous DINO, GenCeption).
License: Apache 2.0 for code, CC‑BY 4.0 for data/materials.
This repository is a genuine research software project focused on frontier video‑representation learning; it is not a simple tutorial list or a trivial demo.
Related
- Dispatch
- Project
- Project
- Project
- Project