Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion...

24
Long-term Human Motion Prediction with Scene Context Zhe Cao 1 , Hang Gao 1 , Karttikeya Mangalam 1 , Qi-Zhi Cai 2 , Minh Vo, and Jitendra Malik 1 1 UC Berkeley 2 Nanjing University Abstract. Human movement is goal-directed and influenced by the spatial lay- out of the objects in the scene. To plan future human motion, it is crucial to per- ceive the environment – imagine how hard it is to navigate a new room with lights off. Existing works on predicting human motion do not pay attention to the scene context and thus struggle in long-term prediction. In this work, we propose a novel three-stage framework that exploits scene context to tackle this task. Given a single scene image and 2D pose histories, our method first samples multiple human motion goals, then plans 3D human paths towards each goal, and finally predicts 3D human pose sequences following each path. For stable training and rigorous evaluation, we contribute a diverse synthetic dataset with clean annota- tions. In both synthetic and real datasets, our method shows consistent quantita- tive and qualitative improvements over existing methods. Project page: https: //people.eecs.berkeley.edu/ ˜ zhecao/hmp/index.html Future Past Now 1 2 3 4 5 6 7 8 9 10 11 12 Fig. 1: Long-term 3D human motion prediction. Given a single scene image and 2D pose histories (the 1st row), we aim to predict long-term 3D human motion (projected on the image, shown in the 2-3rd rows) influenced by scene. The human path is visualized as a yellow line. arXiv:2007.03672v3 [cs.CV] 31 Jul 2020

Transcript of Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion...

Page 1: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Predictionwith Scene Context

Zhe Cao1, Hang Gao1, Karttikeya Mangalam1, Qi-Zhi Cai2,Minh Vo, and Jitendra Malik1

1 UC Berkeley2 Nanjing University

Abstract. Human movement is goal-directed and influenced by the spatial lay-out of the objects in the scene. To plan future human motion, it is crucial to per-ceive the environment – imagine how hard it is to navigate a new room with lightsoff. Existing works on predicting human motion do not pay attention to the scenecontext and thus struggle in long-term prediction. In this work, we propose anovel three-stage framework that exploits scene context to tackle this task. Givena single scene image and 2D pose histories, our method first samples multiplehuman motion goals, then plans 3D human paths towards each goal, and finallypredicts 3D human pose sequences following each path. For stable training andrigorous evaluation, we contribute a diverse synthetic dataset with clean annota-tions. In both synthetic and real datasets, our method shows consistent quantita-tive and qualitative improvements over existing methods. Project page: https://people.eecs.berkeley.edu/˜zhecao/hmp/index.html

Future

Past

Now

1 2 3 4

5 6 7 8

9 10 11 12

Fig. 1: Long-term 3D human motion prediction. Given a single scene image and 2D posehistories (the 1st row), we aim to predict long-term 3D human motion (projected on the image,shown in the 2-3rd rows) influenced by scene. The human path is visualized as a yellow line.

arX

iv:2

007.

0367

2v3

[cs

.CV

] 3

1 Ju

l 202

0

Page 2: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

2 Cao et al.

1 Introduction

Figure 1 shows the image of a typical indoor scene. Overlaid on this image is the posetrajectory of a person, depicted here by renderings of her body skeleton over time in-stants, where Frames 1-3 are in the past, Frame 4 is the present, and Frames 5-12 arein the future. In this paper, we study the following problem: Given the scene image andthe persons past pose and location history in 2D, predict her future poses and locations.

Human movement is goal-directed and influenced by the spatial layout of the objectsin the scene. For example, the person may be heading towards the window, and will finda path through the space avoiding collisions with various objects that might be in theway. Or perhaps a person approaches a chair with the intention to sit on it, and willadopt an appropriate path and pose sequence to achieve such a goal efficiently. We seekto understand such goal-directed, spatially contextualized human behavior, which wehave formalized as a pose sequence and location prediction task.

With the advent of deep learning, there has been remarkable progress on the taskof predicting human pose sequences [14,37,63,66]. However, these frameworks do notpay attention to scene context. As a representative example, Zhang et al. [66] detectthe human bounding boxes across multiple time instances and derive their predictivesignal from the evolving appearance of the human figure, but do not make use of thebackground image. Given this limitation, the predictions tend to be short-term (around1 second), and local in space, e.g., walking in the same spot without global movement.If we want to make predictions that encompass bigger spatiotemporal neighborhoods,we need to make predictions conditioned on the scene context.

We make the following philosophical choices: (1) To understand long term behavior,we must reason in terms of goals. In the setting of moving through space, the goalscould be represented by the destination points in the image. We allow multi-modalityby generating multiple hypotheses of human movement “goals”, represented by 2Ddestinations in the image space. (2) Instead of taking a 3D path planning approach asin the classical robotics literature [6,27], we approach the construction of likely humanmotions as a learning problem by constructing a convolutional network to implicitlylearn the scene constraints from lots of human-scene interaction videos. We representthe scene using 2D images.

Specifically, we propose a learning framework that factorizes this task into three se-quential stages as shown in Figure 2. Our model sequentially predicts the motion goals,plans the 3D paths following each goal and finally generates the 3D poses. In Section 5,we demonstrate our model not only outperforms existing methods quantitatively butalso generates more visually plausible 3D future motion.

To train such a learning system, we contribute a large-scale synthetic dataset focus-ing on human-scene interaction. Existing real datasets on 3D human motion have eithercontrived environment [21,61], relatively noisy 3D annotations [48], or limited motionrange due to the depth sensor [17,48]. This motivates us to collect a diverse syntheticdataset with clean 3D annotations. We turn the Grand Theft Auto (GTA) gaming en-gine into an automatic data pipeline with control over different actors, scenes, cameras,lighting conditions, and motions. We collect over one million HD resolution RGB-Dframes with 3D annotations which we discuss in detail in Section 4. Pre-training on ourdataset stabilizes training and improves prediction performance on real dataset [17].

Page 3: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 3

(a) predicted goals (b) planned paths (c) final poses

Fig. 2: Overall pipeline. Given a single scene image and 2D pose histories, our method firstsamples (a) multiple possible future 2D destinations. We then predict the (b) 3D human pathtowards each destination. Finally, our model generates (c) 3D human pose sequences followingpaths, visualized with the ground-truth scene point cloud.

In summary, our key contributions are the following: (1) We formulate a new taskof long-term 3D human motion prediction with scene context in terms of 3D poses and3D locations. (2) We develop a novel three-stage computational framework that utilizesscene context for goal-oriented motion prediction, which outperforms existing methodsboth quantitatively and qualitatively. (3) We contribute a new synthetic dataset withdiverse recordings of human-scene interaction and clean annotations.

2 Related Work

Predicting future human motion under real-world social context and scene constraintsis a long-standing problem [4,16,18,25,47]. Due to its complexity, most of the currentapproaches can be classified into global trajectory prediction and local pose prediction.We connect these two components in a single framework for long-term scene-awarefuture human motion prediction.Global trajectory prediction: Early approaches in trajectory prediction model the ef-fect of social-scene interactions using physical forces [18], continuum dynamics [52],Hidden Markov model [25], or game theory [34]. Many of these approaches achievecompetitive results even on modern pedestrian datasets [30,46]. With the resurgence ofneural nets, data-driven prediction paradigm that captures multi-modal interaction be-tween the scene and its agents becomes more dominant [4,5,8,16,35,47,50,65]. Similarto our method, they model the influence of the scene implicitly. However, unlike ourformulation that considers images from diverse camera viewpoints, they make the keyassumption of the bird-eye view image or known 3D information [4,16,25,47].Local pose prediction: Similar to trajectory prediction, there has been plenty of inter-est in predicting future pose from image sequences both in the form of image gener-ation [55,67], 2D pose [9,57], and 3D pose [11,15,64,66]. These methods exploit thelocal image context around the human to guide the future pose generation but do notpay attention to the background image or the global scene context. Approaches thatfocus on predicting 3D pose from 3D pose history also exist and are heavily used inmotion tracking [12,56]. The goal is to learn 3D pose prior conditioning on the pastmotion using techniques such as Graphical Models [7], linear dynamical systems [45],trajectory basis [2,3], or Gaussian Process latent variable models [51,53,58,59], and

Page 4: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

4 Cao et al.

more recently neural networks such as recurrent nets [14,22,33,37,44], temporal convo-lution nets [19,20,31], or graph convolution net in frequency space [63]. However, sincethese methods completely ignore the image context, the predicted human motion maynot be consistent with the scene, i.e, waling through the wall. In contrast, we proposeto utilize the scene context for future human motion prediction. This is similar in spiritto iMapper [38]. However, this approach relies on computationally expensive offlineoptimization to jointly reason about the scene and the human motion. Currently, thereis no learning-based method that holistically models the scene context and human posefor more than a single time instance [10,29,32,60,62].3D Human Motion Dataset Training high capacity neural models requires large-scaleand diverse training data. Existing human motion capture datasets either contain noenvironment [1], contrive environment [21,61], or in the outdoor setting without 3D an-notation [36]. Human motion datasets with 3D scenes are often much smaller and haverelatively noisy 3D human poses [17,48] due to the limitations of the depth sensor. Tocircumvent such problems, researchers exploit the interface between the game engineand the graphics rendering system to collect large-scale synthetic datasets [13,26]. Oureffort on synthetic training data generation is a consolidation of such work to the newtask of future human motion prediction with scene context.

3 Approach

In this work, we focus on long-term 3D human motion prediction that is goal-directedand is under the influence of scene context. We approach this problem by construct-ing a learning framework that factorizes long-term human motions into modeling theirpotential goal, planing 3D path and pose sequence, as shown in Figure 3. Concretely,given a N -step 2D human pose history X1:N and an 2D image1 of the scene I (the N thvideo frame in our case), we want to predict the next T -step 3D human poses togetherwith their locations, denoted by a sequence YN+1:N+T . We assume a known humanskeleton consists of J keypoints, such that X ∈ RJ×2,Y ∈ RJ×3. We also assume aknown camera model parameterized by its intrinsic matrix K ∈ R3. To denote a specifickeypoint position, we use the superscript of its index in the skeleton, e.g., Xr refers tothe 2D location of the human center (torso) indexed by r ∈ [1, J ].

We motivate and elaborate our modular design for each stage in the rest of thesection. Specifically, GoalNet learns to predict multiple possible human motion goals,represented as 2D destinations in the image space, based on a 2D pose history and thescene image. Next, PathNet learns to plan a 3D path towards each goal – the 3D locationsequence of the human center (torso) – in conjunction with the scene context. Finally,PoseNet predicts 3D human poses at each time step following the predicted 3D path. Inthis way, the resulting 3D human motion has global movement and is more plausibleconsidering the surrounding scene.

Thanks to this modular design, our model can have either deterministic or stochasticpredictions. When deploying GoalNet, our model can sample multiple destinations,

1 We choose to represent the scene by RGB images rather than RGBD scans because they aremore readily available in many practical applications.

Page 5: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 5

H

<latexit sha1_base64="b8XmY9+3IHWcNmtQuXTJ9o7+TkA=">AAACbnicbVHJahtBEG2NszjK5gVyCSFNRMAnaSZY2ORk8MVHGyLL4BGmpqdHaqY3umtii2Y+Itfky/wX/oS0ZB0iOQUFj/eqqKpXhZXCY5red5KtZ89fvNx+1X395u279zu7e5feNI7xETPSuKsCPJdC8xEKlPzKOg6qkHxc1KcLffyTOy+M/oFzyycKplpUggFGahzyoqJn7c1OL+2ny6BPQbYCPbKK85vdzkVeGtYorpFJ8P46Sy1OAjgUTPK2mzeeW2A1TPl1hBoU95Ow3LelXyNT0sq4mBrpkv23I4Dyfq6KWKkAZ35TW5D/1Qq1NjlYsRgQS+kM0X4fDBiC7hs3Hdg65lLt5prfMqMU6DLkTIGr25CXQk/DMGvbdfluTR62G4didTwJQtsGuWaPd1aNpGjowntaCscZynkEwJyIVlE2AwcM44e68QnZpuVPweW3fnbYH14c9k7c6h3b5CP5Qg5IRo7ICTkj52REGKnJL/Kb/Ok8JB+ST8nnx9Kks+rZJ2uRHPwFFNS+eg==</latexit>

: keypoint heatmap I

<latexit sha1_base64="geSgEI3ast/N/Kx4y5xufsPgh+I=">AAACbnicbVHLahtBEBxtXo4Sx3YCuYSQIcLgk7RrLBxyMvji3GyILINXmN7ZWWnYeTHTG0cM+xG5Jl/mv8gneCTrEMlpaCiquunu6sJK4TFN7zrJk6fPnr/Yetl99Xr7zc7u3ttLbxrH+IgZadxVAZ5LofkIBUp+ZR0HVUg+LurThT7+wZ0XRn/HueUTBVMtKsEAIzUOeVHRb+3Nbi/tp8ugj0G2Aj2yivObvc5FXhrWKK6RSfD+OkstTgI4FEzytps3nltgNUz5dYQaFPeTsNy3pfuRKWllXEyNdMn+2xFAeT9XRaxUgDO/qS3I/2qFWpscrFgMiKV0hmi/DgYMQfeNmw5sHXOpdnPNb5lRCnQZcqbA1W3IS6GnYZi17br8c00ethuHYvVlEoS2DXLNHu6sGknR0IX3tBSOM5TzCIA5Ea2ibAYOGMYPdeMTsk3LH4PLw3521B9eHPVO3OodW+QD+UwOSEaOyQk5I+dkRBipyS/ym/zp/E3eJx+TTw+lSWfV846sRXJwDxbZvns=</latexit>

: scene image d

<latexit sha1_base64="7ar/4aahqsdaZfx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JGa/CA/ya/On+R1cpq8fShNOuueV2QjkvO/NSS+ig==</latexit>

: 2D human pose Y

<latexit sha1_base64="7h2EXN8+bwoK5jAsj3SetRd0Hqo=">AAACbnicbVHLahtBEBxtXo4Sx3YCuZiQIcLgk7RrLBxyMuTiow2W5eAVpnd2Vhp2Xsz0xhHDfkSuyZflL/IJHsk6RHIaGoqqbrq7urBSeEzTP53kydNnz19svey+er39Zmd37+2VN41jfMSMNO66AM+l0HyEAiW/to6DKiQfF/XXhT7+zp0XRl/i3PKJgqkWlWCAkRqHvKjot/Z2t5f202XQxyBbgR5ZxfntXuciLw1rFNfIJHh/k6UWJwEcCiZ5280bzy2wGqb8JkINivtJWO7b0oPIlLQyLqZGumT/7QigvJ+rIlYqwJnf1Bbkf7VCrU0OViwGxFI6Q7RfBgOGoPvGTQe2jrlUu7nmd8woBboMOVPg6jbkpdDTMMzadl3+sSYP241Dsfo8CULbBrlmD3dWjaRo6MJ7WgrHGcp5BMCciFZRNgMHDOOHuvEJ2ablj8HVUT877g8vjnunbvWOLbJPPpFDkpETckrOyDkZEUZq8pP8Ir87f5P3yYfk40Np0ln1vCNrkRzeAzcpvos=</latexit>

: 3D human pose

Ldest2D + LKL

<latexit sha1_base64="DxwQbutR60JB2nfFoHMHR3jp354=">AAACinicbVFdaxNBFJ2sXzVWTfXRl9EgCEKyGxra6kvBPgj2oQXTFrohzM7eJEN2Ppi5WxuGefbX+Gp/S/+NkzSISb1w4XDOvVzOPYWphMM0vW0kDx4+evxk62nz2fbzFy9bO6/OnK4thwHXlbYXBXNQCQUDFFjBhbHAZFHBeTH7stDPr8A6odV3nBsYSjZRYiw4w0iNWm+PRz5HuEZfgsPeUQj0I/3LfTsOYdRqp510WfQ+yFagTVZ1MtppnOal5rUEhbxizl1mqcGhZxYFryA089qBYXzGJnAZoWIS3NAvvQT6PjIlHWsbWyFdsv9ueCadm8siTkqGU7epLcj/aoVcu+yNWByIo3SKaD51uxyZ6mg76ZpZ7KXazBX84FpKpkqfc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Bw+hTP5qQ7778Prj8mOZH6ejiaHDqNnbskbfkPflAcnJMTskZOSdjwsgN+Ul+kdven+RdMkgO70qT3qbnDdmKJP0LUwHA1g==</latexit>

H1:J1:N

<latexit sha1_base64="leFsdXw912A7mUYc887pHeZx9Kw=">AAACf3icbVFNbxMxEHWWQkv4SqnEhYtFhOC02UWNSnuqyqXigFqpaSt1Q+T1ehMr/pI9S4mM/wxX+EP8G7xpDiRlpLGe3pvReOaVRnAHWfankzzYevhoe+dx98nTZ89f9HZfXjrdWMpGVAttr0vimOCKjYCDYNfGMiJLwa7K+adWv/rGrONaXcDCsLEkU8VrTglEatJ7VUgCs7L2p2Hi86Mv4Wt8P4dJr5+l2TLwfZCvQB+t4myy2zkvKk0byRRQQZy7yTMDY08scCpY6BaNY4bQOZmymwgVkcyN/XKBgN9GpsK1tjEV4CX7b4cn0rmFLGNl+123qbXkf7VSrk32hrcDYimeAZijwYACUam204GZx1yq3UKxW6qlJKryBZXEzoMvKq6mfpiHsC5/X5OHYWNRqD+OPVemAabo3Z51IzBo3JqBK24ZBbGIgFDL46kwnRFLKETLutGEfPPk98HlhzTfT4fn+/3jk5UdO+g1eoPeoxwdoGN0is7QCFH0A/1Ev9DvpJO8S9IkuytNOquePbQWyeFfTKzDtw==</latexit>

I

<latexit sha1_base64="7e8tjlBbC/AKupSkzPopkwC6uMA=">AAACcXicbVHLahtBEBxtnNhRHraTk8llsAgEAtKusYjJySSX+GZDZJt4hemdnZUGzYuZ3jhi2L/I1f6vfEd+ILOyDpHshoaiqpvuri6sFB7T9E8nebLx9Nnm1vPui5evXm/v7L4596Z2jI+YkcZdFuC5FJqPUKDkl9ZxUIXkF8Xsa6tf/OTOC6O/49zysYKJFpVggJH6kSvAaVGFk+Z6p5f200XQhyBbgh5Zxun1bucsLw2rFdfIJHh/laUWxwEcCiZ5081rzy2wGUz4VYQaFPfjsFi5oe8jU9LKuJga6YL9vyOA8n6uiljZrujXtZZ8VCvUyuRgRTsgltIpov08GDAE3TduMrCzmAu1m2t+w4xSoMuQMwVu1oS8FHoShlnTrMq/VuRhs3YoVkfjILStkWt2f2dVS4qGtvbTUjjOUM4jAOZEtIqyKThgGJ/UjU/I1i1/CM4P+tlhf3h22Dv+snzHFnlH9skHkpFP5Jh8I6dkRBjR5De5JXedv8leQpP9+9Kks+x5S1Yi+fgPnSe/8w==</latexit>

F

<latexit sha1_base64="Hn8+lp+wFk6U5mFOk4MpiJ7bW08=">AAACcnicbVHJahtBEG1NNkdZbCc359KOCOQQpJlgkZCTIRB8tCGyDRphanpaUqPe6K6xozTzGbna3+X/8AekR5lDJLug4PFeFbW8wkrhMU1vO8mjx0+ePtt63n3x8tXr7Z3dN6feVI7xETPSuPMCPJdC8xEKlPzcOg6qkPysWHxv9LNL7rww+icuLZ8omGkxFQwwUuNcAc4ZyPCjvtjppf10FfQ+yFrQI20cX+x2TvLSsEpxjUyC9+MstTgJ4FAwyetuXnlugS1gxscRalDcT8Jq55p+iExJp8bF1EhX7P8dAZT3S1XEymZHv6k15INaodYmByuaAbGUzhHtt8GAIei+cbOBXcRcqd1c8ytmlAJdhpwpcIs65KXQszDM6npd/rUmD+uNQ3H6dRKEthVyzf7dOa0kRUOb/9NSOM5QLiMA5kR8FWVzcMAwutSNJmSbL78PTj/3s4P+8OSgd/i7tWOLvCPvyUeSkS/kkByRYzIijBjyh1yTm85dspfsJ613SafteUvWIvn0F6MYwJo=</latexit>

Φ

<latexit sha1_base64="LnctwLQiiUmSADuapH/OgSJ+9oM=">AAACdHicbVHJahtBEG1NNkfZ7OSYHJoIQ06jGWORkJMhlxxlsGyDZzA1PS2pUW/prrGjNPMdudqflR/J2T2yDpGcgoLHe1XU8iorhccs+9NLHj1+8vTZzvP+i5evXr/Z3Xt76k3jGJ8wI407r8BzKTSfoEDJz63joCrJz6rFt04/u+LOC6NPcGl5qWCmxVQwwEiVhQKcCwzFeC7ay91BlmaroA9BvgYDso7x5V7vuKgNaxTXyCR4f5FnFssADgWTvO0XjecW2AJm/CJCDYr7Mqy2bul+ZGo6NS6mRrpi/+0IoLxfqipWdlv6ba0j/6tVamNysKIbEEvpHNF+HQ4Zgk6Nmw3tIuZK7ReaXzOjFOg6FEyBW7ShqIWehVHetpvyzw151G4ditMvZRDaNsg1u79z2kiKhnYO0Fo4zlAuIwDmRHwVZXNwwDD61I8m5NsvfwhOD9L8MB0dHw6Ofq3t2CHvyUfyieTkMzki38mYTAgjP8hvckNue3+TD8kg2b8vTXrrnndkI5L0DsNowZI=</latexit>

Ψ

<latexit sha1_base64="7ExUaTXpKq9EvO9l7lgSGmEa/Kk=">AAACdHicbVHJahtBEG1NNkfZ7OSYHJoIQ06jGWORkJMhlxxlsGyDZzA1PS2pUW/prrGjNPMdudqflR/J2T2yDpGcgoLHe1XU8iorhccs+9NLHj1+8vTZzvP+i5evXr/Z3Xt76k3jGJ8wI407r8BzKTSfoEDJz63joCrJz6rFt04/u+LOC6NPcGl5qWCmxVQwwEiVhQKcCwzF2Iv2cneQpdkq6EOQr8GArGN8udc7LmrDGsU1MgneX+SZxTKAQ8Ekb/tF47kFtoAZv4hQg+K+DKutW7ofmZpOjYupka7YfzsCKO+XqoqV3ZZ+W+vI/2qV2pgcrOgGxFI6R7Rfh0OGoFPjZkO7iLlS+4Xm18woBboOBVPgFm0oaqFnYZS37ab8c0MetVuH4vRLGYS2DXLN7u+cNpKioZ0DtBaOM5TLCIA5EV9F2RwcMIw+9aMJ+fbLH4LTgzQ/TEfHh4OjX2s7dsh78pF8Ijn5TI7IdzImE8LID/Kb3JDb3t/kQzJI9u9Lk9665x3ZiCS9A9mqwZ0=</latexit>

Fig. 3: Network architecture. Our pipeline contains three stages: GoalNet predicts 2D motiondestinations of the human based on the reference image and 2D pose heatmaps (Section 3.1);PathNet plans the 3D global path of the human with the input of 2D heatmaps, 2D destination,and the image (Section 3.2); PoseNet predicts 3D global human motion, i.e., the 3D human posesequences, following the predicted path (Section 3.3).

which results in stochastic prediction of future human motion. If not deploying GoalNet,our model generates single-mode prediction instead. We discuss them in more detail inthe rest of the section and evaluate both predictions in our experiments.

3.1 GoalNet: Predicting 2D Path Destination

To understand long-term human motion, we must reason in terms of goals. Insteadof employing autoregressive models to generate poses step-by-step, we seek to firstdirectly predict the destination of the motion in the image space. We allow our modelto express uncertainty of human motion by learning a distribution of possible motiondestinations, instead of a single hypothesis. This gives rise to our GoalNet denoted as Ffor sampling plausible 2D path destination.

GoalNet learns a distribution of possible 2D destinations {XrN+T } at the end of

the time horizon conditioned on the 2D pose history X1:N and the scene image I. Weparametrize each human keypoint Xj by a heatmap channel Hj which preserves spatialcorrelation with the image context.

We employ GoalNet as a conditional variational auto-encoder [24]. The model en-codes the inputs into a latent z-space, from which we sample a random z vector fordecoding and predicting the target destination positions. Formally, we have

z ∼ Q(z|H1:J1:N , I) ≡ N (µ,σ), where µ,σ = Fenc(H

1:J1:N , I). (1)

In this way, we estimate a variational posterior Q by assuming a Gaussian informationbottleneck using the decoder. Next, given a sampled z latent vector, we learn to predictour target destination heatmap with our GoalNet decoder,

HrN+T = Fdec(z, I), (2)

where we additionally condition the decoding process on the scene image. We use soft-argmax [49] to extract the 2D human motion destination Xr

N+T from this heatmap

Page 6: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

6 Cao et al.

HrN+T . We choose to use soft-argmax operation because it is differentiable and can

produce sub-pixel locations. By constructing GoalNet, we have

HrN+T = F(I,H1:J

1:N ). (3)

We train GoalNet by minimizing two objectives: (1) the destination prediction errorand (2) the KL-divergence between the estimated variational posterior Q and a normaldistribution N (0,1):

Ldest2D = ‖XrN+T − Xr

N+T ‖1,LKL = KL

[Q(z|H1:J

1:N , I)||N (0, 1)

],

(4)

where we weigh equally between them. During testing, our GoalNet is able to sam-ple a set of latent variables {z} from N (0,1) and map them to multiple plausible 2Ddestinations {Hr

N+T }.

3.2 PathNet: Planning 3D Path towards Destination

With predicted destinations in the image space, our method further predicts 3D paths(human center locations per timestep) towards each destination. The destination deter-mines where to move while the scene context determines how to move. We design anetwork that exploits both the 2D destination and the image for future 3D path plan-ning. A key design choice we make here is that, instead of directly regressing 3D globalcoordinate values of human paths, we represent the 3D path as a combination of 2Dpath heatmaps and the depth values of the human center over time. This 3D path repre-sentation facilitates training as validated in our experiments (Section 5.3).

As shown in Figure 3, our PathNet Φ takes the scene image I, the 2D pose historyH1:J

1:N , and the 2D destination assignment HrN+T as inputs, and predicts global 3D

path represented as (HrN+1:N+T , d

r1:N+T ), where drt ∈ R denotes the depth of human

center at time t:Hr

N+1:N+T , dr1:N+T = Φ(I,X1:J

1:N ,XrN+T ). (5)

We use soft-argmax to extract the resulting 2D path XrN+1:N+T from predicted heatmaps

HrN+1:N+T . Finally, we obtain the 3D path Yr

1:N+T by back-projecting the 2D pathinto the 3D camera coordinate frame using the human center depth dr

1:N+T and cameraintrinsics K.

We use Hourglass54 [28,40] as the backbone of PathNet to encode both the inputimage and 2D pose heatmaps. The network has two branches where the first branchpredicts 2D path heatmaps and the second branch predicts the depth of the human torso.We describe the network architecture with more details in Appendix F.

We train our PathNet using two supervisions. We supervise our path predictionswith ground-truth 2D heatmaps:

Lpath2D = ‖XrN+1:N+T − Xr

N+1:N+T ‖1. (6)

We also supervise path predictions with 3D path coordinates, while encouraging smoothpredictions by penalizing large positional changes between consecutive frames:

Lpath3D = ‖Yr1:N+T − Yr

1:N+T ‖1 + ‖Yr1:N+T−1 − Yr

2:N+T ‖1. (7)

Page 7: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 7

These losses are summed together with equal weight as the final training loss. Duringtraining, we use the ground-truth destination to train our PathNet, while during testing,we can use predictions from the GoalNet.

The GoalNet and PathNet we describe so far enable sampling multiple 3D pathsduring inference. We thus refer to it as the stochastic mode of the model. The modulardesign of GoalNet and PathNet is flexible. By removing GoalNet and input Xr

N+T fromEquation 5, we can directly use PathNet to produce deterministic 3D path predictions.We study these two modes, deterministic and stochastic mode, in our experiments.

3.3 PoseNet: Generating 3D Pose following Path

With the predicted 3D path Yr1:N+T and 2D pose history X1:N , we use the transformer

network [54] as our PoseNet Ψ to predict 3D poses following such path. Instead of pre-dicting the 3D poses from scratch, we first lift 2D pose history into 3D to obtain a noisy3D human pose sequence Y1:N+T as input, and further use Ψ to refine them to obtainthe final prediction. Our initial estimation consists of two steps. We first obtain a noisy3D poses Y1:N by back-projecting 2D pose history X1:N into 3D using the humantorso depth dr

1:N and camera intrinsics K. We next replicate the present 3D pose YN

to each of the predicted future 3D path location for an initial estimation of future 3Dposes YN+1:N+T . We then concatenate both estimations together to form Y1:N+T asinput to our PoseNet:

YN+1:N+T = Ψ(Y1:N+T ). (8)

The training objective for PoseNet is to minimize the distance between the 3D poseprediction and the ground-truth defined as:

Lpose3D = ‖YN+1:N+T − YN+1:N+T ‖1. (9)

During training, ground-truth 3D path Yr1:N+T is used for estimating coarse 3D pose

input. During testing, we use the predicted 3D path Yr1:N+T from PathNet.

4 GTA Indoor Motion Dataset

We introduce the GTA Indoor Motion dataset (GTA-IM)2 that emphasizes human-sceneinteractions. Our motivation for this dataset is that existing real datasets on human-sceneinteraction [17,48] have relatively noisy 3D human pose annotations and limited long-range human motion limited by depth sensors. On the other hand, existing synthetichuman datasets [13,26] focus on the task of human pose estimation or parts segmen-tation and sample data in wide-open outdoor scenes with limited interactable objects.More detailed comparison to these datasets is in Appendix A.

To overcome the above issues, we spend extensive efforts in collecting a syntheticdataset by developing an interface with the game engine for controlling characters, cam-eras, and action tasks in a fully automatic manner. For each character, we randomizethe goal destination inside the 3D scene, the specific task to do, the walking style, and

2 Dataset available in https://github.com/ZheC/GTA-IM-Dataset

Page 8: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

8 Cao et al.

Fig. 4: Sample RGBD images from GTA-IM dataset. Our dataset contains realistic RGB im-ages (visualized with the 2D pose), accurate depth maps, and clean 3D human pose annotations.

the movement speed. We control the lighting condition by changing different weatherconditions and daytime. We also diversify the camera location and viewing angle over asphere around the actor such that it points towards the actor. We use in-game ray tracingAPI and synchronized human segmentation map to track actors. The collected actionsinclude climbing the stairs, lying down, sitting, opening the door, and etc. – a set ofbasic activities within indoor scenes. For example, the character has 22 walking stylesincluding 10 female and 12 male walking styles. All of these factors enable us to collecta diverse and realistic dataset with accurate annotations for our challenging task.

In total, we collect one million RGBD frames of 1920 × 1080 resolution with theground-truth 3D human pose (98 joints), human segmentation, and camera pose. Someexamples are shown in Figure 4. The dataset contains 50 human characters acting inside10 different large indoor scenes. Each scene has several floors, including living rooms,bedrooms, kitchens, balconies, and etc., enabling diverse interaction activities.

5 Evaluation

We perform extensive quantitative and qualitative evaluations of our future 3D humanpath and motion predictions. The rest of this section is organized as follows: We firstdescribe the datasets we use in Section 5.1. We then elaborate on our quantitative eval-uation metrics and strong baselines in Section 5.2. Further, we show our quantitativeand qualitative improvement over previous methods in Section 5.3. Finally, we evalu-ate our long-term predictions and show qualitative results of destination samples andfinal 3D pose results in Section 5.4. We discussed some failure cases in Section 5.5.Implementation details are described in Appendix B.

5.1 Datasets

GTA-IM: We train and test our model on our collected dataset as described in Section 4.We split 8 scenes for training and 2 scenes for evaluation. We choose 21 out of 98 humanjoints provided from the dataset. We convert both the 3D path and the 3D pose into thecamera coordinate frame for both training and evaluation.PROX: Proximal Relationships with Object eXclusion (PROX) is a new dataset cap-tured using the Kinect-One sensor by Hassan et al. [17]. It comprises of 12 different 3Dscenes and RGB sequences of 20 subjects moving in and interacting with the scenes. Wesplit the dataset with 52 training sequences and 8 sequences for testing. Also, we extract18 joints from the SMPL-X model [42] from the provided human pose parameters.

Page 9: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 9

5.2 Evaluation Metric and Baselines

Metrics: We use the Mean Per Joint Position Error (MPJPE) [21] as a metric for quanti-tatively evaluating both the 3D path and 3D pose prediction. We report the performanceat different time steps (seconds) in millimeters (mm).Baselines: To the best of our knowledge, there exists no prior work that predicts 3Dhuman pose with global movement using 2D pose sequence as input. Thus, we pro-pose three strong baselines for comparison with our method. For the first baseline, wecombine the recent 2D-to-3D human pose estimation method [43] and 3D human poseprediction method [63]. For the second baseline, we use Transformer [54], the state-of-the-art sequence-to-sequence model, to perform 3D prediction directly from 2D inputstreating the entire problem as a single-stage sequence to sequence task. For the thirdbaseline, we compare with is constructed by first predicting the future 2D human poseusing [54] from inputs and then lifting the predicted pose into 3D using [43]. Note thatnone of these baselines consider scene context or deal with uncertainty in their futurepredictions. We train all models on both datasets for two-second-long prediction basedon 1-second-long history and report their best performance for comparison.

5.3 Comparison with Baselines

In this section, we perform quantitative evaluations of our method in the two datasets.We also show some qualitative comparisons in Figure 5. We evaluate the two modes ofour model: the stochastic mode that can generate multiple future predictions by sam-pling different 2D destinations from the GoalNet; and the deterministic mode that cangenerate one identical prediction without deploying GoalNet.

3D path error (mm) 3D pose error (mm)

Time step (second) 0.5 1 1.5 2 0.5 1 1.5 2 All ↓

TR [54] 277 352 457 603 291 374 489 641 406TR [54] + VP [43] 157 240 358 494 174 267 388 526 211VP [43] + LTD [63] 124 194 276 367 121 180 249 330 193

Ours (deterministic) 104 163 219 297 91 158 237 328 173

Ours (samples=4) 114 162 227 310 94 161 236 323 173Ours (samples=10) 110 154 213 289 90 154 224 306 165

Ours w/ xyz. output 122 179 252 336 101 177 262 359 191Ours w/o image 128 177 242 320 99 179 271 367 196Ours w/ masked image 120 168 235 314 96 170 265 358 189Ours w/ RGBD input 100 138 193 262 93 160 235 322 172Ours w/ GT destination 104 125 146 170 85 133 178 234 137

Table 1: Evaluation results in GTA-IM dataset. We compare other baselines in terms of 3Dpath and pose error. The last column (All) is the mean average error of the entire prediction overall time steps. VP denotes Pavllo et al. [43], TR denotes transformer [54] and LTD denotes Weiet al. [63]. GT stands for ground-truth, xyz. stands for directly regressing 3D coordinates of thepath. We report the error of our stochastic predictions with varying number of samples.

Page 10: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

10 Cao et al.

GTA-IM: The quantitative evaluation of 3D path and 3D pose prediction in GTA-IMdataset is shown in Table 1. Our deterministic model with image input can outperformthe other methods by a margin, i.e., with an average error of 173 mm vs. 193 mm.When using sampling during inference, the method can generate multiple hypothesesof the future 3D pose sequence. We evaluate different numbers of samples and select thepredictions among all samples that best matches ground truth to report the error. We findusing four samples during inference can match the performance of our deterministicmodel (173 mm error), while using ten samples, we further cut down the error to 165mm. These results validate that our stochastic model can help deal with the uncertaintyof future human motion and outperform the deterministic baselines with few samples.

As an ablation, we directly regress 3D coordinates (“Ours w/ xyz.” in the Table 1)and observe an overall error that is 18 mm higher than the error of our deterministicmodel (191 mm vs. 173 mm). This validates that representing the 3D path as the depthand 2D heatmap of the human center is better due to its strong correlation to the imageappearance. We also ablates different types of input to our model. Without image input,the average error is 23 mm higher. With only masked images input, i.e., replacing pixelsoutside human crop by ImageNet mean pixel values, the error is 16 mm highe. This val-idates that using full image to encode scene context is more helpful than only observingcropped human image, especially for long-term prediction. Using both color and depthimage as input (“Ours w/ RGBD input”), the average error is 172 mm which is similarto the model with RGB input. This indicates that our model implicitly learns to reasonabout depth information from 2D input. If we use ground-truth 2D destinations insteadof predicted ones, and the overall error decreases down to 137 mm. It implies that theuncertainty of the future destination is the major source of difficulty in this problem.

3D path error (mm) 3D pose error (mm)

Time step (second) 0.5 1 1.5 2 0.5 1 1.5 2 All ↓

TR [54] 487 583 682 783 512 603 698 801 615TR [54] + VP [43] 262 358 461 548 297 398 502 590 326VP [43] + LTD [63] 194 263 332 394 216 274 335 394 282

Ours w/o GTA-IM pretrain 192 258 336 419 192 273 352 426 280Ours (deterministic) 189 245 317 389 190 264 335 406 270

Ours (samples=3) 192 245 311 398 187 258 328 397 264Ours (samples=6) 185 229 285 368 184 249 312 377 254Ours (samples=10) 181 222 273 354 182 244 304 367 249

Ours w/ gt destination 193 223 234 237 195 235 276 321 237

Table 2: Evaluation results in PROX dataset. We compare other baselines in terms of 3Dfuture path and pose prediction. VP denotes Pavllo et al. [43], TR denotes transformer [54] andLTD denotes Wei et al. [63]. GT stands for ground-truth. We rank all methods using mean averageerror of the entire prediction (last column).

PROX: The evaluation results in Table 2 demonstrate that our method outperforms theprevious state of the art in terms of mean MPJPE of all time steps, 270 mm vs. 282 mm.

Page 11: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 11

Overall, we share the same conclusion as the comparisons in GTA-IM dataset. Whenusing sampling during inference, three samples during inference can beat the perfor-mance of our deterministic model (264 mm vs. 270 mm), while using ten samples, theerror decreases to 249 mm. Note that these improvements are more prominent than whatwe observe on GTA-IM benchmark. This is because the uncertainty of future motion inthe real dataset is larger. Therefore, stochastic predictions have more advantage.

Moreover, we find that pre-training in GTA-IM dataset can achieve better perfor-mance (270 mm vs. 280 mm). Our method exploits the image context and tends tooverfit in PROX dataset because it is less diverse in terms of camera poses and back-ground appearance (both are constant per video sequence). Pre-training in our syntheticdataset with diverse appearance and clean annotations can help prevent overfitting andboost the final performance.

(a) input (b) baseline results (c) our results

1

2

3

Top-down View Top-down View

Side View Side View

Past

Now

Future

Side View1-3 Side View

Side View1-3 Side View

Fig. 5: Qualitative comparison. We visualize the input (a), the results of VP[43] and LTD [63](b) and our results (c) in the ground-truth 3D mesh. The color of pose is changed over timestepsaccording to the color bar. The first example includes both top-down and side view. From thevisualization, we can observe some collisions between the baseline results and the 3D scene,while our predicted motion are more plausible by taking the scene context into consideration.

Qualitative comparison: In Figure 5, we show qualitative comparison with the base-line of VP [43] and LTD [63]. This baseline is quantitatively competitive as shown in

Page 12: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

12 Cao et al.

(a) predicted 3D paths (b) predicted 3D poses

Fig. 6: Comparison between our stochastic predictions and deterministic predictions. Weshow error curves of predicted (a) 3D paths and (b) 3D poses with varying numbers of samplesover varying timesteps on GTA-IM dataset. In all plots, we find that our stochastic model canachieve better results with a small number of samples, especially in the long-term prediction(within 2-3 second time span).

Fig. 7: Destination sampling results. In each image, the blue dots denote the path history, thegreen dots are ground-truth future destination, red dots are sample destinations from the GoalNetwhich we draw 30 times from the standard Gaussian. Our method can generate diverse plausiblemotion destination samples which leads to different activities, i.e., sitting still or standing up.

Table 1 and 2. However, without considering scene context, their predicted results maynot be feasible inside the 3D scene, e.g., the person cannot go through a table or sofa.In contrast, our model implicitly learns the scene constraints from the image and cangenerate more plausible 3D human motion in practice.

5.4 Evaluation and Visualization on Longer-term Predictions

To demonstrate our method can predict future human motion for more than 2 seconds,we train another model to produce the 3-second-long future prediction. In Figure 6, weshow the self-comparisons between our stochastic predictions and deterministic predic-tions. Our stochastic models can beat their deterministic counterpart using 5 samples.With increasing number of samples, the testing error decreases accordingly. The errorgap between deterministic results and stochastic results becomes larger at the later stageof the prediction, i.e., more than 100 mm difference at 3 second time step. This indicatesthe advantage of the stochastic model in long-term future motion prediction.

We show qualitative results of our stochastic predictions on movement destinationsin Figure 7, and long-term future motion in Figure 9. Our method can generate diversehuman movement destination, and realistic 3D future human motion by considering theenvironment, e.g., turning left/right, walking straight, taking a U-turn, climbing stairs,standing up from sitting, and laying back on the sofa.

Page 13: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 13

Fig. 8: Visualization of failure cases. In each red circle area, we observe the intersection be-tween the human feet and the 3D mesh, e.g., the bed.

5.5 Discussion of failure cases

Our model implicitly learns scene constraints in a data-driven manner from large amountsof training data, and can produce consistent 3D human paths without serious collisioncomparing to previous methods which do not take scene context into consideration asshown in Figure 5. However, without assuming we have access to the pre-reconstructed3D mesh and using expensive offline optimization as [17], the resulting 3D poses maynot strictly meet all physical constraints of the 3D scene geometry. Some failure casesare shown in Figure 8. In the red circled area, we observe small intersections betweenthe human feet and the 3D scene mesh, e.g., the ground floor or the bed. This issuecould be relieved by integrating multi-view/temporal images as input to the learningsystem to recover the 3D scene better. The resulting 3D scene could be further used toenforce explicit scene geometry constraints for refining the 3D poses. We leave this tothe future work.

6 Conclusion

In this work, we study the challenging task of long-term 3D human motion predictionwith only 2D input. This research problem is very relevant to many real-world applica-tions where understanding and predicting feasible human motion considering the sur-rounding space is critical, e.g., a home service robot collaborating with the moving peo-ple, AR glass providing navigation guide to visually impaired people, and autonomousvehicle planning the action considering the safety of pedestrians. We present an initialattempt in attacking the problem by contributing a new dataset with diverse human-scene interactions and clean 3D annotations. We also propose the first method that canpredict long-term stochastic 3D future human motion from 2D inputs, while taking thescene context into consideration. There are still many aspects in this problem that canbe explored in the future, such as how to effectively evaluate the naturalness and feasi-bility of the stochastic human motion predictions, and how to incorporate informationof dynamic objects and multiple moving people inside the scene.

Acknowledgements We thank Carsten Stoll and Christoph Lassner for their insightfulfeedback. We are also very grateful to the feedback from the BAIR community membersincluding but not limited to Angjoo Kanazawa, Xiaolong Wang, Ashish Kumar, AllanJabri, Ilija Radosavovic, Sasha Sax, Lerrel Pinto, and Deepak Pathak.

Page 14: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

14 Cao et al.

Fig. 9: Qualitative results on long-term stochastic prediction. In each example, we first showthe input image with 2D pose histories and then our stochastic predictions. In the first example(1st and 2nd row), we show five different future human movement predictions by sampling dif-ferent human “goals”. Depending on his intention, the person can choose to turn left to climbupstairs; he may also go straight through the hallway or turn right to fetch some items off the ta-ble. For the following examples at each row, we only show two stochastic predictions per exampledue to space limitation. Our method can generate diverse human motion, e.g., turning left/right,walking straight, taking a u-turn, standing up from sitting, and laying back on the sofa.

Page 15: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 15

References

1. CMUMotionCaptureDatabase.http://mocap.cs.cmu.edu 42. Akhter, I., Sheikh, Y., Khan, S., Kanade, T.: Nonrigid structure from motion in trajectory

space. In: NIPS (2009) 33. Akhter, I., Simon, T., Khan, S., Matthews, I., Sheikh, Y.: Bilinear spatiotemporal basis mod-

els. SIGGRAPH (2012) 34. Alahi, A., Goel, K., Ramanathan, V., Robicquet, A., Fei-Fei, L., Savarese, S.: Social lstm:

Human trajectory prediction in crowded spaces. In: CVPR (2016) 35. Alahi, A., Ramanathan, V., Fei-Fei, L.: Socially-aware large-scale crowd forecasting. In:

CVPR (2014) 36. Alexopoulos, C., Griffin, P.M.: Path planning for a mobile robot. IEEE Transactions on sys-

tems, man, and cybernetics (1992) 27. Brand, M., Hertzmann, A.: Style machines. SIGGRAPH (2000) 38. Chai, Y., Sapp, B., Bansal, M., Anguelov, D.: Multipath: Multiple probabilistic anchor tra-

jectory hypotheses for behavior prediction. In: CoRL (2019) 39. Chao, Y.W., Yang, J., Price, B., Cohen, S., Deng, J.: Forecasting human dynamics from static

images. In: CVPR (2017) 310. Chen, Y., Huang, S., Yuan, T., Qi, S., Zhu, Y., Zhu, S.C.: Holistic++ scene understanding:

Single-view 3d holistic scene parsing and human pose estimation with human-object inter-action and physical commonsense. ICCV (2019) 4

11. Chiu, H.k., Adeli, E., Wang, B., Huang, D.A., Niebles, J.C.: Action-agnostic human poseforecasting. In: WACV (2019) 3

12. Elhayek, A., Stoll, C., Hasler, N., Kim, K.I., Seidel, H.P., Theobalt, C.: Spatio-temporalmotion tracking with unsynchronized cameras. In: CVPR (2012) 3

13. Fabbri, M., Lanzi, F., Calderara, S., Palazzi, A., Vezzani, R., Cucchiara, R.: Learning todetect and track visible and occluded body joints in a virtual world. In: ECCV (2018) 4, 7

14. Fragkiadaki, K., Levine, S., Felsen, P., Malik, J.: Recurrent network models for human dy-namics. In: ICCV (2015) 2, 4

15. Ghosh, P., Song, J., Aksan, E., Hilliges, O.: Learning human motion models for long-termpredictions. In: 3DV (2017) 3

16. Gupta, A., Johnson, J., Fei-Fei, L., Savarese, S., Alahi, A.: Social gan: Socially acceptabletrajectories with generative adversarial networks. In: CVPR (2018) 3

17. Hassan, M., Choutas, V., Tzionas, D., Black, M.J.: Resolving 3d human pose ambiguitieswith 3d scene constraints. In: ICCV (2019) 2, 4, 7, 8, 13, 18

18. Helbing, D., Molnar, P.: Social force model for pedestrian dynamics. Physical review E(1995) 3

19. Hernandez, A., Gall, J., Moreno-Noguer, F.: Human motion prediction via spatio-temporalinpainting. In: CVPR (2019) 4

20. Holden, D., Saito, J., Komura, T., Joyce, T.: Learning motion manifolds with convolutionalautoencoders. In: SIGGRAPH Asian Technical Briefs (2015) 4

21. Ionescu, C., Papava, D., Olaru, V., Sminchisescu, C.: Human3.6m: Large scale datasets andpredictive methods for 3d human sensing in natural environments. TPAMI (2013) 2, 4, 9,18, 19

22. Jain, A., Zamir, A.R., Savarese, S., Saxena, A.: Structural-rnn: Deep learning on spatio-temporal graphs. In: CVPR (2016) 4

23. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. arXiv preprintarXiv:1412.6980 (2014) 18

24. Kingma, D.P., Welling, M.: Auto-encoding variational bayes. ICLR (2014) 5

Page 16: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

16 Cao et al.

25. Kitani, K.M., Ziebart, B.D., Bagnell, J.A., Hebert, M.: Activity forecasting. In: ECCV (2012)3

26. Krahenbuhl, P.: Free supervision from video games. In: CVPR (2018) 4, 727. LaValle, S.M.: Planning algorithms. Cambridge university press (2006) 228. Law, H., Teng, Y., Russakovsky, O., Deng, J.: Cornernet-lite: Efficient keypoint based object

detection. arXiv preprint arXiv:1904.08900 (2019) 6, 2429. Lee, D., Liu, S., Gu, J., Liu, M.Y., Yang, M.H., Kautz, J.: Context-aware synthesis and place-

ment of object instances. In: NIPS (2018) 430. Lerner, A., Chrysanthou, Y., Lischinski, D.: Crowds by example. In: CGF (2007) 331. Li, C., Zhang, Z., Sun Lee, W., Hee Lee, G.: Convolutional sequence to sequence model for

human dynamics. In: CVPR (2018) 432. Li, X., Liu, S., Kim, K., Wang, X., Yang, M.H., Kautz, J.: Putting humans in a scene: Learn-

ing affordance in 3d indoor environments. In: CVPR (2019) 433. Li, Z., Zhou, Y., Xiao, S., He, C., Huang, Z., Li, H.: Auto-conditioned recurrent networks for

extended complex human motion synthesis. In: ICLR (2018) 434. Ma, W.C., Huang, D.A., Lee, N., Kitani, K.M.: Forecasting interactive dynamics of pedes-

trians with fictitious play. In: CVPR (2017) 335. Makansi, O., Ilg, E., Cicek, O., Brox, T.: Overcoming limitations of mixture density net-

works: A sampling and fitting framework for multimodal future prediction. In: CVPR (2019)3

36. von Marcard, T., Henschel, R., Black, M., Rosenhahn, B., Pons-Moll, G.: Recovering accu-rate 3d human pose in the wild using imus and a moving camera. In: ECCV (2018) 4

37. Martinez, J., Black, M.J., Romero, J.: On human motion prediction using recurrent neuralnetworks. In: CVPR (2017) 2, 4

38. Monszpart, A., Guerrero, P., Ceylan, D., Yumer, E., Mitra, N.J.: imapper: Interaction-guidedjoint scene and human motion mapping from monocular videos. SIGGRAPH (2019) 4

39. Moon, G., Chang, J.Y., Lee, K.M.: Camera distance-aware top-down approach for 3d multi-person pose estimation from a single rgb image. In: ICCV (2019) 23

40. Newell, A., Yang, K., Deng, J.: Stacked hourglass networks for human pose estimation. In:ECCV (2016) 6

41. Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., DeVito, Z., Lin, Z., Desmaison, A.,Antiga, L., Lerer, A.: Automatic differentiation in pytorch. In: NIPS workshop (2017) 18

42. Pavlakos, G., Choutas, V., Ghorbani, N., Bolkart, T., Osman, A.A.A., Tzionas, D., Black,M.J.: Expressive body capture: 3d hands, face, and body from a single image. In: CVPR(2019) 8

43. Pavllo, D., Feichtenhofer, C., Grangier, D., Auli, M.: 3d human pose estimation in video withtemporal convolutions and semi-supervised training. In: CVPR (2019) 9, 10, 11, 21

44. Pavllo, D., Grangier, D., Auli, M.: Quaternet: A quaternion-based recurrent model for humanmotion. In: BMVC (2018) 4

45. Pavlovic, V., Rehg, J.M., MacCormick, J.: Learning switching linear models of human mo-tion. In: NIPS (2001) 3

46. Pellegrini, S., Ess, A., Schindler, K., Van Gool, L.: You’ll never walk alone: Modeling socialbehavior for multi-target tracking. In: CVPR (2009) 3

47. Sadeghian, A., Kosaraju, V., Sadeghian, A., Hirose, N., Rezatofighi, H., Savarese, S.: Sophie:An attentive gan for predicting paths compliant to social and physical constraints. In: CVPR(2019) 3

48. Savva, M., Chang, A.X., Hanrahan, P., Fisher, M., Nießner, M.: PiGraphs: Learning Interac-tion Snapshots from Observations. TOG (2016) 2, 4, 7, 18

49. Sun, X., Xiao, B., Wei, F., Liang, S., Wei, Y.: Integral human pose regression. In: ECCV(2018) 5

Page 17: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 17

50. Tai, L., Zhang, J., Liu, M., Burgard, W.: Socially compliant navigation through raw depthinputs with generative adversarial imitation learning. In: ICRA (2018) 3

51. Tay, M.K.C., Laugier, C.: Modelling smooth paths using gaussian processes. In: Field andService Robotics. Springer (2008) 3

52. Treuille, A., Cooper, S., Popovic, Z.: Continuum crowds. In: TOG (2006) 353. Urtasun, R., Fleet, D.J., Geiger, A., Popovic, J., Darrell, T.J., Lawrence, N.D.: Topologically-

constrained latent variable models. In: ICML (2008) 354. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł.,

Polosukhin, I.: Attention is all you need. In: NIPS (2017) 7, 9, 10, 2055. Villegas, R., Yang, J., Zou, Y., Sohn, S., Lin, X., Lee, H.: Learning to generate long-term

future via hierarchical prediction. In: ICML (2017) 356. Vo, M., Narasimhan, S.G., Sheikh, Y.: Spatiotemporal bundle adjustment for dynamic 3d

reconstruction. In: CVPR (2016) 357. Walker, J., Marino, K., Gupta, A., Hebert, M.: The pose knows: Video forecasting by gener-

ating pose futures. In: CVPR (2017) 358. Wang, J.M., Fleet, D.J., Hertzmann, A.: Gaussian process dynamical models for human mo-

tion. TPAMI (2007) 359. Wang, J.M., Fleet, D.J., Hertzmann, A.: Multifactor gaussian process models for style-

content separation. In: ICML (2007) 360. Wang, X., Girdhar, R., Gupta, A.: Binge watching: Scaling affordance learning from sitcoms.

In: CVPR (2017) 461. Wang, Z., Chen, L., Rathore, S., Shin, D., Fowlkes, C.: Geometric pose affordance: 3d human

pose with scene constraints. arXiv preprint arXiv:1905.07718 (2019) 2, 462. Wang, Z., Shin, D., Fowlkes, C.C.: Predicting camera viewpoint improves cross-dataset gen-

eralization for 3d human pose estimation. arXiv preprint arXiv:2004.03143 (2020) 463. Wei, M., Miaomiao, L., Mathieu, S., Hongdong, L.: Learning trajectory dependencies for

human motion prediction. In: ICCV (2019) 2, 4, 9, 10, 11, 2164. Weng, C.Y., Curless, B., Kemelmacher-Shlizerman, I.: Photo wake-up: 3d character anima-

tion from a single photo. In: CVPR (2019) 365. Yu, T., Finn, C., Xie, A., Dasari, S., Zhang, T., Abbeel, P., Levine, S.: One-shot imitation

from observing humans via domain-adaptive meta-learning. IROS (2018) 366. Zhang, J.Y., Felsen, P., Kanazawa, A., Malik, J.: Predicting 3d human dynamics from video.

In: ICCV (2019) 2, 367. Zhao, L., Peng, X., Tian, Y., Kapadia, M., Metaxas, D.: Learning to forecast and refine

residual motion for image-to-video generation. In: ECCV (2018) 3

Page 18: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

18 Cao et al.

APPENDIXIn the supplement, we first compare relevant datasets in Section A. We also cover theimplementation details in Section B. Further, we evaluate GoalNet in Section C andlong-term predictions on PROX in Section D. We also show qualitative comparisonresults in Section E. Finally, we describe the network architecture in details in Section F.We include more visual results on 3D path and 3D pose prediction in our video whichcan be found at https://people.eecs.berkeley.edu/˜zhecao/hmp/.

A Dataset Comparison

Dataset #Clips #Frames #View per clip #Characters #Scenes Pose jittering Depth Range 3D scene

H3.6M [21] 80 3.6 M 4 11 (6M 5F) 1 0 – 6PiGraph [48] 63 0.1 M 1 5 (4M 1F) 30 X 0 – 4 XPROX [17] 60 0.1 M 1 20 (16M 4F) 12 X 0 – 4 X

Ours 119 1 M 14-67 50 (25M 25F) 49 0 – 200 X

Table 3: Overview of the publicly available datasets on 3D human motion.

In Table 3, we list some representative datasets on 3D human motion including Hu-man3.6M (H3.6M) [21], PiGraphs [48], and Proximal Relationships with Object eX-clusion (PROX) [17]. H3.6M [21] is a large-scale dataset with accurate 3D pose anno-tations using a multi-camera capturing system. However, all recordings were capturedin the lab environment (mostly empty space) and thus it lacks diverse human interactionwith the indoor environment, e.g., sitting on a sofa or climbing stairs. PiGraphs [48] andPROX [17], on the other hand, are dedicated datasets with extensive efforts for model-ing the interaction between 3D human and 3D scene. Due to extensive efforts requiredfor manually collecting the RGBD sequence of human activities, both datasets have arelatively small number of frames, scenes, and characters. They are also less diverse interms of camera poses and background appearance (only one static camera viewpointfor each entire video clip). As shown in our experiments (Table 1 in the main paper),models trained on these datasets tend to be overfitting to the training data. Their 3Dhuman poses are also relatively noisy, e.g., temporal jittering, due to the difficulty ofobtaining accurate 3D poses in the real-world setting.

In contrast, we collect a large-scale and more diverse dataset with clean annotationsby developing an automatic data collection pipeline based on the gaming engine. Wediversify the camera location and viewpoint over a sphere around the actor such thatit points towards the actor. We use in-game ray tracing API and synchronized humansegmentation map to track actors. When the actor walks outside the field of view, thecamera will be resampled immediately. We believe our synthetic dataset with clean an-notations can be complementary to real data for stable training and rigorous evaluation.

B Implementation Details

In this section, we describe the implementation details for each module of the model. Allmodules are implemented in PyTorch [41] and trained using the ADAM optimizer [23].

Page 19: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 19

We set the input image size and the heatmap size to 256×448; the resolution of outputfuture heatmap prediction to 64×112; all depth dimension values are caped by 10 andnormalized by a factor 4 during training. We train all 3 modules separately and find itworks better than joint training. The multi-modal nature of this problem makes it hard totrain the model with intermediate prediction, e.g., it is not quite reasonable to supervisePathNet with ground-truth (GT) 3D path towards the GT destination, when taking theinput of a very different destination predicted by GoalNet.GoalNet: We use a 10−4 learning rate without weight decay. For both datasets, we trainfor 2 epochs with a batch size of 128.PathNet: We train our PathNet with ground-truth destination input, while during infer-ence, we use the prediction from GoalNet instead. The learning rate is set to 2.5×10−4

with a 10−4 weight decay. Our models are trained for 10 epochs for GTA-IM and 6epochs for PROX where learning rates decay by a factor of 10 at 7th and 4th epochs,respectively. We use a batch size of 32.PoseNet: We train the PoseNet ground-truth 3D path, while during inference, we usethe prediction from PoseNet instead. We train the model for 80 epochs using a learningrate of 1× 10−3, an attention dropout rate of 0.2, and batch size 1024.

C GoalNet Evaluation

GTA-IM dataset PROX dataset

Dataset min avg±std min avg±std

Ours (deterministic) 23.7 - 27.7 -

Ours (samples=3) 25.3 41.6±10.3 30.3 38.3±7.1

Ours (samples=5) 23.6 40.3±12.7 27.7 37.2±8.3

Ours (samples=10) 17.6 34.6±14.0 24.9 35.3±9.1

Ours (samples=30) 12.2 35.4±17.2 21.7 31.3±9.7

Table 4: Evaluation of 2D goal predictions in GTA-IM and PROX dataset. We compare ourresults of directly predicting 2D destination using GoalNet with those obtained by our determin-istic PathNet. We compare them in terms of the least and average error among all samples.

In Table 4, we evaluate 2D future destination predictions of GoalNet. We use themetric of Mean Per Joint Position Error (MPJPE) [21] in the 2D image space. We com-pare the stochastic results sampled from GoalNet with the deterministic results. We varythe number of samples during the evaluation and present results on both datasets. Ourfindings are twofold. (1) Directly predicting 2D destinations is beneficial. Our Goal-Net can achieve similar performance with the deterministic baseline using as few as 5samples on both datasets. (2) With more samples, our prediction performance increasesmonotonously. When using 30 samples, our GoalNet can outperform the deterministicbaseline by large margins, bringing around 40% less error on GTA-IM dataset and 20%less error on PROX dataset.

Page 20: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

20 Cao et al.

0.0 0.5 1.0 1.5 2.0 2.5 3.0Second

200

300

400

5003D

dist

ance

/ m

mSamples = 3Samples = 10Samples = 30Deterministic

(a) predicted 3D paths

0.0 0.5 1.0 1.5 2.0 2.5 3.0Second

200

300

400

500

3D d

istan

ce /

mm

Samples = 3Samples = 10Samples = 30Deterministic

(b) predicted 3D poses

Fig. 10: Comparison between our stochastic predictions and deterministic predictions oflong-term prediction on PROX. We show error curves of predicted (a) 3D paths and (b) 3Dposes with varying numbers of samples over varying timesteps on GTA-IM dataset. In all plots,we find that our stochastic model can achieve better results with a small number of samples,especially in the long-term prediction (within 2-3 seconds time span).

D Long-term Evaluation on PROX

In Figure 10, we evaluate long-term prediction results on PROX dataset as we previ-ously showed on GTA-IM dataset. Specifically, we show results on predicted 3D pathsand predicted 3D poses using our deterministic model and stochastic model with vary-ing numbers of samples. We note similar trends as previously seen on GTA-IM dataset.More interestingly, we find that our stochastic models can beat their deterministic coun-terpart using only 3 samples on PROX, compared to 5 samples on GTA-IM.

E Qualitative Results

We show additional qualitative comparison results in Figure 11. More results on 3D pathand 3D pose prediction are in our video which can be found at https://people.eecs.berkeley.edu/˜zhecao/hmp/.

F Network Architecture

We outline our network architectures in this section. Specifically, we define our Goal-Net in Table 5, PathNet in Table 6. For PoseNet, please refer to [54], we modified thearchitecture by removing the input embedding layer, output embedding layer, positionalencoding layer and the softmax layer.

Page 21: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 21

(a) input (b) baseline results (c) our results

1

2

3

1-3

Side View Side View

Top-down View Top-down View

Side View Side View

Fig. 11: Qualitative comparison. We visualize the input (a), the results of VP[43] and LTD [63](b) and our results (c) in the ground-truth 3D mesh. The color of pose is changed over timestepsfrom purple to dark blue and finally light blue. The first example (the 1st and 2nd row) includesboth top-down view and side view of the results. From the visualization, we can observe somecollisions between the baseline results and the 3D scene, while our predicted motion are moreplausible by taking the scene context into consideration.

Page 22: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

22 Cao et al.

Index Input Data Operator Output shape

(1) - scene image - 3× 256× 448(2) - stacked heatmaps - (N × J)× 64× 112

(3) (1) 7× 7, stride 2 64× 128× 224(4) (3) MaxPool, stride 2 64× 64× 112

(5) (4)[3× 3, stride 13× 3, stride 1

]64× 64× 112

(6) (2)[3× 3, stride 13× 3, stride 1

]64× 64× 112

(7) (5), (6)[3× 3, stride 23× 3, stride 1

]128× 32× 56

(8) (7)[3× 3, stride 23× 3, stride 1

]256× 16× 28

(9) (8)[3× 3, stride 23× 3, stride 1

]512× 8× 14

(10) (9) encoder feat. GlobalAvgPool 512× 1× 1

(11) (10) µ Linear Z × 1× 1(12) (10) σ Linear Z × 1× 1

(13) (11), (12) z Sample fromN (µ, σ) Z × 8× 14(14) (13) 3× 3, stride 1 512× 8× 14

(15) (14)[3× 3, stride 13× 3, stride 1

]512× 8× 14

(16) (15) Upsample 2× 512× 16× 28

(17) (16)[3× 3, stride 13× 3, stride 1

]256× 16× 28

(18) (17) Upsample 2× 256× 32× 56

(19) (18)[3× 3, stride 13× 3, stride 1

]128× 32× 56

(20) (19) Upsample 2× 128× 64× 112

(21) (20) decoder feat.[3× 3, stride 13× 3, stride 1

]64× 64× 112

(22) (21) goal heatmap pred. 1× 1, stride 1 1× 64× 112

Table 5: Overall architecture for our GoalNet. Each convolutional block denoted in the brackethas an internal skip connection with appropriate strides. Each convolutional operator is followedby a batch normalization and ReLU layer, except the one before heatmap prediction. We denoteN as input time frames, J as the number of human keypoints, Z as the dimension of latent space.We set Z = 30 in our experiments. We use nearest upsampling operator.

Page 23: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

Long-term Human Motion Prediction with Scene Context 23

Index Input Data Operator Output shape

(1) - scene image - 3× 256× 448(2) - stacked heatmaps - (N × J)× 256× 448(3) - goal heatmap - 1× 256× 448(4) - initial depth. - N × 1× 1(5) - 2D pose sequence - N × J × 2

(6) (1), (2), (3) 7× 7, stride 2 128× 128× 224

(7) (6)[3× 3, stride 23× 3, stride 1

]256× 64× 112

(8) (7) backbone feat1. HourglassStack 256× 64× 112(9) (8) backbone feat2. HourglassStack 256× 64× 112

(10) (9) backbone feat3. HourglassStack 256× 64× 112

(11) (8) or (9) or (10)[3× 3, stride 13× 3, stride 1

]256× 64× 112

(12) (11) heatmap pred. 1× 1, stride 1 T × 64× 112

(13) (8) or (9) or (10)[3× 3, stride 23× 3, stride 1

]384× 32× 56

(14) (13)[3× 3, stride 23× 3, stride 1

]512× 16× 28

(15) (14) GlobalAvgPool 512× 1× 1(16) (4), (5) Linear 256× 1× 1(17) (15), (16) Linear 256× 1× 1(18) (17) depth pred. Linear (N + T )× 1× 1

Table 6: Overall architecture for our PathNet. Each convolutional block denoted in the brackethas an internal skip connection with appropriate strides. Each convolutional operator is followedby a batch normalization and ReLU layer, except the one before heatmap prediction. Each linearoperator is followed by a layer normalization and ReLU layer, except the one before depth pre-diction. We denote N as input time frames, T as output time frames, J as the number of humankeypoints. We obtain initial depth as input by scaling the size of the human bounding box [39].We define HourglassStack in Table 7. After each stack output, we use two separate branchesfor predicting heatmaps and human center depth. During training, we backpropagate gradientthrough all stacks, while during inference, we only use the predictions from final stack.

Page 24: Long-term Human Motion Prediction with Scene Context … · 2020-07-08 · Long-term Human Motion Prediction with Scene Context Zhe Cao 1?, Hang Gao , Karttikeya Mangalam , Qi-Zhi

24 Cao et al.

Index Input Data Operator Output shape

(1) - feat. - 256× 64× 112

(2) (1)[3× 3, stride 13× 3, stride 1

]256× 64× 112

(3) (2)[3× 3, stride 23× 3, stride 1

]384× 32× 56

(4) (3)[3× 3, stride 13× 3, stride 1

]384× 32× 56

(5) (4)[3× 3, stride 23× 3, stride 1

]512× 16× 28

(6) (5)[3× 3, stride 23× 3, stride 1

]512× 8× 14

(7) (6)[3× 3, stride 13× 3, stride 1

]512× 8× 14

(8) (7)[3× 3, stride 13× 3, stride 1

]512× 8× 14

(9) (8) Upsample 2× 512× 16× 28(10) (7), (9) Sum 512× 16× 28

(11) (10)[3× 3, stride 13× 3, stride 1

]384× 16× 28

(12) (10) Upsample 2× 384× 32× 56(13) (4), (12) Sum 384× 32× 56

(14) (13)[3× 3, stride 13× 3, stride 1

]256× 32× 56

(15) (14) Upsample 2× 256× 64× 112

(16) (2), (15) refined feat. Sum 256× 64× 112

Table 7: Modular architecture for one HourglassStack. We follow the design and implemen-tation of [28]. Each convolutional block denoted in the bracket has an internal skip connectionwith appropriate strides. We use nearest upsampling operator.