# ClementPinard/SfmLearner-Pytorch

Pytorch version of SfmLearner from Tinghui Zhou et al.

Repository: https://github.com/ClementPinard/SfmLearner-Pytorch
Canonical: https://ross.abutalabs.com/products/sfmlearner-pytorch
Language: Python
License: MIT
License Family: permissive
Topics: pytorch, kitti, disparity, depth, unsupervised
Last push: 2026-04-15T15:24:30+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 77, release rhythm 35, longevity 100
- inputs: {"age_days": 3240, "days_push": 140, "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 1031, forks 224 (observed 2026-08-28T04:03:18.071049+00:00)

## What it is
A PyTorch reimplementation of SfMLearner (Zhou et al., CVPR 2017), which jointly learns monocular depth estimation and camera ego-motion from unlabeled video using photometric loss. It includes dataset preparation for KITTI and Cityscapes, training and evaluation scripts, and adds faster on-the-fly frame stacking compared to the original TensorFlow implementation.

## Use cases
- estimate depth from a single camera video
- train an unsupervised depth estimation model
- recover camera pose or trajectory from video
- reproduce the SfMLearner paper results in PyTorch
- predict disparity maps from monocular images
- monocular visual odometry with deep learning
- train depth and pose networks on KITTI or Cityscapes

## When to choose
- You want to reproduce, study, or build on the SfMLearner CVPR 2017 paper
- You need a self-supervised depth-plus-ego-motion baseline trainable on KITTI or Cityscapes video
- You prefer a PyTorch codebase over the original TensorFlow implementation
- You want faster training with on-the-fly frame stacking and ground-truth comparison for validation

## When to avoid
- You need production-ready, state-of-the-art depth estimation rather than a research baseline
- You want an off-the-shelf pretrained model for inference without training
- You are on recent PyTorch/CUDA versions without willingness to adapt code targeting PyTorch 1.0.1 and CUDA 10
- You need stereo, multi-camera depth, or a real-time SLAM system

## Facets
- artifact type: library
- maturity: maintenance
- function: deep-learning, machine-learning, computer-vision
- domain: computer-vision, deep-learning, machine-learning
- platform: python
- tags: depth-estimation, ego-motion, pose-estimation, unsupervised-learning, self-supervised, disparity, monocular-depth, visual-odometry, kitti, cityscapes, research-code, cvpr-2017, pytorch-implementation, reimplementation, gpu, linux

## Member repositories
- ClementPinard/SfmLearner-Pytorch (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:18.071049+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-30T07:07:24.353998+00:00, confidence not recorded.
  - readme: https://github.com/ClementPinard/SfmLearner-Pytorch (fetched 2026-08-28T04:03:18.071049+00:00, sha 60588cfec9d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
