# mega-sam/mega-sam

Code for the project "MegaSaM: Accurate, Fast and Robust Structure and Motion from Casual Dynamic Videos"

Repository: https://github.com/mega-sam/mega-sam
Canonical: https://ross.abutalabs.com/products/mega-sam
Homepage: https://mega-sam.github.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: pose-estimation, video-depth
Last push: 2026-01-05T21:13:42+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 60, release rhythm 35, longevity 45
- inputs: {"age_days": 635, "days_push": 240, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1355, forks 85 (observed 2026-08-28T04:04:29.181630+00:00)

## What it is
MegaSaM is a research codebase implementing a deep visual SLAM system that estimates camera parameters and consistent depth maps from casual monocular videos of dynamic scenes. It accompanies the CVPR 2025 paper and combines monocular depth models, optical flow, and camera tracking optimization.

## Use cases
- estimate camera poses from a handheld video of a moving scene
- recover consistent depth maps from monocular video
- run structure from motion on videos with little parallax
- evaluate camera tracking on Sintel and DyCheck benchmarks
- reconstruct 3D point clouds from casual dynamic videos

## When to choose
- you need robust camera pose and depth estimation from dynamic, unconstrained videos
- you are doing research in visual SLAM, video depth, or 4D reconstruction
- you have a CUDA GPU and want to reproduce the MegaSaM paper results

## When to avoid
- you need a production-ready, supported product (it is research code, not officially supported)
- you have no GPU or cannot set up CUDA/PyTorch environments
- you need real-time processing on edge devices

## Facets
- artifact type: library
- maturity: active
- function: computer-vision, machine-learning, deep-learning, simulation
- domain: computer-vision, machine-learning, artificial-intelligence
- platform: python
- tags: structure-from-motion, slam, camera-pose-estimation, monocular-depth, video-depth, dynamic-scenes, research-code, pytorch, linux, gpu

## Member repositories
- mega-sam/mega-sam (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.181630+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:41:58.489097+00:00, confidence not recorded.
  - readme: https://github.com/mega-sam/mega-sam (fetched 2026-08-28T04:04:29.181630+00:00, sha fb89d55edac5)
  - homepage: https://mega-sam.github.io (fetched 2026-08-29T12:00:15.564205+00:00, sha db67124f4798)
- Data as of 2026-08-30T08:39:29.467469+00:00.
