VLM-3R is a unified Vision-Language Model (VLM) framework integrating 3D reconstructive instruction tuning for deep spatial understanding from monocular video.
The rapid advancement of Large Multimodal Models (LMMs) for 2D images and videos has motivated extending these models to understand 3D scenes, aiming for human-like visual-spatial intelligence. VLM-3R processes monocular video frames by employing a geometry encoder to derive implicit 3D tokens that represent spatial understanding. Through the utilization of Spatial-Visual–View Fusion technique and over 200K curated 3D reconstructive instruction tuning question-answer (QA) pairs, VLM-3R effectively aligns real-world spatial context with language instructions. This enables the model to perform monocular 3D spatial assistance and embodied reasoning.
Paper (arXiv) | Project Page | Code (GitHub) | Dataset (HF) | VSTiBench (HF)
Zhiwen Fan1,3†*, Jian Zhang2*, Renjie Li3, Junge Zhang4, Runjin Chen1, Hezhen Hu1, Kevin Wang1, Peihao Wang1, Huaizhi Qu5, Shijie Zhou7, Dilin Wang6, Zhicheng Yan6, Hongyu Xu6, Justin Theiss6, Tianlong Chen5, Jiachen Li4, Zhengzhong Tu3, Zhangyang Wang1†, Rakesh Ranjan6†
¹UT Austin ²XMU ³TAMU ⁴UCR ⁵UNC ⁶Meta ⁷UCLA
†Corresponding Author. *Equal contribution.
-R.T @ t (the world-to-camera translation) instead of pose[:3, 3], corrupting ground truth for camera_displacement, camera_obj_abs_dist, and camera_obj_rel_dist_v1/v2/v3. Other VSTiBench categories and all VSiBench data are unaffected.route plan task in VSiBench is still being organized and is not yet open-sourced.
The core of VLM-3R is a pre-trained Large Multimodal Model (LMM), integrated with modules for deriving geometric encodings, camera view encodings, and visual features from the input video; these diverse inputs are subsequently fused effectively with language representations. VLM-3R does not rely on pre-built 3D maps or external depth sensors. This design directly addresses key limitations of existing approaches, such as the common inadequacy of Video LLMs in perceiving rich spatial context from monocular video and the restrictive dependency of many specialized 3D-LLMs on prior 3D map or depth sensor inputs.
Architecture Overview Diagram:
Video of VLM3R Network Architecture Demonstration
Our method takes monocular video and language instruction as input. Visual Encoder coupled with Spatial Encoder extract frame-level appearance, camera view position, and globally aligned geometry. Visual-Geometry Fusion integrates these through attention and projection layers to create 3D-aware visual features for the LMM. During the inference stage, this fusion enables reliable spatial and temporal reasoning.
Key Components:
3D Reconstructive Tokenization: Utilizes the pre-trained CUT3R model to process monocular video frame-by-frame, extracting implicit latent representations (enriched feature tokens and camera view tokens). These tokens serve as rich 3D reconstructive tokens, compactly encoding observed 3D geometry and camera perspective without relying on explicit point clouds.
Spatial-Visual-View Fusion: Employs a cross-attention mechanism where the VLM's native visual tokens (Hv) attend to a unified 3D representation (Z3D, formed by concatenated 3D feature tokens Ft′ and camera view tokens zt′). The output of this attention stage (Hattn) is then residually connected with the original visual tokens (Hv′=Hv+Hattn). This enriched representation Hv′ subsequently passes through a two-layer MLP projector for alignment with the LMM.
Z_3D = Concat(F'_t, z'_t)
H_attn = CrossAttention(Query: H_v, KeyValue: Z_3D)
H'_v = H_v + H_attn
ProjectedFeatures = MLP_2-layer(H'_v)
Training Objective & Fine-tuning Strategy: Adopts the same learning objective as LLaVA-NeXT-Video. To achieve efficient adaptation, Low-Rank Adaptation (LoRA) is employed for fine-tuning, which involves updating parameters within the 3D fusion attention block and the projection layers.
vlm_3r_data_process/README.md for detailed instructions.git clone https://github.com/VITA-Group/VLM-3R.git
cd VLM-3R
git submodule update --init --recursive
Create conda environment:
conda create -n vlm3r python=3.10 -y
conda activate vlm3r
Install base packages:
pip install --upgrade pip
conda install pytorch==2.1.1 torchvision==0.16.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
Install project dependencies:
pip install -e ".[train]"
# Note: The FlashAttention wheel URL might be specific. Consider verifying compatibility.
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install decord openai accelerate==0.29.1
Install requirements:
cd CUT3R
pip install -r requirements.txt
Build CUT3R extension:
cd src/croco/models/curope/
python setup.py build_ext --inplace
cd ../../../../ # Return to CUT3R root
Download checkpoint:
cd src # Navigate to src within CUT3R
pip install gdown
gdown --fuzzy https://drive.google.com/file/d/1Asz-ZB3FfpzZYwunhQvNPZEUA8XUNAYD/view?usp=drive_link
cd ../.. # Return to VLM-3R root
Run Video Test Example:
CUDA_VISIBLE_DEVICES=0 bash scripts/video/demo/video_demo.sh \
Journey9ni/vlm-3r-llava-qwen2-lora \
qwen_1_5 32 2 average grid True \
playground/demo/47334096.mp4 \
lmms-lab/LLaVA-NeXT-Video-7B-Qwen2
Explanation:
CUDA_VISIBLE_DEVICES=0: Specifies the GPU device number to use.Journey9ni/vlm-3r-llava-qwen2-lora: Specifies the location of the model checkpoint.qwen_1_5: Specifies the model version to use.32 2 average grid True: These are parameter settings for model inference.playground/demo/47334096.mp4: Specifies the path to the video file to be tested.lmms-lab/LLaVA-NeXT-Video-7B-Qwen2: Specifies the base model path for the LoRA model.Run Image Test Example:
bash scripts/image/demo/image_demo.sh \
Journey9ni/vlm-3r-llava-qwen2-lora \
qwen_1_5 2 average grid True \
playground/demo/scene_47334096_imgs \
lmms-lab/LLaVA-NeXT-Video-7B-Qwen2
Explanation:
Journey9ni/vlm-3r-llava-qwen2-lora: Specifies the location of the model checkpoint.qwen_1_5: Specifies the model version to use.2 average grid True: These are parameter settings for model inference.playground/demo/scene_47334096_imgs: Specifies the path to the directory with image files.lmms-lab/LLaVA-NeXT-Video-7B-Qwen2: Specifies the base model path for the LoRA model.The model weights can be downloaded from Hugging Face:
# Download model weights from Hugging Face
git lfs install
git clone https://huggingface.co/Journey9ni/vlm-3r-llava-qwen2-lora
The model weights include:
For detailed instructions on training the VLM-3R model, please refer to our primary training script as an example: scripts/VLM_3R/train_vsibench.sh.
# Example training command. Please see the script for more details.
bash scripts/VLM_3R/train_vsibench.sh
Important Note on Video Data: We do not provide the raw video data from datasets like ScanNet, ScanNet++, or ARKitScenes. You will need to download and process them yourself. The training scripts expect the video data to follow a specific path structure. For instance, the anticipated path for a ScanNet video should be data/vlm_3r_data/scannet/videos/scene0191_00.mp4.
Optional: Pre-extracting Spatial Features To significantly accelerate the training process, you can pre-extract spatial features from all your videos beforehand. This avoids redundant feature computation during each training epoch. You can use the provided script for this purpose:
# Example command for feature extraction
python scripts/extract_spatial_features.py \\
--input-dir /path/to/your/video/dataset \\
--output-dir /path/to/save/extracted_features \\
--cut3r-weights-path /path/to/your/cut3r_weights.pth \\
--processor-config-path /path/to/your/processor_config.json \\
--gpu-ids 0,1,2,3
Please see the script for a full list of arguments. You will need to create the processor_config.json file with the following content:
{
"do_convert_rgb": null,
"do_normalize": true,
"do_rescale": true,
"do_resize": true,
"image_mean": [
0.5,
0.5,
0.5
],
"image_processor_type": "SiglipImageProcessor",
"image_std": [
0.5,
0.5,
0.5
],
"processor_class": "LlavaProcessor",
"resample": 3,
"rescale_factor": 0.00392156862745098,
"size": {
"height": 384,
"width": 384
}
}
How Pre-computed Features are Loaded:
The training script automatically detects and loads pre-computed features. Here's how it works:
Directory Structure: Pre-computed features should follow this structure:
your_data_folder/
├── videos/
│ └── scene0191_00.mp4
└── spatial_features/
└── scene0191_00.pt
Automatic Loading: During training, the system automatically checks for pre-computed features by:
.mp4 with .pt and videos with spatial_featuresNo Configuration Needed: You don't need to modify any configuration files. The training script (see llava/train/train.py, lines 1805-1808) handles this automatically:
spatial_features_path = os.path.join(video_folder, self.list_data_dict[i]['video'].replace('.mp4', '.pt').replace('videos', 'spatial_features'))
if os.path.exists(spatial_features_path):
spatial_features = torch.load(spatial_features_path)
This approach significantly speeds up training by avoiding redundant feature extraction during each epoch.
Make sure to configure the paths to your video data, benchmark datasets, and desired model output directories within the script.
To run the evaluation, first set up the environment:
cd thinking-in-space # Ensure you are in the correct directory if it's a submodule
conda create --name vsibench python=3.10 -y
conda activate vsibench
conda install pytorch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
pip install -e .
pip install s2wrapper@git+https://github.com/bfshi/scaling_on_scales
# Note: The FlashAttention wheel URL might be specific. Consider verifying compatibility.
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install transformers==4.40.0 peft==0.10.0 google-generativeai google-genai huggingface_hub[hf_xet]
Then, you can run the evaluation scripts for the VSiBench and VSTiBench benchmarks.
To evaluate on VSiBench:
bash eval_vlm_3r_vsibench.sh
To evaluate on VSTiBench:
bash eval_vlm_3r_vstibench.sh
route plan task is pending).We would like to express our gratitude to the following projects for their valuable contributions:
If you find VLM-3R useful for your research, please consider citing our paper:
@inproceedings{fan2026vlm3r,
title={VLM-3R: Vision-Language Models Augmented with Instruction-Aligned 3D Reconstruction},
author={Fan, Zhiwen and Zhang, Jian and Li, Renjie and Zhang, Junge and Chen, Runjin and Hu, Hezhen and Wang, Kevin and Wang, Peihao and Qu, Huaizhi and Zhou, Shijie and Wang, Dilin and Yan, Zhicheng and Xu, Hongyu and Theiss, Justin and Chen, Tianlong and Li, Jiachen and Tu, Zhengzhong and Wang, Zhangyang and Ranjan, Rakesh},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={31054--31065},
year={2026}
}
Python
96.9%
Shell
3.1%
VLM-3R is a unified Vision-Language Model (VLM) framework integrating 3D reconstructive instruction tuning for deep spatial understanding from monocular video.
The rapid advancement of Large Multimodal Models (LMMs) for 2D images and videos has motivated extending these models to understand 3D scenes, aiming for human-like visual-spatial intelligence. VLM-3R processes monocular video frames by employing a geometry encoder to derive implicit 3D tokens that represent spatial understanding. Through the utilization of Spatial-Visual–View Fusion technique and over 200K curated 3D reconstructive instruction tuning question-answer (QA) pairs, VLM-3R effectively aligns real-world spatial context with language instructions. This enables the model to perform monocular 3D spatial assistance and embodied reasoning.
Paper (arXiv) | Project Page | Code (GitHub) | Dataset (HF) | VSTiBench (HF)
Zhiwen Fan1,3†*, Jian Zhang2*, Renjie Li3, Junge Zhang4, Runjin Chen1, Hezhen Hu1, Kevin Wang1, Peihao Wang1, Huaizhi Qu5, Shijie Zhou7, Dilin Wang6, Zhicheng Yan6, Hongyu Xu6, Justin Theiss6, Tianlong Chen5, Jiachen Li4, Zhengzhong Tu3, Zhangyang Wang1†, Rakesh Ranjan6†
¹UT Austin ²XMU ³TAMU ⁴UCR ⁵UNC ⁶Meta ⁷UCLA
†Corresponding Author. *Equal contribution.
-R.T @ t (the world-to-camera translation) instead of pose[:3, 3], corrupting ground truth for camera_displacement, camera_obj_abs_dist, and camera_obj_rel_dist_v1/v2/v3. Other VSTiBench categories and all VSiBench data are unaffected.route plan task in VSiBench is still being organized and is not yet open-sourced.
The core of VLM-3R is a pre-trained Large Multimodal Model (LMM), integrated with modules for deriving geometric encodings, camera view encodings, and visual features from the input video; these diverse inputs are subsequently fused effectively with language representations. VLM-3R does not rely on pre-built 3D maps or external depth sensors. This design directly addresses key limitations of existing approaches, such as the common inadequacy of Video LLMs in perceiving rich spatial context from monocular video and the restrictive dependency of many specialized 3D-LLMs on prior 3D map or depth sensor inputs.
Architecture Overview Diagram:
Video of VLM3R Network Architecture Demonstration
Our method takes monocular video and language instruction as input. Visual Encoder coupled with Spatial Encoder extract frame-level appearance, camera view position, and globally aligned geometry. Visual-Geometry Fusion integrates these through attention and projection layers to create 3D-aware visual features for the LMM. During the inference stage, this fusion enables reliable spatial and temporal reasoning.
Key Components:
3D Reconstructive Tokenization: Utilizes the pre-trained CUT3R model to process monocular video frame-by-frame, extracting implicit latent representations (enriched feature tokens and camera view tokens). These tokens serve as rich 3D reconstructive tokens, compactly encoding observed 3D geometry and camera perspective without relying on explicit point clouds.
Spatial-Visual-View Fusion: Employs a cross-attention mechanism where the VLM's native visual tokens (Hv) attend to a unified 3D representation (Z3D, formed by concatenated 3D feature tokens Ft′ and camera view tokens zt′). The output of this attention stage (Hattn) is then residually connected with the original visual tokens (Hv′=Hv+Hattn). This enriched representation Hv′ subsequently passes through a two-layer MLP projector for alignment with the LMM.
Z_3D = Concat(F'_t, z'_t)
H_attn = CrossAttention(Query: H_v, KeyValue: Z_3D)
H'_v = H_v + H_attn
ProjectedFeatures = MLP_2-layer(H'_v)
Training Objective & Fine-tuning Strategy: Adopts the same learning objective as LLaVA-NeXT-Video. To achieve efficient adaptation, Low-Rank Adaptation (LoRA) is employed for fine-tuning, which involves updating parameters within the 3D fusion attention block and the projection layers.
vlm_3r_data_process/README.md for detailed instructions.git clone https://github.com/VITA-Group/VLM-3R.git
cd VLM-3R
git submodule update --init --recursive
Create conda environment:
conda create -n vlm3r python=3.10 -y
conda activate vlm3r
Install base packages:
pip install --upgrade pip
conda install pytorch==2.1.1 torchvision==0.16.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
Install project dependencies:
pip install -e ".[train]"
# Note: The FlashAttention wheel URL might be specific. Consider verifying compatibility.
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install decord openai accelerate==0.29.1
Install requirements:
cd CUT3R
pip install -r requirements.txt
Build CUT3R extension:
cd src/croco/models/curope/
python setup.py build_ext --inplace
cd ../../../../ # Return to CUT3R root
Download checkpoint:
cd src # Navigate to src within CUT3R
pip install gdown
gdown --fuzzy https://drive.google.com/file/d/1Asz-ZB3FfpzZYwunhQvNPZEUA8XUNAYD/view?usp=drive_link
cd ../.. # Return to VLM-3R root
Run Video Test Example:
CUDA_VISIBLE_DEVICES=0 bash scripts/video/demo/video_demo.sh \
Journey9ni/vlm-3r-llava-qwen2-lora \
qwen_1_5 32 2 average grid True \
playground/demo/47334096.mp4 \
lmms-lab/LLaVA-NeXT-Video-7B-Qwen2
Explanation:
CUDA_VISIBLE_DEVICES=0: Specifies the GPU device number to use.Journey9ni/vlm-3r-llava-qwen2-lora: Specifies the location of the model checkpoint.qwen_1_5: Specifies the model version to use.32 2 average grid True: These are parameter settings for model inference.playground/demo/47334096.mp4: Specifies the path to the video file to be tested.lmms-lab/LLaVA-NeXT-Video-7B-Qwen2: Specifies the base model path for the LoRA model.Run Image Test Example:
bash scripts/image/demo/image_demo.sh \
Journey9ni/vlm-3r-llava-qwen2-lora \
qwen_1_5 2 average grid True \
playground/demo/scene_47334096_imgs \
lmms-lab/LLaVA-NeXT-Video-7B-Qwen2
Explanation:
Journey9ni/vlm-3r-llava-qwen2-lora: Specifies the location of the model checkpoint.qwen_1_5: Specifies the model version to use.2 average grid True: These are parameter settings for model inference.playground/demo/scene_47334096_imgs: Specifies the path to the directory with image files.lmms-lab/LLaVA-NeXT-Video-7B-Qwen2: Specifies the base model path for the LoRA model.The model weights can be downloaded from Hugging Face:
# Download model weights from Hugging Face
git lfs install
git clone https://huggingface.co/Journey9ni/vlm-3r-llava-qwen2-lora
The model weights include:
For detailed instructions on training the VLM-3R model, please refer to our primary training script as an example: scripts/VLM_3R/train_vsibench.sh.
# Example training command. Please see the script for more details.
bash scripts/VLM_3R/train_vsibench.sh
Important Note on Video Data: We do not provide the raw video data from datasets like ScanNet, ScanNet++, or ARKitScenes. You will need to download and process them yourself. The training scripts expect the video data to follow a specific path structure. For instance, the anticipated path for a ScanNet video should be data/vlm_3r_data/scannet/videos/scene0191_00.mp4.
Optional: Pre-extracting Spatial Features To significantly accelerate the training process, you can pre-extract spatial features from all your videos beforehand. This avoids redundant feature computation during each training epoch. You can use the provided script for this purpose:
# Example command for feature extraction
python scripts/extract_spatial_features.py \\
--input-dir /path/to/your/video/dataset \\
--output-dir /path/to/save/extracted_features \\
--cut3r-weights-path /path/to/your/cut3r_weights.pth \\
--processor-config-path /path/to/your/processor_config.json \\
--gpu-ids 0,1,2,3
Please see the script for a full list of arguments. You will need to create the processor_config.json file with the following content:
{
"do_convert_rgb": null,
"do_normalize": true,
"do_rescale": true,
"do_resize": true,
"image_mean": [
0.5,
0.5,
0.5
],
"image_processor_type": "SiglipImageProcessor",
"image_std": [
0.5,
0.5,
0.5
],
"processor_class": "LlavaProcessor",
"resample": 3,
"rescale_factor": 0.00392156862745098,
"size": {
"height": 384,
"width": 384
}
}
How Pre-computed Features are Loaded:
The training script automatically detects and loads pre-computed features. Here's how it works:
Directory Structure: Pre-computed features should follow this structure:
your_data_folder/
├── videos/
│ └── scene0191_00.mp4
└── spatial_features/
└── scene0191_00.pt
Automatic Loading: During training, the system automatically checks for pre-computed features by:
.mp4 with .pt and videos with spatial_featuresNo Configuration Needed: You don't need to modify any configuration files. The training script (see llava/train/train.py, lines 1805-1808) handles this automatically:
spatial_features_path = os.path.join(video_folder, self.list_data_dict[i]['video'].replace('.mp4', '.pt').replace('videos', 'spatial_features'))
if os.path.exists(spatial_features_path):
spatial_features = torch.load(spatial_features_path)
This approach significantly speeds up training by avoiding redundant feature extraction during each epoch.
Make sure to configure the paths to your video data, benchmark datasets, and desired model output directories within the script.
To run the evaluation, first set up the environment:
cd thinking-in-space # Ensure you are in the correct directory if it's a submodule
conda create --name vsibench python=3.10 -y
conda activate vsibench
conda install pytorch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
pip install -e .
pip install s2wrapper@git+https://github.com/bfshi/scaling_on_scales
# Note: The FlashAttention wheel URL might be specific. Consider verifying compatibility.
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install transformers==4.40.0 peft==0.10.0 google-generativeai google-genai huggingface_hub[hf_xet]
Then, you can run the evaluation scripts for the VSiBench and VSTiBench benchmarks.
To evaluate on VSiBench:
bash eval_vlm_3r_vsibench.sh
To evaluate on VSTiBench:
bash eval_vlm_3r_vstibench.sh
route plan task is pending).We would like to express our gratitude to the following projects for their valuable contributions:
If you find VLM-3R useful for your research, please consider citing our paper:
@inproceedings{fan2026vlm3r,
title={VLM-3R: Vision-Language Models Augmented with Instruction-Aligned 3D Reconstruction},
author={Fan, Zhiwen and Zhang, Jian and Li, Renjie and Zhang, Junge and Chen, Runjin and Hu, Hezhen and Wang, Kevin and Wang, Peihao and Qu, Huaizhi and Zhou, Shijie and Wang, Dilin and Yan, Zhicheng and Xu, Hongyu and Theiss, Justin and Chen, Tianlong and Li, Jiachen and Tu, Zhengzhong and Wang, Zhangyang and Ranjan, Rakesh},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={31054--31065},
year={2026}
}
Python
96.9%
Shell
3.1%