在arxiv上看到了这篇论文 ,个人认为这是一个很有意思的工作, 利用用heatmap上的最大值以及其对应位置m, 来估计真实高斯分布均值位置μ. 这样的量化误差(下采样导致的量化最小单位误差)能够得到最大程度上的减轻.
论文实验验证了该方法比经验上的估计方法更准确.(取峰值到次峰值的1/4偏移处的位置,这个估计其实也是近似符合高斯分布了).
公式6一阶导
\[ \left.\mathcal{D}^{\prime}(\boldsymbol{x})\right|_{\boldsymbol{x}=\boldsymbol{\mu}}=\left.\frac{\partial \mathcal{P}^{T}}{\partial \boldsymbol{x}}\right|_{\boldsymbol{x}=\boldsymbol{\mu}}=-\left.\Sigma^{-1}(\boldsymbol{x}-\boldsymbol{\mu})\right|_{\boldsymbol{x}=\boldsymbol{\mu}}=0 \]
那么\(\mathcal{D}^{\prime}(\boldsymbol{x})\) 是一个和\(\boldsymbol{x}\) 形状一样的向量, 然而在公式(7)对向量\(\boldsymbol{\mu}\)泰勒展开:
公式7,高斯分布均值\(\mu\)处关于\(m\)位置的二阶泰勒展开
\[ \mathcal{P}(\boldsymbol{\mu})=\mathcal{P}(\boldsymbol{m})+\mathcal{D}^{\prime}(\boldsymbol{m})(\boldsymbol{\mu}-\boldsymbol{m})+\frac{1}{2}(\boldsymbol{\mu}-\boldsymbol{m})^{T} \mathcal{D}^{\prime \prime}(\boldsymbol{m})(\boldsymbol{\mu}-\boldsymbol{m}) \]
中的第二项\(\mathcal{D}^{\prime}(\boldsymbol{m})(\boldsymbol{\mu}-\boldsymbol{m})\) 中的\(\mathcal{D}^{\prime}(\boldsymbol{m})\) 是不是应该加上转置,才能得到标量? 即 \(\mathcal{D}^{\prime}(\boldsymbol{m})^T(\boldsymbol{\mu}-\boldsymbol{m})\)
推导
泰勒展开公式
\[ \mathcal{P}(\boldsymbol{\mu})=\mathcal{P}(\boldsymbol{m})+\mathcal{D}^{\prime}(\boldsymbol{m})(\boldsymbol{\mu}-\boldsymbol{m})+\frac{1}{2}(\boldsymbol{\mu}-\boldsymbol{m})^{T} \mathcal{D}^{\prime \prime}(\boldsymbol{m})(\boldsymbol{\mu}-\boldsymbol{m}) \]
代入\(P(\mu)\)和\(P(m)\)的高斯分布公式,即,将\(\mu,m\)代入下面的式子,约掉常数项
\[ \begin{aligned} \mathcal{P}(\boldsymbol{x}; \boldsymbol{\mu}, \Sigma)=\ln (\mathcal{G})=&-\ln (2 \pi)-\frac{1}{2} \ln (|\Sigma|)\\ &-\frac{1}{2}(\boldsymbol{x}-\boldsymbol{\mu})^{T} \Sigma^{-1}(\boldsymbol{x}-\boldsymbol{\mu}) \end{aligned} \]
可以得到
\[ \begin{aligned}0&=-\frac{1}{2}(m-\mu)^{\top} \Sigma^{-1}(m-\mu) +D^{\prime}(m)^{\top}(\mu-m)+\frac{1}{2}(\mu-m)^{\top} D^{\prime \prime}(m)(\mu-m)\\-D^{\prime}(m)^{\top}(\mu-m)&=(\mu-m)^{\top} D^{\prime \prime}(m)(\mu-m)\\-D^{\prime}(m)^{\top} &=(\mu-m)^{\top} D^{\prime \prime}(m)\\-D^{\prime}(m)^{\top} D^{\prime \prime}(m)^{-1} &=(\mu-m)^{\top} \\-D^{\prime\prime}(m)^{-\top} D^{\prime}(m) &=\mu-m \\ \mu &=m-D^{\prime \prime}(m)^{-\top} D^{\prime}(m) \end{aligned} \]
因为\(D^{\prime \prime}(m)=- \Sigma^{-1}\),在论文中方差矩阵假设为对角阵(可逆)\(\Sigma=\left[\begin{array}{ll}{\sigma^{2}} & {0} \\ {0} & {\sigma^{2}}\end{array}\right]\) (因为xy方向独立), 这意味着\(D^{\prime \prime}(m)=D^{\prime \prime}(m)^T\), 所以
\[ \begin{aligned}\mu &=m-D^{\prime \prime}(m)^{-\top} D^{\prime}(m) \\ \mu&=m-D^{\prime \prime}(m)^{-1} D^{\prime}(m)\end{aligned} \]
补充一个细节:
上面的推导, 在第三个等式约掉(\(\mu-m\))的条件是假设\(\mu\)不等于\(m\), 所以下面的等式是更完备的推导: \[ \begin{aligned}0&=-\frac{1}{2}(m-\mu)^{\top} \Sigma^{-1}(m-\mu) +D^{\prime}(m)^{\top}(\mu-m)+\frac{1}{2}(\mu-m)^{\top} D^{\prime \prime}(m)(\mu-m)\\-D^{\prime}(m)^{\top}(\mu-m)&=(\mu-m)^{\top} D^{\prime \prime}(m)(\mu-m) \\-D^{\prime}(m)^{\top} D^{\prime \prime}(m)^{-1} (\mu-m)&=(\mu-m)^{\top}(\mu-m) \\ 0 &=\left[\mu-m+D^{\prime \prime}(m)^{-\top} D^{\prime}(m)\right] (\mu-m) \\ 0 &=[\mu-m+D^{\prime \prime}(m)^{-1} D^{\prime}(m)] (\mu-m)\end{aligned} \]
这个推导的建立在两个假设上面: (1) 下采样后得到的heatmap上面的取值, 被假设为服从真实关键点位置的高斯分布 (2) 二阶泰勒展开的近似
那么 \(\mu =m-D^{\prime \prime}(m)^{-1} D^{\prime}(m)\) 也包含了\(\mu=m\)的可能, 因为
\(D^{\prime}(m)=0\Leftrightarrow m\)在高斯分布的均值位置\(\Leftrightarrow \mu=m\)
所以 \(\mu =m-D^{\prime \prime}(m)^{-1} D^{\prime}(m)\)是完备的
在ilovepose网站(赞!)上, 原作者也给出了关于公式的解释: http://www.ilovepose.cn/t/99