wikillm

Paper · 2020-07-07 · cs.CV

Long-term Human Motion Prediction with Scene Context

Predicts 3D human pose and path several seconds ahead from one RGB scene image and 2D pose history. A conditional VAE samples 2D goal destinations, a heatmap network plans a 3D path to each goal, and a transformer refines the pose sequence. Trained on a new synthetic GTA indoor dataset. Author-reported: 173 mm mean MPJPE vs 193 mm for the best baseline on GTA-IM; 270 mm vs 282 mm on PROX.

Motion predictionVariational autoencoderAttention mechanismhuman-motion3d-posescene-contextsynthetic-data

arXivPDFMarkdown11 min read

AI-compiled by claude-haiku-5-5 on 2026-11-05, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Predicting how a person will move a few seconds ahead is easier when you know the room they are in. A person walking toward a chair will sit down; a person walking toward a door will go through it. Earlier systems looked only at the person's recent body poses, so they could predict a short, local motion but tended to walk the person through walls and tables.

This method looks at a single picture of the room together with the last second of the person's movement. It first guesses where the person is heading, offering several possible destinations so that it can express uncertainty. It then plans a route in 3D to each destination, and finally works out the body poses that follow that route. The authors also built a large synthetic video dataset from a video game, with exact 3D labels, to train it.

TL;DR

  • Input: one RGB scene image and a 2D pose history. Output: future 3D poses and the 3D path of the body centre §3.
  • Three separately trained stages: GoalNet (2D destinations), PathNet (3D path), PoseNet (3D poses) §3.
  • Trained on GTA-IM, a synthetic indoor dataset, and evaluated on GTA-IM and PROX §4, §5.1.
  • Author-reported gain over three constructed baselines, mainly on the synthetic set; the PROX gain is small tab. 1, tab. 2.

Problem

Given a single image of a scene and the 2D positions of a person's joints over a history window, predict the next T steps of 3D pose and location §3. The authors say no earlier method predicted 3D pose with global movement from 2D input, and that prior 3D pose predictors ignore the image §2, §5.2. The history window is one second and the horizon is two seconds in the main experiments; a three-second model is trained separately for the longer-horizon study §5.2, §5.4. Known camera intrinsics are assumed §3.

Method

Overview. The pipeline has three stages, GoalNet, PathNet and PoseNet, shown in fig. 2 and fig. 3 §3. The stages connect through 2D destinations and 3D paths. Because GoalNet is a sampler, the system can produce several futures (stochastic mode) or, with GoalNet removed, one future (deterministic mode) §3.

Coordinates. A 3D path is stored as a 2D heatmap track over the image plus a depth value for the body centre at each time step; it is converted to 3D by back-projection through the camera intrinsics §3.2. The paper states that this representation is easier to learn than regressing 3D coordinates directly §3.2, §5.3.

GoalNet (§3.1). A conditional VAE. An encoder reads the stacked 2D pose heatmaps for the history and the scene image, and outputs a mean and a standard deviation for a latent vector z eq. 1. A decoder reads z and the image and outputs a destination heatmap at the end of the horizon eq. 2. Soft-argmax turns that heatmap into a sub-pixel 2D point §3.1. Training minimises an L1 error on the destination plus the KL divergence to a standard normal, with equal weight eq. 4. At test time z is drawn from a standard normal and each draw gives one destination §3.1.

PathNet (§3.2). Takes the image, the stacked pose heatmaps, and a destination heatmap, and outputs future path heatmaps and a depth for every frame of the history and the future eq. 5. The backbone is a three-stack hourglass network §3.2, tab. 6, tab. 7. The initial depth input is derived from the size of the person's bounding box tab. 6 note. The loss has an L1 term on the 2D path eq. 6 and an L1 term on the 3D path that also penalises frame-to-frame changes eq. 7; the two are summed with equal weight §3.2. Training uses the ground-truth destination; testing uses GoalNet's output §3.2.

PoseNet (§3.3). A transformer encoder-decoder with the input embedding, output embedding, positional encoding and softmax removed app. F. Its input is a rough 3D pose sequence: the history lifted to 3D using the estimated torso depth, and the present pose copied to every future point of the path §3.3. It outputs refined future poses eq. 8 and is trained with an L1 loss on the 3D pose eq. 9. Training uses the ground-truth path; testing uses the PathNet path §3.3.

Pseudocode
# Stochastic inference  [§3] [tab. 5] [tab. 6] [tab. 7]
# Input:  image (3, 256, 448); history (N, J, 2) 2D keypoints
# Output: one 3D path and pose sequence per sample

def predict_stochastic(image, history, num_samples):
    results = []
    for sample in range(num_samples):
        # GoalNet: decode a random latent into a 2D destination [§3.1]
        latent = sample_standard_normal(dim=30)            # Z = 30 [tab. 5]
        goal_heatmap = goalnet_decoder(latent, image)      # (64, 112)
        destination = soft_argmax(goal_heatmap)            # (2,) [§3.1]

        # PathNet: heatmap track and depth toward the destination [§3.2]
        future_heatmaps, depths = pathnet(image, history, destination)
        future_2d = soft_argmax(future_heatmaps)           # (T, 2)
        # Back-project the 2D track with depth and intrinsics [§3.2]
        path_3d = back_project(future_2d, depths[N:], intrinsics)

        # PoseNet: refine a rough pose sequence along the path [§3.3]
        lifted_past = back_project(history, depths[:N], intrinsics)
        # Copy the present pose onto each future path point [§3.3]
        rough_future = place_pose_on_path(lifted_past[-1], path_3d)
        pose_3d = posenet(concat(lifted_past, rough_future))
        results.append((path_3d, pose_3d))
    return results
Pseudocode
# Training losses; each module is trained on its own  [app. B]
# Each block lists its equation number in the paper

def goalnet_loss(dest_pred, dest_gt, mu, sigma):
    # L1 on the destination plus KL to N(0, I), equal weight [eq. 4]
    loss_dest = l1(dest_gt - dest_pred)
    loss_kl = kl(normal(mu, sigma), standard_normal())
    return loss_dest + loss_kl

def pathnet_loss(path2d_pred, path2d_gt, path3d_pred, path3d_gt):
    # L1 on the 2D path [eq. 6]
    loss_2d = l1(path2d_gt - path2d_pred)
    # L1 on the 3D path, plus L1 on frame-to-frame differences [eq. 7]
    loss_3d = l1(path3d_gt - path3d_pred)
    loss_smooth = l1(path3d_pred[:-1] - path3d_pred[1:])
    return loss_2d + loss_3d + loss_smooth

def posenet_loss(pose_pred, pose_gt):
    # L1 on the future 3D poses [eq. 9]
    return l1(pose_gt - pose_pred)

Architecture details are in tables, not prose: GoalNet is a residual convolutional encoder with global pooling feeding two linear heads for the mean and standard deviation, and a nearest-upsampling convolutional decoder ending in a 64 × 112 heatmap; each convolution is followed by batch norm and ReLU, except the heatmap head tab. 5. PathNet has three hourglass stacks with a depth branch built from global pooling and linear layers tab. 6, tab. 7.

Hyperparameters

NameValueWhereNotes
Input image size256 × 448app. Bscene image and stacked heatmaps for PathNet
Heatmap output size64 × 112app. B tab. 5GoalNet and PathNet future heatmaps
Latent dimension Z (GoalNet)30tab. 5stated in the table note
Depth cap and scalecap 10, divide by 4app. Bunits of depth not stated
History length N1 second§5.2frame rate and frame count not stated
Prediction horizon T2 seconds (main); 3 seconds (long-term study)§5.2 §5.4
Joints, GTA-IM21 of 98§5.1which 21 is not listed
Joints, PROX18 from SMPL-X§5.1derived from the pose parameters
Train / eval split, GTA-IM8 scenes / 2 scenes§5.1
Train / test split, PROX52 / 8 sequences§5.112 scenes, 20 subjects
Number of samples at test (GTA-IM)4, 10tab. 1best sample per ground truth
Number of samples at test (PROX)3, 6, 10tab. 2best sample per ground truth
GoalNet optimiserAdamapp. Bbetas, epsilon, schedule not stated
GoalNet learning rate1e-4, no weight decayapp. B
GoalNet epochs / batch2 / 128 (both datasets)app. B
PathNet optimiserAdamapp. Bbetas, epsilon not stated
PathNet learning rate2.5e-4, weight decay 1e-4app. B
PathNet epochs (GTA-IM)10, lr × 0.1 at epoch 7app. B
PathNet epochs (PROX)6, lr × 0.1 at epoch 4app. B
PathNet batch32app. B
PoseNet learning rate1e-3app. Bschedule and weight decay not stated
PoseNet epochs / batch80 / 1024app. B
PoseNet attention dropout0.2app. B
Loss weightsequal weights§3.1 §3.2no other weights given
Hourglass backbonethree stackstab. 6 tab. 7text names Hourglass54 §3.2
MetricMPJPE, mm§5.2path and pose, at 0.5 / 1 / 1.5 / 2 s and mean

Results

Author-reported. Setup: GTA-IM (synthetic, 1 M RGB-D frames, training on 8 scenes, testing on 2) and PROX (real, Kinect-One, 60 sequences). Baselines are built by the authors: a transformer that predicts 3D directly from 2D input (TR); a transformer that predicts 2D and then lifts it with VP; and VP combined with a 3D motion predictor (LTD) §5.2. The baselines do not use scene context §5.2. tab. 1 and tab. 2 also contain ablations, which are summarised below.

SettingMetricBaselineThis paperSource
GTA-IM, mean over all steps, poseMPJPE mmVP+LTD 193deterministic 173; 10 samples 165tab. 1
GTA-IM, 2 s, poseMPJPE mmVP+LTD 330deterministic 328tab. 1
GTA-IM, 2 s, pathMPJPE mmVP+LTD 367deterministic 297tab. 1
GTA-IM, ground-truth destination (oracle)MPJPE mmdeterministic 173137tab. 1
GTA-IM, no image inputMPJPE mmdeterministic 173196tab. 1
PROX, mean over all steps, poseMPJPE mmVP+LTD 282deterministic 270; 10 samples 249tab. 2
PROX, 2 s, poseMPJPE mmVP+LTD 394deterministic 406tab. 2
PROX, no GTA-IM pre-trainingMPJPE mmdeterministic 270280tab. 2
GoalNet destination error, GTA-IM, 30 samples, minunit not stateddeterministic 23.712.2app. C, tab. 4
Longer horizon, 3 sMPJPE mmdeterministicstochastic gap above 100 mm at 3 s§5.4, fig. 6 (exact values only in the figure)

Ablations on GTA-IM, mean over all steps, pose: direct 3D regression 191; masked image 189; RGB-D input 172; no image 196 tab. 1. On PROX, a deterministic model without GTA-IM pre-training is 280 against 270 with it tab. 2.

Paper vs code

No official code for the method. The authors' GitHub account has no repository for this method. The searches were: the arXiv abstract and listing (no code link); the project page, which redirects to zhec.github.io/hmp and links only sample downloads and the dataset repository; a repository search on the GitHub API for the title and method words, which returned zero results; and the author's repository list, two pages of 42, where no description matches.

The dataset repository, https://github.com/ZheC/GTA-IM-Dataset, is official. It contains visualisation scripts and a tool that writes a skeleton file. Its README, read through the web interface and not cloned, says the code is released under CC BY-NC 4.0 and that the full dataset is available on request for non-commercial research. It contains no trained model and no motion prediction training code. This is a licensing conflict for the data; see Pitfalls.

Pitfalls

  • No method code. An implementation has to be built from the text and tables alone. Several values that a reimplementation needs are not stated (below).
  • Dataset licence. GTA-IM is available for non-commercial research only, according to its repository. The CC BY 4.0 licence on this card covers the paper, not the dataset. Do not ship the data in a commercial product.
  • Coordinate units not stated. The L1 losses on destinations and 2D paths do not say whether they are in image pixels, in heatmap cells or normalised units eq. 4, eq. 6. Depth units are also not stated; the depth is capped at 10 and divided by 4 during training app. B.
  • Source of 2D history at test time not stated. The text does not say whether test-time 2D keypoints are ground-truth projections or detector output.
  • GoalNet decoder inputs are ambiguous. Eq. 2 shows the decoder reading the latent and the image only. The text says destinations are conditioned on the pose history, and eq. 3 writes the whole model as a function of both. Whether the decoder sees the history at test time is not stated.
  • Stochastic numbers are best-of-K. The paper reports, for each ground-truth sequence, the sample that best matches it §5.3. These are not single-sample errors. A deployed system that picks one future has no such oracle.
  • Train/test mismatch. PathNet is trained with the ground-truth destination and PoseNet with the ground-truth path, but both receive predictions at test time §3.2, §3.3. The oracle rows in tab. 1 and tab. 2 show the cost: the error with ground-truth destinations is much lower on GTA-IM (137 mm against 173 mm).
  • Where the gain is small. On PROX at 2 seconds the baseline has lower pose error than this method (394 against 406) tab. 2. On the mean over all steps the margin is 12 mm (282 for the best baseline against 270 for the deterministic model) tab. 2.
  • Pose placement not specified. The paper says the present pose is copied to every future path point, but not which joint anchors the copy or how the root is translated §3.3.
  • Training order and joint training. The three modules are trained separately, and the authors say joint training works worse app. B. No numbers are given for that comparison.
  • Missing optimiser and schedule details. The following are not stated: Adam betas and epsilon; learning-rate schedule for GoalNet and PoseNet; warm-up; gradient clipping; random seeds; number of runs. The main tables report no variance.
  • Dataset size is inconsistent. The dataset section says 10 indoor scenes and 1 M frames §4; the appendix table lists 49 scenes and 119 clips app. A.
  • Joint subset. The 21 GTA-IM joints used are not listed §5.1.
  • Frame rate. The paper gives times in seconds but never the frame rate, so the number of history and future frames is not stated.
  • Backbone naming. The text says Hourglass54 §3.2; the appendix tables give three stacked hourglass modules with the layer layout shown tab. 6, tab. 7.
  • Physical constraints not enforced. The failure analysis shows feet intersecting the floor and a bed §5.5, fig. 8. The model does not use scene geometry and does not enforce collision constraints.
  • Numbering was not checked against the PDF. Figure and table numbers are counted from the LaTeX source order, and appendix letters are inferred from the \appendix command. Check them against the compiled paper before quoting.

Lineage

  • Builds on: conditional VAE (Kingma and Welling, 2013), soft-argmax (Sun et al., 2018), hourglass backbone (Newell et al., 2016; CornerNet, Law and Deng, 2019), transformer (Vaswani et al., 2017) §3.1, §3.2, §3.3. The 2D-to-3D lifter and 3D motion predictor used as baselines are Pavllo et al. (2019) and Wei et al. (2019) §5.2.
  • Compared against: the three constructed baselines above; the paper also mentions iMapper, an offline optimisation approach, without a numerical comparison §2.
  • Superseded by: not known from content in this wiki.

Source and license

Adapted from “Long-term Human Motion Prediction with Scene Context” by Zhe Cao, Hang Gao, Karttikeya Mangalam, Qi-Zhi Cai, Minh Vo, Jitendra Malik (arXiv:2007.03672), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.