TartanVO

Wang 2021 · Paper

One-line summary — The first learning-based visual odometry model that generalizes across multiple real-world datasets without fine-tuning, trained entirely on diverse synthetic data from TartanAir.

Problem

Prior learning-based VO methods trained and tested on the same dataset (usually KITTI) and failed to generalize across domains, while classical geometric VO generalizes but struggles with motion blur, aggressive rotation, and lighting changes. The paper identifies two causes: (1) training data with insufficient diversity in scenes and motion patterns, and (2) ignoring two fundamental ambiguities from multi-view geometry — monocular scale ambiguity and dependence on camera intrinsics — so that “a model learned from one dataset would likely fail in another dataset, no matter how good the feature extractor is.”

Method & architecture

Two-stage network. Given consecutive undistorted images {It,It+1}\{I_t, I_{t+1}\}, a matching module Mθ(It,It+1)M_\theta(I_t, I_{t+1}) (pre-trained PWC-Net) estimates dense optical flow Ftt+1F_t^{t+1}, and a pose module Pϕ(Ftt+1,K)P_\phi(F_t^{t+1}, K) (a modified ResNet50 with separate translation and rotation heads, no batch norm) regresses the relative motion δtt+1=(T,R)\delta_t^{t+1} = (T, R), TR3T \in \mathbb{R}^3, Rso(3)R \in so(3). The end-to-end objective jointly supervises both:

L=λLf+Lp=λMθ(It,It+1)Ftt+1+Pϕ(F^tt+1)δtt+1L = \lambda L_f + L_p = \lambda \lVert M_\theta(I_t, I_{t+1}) - F_t^{t+1} \rVert + \lVert P_\phi(\hat{F}_t^{t+1}) - \delta_t^{t+1} \rVert

Up-to-scale loss. Since motion scale is unobservable from monocular images, only the translation direction is supervised (rotation loss unchanged). The normalized-distance form used in the paper is

Lpnorm=T^max(T^,ϵ)Tmax(T,ϵ)+R^R,ϵ=106L_p^{norm} = \left\lVert \frac{\hat{T}}{\max(\lVert\hat{T}\rVert, \epsilon)} - \frac{T}{\max(\lVert T \rVert, \epsilon)} \right\rVert + \lVert \hat{R} - R \rVert, \qquad \epsilon = 10^{-6}

(a cosine-similarity variant performs similarly). This closes the train/test translation-loss gap that scale-aware losses leave open.

Intrinsics layer (IL). To resolve intrinsics ambiguity, a 2-channel map KcR2×H×WK^c \in \mathbb{R}^{2\times H\times W} built from the intrinsics K={fx,fy,ox,oy}K = \{f_x, f_y, o_x, o_y\} is concatenated to the flow before the pose network:

Kxc=(Xindox)/fx,Kyc=(Yindoy)/fyK_x^c = (X_{ind} - o_x)/f_x, \qquad K_y^c = (Y_{ind} - o_y)/f_y

giving each flow vector its normalized 2D position — the same information geometric methods need to recover pose from matches. Since TartanAir has one fixed camera (fx=fy=320f_x = f_y = 320, ox=320o_x = 320, oy=240o_y = 240), random cropping and resizing (RCR, resize factors up to 2.5) synthesizes cameras with FoV from 4040^{\circ} to 9090^{\circ}.

Training. Trained only on TartanAir (>400,000 frames, 20 environments, 3 held out): first PϕP_\phi alone on ground-truth flow (100k iterations, batch 100), then jointly with MθM_\theta (50k iterations, batch 64). Inference takes 40 ms per pair on a GTX 1080. The same weights are used on every test dataset — no fine-tuning anywhere.

Results

Why it matters for SLAM

TartanVO demonstrated that sim-to-real transfer is viable for visual odometry: a single model trained purely in simulation generalized to KITTI, EuRoC, and real IR footage, and held up in conditions (motion blur, aggressive MAV motion, low light) where classical geometric pipelines fail. Its two lasting lessons — train on massive diverse synthetic data, and bake geometric invariances (scale, intrinsics) into the model — flow directly into DROID-SLAM, DPVO, and MAC-VO, all trained on TartanAir; MAC-VO even uses TartanVO as its motion-model initializer.