NIKI: Neural Inverse Kinematics with Invertible Neural Networks for 3D
  Human Pose and Shape Estimation
With the progress of 3D human pose and shape estimation, state-of-the-art
methods can either be robust to occlusions or obtain pixel-aligned accuracy in
non-occlusion cases. However, they cannot obtain robustness and mesh-image
alignment at the same time. In this work, we present NIKI (Neural Inverse
Kinematics with Invertible Neural Network), which models bi-directional errors
to improve the robustness to occlusions and obtain pixel-aligned accuracy. NIKI
can learn from both the forward and inverse processes with invertible networks.
In the inverse process, the model separates the error from the plausible 3D
pose manifold for a robust 3D human pose estimation. In the forward process, we
enforce the zero-error boundary conditions to improve the sensitivity to
reliable joint positions for better mesh-image alignment. Furthermore, NIKI
emulates the analytical inverse kinematics algorithms with the twist-and-swing
decomposition for better interpretability. Experiments on standard and
occlusion-specific benchmarks demonstrate the effectiveness of NIKI, where we
exhibit robust and well-aligned results simultaneously. Code is available at
https://github.com/Jeff-sjtu/NIKI
Jiefeng Li, Siyuan Bian, Qi Liu, Jiasheng Tang, Fan Wang, Cewu Lu
# NIKI: Neural Inverse Kinematics with Invertible Neural Networks

###### Abstract

With the progress of 3D human pose and shape estimation, state-of-the-art methods can either be robust to occlusions or obtain pixel-aligned accuracy in non-occlusion cases. However, they cannot obtain robustness and mesh-image alignment at the same time. In this work, we present NIKI (**N**eural **I**nverse **K**i_nematics with **I**nvertible Neural Network), which models bi-directional errors to improve the robustness to occlusions and obtain pixel-aligned accuracy. NIKI can learn from both the forward and inverse processes with invertible networks. In the inverse process, the model separates the error from the plausible 3D pose manifold for a robust 3D human pose estimation. In the forward process, we enforce the zero-error boundary conditions to improve the sensitivity to reliable joint positions for better mesh-image alignment. Furthermore, NIKI emulates the analytical inverse kinematics algorithms with the twist-and-swing decomposition for better interpretability. Experiments on standard and occlusion-specific benchmarks demonstrate the effectiveness of NIKI, where we exhibit robust and well-aligned results simultaneously. Code is available at [https://github.com/Jeff-sju/NIKI](https://github.com/Jeff-sju/NIKI).

## 1 Introduction

Recovering 3D human pose and shape (HPS) from monocular input is a challenging problem. It has many applications [10, 62, 64, 65, 47, 11, 46]. Despite the rapid progress powered by deep neural networks [18, 22, 23, 25, 30, 68], the performance of existing methods is not satisfactory in complex real-world applications where people are often occluded and truncated by themselves, each other, and objects.

Existing state-of-the-art approaches rely on pixel-aligned local evidence, _e.g_., 3D keypoints [15, 30], mesh vertices [41], and mesh-aligned features [68], to perform accurate human pose and shape estimation. Although the local evidence helps obtain high accuracy in standard benchmarks, it fails when the mesh-image correspondences are unavailable due to occlusions and truncations. These pixel-aligned approaches sacrifice robustness to occlusions for high accuracy in non-occlusion scenarios. On the other hand, direct regression approaches are more robust to occlusions. Such approaches directly predict a set of pose and shape parameters with neural networks. By encoding human body priors in the networks, they predict a more physiologically plausible result than the pixel-aligned approaches in severely occluded scenarios. However, direct regression approaches use all pixels to predict human pose and shape, which is a highly non-

Figure 1: **Trade-off between pixel-aligned accuracy and robustness.** From 3DPW to 3DPW-XOCC, the degree of occlusion increases. The pixel-aligned approach performs well only in non-occlusion cases. The direct regression approach is more robust to occlusions but less accurate in non-occlusion cases. NIKI shows high accuracy and strong robustness simultaneously. Illustrative results on the 3DPW-XOCC dataset are shown on the right.
fers from image-mesh misalignment. Recent work [20, 23] adopts guided attention to leverage local evidence for better alignment. Nevertheless, in non-occlusion scenarios, direct regression approaches are still not as accurate as the pixel-aligned approaches that explicitly model the local evidence. Fig. 1 shows the performance of the state-of-the-art pixel-aligned and regression approaches in scenarios with different levels of occlusions. These two types of approaches cannot achieve mesh-image alignment and robustness at the same time.

In this work, we propose NIKI, a Neural Inverse Kinematics (IK) algorithm with Invertible neural networks, to improve robustness to occlusions while maintaining pixel-aligned accuracy. IK algorithms are widely adopted in pixel-aligned approaches [15, 30] to obtain mesh-image alignment in non-occlusion scenarios. However, existing IK algorithms only focus on estimating the body part rotations that best explain the joint positions but do not consider the plausibility of the estimated poses. Therefore, the output human pose inherits the errors from joint position estimation, which is especially severe in occlusion scenarios. In contrast, NIKI is robust to unreliable joint positions by modeling the bi-directional pose error. We build the bijective mapping between the Euclidean joint position space and the combined space of the 3D joint rotation and the latent error. The latent error indicates how the joint positions deviate from the manifold of plausible human poses. The output rotations are robust to erroneous joint positions since we have explicitly removed the error information by supervising the output marginal distribution in the inverse direction. In the forward direction, we introduce the zero-error boundary conditions, which enforce the solved rotations to explain the reliable joint positions and improve mesh-image alignment. The invertible neural network (INN) is trained in both forward and inverse directions. Since forward kinematics (FK) is deterministic and easy to understand, it aids the INN in learning the complex IK process through inherent bijective mapping. To further improve the interpretability of the IK network, we emulate the analytical IK algorithm by decomposing the complete rotation into the twist rotation and the swing-dependent joint position with two consecutive invertible networks.

We benchmark NIKI on 3DPW [56], AGORA [44], 3DOH [69], 3DPW-OCC [56], and our proposed 3DPW-XOCC datasets. 3DPW-XOCC is augmented from the original 3DPW dataset with extremely challenging occlusions and truncations. NIKI shows robust reconstructions while maintaining pixel-aligned accuracy, demonstrating state-of-the-art performance in both occlusions and non-occlusion benchmarks. The main contributions of this paper are summarized as follows:

* We present a framework with a novel error-aware inverse kinematics algorithm that is robust to occlusions while maintaining pixel-aligned accuracy.
* We propose to decouple the error information from plausible human poses by learning a pose-independent error embedding in the inverse process and enforcing zero-error boundary conditions during the forward process using invertible neural networks.
* Our approach outperforms previous pixel-aligned and direct regression approaches on both occlusions and non-occlusion benchmarks.

## 2 Related Work

3D Human Pose and Shape Estimation.Prior work estimates 3D human pose and shape by outputting the parameters of statistical human body models [1, 36, 43, 45, 63]. Initial work follows the optimization paradigm [6, 27, 45, 52]. SMPLify [6] is the first automated approach that fits SMPL parameters to 2D keypoint observations. This paradigm is further extended to silhouette [27] and volumetric grids [52].

Recently, learning-based paradigms have gained much attention with the advances in deep neural networks. Existing work can be categorized into two classes: direct regression approaches and pixel-aligned approaches. Direct regression approaches use deep neural networks to regress the pose and shape parameters directly [18, 19, 22, 23, 24, 25, 28, 58]. Intermediate representations are used as the weak supervision to improve the regression performance,, 2D keypoints [18] and body/part segmentation [46]. Several studies [17, 25] leverage the optimization paradigm to introduce the pseudo ground truth for better supervision. Pixel-aligned approaches explicitly exploit pixel-aligned local evidence to estimate the pose and shape parameters. Moon [41] use the vertex positions to regress the SMPL parameters. Li [30] and Iqbal [15] propose to map the 3D keypoints to pose parameters. Zhang [68] propose the mesh-aligned feedback loop to predict the aligned SMPL parameters. Explicitly modeling local evidence contributes to the state-of-the-art performance of pixel-aligned approaches.

Although pixel-aligned approaches achieve high accuracy in standard benchmarks, they are vulnerable to occlusions and truncations. When the local evidence is not reliable or even does not exist in occluded and truncated cases, such approaches predict physiologically implausible results. Direct regression approaches [16, 20, 23, 50, 69] are more robust to occlusions and truncations but less accurate in non-occlusion scenarios. Zhang [69] use the saliency map to infer object-occluded human bodies. Kocabas [23] propose part-guided attention to exploit the information about the visibility of body parts. Khirodkar [20] use body centernaps to exploit the spatial context. A number of studies [45, 48, 51] propose to use pose
prior to improve the plausibility of the estimated poses. Although the local evidence is implicitly used in recent regression approaches, pixel-aligned approaches still dominate non-occlusion benchmarks.

In this work, we combine the merits of pixel-aligned approaches and direct regression approaches. NIKI maintains pixel-aligned accuracy by aligning with the body joints via inverse kinematics while achieving robustness to occlusions and truncations with bi-directional error decoupling.

Inverse Kinematics.The inverse kinematics (IK) process finds the relative rotations to produce the desired positions of body joints. It is an ill-posed problem because of the information loss in the forward process. Traditional numerical approaches [4, 7, 12, 21, 57, 60] are time-consuming due to iterative optimization. The heuristic approaches such as CDC [37], FABRIK [3], and IK-FA [49] are more efficient and have a lower computation cost for each heuristic iteration. Recent work [9, 54] has started using neural networks to solve the IK problem. Zhou [70] train a four-layer MLP network to predict the 3D human pose parameterized as 6D vectors. Li [30] propose a hybrid analytical-neural solution to accurately predict the body part rotations. Oreshkin [42] propose to use prototype encoding to predict rotations from sparse user inputs. Voleti [55] extend the same model to arbitrary skeletons. The work of Ardizzone [2] is most related to us. They use invertible neural networks (INNs) to solve inverse problems, including the toy inverse kinematics problem in 2D space. However, similar to all the aforementioned approaches, they assume the input body joints are reliable, resulting in vulnerability to occlusions and truncations.

Invertible Neural Network in HPS Estimation.Modeling the conditional posterior of an inverse process is a classical statistical task. Wehrbein [59] propose to estimate 3D human poses from 2D poses by capturing lost information with INNs. Several studies [63, 66] leverage INNs to build priors for 3D human pose estimation. The pose priors are learned by normalizing flows that are built with INNs. Biggs [5] propose to use the learned prior from normalizing flows to resolve ambiguities. Kolotouros [26] propose a conditional distribution with normalizing flows as a function of the input to combine information from different sources. Li [29] leverage normalizing flows to capture the underlying residual log-likelihood of the output and propose a novel regression paradigm from the perspective of maximum likelihood estimation. Unlike previous methods, our approach leverages the property of bijective mapping in INNs to decouple joint errors and solve the inverse kinematics problem robustly.

## 3 Method

In this section, we present NIKI, a neural inverse kinematics solution for 3D human pose and shape estimation. We first review the formulation of existing analytical and MLP-based IK algorithms in SS3.1. In SS3.2, we introduce the proposed INN-based IK algorithm with bi-directional error decoupling. In SS3.3, we present the overall human pose estimation framework and the learning objective. Then we elaborate on the proposed IK-specific invertible architecture in SSA. Finally, we provide the necessary implementation details in SS3.5

### Preliminaries

The IK process is to find the corresponding body part rotations that explain the input body joint positions, while the forward kinematics (FK) process computes the desired joint positions based on the input rotations. The FK process is well-defined, but the transformation from joint rotations to joint positions incurs an information loss,, multiple rotations could correspond to one position, resulting in an ill-posed IK process. Here, we follow HybrIK [30] to consider twist rotations for information integrity.

The conventional IK algorithms only require the output rotations to match the input joint positions but ignore the errors of the joint positions and the plausibility of the body pose. Therefore, the errors of the joint positions will be accumulated in the joint rotations (Fig. 1(a)). This process

Figure 2: **Illustration** of (a) analytical IK, (b) feedforward MLP-based IK, and (c) NIKI with bi-directional error decoupling.
can be formulated as:

\[\underbrace{\mathbf{R}+\epsilon_{r}}_{\text{erroneous output}}=\text{IK}_{ \text{Analytical}}(\underbrace{\mathbf{p}+\epsilon_{p},\boldsymbol{\phi}+\epsilon_ {\phi}}_{\text{erroneous input}}\mid\boldsymbol{\beta}), \tag{1}\]

where \(\mathbf{R}\) denotes the underlying plausible rotations, \(\epsilon_{r}\) denotes the accumulated error in estimated rotations, \(\mathbf{p}\) denotes the underlying plausible joint positions, \(\epsilon_{p}\) denotes the position errors, \(\boldsymbol{\phi}\) denotes the underlying plausible twist rotations, \(\epsilon_{\phi}\) denotes the twist error, and \(\boldsymbol{\beta}\) denotes the body shape parameters.

A straightforward solution to improving the robustness of the IK algorithms is using the standard regression model [9, 69] to approximate the underlying plausible rotations \(\mathbf{R}\) given the erroneous input (Fig. 2b):

\[\mathbf{R}\approx\text{IK}_{\text{MLP}}(\mathbf{p}+\epsilon_{p},\boldsymbol {\phi}+\epsilon_{\phi}\mid\boldsymbol{\beta}). \tag{2}\]

Indeed, modeling the IK process with classical neural networks, _e.g_., MLP, can improve the robustness. However, the output rotations are less sensitive to the change of the joint positions. The errors are highly coupled with the joint positions. Without explicitly decoupling errors from plausible human poses, it is difficult for the network to distinguish between reasonable and abnormal changes in joint positions. Therefore, the output rotations cannot accurately track the movement of the body joints. In practice, we find that the feedforward neural networks could improve performance in occlusion cases but cause performance degradation in non-occlusion cases, where accurate mesh-image alignment is required. Detailed comparisons are provided in Tab. 5.

### Inverse Kinematics with INNs

In this work, to improve the robustness of IK to occlusions while maintaining the sensitivity to non-occluded body joints, we propose to use the invertible neural network (INN) to model bi-directional errors explicitly (see Fig. 2c). In contrast to the conventional methodology, we learn the IK model \(g(\cdot;\boldsymbol{\beta},\theta)\) jointly with the FK model \(f(\cdot;\boldsymbol{\beta},\theta)\):

\[[\mathbf{p}+\epsilon_{p},\boldsymbol{\phi}+\epsilon_{\phi}] =f(\mathbf{R},\mathbf{z}_{r};\boldsymbol{\beta},\theta), \tag{3}\] \[=g(\mathbf{p}+\epsilon_{p},\boldsymbol{\phi}+\epsilon_{\phi}; \boldsymbol{\beta},\theta), \tag{4}\]

where \(\mathbf{z}_{r}\) is the error embedding that denotes how the input joint positions deviate from the manifold of plausible human poses. Notice that \(f\) and \(g\) share the same parameters \(\theta\), and \(f=g^{-1}\) is enforced by the invertible network architecture. We expect that simultaneously learning the FK and IK processes can benefit each other.

In the forward process, we can tune the error embedding \(\mathbf{z}_{r}\) to control the error level of the body joint positions. The body part rotations will perfectly align with the joint positions by setting \(\mathbf{z}_{r}\) to \(0\), which means no deviation from the pose manifold. In the inverse process, the error is only reflected on \(\mathbf{z}_{r}\). The rotation \(\mathbf{R}\) keeps stable against the erroneous input.

Decouple Error Information.The input joints and twists to the IK process contain two parts of information: i) the underlying pose that lies on the manifold of plausible 3D human poses; ii) the error information that indicates how the input deviates from the manifold. We can obtain robust pose estimation by separating these two types of information. Due to the bijective mapping enforced by the INN, all the input information is preserved in the output, and no new information is introduced. Therefore, we only need to remove the pose information from the output vector \(\mathbf{z}_{r}\) in the inverse process. The vector \(\mathbf{z}_{r}\) will automatically encode the remaining error information. To this end, we enforce the model to follow the independence constraint, which encourages \(\mathbf{R}\) and \(\mathbf{z}_{r}\) to be independent upon convergence, _i.e_., \(p(\mathbf{z}_{r}|\mathbf{R})=p(\mathbf{z}_{r})\).

After we separate the error information, we can manipulate the error embedding to let the model preserve the sensitivity to error-free body joint positions without compromising robustness. In particular, we constrain the error information in the forward process with the zero-error condition:

\[[\mathbf{p},\phi]=f(\mathbf{R},\boldsymbol{0};\boldsymbol{\beta},\theta). \tag{5}\]

In this way, the rotations will track the joint positions and twist rotations accurately in non-occlusion scenarios. Besides, the zero-error condition can also be extended to the inverse process:

\[[\mathbf{R},\boldsymbol{0}]=g(\mathbf{p},\boldsymbol{\phi};\boldsymbol{\beta },\theta). \tag{6}\]

With the independence and zero-error constraints, the network is able to model the error information in both the forward and inverse processes, making NIKI robust to occlusions while maintaining pixel-aligned accuracy.

Figure 3: **Overview of the proposed framework.** The input image is fed into the CNN backbone network to estimate the initial joint positions and twist rotations, followed by NIKI to solve the joint rotations.
### Decoupled Learning

The overview of our approach is illustrated in Fig. 3. During inference, we first extract the joint positions and twist rotations with the CNN backbone, which are subsequently fed to the invertible network to predict the complete body part rotations. During training, we optimize FK and IK simultaneously in one network. Hereby, we perform FK and IK alternately with the additional independence loss and boundary loss. The gradients from both directions are accumulated before performing a parameter update.

Inverse Training.In the inverse iteration, the network predicts the body part rotations given the joint positions \(\hat{\mathbf{p}}\) and twist rotations \(\hat{\boldsymbol{\phi}}\) from the CNN backbone. The loss function is defined as:

\[\mathcal{L}_{inv}=\left\|\hat{\mathbf{R}}_{inv}-\widetilde{\mathbf{R}}\right\| _{2}^{2}+\left\|\text{FK}(\hat{\mathbf{R}}_{inv})-\text{FK}(\widetilde{\mathbf{ R}})\right\|_{1}, \tag{7}\]

with

\[[\hat{\mathbf{R}}_{inv},\hat{\mathbf{z}}_{r}]=g(\hat{\mathbf{p}},\hat{ \boldsymbol{\phi}};\boldsymbol{\beta},\theta), \tag{8}\]

where \(\widetilde{\mathbf{R}}\) represents the ground-truth rotations, and \(\text{FK}(\cdot)\) denotes the analytical FK process to superoise the corresponding 3D joint positions of the predicted pose.

Forward Training.In the forward process, the network predicts the joint positions and twist rotations given the body part rotations. The error of the noisy predictions \(\hat{\mathbf{p}}\) and \(\hat{\boldsymbol{\phi}}\) should only be determined by the error embedding. Therefore, with the ground-truth rotations \(\widetilde{\mathbf{R}}\) and error embedding \(\hat{\mathbf{z}}_{r}\) obtained from the inverse iteration, the forward model should predict the same values as the CNN output:

\[\mathcal{L}_{fund}=\|\hat{\mathbf{p}}_{fund}-\hat{\mathbf{p}}\|_{1}+\|\hat{ \boldsymbol{\phi}}_{fund}-\hat{\boldsymbol{\phi}}\|_{2}^{2}, \tag{9}\]

with

\[[\hat{\mathbf{p}}_{fund},\hat{\boldsymbol{\phi}}_{fund}]=f(\widetilde{\mathbf{ R}},\hat{\mathbf{z}}_{r};\boldsymbol{\beta},\theta). \tag{10}\]

Independence Loss.The latent error vector is learned in an unsupervised manner by making \(\mathbf{R}_{inv}\) and \(\mathbf{z}_{r}\) independent of each other. The pose information in \(\mathbf{R}_{inv}\) is supervised by Eq. 7. We then enforce the independence by penalizing the mismatch between the joint distribution of the rotations and error embedding \(q\big{(}\hat{\mathbf{R}}_{inv},\mathbf{z}_{r}\big{)}\) and the product of marginal distributions \(p\big{(}\widetilde{\mathbf{R}}\big{)}p(\mathbf{z})\).

\[\mathcal{L}_{ind}=\mathcal{D}(q\big{(}\mathbf{R}_{inv},\mathbf{z}_{r}\big{)},p \big{(}\widetilde{\mathbf{R}}\big{)}p(\mathbf{z})), \tag{11}\]

where \(\mathbf{z}\sim\mathcal{N}(0,\mathbf{I})\) follows the standard normal distribution, \(\mathbf{I}\) is the identity matrix, and \(\mathcal{D}(\cdot)\) denotes the Maximum Mean Discrepancy [13], which allows us to compare two probability distributions through samples. In addition to the independence constraint, \(\mathcal{L}_{ind}\) encourages the error embedding \(\mathbf{z}_{r}\) to follow the standard normal distribution \(p(\mathbf{z})\), serving as a regularization.

Boundary Condition Loss.To enforce the solved rotations to explain the reliable joint positions, we supervise the boundary cases where no error occurs. In the inverse process, the output error should be zero when the network is fed with the ground truth:

\[\mathcal{L}_{ind}^{i}=\|\hat{\epsilon}_{r}\|_{2}^{2}+\|\hat{\mathbf{R}}_{{ \textit{bnd}}}-\widetilde{\mathbf{R}}\|_{2}^{2}, \tag{12}\]

with

\[[\hat{\mathbf{R}}_{{\textit{bnd}}},\hat{\epsilon}_{r}]=g(\widetilde{\mathbf{p} },\widetilde{\boldsymbol{\phi}};\boldsymbol{\beta},\theta), \tag{13}\]

where \(\widetilde{\mathbf{p}}\) and \(\widetilde{\boldsymbol{\phi}}\) denote the ground-truth joint positions and twist rotations, respectively.

In the forward process, the joint positions and twist rotations should map to the ground truth when the input error vector \(\mathbf{z}_{r}\) is \(\mathbf{0}\):

\[\mathcal{L}_{{\textit{bnd}}}^{\prime}=\|\hat{\mathbf{p}}_{{\textit{bnd}}}- \widetilde{\mathbf{p}}\|_{1}+\|\hat{\boldsymbol{\phi}}_{{\textit{bnd}}}- \widetilde{\boldsymbol{\phi}}\|_{2}^{2}, \tag{14}\]

with

\[[\hat{\mathbf{p}}_{{\textit{bnd}}},\hat{\boldsymbol{\phi}}_{{\textit{bnd}}}]= f(\widetilde{\mathbf{R}},\mathbf{0};\boldsymbol{\beta},\theta). \tag{15}\]

Overall, the total loss of NIKI is:

\[\begin{split}\mathcal{L}=&\lambda_{{\textit{imr}}} \mathcal{L}_{{\textit{imr}}}+\lambda_{{\textit{fru}}}\mathcal{L}_{{\textit{ fru}}}\\ +&\lambda_{{\textit{ind}}}\mathcal{L}_{{\textit{ind} }}+\lambda_{{\textit{bnd}}}^{i}\mathcal{L}_{{\textit{bnd}}}^{i}+\lambda_{{ \textit{bnd}}}^{\prime}\mathcal{L}_{{\textit{bnd}}}^{\prime},\end{split} \tag{16}\]

where \(\lambda_{{\textit{imr}}},\lambda_{{\textit{fru}}},\lambda_{{\textit{ind}}}, \lambda_{{\textit{ind}}},\lambda_{{\textit{ind}}}^{i},\lambda_{{\textit{ bnd}}}^{\prime}\) are the scalar coefficients to balance the loss terms.

### Invertible Architecture

One-Stage Mapping.To build a fully invertible neural network for inverse kinematics, we build the one-stage mapping model using RealNVP [11]. Since the IK and FK processes require the skeleton template, we extend the INN to incorporate the conditional shape parameters input. The basic block of the network contains two reversible coupling layers conditioned on the shape parameters. The overall network consists of multiple blocks connected in series to increase capacity. Besides, since the invertible network requires the input and output vectors to have the same dimension, we follow previous work [2] and pad zeros to the input.

Twist-and-Swing Mapping.Although treating the invertible neural network as a black box can let us model both the FK and IK processes at the same time, we further emulate the analytical IK algorithm to improve the performance and interpretability. Specifically, we follow the twist-and-swing decomposition [30] and divide the IK process into two steps: i) from joint positions to swing rotations; ii) from twist and swing rotations to complete rotations. The two-step mapping is implemented by two separate invertible networks:

\[[\mathbf{R}_{\textit{sw}},\mathbf{z}_{\textit{sw}}] =g_{1}(\mathbf{p}+\epsilon_{p};\boldsymbol{\beta},\theta_{1}), \tag{17}\] \[[\mathbf{R},\mathbf{z}_{r}] =g_{2}(\mathbf{R}_{\textit{sw}},\boldsymbol{\phi}+\epsilon_{ \phi};\theta_{2}), \tag{18}\]
where \(\mathbf{R}_{sw}\) is the swing rotations, and \(\mathbf{z}_{sw}\) indicates the deviation from the plausible swing rotation manifold.

Since the mappings are bijective, the FK process also follows the twist-and-swing procedure but inversely. We have \(f=f_{1}\circ f_{2}=g_{1}^{-1}\circ g_{2}^{-1}=g^{-1}\). In the FK process, the body part rotations are first decomposed into twist and swing rotations. Then the swing rotations are transformed into the joint positions. The intermediate supervision of swing rotations is used in both the forward and inverse training.

Temporal Extension.The invertible framework is flexible. It can be easily extended to solving the IK problem with temporal inputs. The model with static inputs can only identify the errors related to physiological implausibility. In contrast, the temporal model further improves motion smoothness by decoupling errors of implausible human body movements. More details are provided in the supplementary material.

### Implementation Details.

We adopt HybrIK [30] as the CNN backbone to predict the noisy body joint positions and the twist rotations. The input of the IK model includes the joint positions \(\mathbf{p}\in\mathbb{R}^{3K}\), twist rotations parameterized in 2-dimensional vectors, _i.e_., \(\boldsymbol{\phi}\in\mathbb{R}^{2(K-1)}\), and the confidence scores of each joint \(\mathbf{s}\in\mathbb{R}^{K}\), where \(K\) denotes the total number of human body joints. The output of the model consists of the body part rotations parameterized as a 6D vector for each part, _i.e_., \(\mathbf{R}\in\mathbb{R}^{6K}\), and the error embedding \(\mathbf{z}_{r}\in\mathbb{R}^{D_{z}}\). The IK model is conditioned on the shape parameters \(\boldsymbol{\beta}\), which is also predicted by the CNN backbone. We pad the input with a zero vector with the dimension \(M=D_{z}+2\) to satisfy the dimension constraint of the invertible neural network. The networks are trained with the Adam solver for 50 epochs with a mini-batch size of \(64\). The learning rate is set to \(1\times 10^{-3}\) at first and reduced by a factor of 10 at the 30th and 40th epochs. Implementation is in PyTorch. Detailed architectures are provided in the supplementary material.

## 4 Experiments

Datasets.We employ the following datasets in our experiments: (1) 3DPW [56], an outdoor benchmark for 3D human pose estimation. (2) AGORA [44], a synthetic dataset with challenging environmental occlusions. (3) 3DOH [69], a 3D human dataset where human activities are occluded by objects. (4) 3DPW-OCC [56], a different split of the original 3DPW dataset with a occluded test set. (5) 3DPW-XOCC, a new benchmark for 3D human pose estimation with extremely challenging occlusions and truncations. We simulate occlusions and truncations by randomly pasting occlusion patches and cropping frames with truncated windows.

Training and Evaluation.NIKI is trained on 3DPW [56] and Human3.6M [14] and evaluated on 3DPW [56] and 3DPW-XOCC [56] to benchmark the performance on both occlusions and non-occlusion scenarios. We use the AGORA [44] train set only when conducting experiments on its test set. For evaluations on the 3DPW-OCC [56] and 3DOH [69] datasets, we train NIKI on COCO [35], Human3.6M [14], and 3DOH [69] for a fair comparison. Procrustes-aligned mean per joint position error (PA-MPJPE) and mean per joint position error (MPJPE) are reported to assess the 3D pose accuracy. Per vertex error (PVE) is also reported to evaluate the estimated body mesh.
significantly outperforms the most accurate direct regression approach by 5.9 mm on PA-MPJPE (12.7% relative improvement). Besides, NIKI obtains comparable performance to pixel-aligned approaches, showing a 1.2 mm improvement on PA-MPJPE.

Tab. 2 demonstrates the robustness of NIKI to extreme occlusions and truncations. We report the results of the most accurate pixel-aligned and direct regression approaches on the 3DPW-XOCC dataset. It shows that direct regression approaches outperform pixel-aligned approaches in challenging scenes, which is in contrast to the results in the standard benchmark. NIKI improves the PA-MPJPE performance by **38.7**% compared to HybrIK and **10.1**% compared to PARE that finetuned on the 3DPW-XOCC train set.

The results of NIKI on other occlusion-specific datasets are reported in Tab. 3 and Tab. 4. NIKI shows consistent improvements on all these datasets, demonstrating that NIKI is robust to challenging occlusions and truncations while maintaining pixel-aligned accuracy. Specifically, NIKI improves the NMIE performance on AGORA by **12.5**% compared to the state-of-the-art methods. We can also observe that the twist-and-swing mapping model is consistently superior to the one-stage mapping model. More discussions of limitations and future work are provided in the supplementary material.
Effectiveness of Bi-directional Training.To further validate the effectiveness of bi-directional training, we report the results of the baseline model that is only trained with the inverse process. Without bi-directional training, we also cannot apply the boundary condition in the forward direction, which means that we only decouple the errors in the inverse process. As shown in Tab. 5, the IK model cannot maintain the sensitivity to non-occluded body joints in the standard benchmark without forward training.

Sensitivity Analysis.We further follow Kocabas _et al_. [23] to conduct the occlusion sensitivity analysis. Fig. 4 shows the per-joint breakdown of the mean 3D error from the occlusion sensitivity analysis for three different methods on the 3DPW test split. Although HybrIK [30] obtains high accuracy on the 3DPW dataset, it is quite sensitive to occlusions. NIKI is more robust to occlusions and improves the robustness of all joints. We also qualitatively compare HybrIK, PARE, and NIKI in Fig. 5. NIKI performs well in challenging occlusion scenarios and predicts well-aligned results. More occlusion analyses and qualitative samples are provided in the supplementary material.

## 5 Conclusion

In this paper, we propose NIKI, a neural inverse kinematics solution for accurate and robust 3D human pose and shape estimation. NIKI is built with invertible neural networks to model bi-directional error information in the forward and inverse kinematics processes. In the inverse direction, NIKI explicitly decouples the error information from the manifold of the plausible human poses to improve robustness. In the forward direction, NIKI enforces zero-error boundaries to obtain accurate mesh-image alignment. We construct the invertible neural network by emulating the analytical inverse kinematics algorithm with twist-and-swing decomposition to improve interpretability. Comprehensive experiments on standard and occlusion-specific datasets demonstrate the pixel-aligned accuracy and robustness of NIKI. We hope NIKI can serve as a solid baseline for challenging real-world applications.

**Acknowledgments.** This work was supported by the National Key R&D Program of China (No. 2021ZD0110704), Shanghai Municipal Science and Technology Major Project (2021SHZDZX0102), Shanghai Qi Zhi Institute, and Shanghai Science and Technology Commission (21511101200).

Figure 5: **Quantitative results on COCO (rows 1-3) and 3DPW-XOCC (rows 4-5) datasets. From left to right: Input image, (a) HybrIK [30] results, (b) PARE [23] results, and (c) NIKI results.**
## Appendix A Architecture of INN

### One-Stage Mapping

The detailed architecture of the one-stage mapping model is illustrated in Fig. 6. We follow the architecture of RealNVP [11]. The model consists of multiple basic blocks to increase capacity. The input vector \(\mathbf{u}\) of the block is split into two parts, \(\mathbf{u}_{1}\) and \(\mathbf{u}_{2}\), which are subsequently transformed with coefficients \(\exp(s_{i})\) and \(t_{i}\) (\(i\in\{1,2\}\)) by the two affine coupling layers:

\[\mathbf{v}_{1} =\mathbf{u}_{1}\odot\exp(s_{2}(\mathbf{u}_{2},\boldsymbol{ \beta}))+t_{2}(\mathbf{u}_{2},\boldsymbol{\beta}), \tag{19}\] \[\mathbf{v}_{2} =\mathbf{u}_{2}\odot\exp(s_{1}(\mathbf{v}_{1},\boldsymbol{\beta }))+t_{1}(\mathbf{v}_{1},\boldsymbol{\beta}), \tag{20}\]

where \(\mathbf{v}=[\mathbf{v}_{1},\mathbf{v}_{2}]\) is the output vector of the block and \(\odot\) denotes element-wise multiplication. The coefficients of the affine transformation can be learned by arbitrarily complex functions, which do not need to be invertible. The invertibility is guaranteed by the affine transformation in Eq. 19 and 20. The scale network \(s_{i}\) is a 3-layer MLP with the hidden dimension of \(512\), and the translation network \(t_{i}\) has the same architecture followed by a \(\tanh\) activation function.

### Twist-and-Swing Mapping

The detailed architecture of the twist-and-swing mapping model is illustrated in Fig. 7. The two-step mapping is implemented by two separate invertible networks. The first network has the same architecture as the one-stage mapping model, while its input is only the joint positions, and the output is the swing rotations. The second network removes the shape condition and directly transforms the twist and swing rotations to complete rotations.

## Appendix B Implementation Details

In our experiments, we use the weights pretrained on COCO[35] 2D pose estimation task for the initialization of the CNN backbone to accelerate convergence. The scalar coefficients in the loss function are \(\lambda_{\textit{inv}}=1\), \(\lambda_{\textit{fwd}}=1\), \(\lambda_{\textit{ind}}=1\), \(\lambda_{\textit{ind}}^{i}=0.1\), \(\lambda_{\textit{ind}}^{f}=1\). We first train the CNN backbone following HybridK [30] to obtain initial joint positions and twist rotations. Then we solely train NIKI and freeze the parameters of the CNN backbone. During training, we follow EFT [17], SPIN [25], and PARE [23], which use fixed data sampling ratios for each batch. We incorporate 50% Human3.6M and 50% 3DPW when conducting experiments on the 3DPW and 3DPW-XOCC datasets. For experiments on the 3DPW-OCC and 3DOH datasets, we incorporate 35% COCO, 35% Human3.6M, and 30% 3DOH.

## Appendix C Temporal Extension of NIKI

### Architecture

We extend the invertible network for temporal input. We design a spatial-temporal INN model to incorporate temporal information to solve the IK problem. For simplicity, we use the basic block in the one-stage mapping and twist-and-swing mapping models as the spatial INN. Self-attention modules are introduced to serve as the temporal INN and conduct temporal affine transformations. The temporal input vectors \(\{\mathbf{u}^{t}\}_{1}^{T}\) are split into two subsets, \(\{\mathbf{u}^{t}\}_{1}^{\left[T/2\right]}\) and \(\{\mathbf{u}^{t}\}_{\left[T/2\right]+1}^{T}\), which are subsequently transformed with coefficients \(\exp(s_{i})\) and \(t_{i}\) (\(i\in\{1,2\}\)) by the two affine coupling layers like Eq. 19 and 20. We adopt self-attention layers [53] as the temporal scale and translation layers. The detailed network architecture of the temporal INN is illustrated in Fig. 8.

### Experiments of the Temporal Extension

We evaluate the temporal extension on both standard and occlusion-specific benchmarks. Tab. 6 compares temporal NIKI with previous state-of-the-art temporal HPS methods on the standard 3DPW[56] dataset. Notice that we do not design complex network architecture or use dynamics infor

Figure 6: **Detailed architecture of the one-stage mapping model.**

Figure 7: **Detailed architecture of the twist-and-swing mapping model.**
mation. Our temporal extension simply applies the affine coupling layers to the time domain. It shows that our simple extension obtains better accuracy than state-of-the-art dynamics-based approaches.

Tab. 7 presents the performance on the occlusion-specific benchmark. We compare the temporal extension with a strong baseline. The baseline combines PARE [23] with the state-of-the-art temporal approach, VIBE [22]. We first use the backbone of PARE [23] to extract attention-guided features. Then we apply VIBE [22] to incorporate temporal information to predict smooth and robust human motions. Temporal NIKI outperforms the baseline in challenging occlusions and truncations.

Fig. 9 present the acceleration error curves of the single-frame and temporal models in the 3DPW-XOCC dataset. We can observe that the temporal model can improve motion smoothness.

## Appendix D Noise Analysis

We assess the robustness of three different IK algorithms: analytical IK, MLP-based IK, and NIKI. We evaluate their performance on the AMASS dataset [39] with noisy

\begin{table}
\begin{tabular}{l|c c c c} \hline \hline  & \multicolumn{4}{c}{3DPW} \\ \cline{2-5} Method & MPIPE \(\downarrow\) & PA-MPIPE \(\downarrow\) & PVE \(\downarrow\) & ACCEL \(\downarrow\) \\ \hline VIBE [22] & 82.9 & 51.9 & 99.1 & 23.4 \\ MEVA [38] & 86.9 & 54.7 & - & 11.6 \\ TCMR [8] & 86.5 & 52.7 & 102.9 & 7.1 \\ MAED [58] & 79.1 & 45.7 & 92.6 & 17.6 \\ D&D [28] & 73.7 & 42.7 & 88.6 & **7.0** \\ \hline NIKI (Frame-based) & 71.3 & 40.6 & 86.6 & 15.1 \\ NIKI (Temporal) & **71.2** & **40.5** & **86.3** & 12.3 \\ \hline \hline \end{tabular}
\end{table}
Table 6: **Quantitative comparisons with state-of-the-art temporal methods on the 3DPW dataset. Symbol “-” means results are not available.**

\begin{table}
\begin{tabular}{l|c c c c} \hline \hline  & \multicolumn{4}{c}{3DPW-XOCC} \\ \cline{2-5} Method & MPIPE \(\downarrow\) & PA-MPIPE \(\downarrow\) & PVE \(\downarrow\) & ACCEL \(\downarrow\) \\ \hline HybrIK [30] & 148.3 & 98.7 & 164.5 & 108.6 \\ PARE\({}^{*}\)[23] & 114.2 & 67.7 & 133.0 & 90.7 \\ PARE\({}^{*}\)[23] + VIBE [22] & 97.3 & 60.2 & 114.9 & 18.3 \\ \hline NIKI (Frame-based) & 110.7 & 60.5 & 128.6 & 74.4 \\ NIKI (Temporal) & **88.9** & **52.1** & **98.0** & **17.3** \\ \hline \hline \end{tabular}
\end{table}
Table 7: **Quantitative comparisons with state-of-the-art temporal methods on the 3DPW–XOCC dataset. Symbol \(*\) means finetuning on the 3DPW–XOCC train set.**

Figure 8: **Detailed architecture of the temporal INN.**

Figure 10: **Noise sensitivity analysis of analytical IK, MLP-based IK and NIKI.**

Figure 9: **Acceleration error curve.**
joint positions. As shown in Fig. 10, MLP-based IK is more robust than the analytical IK when the noise is larger than 30 mm. However, MLP-based IK fails to obtain pixel-aligned performance when the noise is small. NIKI shows superior performance at all noise levels.

## Appendix E Collision Analysis

To quantitatively show that the output poses from NIKI are more plausible, we compare the collision ratio of mesh triangles [40] between HybrIK and NIKI on the 3DPW-XOCC dataset. NIKI reduces the collision ratio from 2.6% to 1.0% (57.7% relative improvement).

## Appendix F Occlusion Analysis

We follow the framework of [67, 23] and replace the classification score with an error measure for body poses. We choose MPJPE as the error measurement. This analysis is not limited to a particular network architecture. We apply it to the state-of-the-art pixel-aligned approach, HybrIK [30], and the direct regression approach, PARE [23]. The visualizations of the error maps are shown in Fig. 12 and 13. Warmer colors denote a higher MPJPE. It shows that NIKI is more robust to body part occlusions.

Additionally, we follow the official AGORA analyses to compare the performance in different occlusion levels. As shown in Fig. 11, in the low occlusion level (0-10%), NIKI brings \(6.5\) mm MPJPE improvement. The improvement reaches a peak (\(13.3\) mm) in the medium occlusion level (20-30%). For the high occlusion level (70-80%), the improvement falls back to \(10.2\) mm. We can observe that NIKI is good at handling medium occlusions. There is still a lot of room for improvement in highly occluded scenarios.

## Appendix G Heatmap Condition

We follow Wehrbein [59] and add heatmap condition in the INN. As shown in Tab. 8, it brings \(0.2\) mm improvement on the 3DPW dataset. However, it is \(0.1\) mm worse on the 3DPW-XOCC dataset. We assume this is because heatmap is not reliable under server occlusions.

## Appendix H Inference Time and Model Size

We benchmark the inference time of the analytical IK algorithm, HybrIK [30] and NIKI with an RTX 3090 GPU with a batch size of 1. The latency of HybrIK is \(26\) ms and NIKI is \(8\) ms, respectively. HybrIK is much slower since it needs to solve the rotations iteratively along the kinematic tree. For the model size, the total parameters of NIKI is 29.01M.

## Appendix I Details of 3DPW-XOCC

3DPW-XOCC is a new benchmark for human pose and shape estimation with extremely challenging occlusions and truncations. The dataset is augmented from the original 3DPW dataset by adding temporally-smooth synthetic occlusions and truncations. To ensure temporal smoothness, we choose keyframes at an interval of 8 frames, and the rest frames are generated by linearly interpolating the clipping and occlusion of the keyframes. In the keyframe, the image is randomly clipped to ensure that at least one body part is outside the clipped image with a possibility of over \(2/3\). A square area that takes up to 30% of the clipped image is replaced by gaussian noise to serve as occlusion. The evaluation protocol and the split of the dataset are unchanged.

## Appendix J Limitations and Future Work

Our work has several limitations. First, NIKI does not include body shape refinement. Human body shape estimation is also challenging in occlusion scenarios. The incorrect body shape would cause incorrect distal joints reconstruction. For example, even the knee and ankle rotations are correct, the wrong leg length will cause a wrong ankle position. Exploiting the bone length information in joint positions can help refine \(\mathbf{\beta}\) for better pose and shape estimation. Second, NIKI does not use the scene information to separate the pose error. The initial joint positions could be physiologically plausible but do not match the input scene. Using scene constraints can reduce implausible human-scene interactions and further improve robustness. Third, the training of NIKI relies on the diversity of datasets. To accurately built the bijective mapping, the training data need to be diverse enough. We believe these limitations are exciting avenues for future work to explore.

## Appendix K Qualitative Results

Additional qualitative results are shown in Fig. 14 and 15.
Figure 12: **Occlusion Sensitivity Maps of PARE [23] and NIKI.**
Figure 13: **Occlusion Sensitivity Maps of HybrIK [30] and NIKI.**
Figure 14: **Qualitative comparison with PARE [23].**
Figure 15: **Qualitative comparison with HybrIK [30].**