DSAC

Brachmann 2017 · Paper

One-line summary — Makes RANSAC differentiable by replacing deterministic hypothesis selection with probabilistic selection, enabling end-to-end training of a scene-coordinate-based camera localization pipeline through the robust pose estimator.

Problem

RANSAC is the central tool for robust estimation in geometric vision (multi-view geometry, pose estimation, SLAM), following the schema “predict locally, fit globally”. But its hypothesis selection — take the model hypothesis with the highest consensus score, hAM=argmaxhJs(hJ,Y)\mathbf{h}_{\mathrm{AM}}=\arg\max_{\mathbf{h}_J} s(\mathbf{h}_J,Y) — is non-differentiable, so RANSAC could not sit inside an end-to-end trained deep pipeline. For camera relocalization specifically, deep learning had so far failed to beat traditional approaches: direct pose regression (PoseNet) is inaccurate (median translational errors around 40 cm per scene), while scene coordinate regression kept the geometry but its learned components could only be trained with surrogate losses, not the pose loss that actually matters.

Method & architecture

The pipeline estimates the 6-DoF pose h~\tilde{\mathbf{h}} of an RGB image in a known scene, following the scene coordinate regression (SCoRF) framework:

Two routes to differentiability of the selection step are compared:

w~,v~=argminw,vIIEJP(Jv,w)[(R(hJw,Yw))]\tilde{\mathbf{w}},\tilde{\mathbf{v}}=\arg\min_{\mathbf{w},\mathbf{v}}\sum_{I\in\mathcal{I}}\mathbb{E}_{J\sim P(J|\mathbf{v},\mathbf{w})}\left[\ell(\mathbf{R}(\mathbf{h}_J^{\mathbf{w}},Y^{\mathbf{w}}))\right]

whose gradient is itself an expectation:

wEJ[()]=EJ[()wlogP(Jv,w)+w()]\frac{\partial}{\partial\mathbf{w}}\mathbb{E}_{J}\left[\ell(\cdot)\right]=\mathbb{E}_{J}\left[\ell(\cdot)\frac{\partial}{\partial\mathbf{w}}\log P(J|\mathbf{v},\mathbf{w})+\frac{\partial}{\partial\mathbf{w}}\ell(\cdot)\right]

The training loss is the pose error pose(h,h)=max((θ,θ),tt)\ell_{\text{pose}}(\mathbf{h},\mathbf{h}^{*})=\max(\measuredangle(\boldsymbol{\theta},\boldsymbol{\theta}^{*}),\lVert\mathbf{t}-\mathbf{t}^{*}\rVert) (rotation in degrees, translation in cm). Both CNNs are first trained componentwise (L1L_1 coordinate loss; scores regressed against βpose-\beta\,\ell_{\text{pose}} with β=10\beta{=}10), then end-to-end; PnP and refinement derivatives are taken via central differences.

Results

On the 7-Scenes dataset (accuracy = % of test frames within 5 cm / 5 deg):

Why it matters for SLAM

DSAC established scene coordinate regression as the dominant learned paradigm for indoor camera relocalization, dramatically outperforming absolute pose regression because it keeps the geometric solver in the loop and trains for the pose loss the task actually cares about. The differentiable-RANSAC idea spread broadly through geometric deep learning — the paper explicitly proposes it as a robust optimization component for learning SfM or SLAM end-to-end — and DSAC is the direct ancestor of DSAC++, DSAC*, and the ACE line of fast-training relocalizers used today.