Transformer-Based Pedestrian Video Inpainting Guided by Pseudo-Spatiotemporal Pose Correction Graph Convolutional Networks

Fan Tang, Yongwei Nie, Jiaqi Yu, Qing Zhang, Guiqing LiJournal of Computer-Aided Design & Computer Graphics 2024

Abstract

Repairing occluded pedestrians in surveillance videos is a challenging task due to the complex, non-rigid motion of the human body. This paper proposes a two-stage framework: first, a Pseudo-Spatiotemporal Graph Convolutional Network (PST-GCN) repairs incomplete pose sequences extracted from occluded footage; second, a Pose-Guided Transformer (PGT) inpaints video frames using the corrected structural information. Evaluated on the Human3.6M dataset, the method significantly outperforms state-of-the-art approaches, achieving a 21.67% improvement in perceptual quality (LPIPS).

Introduction

Video inpainting in surveillance often fails when the target is a moving person. Standard methods that rely on temporal pixel matching struggle with the non-rigid nature of human movement, often resulting in anatomical distortions or "ghosting" effects. While human pose (skeletons) can serve as a structural guide, occlusions typically cause pose estimation tools like OpenPose to produce noisy or missing data. This research addresses the "chicken and egg" problem by prioritizing the restoration of the underlying skeletal structure before attempting pixel-level reconstruction.

Methodology

1. Pose Correction via PST-GCN

The first stage involves extracting initial poses using OpenPose. Due to occlusions, these skeletons are often fragmented, with missing or inaccurately placed joints that can mislead the inpainting process.

Noisy pose sequences extracted by OpenPose from occluded video frames.

To address this, the authors developed the PST-GCN. Unlike traditional 3D spatiotemporal graphs which are computationally intensive, the PST-GCN decouples spatial and temporal modeling. One GCN captures spatial relationships (e.g., the connection between shoulder and elbow), while another focuses on temporal trajectories (how joints move across frames). This decoupling allows for deeper feature extraction and more robust joint prediction, resulting in a clean, anatomically correct sequence.

Accurate pose sequences after correction by the proposed PST-GCN model.

2. Pose-Guided Video Inpainting

The repaired skeletons are converted into bone heatmaps, providing a continuous structural boundary. These heatmaps guide a Pose-Guided Transformer (PGT). The core innovation here is the Pose-Guided Self-Attention (PGSA) mechanism, which biases the Transformer's attention toward semantically relevant body parts in reference frames. By using the skeleton as a high-level index, the model can accurately "copy" pixels from unoccluded frames to fill gaps in the current frame.

Experimental Results

The framework was tested on the Human3.6M dataset with synthetic occlusions mimicking real-world obstacles like tables, chairs, and other pedestrians.

  • Quantitative Performance: The model achieved a PSNR of 33.474 and an SSIM of 0.968. Notably, it improved RMSE by 9.50% and LPIPS by 21.67% compared to the previous state-of-the-art (DSTT).
  • Qualitative Performance: Visual analysis confirms that the pose-guided approach maintains sharper limb boundaries and better textural consistency during complex motions, avoiding the blurriness common in non-pose-guided methods.

Conclusion

By decoupling spatiotemporal pose correction and using the result to guide a Transformer-based inpainting model, this research demonstrates that structural integrity is key to high-quality video reconstruction. Future work will explore integrating pre-trained human priors to handle cases where body parts are occluded for the entire duration of a video sequence.

Summary updated

Abstract

In order to solve the problem of repairing occluded pedestrians in surveillance videos, a pedestrian video inpainting method based on human pose is proposed, which repairs the incomplete pedestrian pose sequence at first, and then inpaints the video frames under the guidance of the repaired pose sequence. Firstly, the proposed method uses OpenPose to extract the occluded human pose sequence from the video. Due to occlusions, some joints of the extracted poses may be unrecognized or inaccurately recognized. We thus propose a pseudo-spatiotemporal graph convolutional network to repair the extracted poses and obtain an accurate pose sequence. We then propose a Transformer-based pedestrian video repair model guided by the repaired pose sequence. Tested on the Human3.6M dataset, the proposed method is better than previous approaches in terms of four metrics including PSNR, RMSE, SSIM, and LPIPS. Especially, RMSE is improved by 9.50%, and LPIPS is improved by 21.67%.
BibTeX
@article{tang2024transformer,
  author = {Fan Tang and Yongwei Nie and Jiaqi Yu and Qing Zhang and Guiqing Li},
  title = {{Transformer-Based Pedestrian Video Inpainting Guided by Pseudo-Spatiotemporal Pose Correction Graph Convolutional Networks}},
  journal = {Journal of Computer-Aided Design \& Computer Graphics},
  year = {2024},
  doi = {10.3724/sp.j.1089.2024.19773},
}
Figure