Skip to content
ModelsThatRun

MoGe-2

Microsoft's metric monocular geometry: depth, a 3D point map and normals from one photo, three sizes, MIT.

Size

Commercial use OK for size vits: code MIT, weights MIT. Measured on our RTX 4090: 44.1 ms median, 1.9 GiB VRAM peak. PyTorch weights, 134 MB.

License

Commercial use OK

Code
MITchecked 26 Oct 2026
Weights
MITall sizes, checked 26 Oct 2026

On our RTX 4090, measured

44.1ms median

p90 45.3 ms, fp16, batch 1, 1022x686

VRAM peak
1.9 GiB
Status
Runs as is
Environment, 27 Oct 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, microsoft/MoGe@925b8ed835a7a9cdb7578ba15c658a0afc969030. Baseline 848 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Accuracy

Not yet scored

Weights

PyTorch

Size
134 MB
sha256
79a16621928c…d3e1dc
Download vits weights

Same photos and one score threshold for every model of this task. Failures are marked.

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
vits44.1 ms1022x6861.9 GiBNot yet scored134 MBAs isCommercial OK
vitb48.3 ms1022x6862.2 GiBNot yet scored400 MBAs isCommercial OK
vitl69.7 ms1022x6863.0 GiBNot yet scored1.23 GBAs isCommercial OK

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

MoGe-2: Accurate Monocular Geometry with Metric Scale and Sharp Details

Ruicheng Wang, Sicheng Xu, Yue Dong, Yu Deng, Jianfeng Xiang, Zelong Lv and 3 others

arXiv 2507.02546, 3 Jul 2025

Abstract

We propose MoGe-2, an advanced open-domain geometry estimation model that recovers a metric scale 3D point map of a scene from a single image. Our method builds upon the recent monocular geometry estimation approach, MoGe, which predicts affine-invariant point maps with unknown scales. We explore effective strategies to extend MoGe for metric geometry prediction without compromising the relative geometry accuracy provided by the affine-invariant point representation. Additionally, we discover that noise and errors in real data diminish fine-grained detail in the predicted geometry. We address this by developing a unified data refinement approach that filters and completes real data from different sources using sharp synthetic labels, significantly enhancing the granularity of the reconstructed geometry while maintaining the overall accuracy. We train our model on a large corpus of mixed datasets and conducted comprehensive evaluations, demonstrating its superior performance in achieving accurate relative geometry, precise metric scale, and fine-grained detail recovery -- capabilities that no previous methods have simultaneously achieved.

README

Copied from the authors' repository at commit 925b8ed on 3 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

MoGe is a powerful model for recovering 3D geometry from monocular open-domain images, including metric point maps, metric depth maps, normal maps and camera FOV. Check our websites (MoGe-1, MoGe-2, MoGe-3) for videos and interactive results!

📖 Publications

MoGe-3: Fine-Detail Monocular Geometry Estimation with Self-Guided Sparse Volumetric Refinement

Video

MoGe-2: Accurate Monocular Geometry with Metric Scale and Sharp Details
Video https://github.com/user-attachments/assets/8f9ae680-659d-4f7f-82e2-b9ed9d6b988a
MoGe: Unlocking Accurate Monocular Geometry Estimation for Open-Domain Images with Optimal Training Supervision
Overview Figure Method overview

🌟 Features

  • Accurate 3D geometry estimation: Estimate point maps & depth maps & normal maps from open-domain single images with high precision -- all capabilities in one model, one forward pass.
  • Optional ground-truth FOV input: Enhance model accuracy further by providing the true field of view.
  • Flexible resolution support: Works seamlessly with various resolutions and aspect ratios, from 2:1 to 1:2.
  • Optimized for speed: Achieves 60ms latency per image (A100 or RTX3090, FP16, ViT-L). Adjustable inference resolution for even faster speed.

✨ News

(2026-07-21)

  • ❗Published MoGe-3, featuring significantly improved fine-grained point map geometry.
    • The new code and pretrained models are coming soon. Please stay tuned!

📦 Installation

Install via pip
pip install git+https://github.com/microsoft/MoGe.git
Or clone this repository
git clone https://github.com/microsoft/MoGe.git
cd MoGe
pip install -r requirements.txt   # install the requirements

Note: MoGe should be compatible with most requirements versions. Please check the requirements.txt for more details if you encounter any dependency issues.

🤗 Pretrained Models

Our pretrained models are available on the huggingface hub:

Version Hugging Face Model Metric scale Normal #Params
MoGe-1 Ruicheng/moge-vitl - - 314M
MoGe-2 Ruicheng/moge-2-vitl ✅ - 326M
Ruicheng/moge-2-vitl-normal ✅ ✅ 331M
Ruicheng/moge-2-vitb-normal ✅ ✅ 104M
Ruicheng/moge-2-vits-normal ✅ ✅ 35M
MoGe-3 moge-3-vitg (coming soon) ✅ ✅ -
moge-3-vitl (coming soon) ✅ ✅ -

You may import the MoGeModel class of the matched version, then load the pretrained weights via MoGeModel.from_pretrained("HUGGING_FACE_MODEL_REPO_NAME") with automatic downloading. If loading a local checkpoint, replace the model name with the local path.

For ONNX support, please refer to docs/onnx.md.

💡 Minimal Code Example

Here is a minimal example for loading the model and inferring on a single image.

import cv2
import torch
# from moge.model.v1 import MoGeModel
from moge.model.v2 import MoGeModel # Let's try MoGe-2

device = torch.device("cuda")

# Load the model from huggingface hub (or load from local).
model = MoGeModel.from_pretrained("Ruicheng/moge-2-vitl-normal").to(device)                             

# Read the input image and convert to tensor (3, H, W) with RGB values normalized to [0, 1]
input_image = cv2.cvtColor(cv2.imread("PATH_TO_IMAGE.jpg"), cv2.COLOR_BGR2RGB)                       
input_image = torch.tensor(input_image / 255, dtype=torch.float32, device=device).permute(2, 0, 1)    

# Infer 
output = model.infer(input_image)
"""
`output` has keys "points", "depth", "mask", "normal" (optional) and "intrinsics",
The maps are in the same size as the input image. 
{
    "points": (H, W, 3),    # point map in OpenCV camera coordinate system (x right, y down, z forward). For MoGe-2, the point map is in metric scale.
    "depth": (H, W),        # depth map
    "normal": (H, W, 3)     # normal map in OpenCV camera coordinate system. (available for MoGe-2-normal)
    "mask": (H, W),         # a binary mask for valid pixels. 
    "intrinsics": (3, 3),   # normalized camera intrinsics
}
"""

For more usage details, see the MoGeModel.infer() docstring.

💡 Usage

Gradio demo | moge app

The demo for MoGe-1 is also available at our Hugging Face Space.

# Using the command line tool
moge app        # will run MoGe-2 demo by default.

# In this repo
python moge/scripts/app.py   # --share for Gradio public sharing

See also moge/scripts/app.py

Inference | moge infer

Run the script moge/scripts/infer.py via the following command:

# Save the output [maps], [glb] and [ply] files
moge infer -i IMAGES_FOLDER_OR_IMAGE_PATH --o OUTPUT_FOLDER --maps --glb --ply

# Show the result in a window (requires pyglet < 2.0, e.g. pip install pyglet==1.5.29)
moge infer -i IMAGES_FOLDER_OR_IMAGE_PATH --o OUTPUT_FOLDER --show

For detailed options, run moge infer --help:

Usage: moge infer [OPTIONS]

  Inference script

Options:
  -i, --input PATH            Input image or folder path. "jpg" and "png" are
                              supported.
  --fov_x FLOAT               If camera parameters are known, set the
                              horizontal field of view in degrees. Otherwise,
                              MoGe will estimate it.
  -o, --output PATH           Output folder path
  --pretrained TEXT           Pretrained model name or path. If not provided,
                              the corresponding default model will be chosen.
  --version [v1|v2]           Model version. Defaults to "v2"
  --device TEXT               Device name (e.g. "cuda", "cuda:0", "cpu").
                              Defaults to "cuda"
  --fp16                      Use fp16 precision for much faster inference.
  --resize INTEGER            Resize the image(s) & output maps to a specific
                              size. Defaults to None (no resizing).
  --resolution_level INTEGER  An integer [0-9] for the resolution level for
                              inference. Higher value means more tokens and
                              the finer details will be captured, but
                              inference can be slower. Defaults to 9. Note
                              that it is irrelevant to the output size, which
                              is always the same as the input size.
                              `resolution_level` actually controls
                              `num_tokens`. See `num_tokens` for more details.
  --num_tokens INTEGER        number of tokens used for inference. A integer
                              in the (suggested) range of `[1200, 2500]`.
                              `resolution_level` will be ignored if
                              `num_tokens` is provided. Default: None
  --threshold FLOAT           Threshold for removing edges. Defaults to 0.01.
                              Smaller value removes more edges. "inf" means no
                              thresholding.
  --maps                      Whether to save the output maps (image, point
                              map, depth map, normal map, mask) and fov.
  --glb                       Whether to save the output as a.glb file. The
                              color will be saved as a texture.
  --ply                       Whether to save the output as a.ply file. The
                              color will be saved as vertex colors.
  --show                      Whether show the output in a window. Note that
                              this requires pyglet<2 installed as required by
                              trimesh.
  --help                      Show this message and exit.

See also moge/scripts/infer.py

360° panorama images | moge infer_panorama

NOTE: This is an experimental extension of MoGe.

The script will split the 360-degree panorama image into multiple perspective views and infer on each view separately. The output maps will be combined to produce a panorama depth map and point map.

Note that the panorama image must have spherical parameterization (e.g., environment maps or equirectangular images). Other formats must be converted to spherical format before using this script. Run moge infer_panorama --help for detailed options.

Figure panorama pipeline

The photo is from this URL

See also moge/scripts/infer_panorama.py

🏋️‍♂️ Training & Finetuning

See docs/train.md

🧪 Evaluation

See docs/eval.md

⚖️ License

MoGe code is released under the MIT license, except for DINOv2 code in moge/model/dinov2 which is released by Meta AI under the Apache 2.0 license. See LICENSE for more details.

📜 Citation

If you find our work useful in your research, we gratefully request that you consider citing our paper:

@inproceedings{wang2025moge,
  title={Moge: Unlocking accurate monocular geometry estimation for open-domain images with optimal training supervision},
  author={Wang, Ruicheng and Xu, Sicheng and Dai, Cassie and Xiang, Jianfeng and Deng, Yu and Tong, Xin and Yang, Jiaolong},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={5261--5271},
  year={2025}
}

@misc{wang2025moge2,
      title={MoGe-2: Accurate Monocular Geometry with Metric Scale and Sharp Details}, 
      author={Ruicheng Wang and Sicheng Xu and Yue Dong and Yu Deng and Jianfeng Xiang and Zelong Lv and Guangzhong Sun and Xin Tong and Jiaolong Yang},
      year={2025},
      eprint={2507.02546},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2507.02546}, 
}

Alternatives

Model output
Input test photo
⇆
InputOutput