扩散模型轨迹预测
文章目录
参考论文《Leapfrog Diffusion Model for Stochastic Trajectory Prediction》
CVPR2024
1. 问题定义
目的是得到model g θ ( ⋅ ) g_{\theta}(\cdot) gθ(⋅),参数 θ \theta θ来生成分布 P θ = g θ ( X , X N ) \mathcal{P}_{\theta}=g_{\theta}(\mathbf{X},\mathbb{X}_{\mathcal{N}}) Pθ=gθ(X,XN),基于分布 P θ \mathcal{P}_\theta Pθ来画 K K K个样本, Y ^ = { Y 1 ^ , Y 2 ^ , . . . , Y K ^ } \hat{\mathcal{\mathbf{Y}}}=\{\hat{\mathbf{Y_1}},\hat{\mathbf{Y_2}},...,\hat{\mathbf{Y_K}}\} Y^={
Y1^,Y2^,...,YK^},这样至少有一个样本是接近真实的未来轨迹。总体问题定义:
θ ∗ = min θ min Y ^ i ∈ Y ^ D ( Y ^ i , Y ) , s.t. Y ^ ∼ P θ \theta^{*}=\min _{\theta} \min _{\widehat{\mathbf{Y}}_{i} \in \widehat{\mathcal{Y}}} D\left(\widehat{\mathbf{Y}}_{i}, \mathbf{Y}\right), \quad \text { s.t. } \widehat{\mathcal{Y}} \sim \mathcal{P}_{\theta} θ∗=minθminY
i∈Y
D(Y
i,Y), s.t. Y
∼Pθ
X \mathbf{X} X和 X N \mathbb{X}_{\mathcal{N}} XN分别表示ego车辆的过去轨迹和neighboring车辆, Y \mathbf{Y} Y是ego车辆的未来轨迹。
通过一系列去噪步骤来学习轨迹分布,先执行前向diffusion的加噪到 未来轨迹的ground-truth上,然后,用条件去噪过程从过去轨迹的噪声中来恢复未来轨迹。
Diffusion 过程:
2. 方法论
2.1 前向扩散
Y 0 = Y \mathbf{Y}^{0}=\mathbf{Y} Y0=Y
初始化扩散轨迹,
Y γ = f diffuse ( Y γ − 1 ) , γ = 1 , ⋯ , Γ \mathbf{Y}^{\gamma}=f_{\text {diffuse }}\left(\mathbf{Y}^{\gamma-1}\right), \gamma=1, \cdots, \Gamma Yγ=fdiffuse (Yγ−1),γ=1,⋯,Γ
使用前向 f d i f f u s e ( ⋅ ) f_{diffuse}(\cdot) fdiffuse(⋅)向 Y γ − 1 \mathbf{Y}^{\gamma-1} Yγ−1添加连续噪声来获取扩散后的 Y γ \mathbf{Y}^{\gamma} Yγ,其中 Y γ \mathbf{Y}^{\gamma} Yγ是第 γ \gamma γ次diffusion步骤
2.2 逆过程
Y ^ k Γ ∼ i . i . d P ( Y ^ Γ ) = N ( Y ^ Γ ; 0 , I ) , sample K times \widehat{\mathbf{Y}}_{k}^{\Gamma} \stackrel{i . i . d}{\sim} \mathcal{P}\left(\widehat{\mathbf{Y}}^{\Gamma}\right)=\mathcal{N}\left(\widehat{\mathbf{Y}}^{\Gamma} ; \mathbf{0}, \mathbf{I}\right) \text {, sample } K \text { times } Y
kΓ∼i.i.dP(Y
Γ)=N(Y
Γ;0,I), sample K times
从正态分布中抽取 K K K个独立同分布的样本初始化去噪轨迹 Y k Γ ^ \hat{\mathbf{Y}^\Gamma_k} YkΓ^
Y ^ k γ = f denoise ( Y ^ k γ + 1 , X , X N ) , γ = Γ − 1 , ⋯ , 0 \widehat{\mathbf{Y}}_{k}^{\gamma}=f_{\text {denoise }}\left(\widehat{\mathbf{Y}}_{k}^{\gamma+1}, \mathbf{X}, \mathbb{X}_{\mathcal{N}}\right), \gamma=\Gamma-1, \cdots, 0 Y
kγ=fdenoise (Y
kγ+1,X,XN),γ=Γ−1,⋯,0
迭代应用去噪操作 f d e n o i s e ( ⋅ ) f_{denoise}(\cdot) fdenoise(⋅)以过去轨迹 X , X N \mathbf{X},\mathbb{X}_\mathcal{N} X,XN为条件获取去噪轨迹。
Y k γ ^ \hat{\mathbf{Y}_k^\gamma} Ykγ^是第 γ \gamma γ次去噪轨迹第 k k k次采样,最终 K K K个预测轨迹 Y = { Y ^ 1 0 , Y ^ 2 0 , … , Y ^ K 0 } ^ \hat{\mathcal{Y}=\left\{\hat{\mathbf{Y}}_{1}^{0}, \widehat{\mathbf{Y}}_{2}^{0}, \ldots, \widehat{\mathbf{Y}}_{K}^{0}\right\}} Y={
Y^10,Y
20,…,Y
K0}^
Note:
前向扩散处理不会用于推理步骤,在训练期间, Y γ \mathbf{Y}^\gamma Yγ是第 γ \gamma γ步 Y k γ ^ \hat{\mathbf{Y}^\gamma_k}