Abstract
Traditional person image generation models often operate in isolation, requiring explicit user-defined poses and ignoring the broader environmental context. This paper presents a novel three-stage framework for context-aware person insertion. By analyzing the spatial relationships of existing individuals in a scene, the system automatically determines the optimal position, scale, and pose for a new person, rendering them realistically to blend into complex multi-person environments.
Introduction
Most existing person generation models are "self-centered," relying on external inputs like skeletal keypoints or 3D masks to define a target. When these generated figures are placed into real-world scenes, they frequently suffer from perspective mismatches and scale inconsistencies. This research addresses the challenge of context-aware person insertion, aiming to automate the placement and rendering of new individuals based solely on the global context of an existing scene.
Methodology
The proposed framework utilizes a sequential three-stage pipeline to ensure both contextual relevance and anatomical realism.
1. Coarse Generation (Contextual Guesser)
The first stage employs a modified Pix2PixHD architecture to analyze the semantic maps of existing people. The network "hallucinates" a coarse semantic mask for the new person, effectively predicting a contextually appropriate location and scale based on the camera perspective and surrounding figures.
2. Data-Driven Refinement
To overcome the lack of anatomical detail in AI-generated coarse masks, the authors introduce a retrieval-based refinement step. The coarse mask is encoded via a pre-trained VGG-19 network. K-means clustering is then used to search a pre-computed database of real human semantic masks (derived from the DeepFashion dataset) to find the most anatomically accurate match.
3. Appearance Transfer and Rendering
The final stage uses a multi-scale, attention-guided generative network. It takes an exemplar image of the target person and transfers their appearance—including clothing, facial features, and skin tone—onto the refined semantic mask. This process is optimized using a combination of L1, PatchGAN adversarial, and perceptual losses to ensure high-fidelity results.
Datasets and Implementation
The framework was trained and evaluated using two primary datasets:
- LV-MHP-v1 (Multi-Human Parsing): Used for training the coarse generation network, providing complex scenes with multiple interacting individuals.
- DeepFashion: Used to build the clustered knowledge base for pose refinement and to train the appearance rendering network.
Results and Discussion
The proposed rendering network demonstrates state-of-the-art performance, outperforming eight recent baselines, including PATN and XingGAN. Quantitative evaluations show a Structural Similarity Index (SSIM) of 0.845 and a Detection Score (DS) of 0.968.
Key insights from the study include:
- Contextual Sufficiency: The geometric distribution of existing people provides enough latent information for realistic positioning without manual user input.
- Retrieval vs. Hallucination: Using a database of real poses for refinement effectively avoids the "uncanny valley" often associated with purely generative anatomical structures.
- Attribute Control: The semantic-based rendering allows for precise attribute swapping (e.g., changing a shirt while keeping the original pants) through simple bitwise operations.
Conclusion
This research shifts the focus of person generation from isolated subjects to contextually integrated figures. While the sequential nature of the pipeline can lead to cascading errors if early stages fail, the method significantly advances the realism of automated person insertion. Future work will explore end-to-end architectures to improve robustness across unconventional poses and complex scene geometries.
Summary updated