All models

DSAC

A CNN predicts 2D points in an image, and a differentiable form of RANSAC fits a line to them.

Depth estimation · 7,615 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 7,615 operations (8.0 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
1.7M
Operations
7,615
Framework
PyTorch
Recurrent
No
Published
CVPR 2017
Cited by
11 (as of 24 October 2026)
Authors
Eric Brachmann, Alexander Krull, Sebastian Nowozin and others
License
BSD-3-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m15752
Graph hash
60b265980144e1b7407a0c78bc6a87c63eca9c4a7a5a34b90174a33e32602131
Skeleton hash
4951301ca7042e560f1bd20782152236381f213f2bde202825da47caa32169dc
Architecture hash
33475b2ae0f5ad4232c27ddd4c28aad53a2fc26749ae0bbc541cab035e63bad5
Diagram SHA-256
e838df64eda260f5d9e8dcc8c3bd528bb831c746ff1b10b41c6a725709147045
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

DSAC, or Differentiable SAmple Consensus, makes the robust fitting algorithm RANSAC usable inside a network trained end to end. RANSAC fits candidate models to small random subsets of the data, scores each by how many points agree with it, and keeps the best, but that final choice cannot be differentiated. DSAC instead picks a candidate at random with a probability that grows with its score, and training minimizes the expected loss, a technique the paper takes from reinforcement learning.

This model is the authors' small teaching example, which fits lines to noisy synthetic images. A CNN predicts a set of 2D points, random pairs of them propose lines, a soft count of inliers scores the proposals, and each line is refit to its soft inliers. The loss is the maximum distance between the predicted and true lines within the image.

The paper itself applies DSAC to camera localization, where one CNN predicts scene coordinates and a second CNN scores the candidate poses. The line example replaces that learned scorer with a soft inlier count, following a later paper on camera localization.

Key idea. DSAC replaces RANSAC's deterministic choice of hypothesis with a probabilistic one, so a whole pipeline can be trained to minimize its expected loss.

  • DSAC
  • differentiable RANSAC
  • differentiable sample consensus
  • DSACLine
  • line fitting
  • robust estimation
  • camera localization

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{brachmann2018dsacdifferentiableransac,
      title={DSAC - Differentiable RANSAC for Camera Localization}, 
      author={Eric Brachmann and Alexander Krull and Sebastian Nowozin and Jamie Shotton and Frank Michel and Stefan Gumhold and Carsten Rother},
      year={2018},
      eprint={1611.05705},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1611.05705}, 
}