📝 精读笔记
灵魂一句
首个“无监督 + 联合估计光流与逐像素不确定性”的 recurrent 框架(RAFT 底座)。核心:没有 GT,就从“数据增广下的预测不一致性”里反推不确定性监督——用 Laplace MLE 学方差,且把不确定性损失与光流损失解耦(stop-gradient 防梯度泄漏)才训得稳。学到的 uncertainty 不是副产品,而是反哺网络:① guide 自适应 flow refinement;② 动态调制 regional smoothness;③ 引导双向流融合(置信区补不置信区)。KITTI/Sintel 无监督 SOTA,且 uncertainty map 质量超监督的 PDC-Net+。
问题 & 动机
监督光流(RAFT 系)强但 GT 贵→转无监督(靠 photometric + smoothness);但无监督在遮挡/无纹理/大位移处易错,误差会污染下游(点追踪、重建、深度、分割)。所以模型不仅要答“运动是什么”,还要答“我对它多有把握”。可惜无监督下 uncertainty 研究稀少,两大拦路虎:① 无直接监督(没有 GT variance 当“正确答案”教模型自评);② 难有效利用(就算估出来,怎么用它反过来提升光流、而非仅当副产品)。
核心方法(RAFT + 不确定性头 + 三处利用)
底座 RAFT(4D correlation + recurrent 更新 K=12 次),按 SMURF 把 BN 换 IN。新增 uncertainty head。① 不确定性监督(无 GT):对同一对图做强增广(色彩抖动/噪声/旋转/缩放…),比较增广前后两次预测的 ℓ1 差 D̂ 当“自监督目标”——预测越不一致的像素越不可信。② refinement:用 uncertainty 算可靠性权重 s 去缩放 flow 特征再算残差。③ smoothness:用 uncertainty 阈值挑高置信像素做 homography RANSAC(替代旧的遮挡 mask)。④ 双向融合:前向不确定但后向确定处,用后向流纠正前向流。
关键公式
不确定性头预测 log-variance α=log(σ²)(式2,保正 + 数值稳);可靠性权重 s=ϕ(−α)(式3, sigmoid);缩放特征 f̃=f⊙s\*(式4,\*=stop-grad);残差 ΔF=C'_flow(concat(f, f̃, α\*))(式5)。不确定性 MLE(Laplace):ℓ̃_unc=√2·exp(−½α)·D̂ + ½α(式9),D̂=增广前后流的 ℓ1 不一致。关键解耦:把 D̂ 从 MLE 里 detach,防梯度漏进光流分支。双向融合掩码 M_fused=(1−M_f)⊙M_b(式13,前向不确定 M_f=0 且后向确定 M_b=1 处才纠正)。
关键结果
光流(Tab.1):KITTI-2015 test Fl-all 6.13%(+FF 进一步 6.00%),远超次优无监督 UPFlow 9.38%,且反超多帧 SMURF(6.83)/M2Flow(7.37) 与语义 UnSAMFlow(7.83);Sintel Final test 4.16/4.10。不确定性质量(Tab.2):AUSE Sintel 0.11/KITTI 0.12、CC 0.66/0.64,全面优于 FB-Check、Smoothness、甚至监督的 PDC-Net+(用稠密合成 GT 训)。
亮点
① 把“增广一致性”变成无 GT 的不确定性监督来源;② 解耦是成败关键(消融里不解耦直接联合训反而全面掉点);③ uncertainty 三处反哺(refine/smoothness/fusion)闭环;④ uncertainty mask 优于 occlusion mask——遮挡≠估计差、非遮挡也可能很不可靠(Tab.5 用遮挡 mask 融合反而比不融合更差);⑤ 跨域泛化也靠 uncertainty 提升(Tab.6)。
疑问 / 待查
① homography smoothness ℓ_hg 仅用于 KITTI(平面刚性运动),Sintel 非刚性时高不确定常对应动态物体、平面假设崩→用了反而有害(消融 Tab.3 row6 用 ⃝ 标注),跨场景普适性受限;② 不确定性监督依赖预设增广集,作者自承可能覆盖不了真实退化(如强非高斯运动模糊/大气扰动),拟用生成模型扩增广空间;③ 各 λ 超参(λ_sm=55 等)与 θ(Sintel45/KITTI35)数据集相关,需调。
📖 逐段精读 · 笔记
① Abstract(摘要)— 逐句精讲
原文大意:无监督光流普遍“lack reliable uncertainty estimation, limiting their robustness and interpretability”。本文提 U²Flow:“the first recurrent unsupervised framework that jointly estimates optical flow and per-pixel uncertainty”。核心创新=解耦学习策略,“derives uncertainty supervision from augmentation consistency via a Laplace-based maximum likelihood objective, enabling stable training without ground truth”。预测的不确定性“further integrated into the network to guide adaptive flow refinement and dynamically modulate the regional smoothness loss”;再加 “uncertainty-guided bidirectional flow fusion mechanism that enhances robustness in challenging regions”。KITTI/Sintel 上无监督 SOTA。代码:github.com/sunzunyi/U2FLOW。
逐句指路:
1) “lack reliable uncertainty estimation” → 靶子=无监督光流不给“置信度”。
2) “first recurrent unsupervised framework that jointly estimates optical flow and per-pixel uncertainty” → 定位=首个联合估计。
3) “derives uncertainty supervision from augmentation consistency via a Laplace-based maximum likelihood objective” → 监督怎么来=增广一致性 + Laplace MLE。
4) “decoupled … enabling stable training without ground truth” → 解耦=无 GT 稳定训练的关键。
5) refinement + smoothness modulation + bidirectional fusion → 不确定性的三处利用闭环。
📚 背景知识①(外部,非本文原文):光流 / RAFT / EPE·Fl
光流(optical flow)=两帧间每像素的 2D 位移场 \(F_{1\to2}\in\mathbb{R}^{H\times W\times2}\)。RAFT(Teed & Deng 2020)=主流 recurrent 架构:抽特征 \(f_1,f_2\in\mathbb{R}^{H'\times W'\times D}\)→建全对 4D correlation volume \(C\in\mathbb{R}^{H'\times W'\times H'\times W'}\)→GRU recurrent 迭代 \(k=1,...,K\) 次逐步 refine 光流。本文沿用。指标:EPE(average endpoint error)=预测位移与真值的平均欧氏距离;Fl=错误像素百分比(误差超阈值);noc=非遮挡、occ=遮挡。
📚 背景知识②:无监督光流怎么训(无 GT)
靠 photometric loss(用预测流把一帧 warp 到另一帧、比对像素一致性,常用 ℓ1 + SSIM + census)+ edge-aware smoothness(边缘感知平滑)。遮挡处 photometric 失效→用 forward-backward consistency check(前向流 + 反查后向流应抵消,否则判遮挡)生成二值遮挡 mask 排除(本文式6)。代表作:ARFlow/SelFlow(知识蒸馏 + 强增广)、SemARFlow/UnSAMFlow(注入语义提运动边界)、SMURF/M2Flow(多帧时序)。本文要把这套“二值遮挡 mask”升级成更细的“逐像素不确定性 mask”。
📚 背景知识③:不确定性建模(Laplace MLE)/ AUSE / Spearman CC
把预测当一个分布、最大化观测似然=最小化负对数似然(NLL)。若残差用 ℓ1,对应 Laplace 分布;预测 log-variance \(\alpha=\log\sigma^2\) 保正且数值稳。评测:AUSE(Area Under the Sparsification Error)=按预测不确定性 vs 按真值误差逐步移除像素,两条误差曲线差的面积,越小说明不确定性越能当真误差的代理;Spearman CC=不确定性与真误差的秩相关,越高越好。两者都需要 GT 光流误差当参照(仅用于评测、不用于训练)。
② §1 Introduction — problem(两大核心挑战)
problem:监督光流(RAFT 系)强但 GT 贵“costly and often impractical”→转无监督;但无监督在“occlusions, textureless regions, and large motion displacements”处易错,且误差污染下游——“In point tracking and multi-view reconstruction, even small local optical flow errors can accumulate and lead to failure”,还会在 depth recovery / motion segmentation 产生 artifact。一句点题:“it is not enough for a model to predict what the motion is; it must also quantify how confident it is in that prediction.” 两大拦路虎:(1) Absence of Direct Supervision——“self-supervised models lack any explicit ‘correct answer’ for uncertainty”;(2) Effective Integration——“it is unclear how to leverage it effectively during training to improve flow accuracy, rather than treating it as a mere byproduct.”
②b §1 — solution(增广不一致 + 反馈架构)
solution(两条主线):① 针对无监督——“we derive a supervisory signal from the model’s own predictive inconsistencies under data augmentation”:扰动后“When the model yields inconsistent predictions … it exposes its own regions of low confidence”,据此用 Laplace MLE 学不确定性、且与主光流损失解耦。② 针对“怎么用”——设计 uncertainty-aware recurrent 架构,“The predicted uncertainty is fed back into the recurrent update block to guide adaptive refinement”,并用它“modulate the self-supervision objectives … intelligently down-weight unreliable signals”。
②c §1 — why 增广一致性能当监督 + 三大贡献
why(最关键的两个判断):① 为什么增广不一致=不确定性:对图做扰动后,模型在“真懂”的区域预测应稳定、在“没把握”区域(遮挡/无纹理)预测会乱跳→不一致 \(\hat D\) 天然标出低置信区,是无 GT 下唯一可得的可靠自监督信号。② 为什么必须解耦:若像监督法那样把 uncertainty 与 flow 绑进一个 MLE,低置信区会被 MLE 自动 down-weight→反过来削弱光流在难区的学习(消融证实 UE-only 全面恶化)。三大贡献:(i) 首个 recurrent 无监督联合估计光流 + 不确定性框架(含 uncertainty head + uncertainty-aware refinement);(ii) 基于增广一致性的 decoupled 学习 + uncertainty-guided regional smoothness;(iii) uncertainty-guided 双向流融合,“outperforming traditional occlusion-based strategies”。
③ §2 Related Work — 无监督光流 + 不确定性估计
无监督光流:基础=photometric consistency + spatial smoothness,但 photometric 在 “occlusions, motion blur, illumination changes, or textureless regions” 失效。早期用二值 occlusion mask 排除;ARFlow/SelFlow 靠知识蒸馏 + 强增广;SemARFlow/UnSAMFlow 注入语义;多帧法(SMURF/M2Flow)用时序补充。痛点:“most models focus solely on point estimation and ignore prediction uncertainty”。不确定性估计:早期当后处理(从图像梯度/局部能量启发式估),后来 ProbFlow(变分推断联合估)、PDC-Net+(监督下学稠密对应 + 不确定性)、ProbDiffFlow(多假设输出)。关键缺口:“most existing optical flow uncertainty methods depend on full supervision … incompatible with the self-supervised paradigm”,且“uncertainty is rarely leveraged to improve the flow estimation process itself”。
④ §3.1 Network Overview(RAFT 底座 + 维度)
目标:给两帧 \(I_1,I_2\in\mathbb{R}^{H\times W\times3}\),估稠密光流 \(F_{1\to2}\in\mathbb{R}^{H\times W\times2}\) 及其不确定性 map \(\sigma^2_{1\to2}\in\mathbb{R}^{H\times W}\)。架构:继承 RAFT——抽特征→4D correlation volume \(C\in\mathbb{R}^{H'\times W'\times H'\times W'}\)→recurrent update block 迭代 \(K\) 次 refine \(F^{(k)}_{1\to2}\)。随 SMURF 把 BatchNorm 全换 InstanceNorm(“to enhance training stability and convergence under small-batch, unsupervised settings”)。新增 uncertainty head 在每次迭代估 \(\sigma^{2(k)}_{1\to2}\),并把它喂回 refinement——形成“jointly learns optical flow and uncertainty within a unified optimization framework”。
④b §3.2 Uncertainty Head + Flow Refinement 式(1)-(5)
从隐状态 \(h^{(k)}\) 解 flow 特征与不确定性:
\[ f^{(k)}=C_{flow}(h^{(k)}),\quad \alpha^{(k)}=C_{unc}(h^{(k)}) \tag{1} \]
保正 + 数值稳,预测 log-variance:
\[ \alpha^{(k)}=\log\!\big(\sigma^{2(k)}_{1\to2}\big),\quad \text{推理时 } \sigma^{2(k)}_{1\to2}=\exp(\alpha^{(k)}) \tag{2} \]
可靠性权重(sigmoid,越不确定越小)\(s^{(k)}=\phi(-\alpha^{(k)})\)(式3);缩放特征 \(\tilde f^{(k)}=f^{(k)}\odot s^{(k)*}\)(式4,*=stop-gradient,不让梯度回传 uncertainty 分支);残差
\[ \Delta F^{(k)}_{1\to2}=C'_{flow}\big(\mathrm{concat}(f^{(k)},\tilde f^{(k)},\alpha^{(k)*})\big) \tag{5} \]
“effectively suppressing the influence of unreliable regions during refinement.”
④c §3.3 Photometric + Homography Smoothness 式(6)(7)
Photometric(式6):用 \(F^{(k)}\) warp 帧、比对,损失=ℓ1 + SSIM + census;遮挡 mask 由 forward-backward consistency 算(\(\|F_{i\to j}+F_{j\to i}\|^2>\delta\) 判遮挡)。Regional smoothness(式7):对每个物体区域用 RANSAC 估 homography 生成 refine 流 \(F^H\),\(\ell_{hg}=\frac{1}{H'W'}\sum_p\|F_{i\to j}(p)-F^{H}_{i\to j}(p)\|_1\)。关键区别:旧法用遮挡 mask 挑可靠点,本文改用 uncertainty < τ_hg 的 reliability mask(Fig.3 显示它比 FB mask 更准圈出高误差区——“some high-error regions remain unmasked, while certain low-error regions are incorrectly masked”)。因 homography 平面假设强,“this uncertainty-enhanced component is applied exclusively to the KITTI dataset, which contains predominantly planar rigid motions.”
④d §3.3 增广一致性 + Laplace MLE 式(8)(9)(10) + 解耦
不确定性监督(核心):初次前向得 \(F_{1\to2}\)→对图像+流做强增广得 \((\hat I_1,\hat I_2)\) 与变换后伪 GT 流 \(\hat F_{1\to2}\)→网络在增广对上重估 \(\hat F'_{1\to2}\)→\(\hat D^{(k)}(p)=\|\hat F_{1\to2}(p)-\hat F'^{(k)}_{1\to2}(p)\|_1\) 当自监督目标(捕捉“predictive inconsistency under perturbation”)。增广含 “color jitter, contrast adjustment, Gaussian noise, random erasing” + “translation, random rotation, rescaling”。NLL(式8)假设 Laplace likelihood(与 ℓ1 残差对齐)得数值稳的 MLE:
\[ \tilde\ell^{(k)}_{unc}(p)=\sqrt{2}\,\exp\!\Big(-\tfrac12\alpha^{(k)}(p)\Big)\hat D^{(k)}(p)+\tfrac12\alpha^{(k)}(p) \tag{9} \]
直觉:\(\hat D\) 大处逼 \(\alpha\)(方差)变大,\(\tfrac12\alpha\) 项又惩罚方差无脑膨胀。解耦关键:“we detach \(\hat D^{(k)}\) from the MLE objective to prevent gradient leakage into the main flow estimation branch”;另留带梯度的增广正则 \(\ell^{(k)}_{ar}\)(式10)继续训光流。
④e §3.3 总损失 式(11)
总目标按迭代指数衰减 \(\zeta\) 加权(早期迭代权重小):
\[ \ell_{Total}=\lambda_{hg}\ell_{hg}+\sum_{k=1}^{K}\zeta^{K-k}\big(\ell^{(k)}_{ph}+\lambda_{sm}\ell^{(k)}_{sm}+\lambda_{ar}\ell^{(k)}_{ar}+\lambda_{sem}\ell^{(k)}_{sem}+\lambda_{unc}\ell^{(k)}_{unc}\big) \tag{11} \]
含 photometric / 边缘 smoothness / 增广正则 ar / 语义增广 sem / 不确定性 unc;“The homography smoothness term \(\ell_{hg}\) is applied only to the final iteration output.”
④f §3.4 Uncertainty-Guided 双向流融合 式(12)(13)
随 SMURF 用轻量 conv 学“后向流 \(F_{t\to t-1}\)→前向流 \(F_{t\to t+1}\)”映射,但只在高置信区训:
\[ M_f=\mathbb{1}(\sigma^2_{t\to t+1}<\theta),\quad M_b=\mathbb{1}(\sigma^2_{t\to t-1}<\theta) \tag{12} \]
\[ F^{fused}_{t\to t+1}=F_{t\to t+1}\odot(1-M_{fused})+\bar F_{t\to t+1}\odot M_{fused},\quad M_{fused}=(1-M_f)\odot M_b \tag{13} \]
即精确在“前向不确定(\(M_f=0\))但后向确定(\(M_b=1\))”处用后向纠正。区别 SMURF 只管遮挡:“true occlusion does not always equate to poor flow estimation, and conversely, non-occluded regions can still yield highly unreliable flow predictions.” 且这是 U²Flow 输出上的轻量 refinement,“achieving multi-frame benefits without the extensive retraining … required by methods like SMURF.”
⑤ §4.1 实验设置
KITTI + Sintel。训练:Adam(β1=0.9, β2=0.999),batch 4;先 100k raw(lr 2×10⁻⁴),再 finetune(OneCycleLR,max lr 2.5×10⁻⁴,KITTI 100k / Sintel 50k);增广在 50k 后引入、同时关 \(\ell_{sm}\),\(\ell_{hg}\) 与 \(\ell_{sem}\) 在 finetune 过半后开。超参:\(K=12\),\([\lambda_{hg},\lambda_{sm},\lambda_{ar},\lambda_{sem},\lambda_{unc},\tau_{hg}]=[0.1,55,0.02,0.05,0.005,2]\),\(\theta=45\)(Sintel)/ \(35\)(KITTI);输入 resize KITTI 256×832、Sintel 448×1024。指标 EPE + Fl。
⑤b §4.2 光流 benchmark(Tab.1 真数字,越低越好)
| 方法(无监督) | Sintel-C test | Sintel-F test | K15 Fl-all | K15 Fl-noc |
| UPFlow | 4.68 | 5.32 | 9.38 | — |
| SMURF (MF 多帧) | 3.15 | 4.18 | 6.83 | 5.26 |
| UnSAMFlow (语义) | 3.93 | 5.20 | 7.83 | 5.67 |
| M2Flow (MF 多帧) | 3.38 | 5.01 | 7.37 | 5.73 |
| U2Flow | 2.83 | 4.16 | 6.13 | 4.56 |
| U2Flow (+FF) | 2.83 | 4.10 | 6.00 | 4.52 |
读表:两帧 U²Flow 即 K15 Fl-all 6.13,“significantly outperforming the previous state-of-the-art unsupervised two-frame method UPFlow (9.38%)”,且反超多帧 SMURF(6.83)/M2Flow(7.37) 与语义 SemARFlow(8.38)/UnSAMFlow(7.83);KITTI-2012 EPE≈1.4(comparable)。+FF 进一步到 Fl-all 6.00、Sintel Final 4.10。
⑤c §4.3 不确定性质量(Tab.2 + 稀疏化曲线 Fig.4)
| 方法 | Sintel AUSE↓ | Sintel CC↑ | KITTI AUSE↓ | KITTI CC↑ |
| FB Check | 0.19 | 0.57 | 0.21 | 0.53 |
| PDC-Net+(监督) | 0.18 | 0.45 | 0.16 | 0.50 |
| Smoothness | 0.26 | 0.43 | 0.23 | 0.45 |
| U2Flow | 0.11 | 0.66 | 0.12 | 0.64 |
读表:U²Flow 不确定性与真误差相关性最强,“outperforming heuristic methods as well as the model-based PDC-Net+, despite the latter being trained on dense synthetic ground-truth data”——无监督却赢过用稠密合成 GT 训的监督法。Fig.4 稀疏化曲线:U²Flow 曲线最贴 oracle;虽 PDC-Net+ 在 KITTI 初段因 real-data finetune 略优,但 U²Flow 在更宽移除区间内更接近 oracle、最终误差更低。
⑤d §4.5 消融:主组件(Tab.3)+ refinement(Tab.4)
主组件(Tab.3,列=Sintel-F EPE / Sintel-C EPE / K15 EPE / K15 Fl-all;○=ℓhg 仅 KITTI):
| UE | Dec | FR | ℓhg | FF | S-F | S-C | K15 EPE | K15 Fl-all |
| - | - | - | - | - | 2.46 | 1.56 | 1.98 | 6.82 |
| ✓ | - | - | - | - | 2.57 | 1.65 | 2.18 | 7.72 |
| ✓ | ✓ | - | - | - | 2.41 | 1.44 | 1.98 | 6.87 |
| ✓ | ✓ | ✓ | - | - | 2.32 | 1.42 | 1.95 | 6.85 |
| ✓ | ✓ | ✓ | ○ | - | 2.32 | 1.42 | 1.83 | 6.59 |
| ✓ | ✓ | ✓ | ○ | ✓ | 2.29 | 1.36 | 1.74 | 6.30 |
读表(最关键):仅加 UE 不解耦反而恶化(K15 Fl-all 6.82→7.72,“the uncertainty learning objective can interfere with the primary task”);加 Dec 解耦立刻修复到 6.87 并稳步改善——解耦是转折点。refinement(Tab.4):w/o Refinement K15 Fl-all 6.69;Refinement w/o Uncertainty 6.81(更差,仅特征拼接);Refinement w/ Uncertainty 6.59→证明动态缩放靠的就是 uncertainty。
⑤e §4.5 消融:双向融合(Tab.5)+ §4.6 跨域泛化(Tab.6)
融合 mask(Tab.5,K15 Fl-all / Fl-occ):w/o Fusion 6.59 / Fl-occ 16.01;用遮挡 mask 反恶化到 8.17 / 27.73(“guiding fusion with a conventional occlusion mask yields results even worse than the baseline … valid forward flows are often indiscriminately discarded”);用 uncertainty mask(Ours)降到 6.30 / 14.17。跨域泛化(Tab.6,无 finetune 直接跨测):+Fusion 让 KITTI→Sintel Final 5.80→5.49、Sintel→KITTI Fl-all 17.05→16.58——“the reliability signal captured by our uncertainty estimation is fundamental and transferable.”
⑥ 疑问 / 局限([推测] 已标注)
① homography \(\ell_{hg}\) 仅用于 KITTI:Sintel 非刚性运动时高不确定常对应动态物体、平面假设崩→用了反而有害(Tab.3 用 ○ 标注),跨场景普适性受限。② 作者自承局限:“Our uncertainty supervision relies on the model’s predictive variance under a predefined set of augmentations, which may not fully capture all real-world sources of error, such as severe non-Gaussian motion blur or atmospheric distortions”——拟用生成模型扩增广空间。③ [推测] 各 λ 超参与阈值 \(\theta\)(Sintel 45 / KITTI 35)、\(\tau_{hg}\) 数据集相关,迁移到新域可能需重调。④ [推测] +FF 的多帧增益建立在“后向流可靠”假设上,若前后向同时不确定(如长时遮挡)则无从纠正。
📌 全文一页总结(≥3 takeaway)
problem:无监督光流无 GT、难估不确定性,且遮挡/无纹理/大位移处易错、错误污染下游(点追踪/重建/深度/分割)。
method:RAFT 底座 + uncertainty head;从“增广前后预测不一致 \(\hat D\)”用 Laplace MLE(式9)学不确定性、并 detach \(\hat D\) 解耦防梯度漏进光流;uncertainty 三处反哺——缩放特征做 refinement(式4/5)、阈值挑高置信点做 homography smoothness(式7,仅 KITTI)、双向流融合(式12/13,前向不确定+后向确定处纠正)。
experiment:KITTI15 Fl-all 6.00(无监督 SOTA,超多帧/语义法),不确定性 AUSE 0.11/0.12 超监督 PDC-Net+;遮挡 mask 融合 Fl-occ 反恶化到 27.73、uncertainty mask 才降到 14.17。
takeaways:① 增广一致性是无 GT 不确定性的可靠监督源(模型自己的“预测抖动”即低置信信号);② 不确定性损失必须与光流损失解耦(detach)才稳——不解耦直接联合训会全面掉点(6.82→7.72);③ 逐像素不确定性 > 二值遮挡 mask——“真遮挡≠估计差、非遮挡也可能很不可靠”,故 uncertainty mask 更适合指导 smoothness/fusion 且可跨域迁移。