[Paper Review] Shape-guided Object Inpainting
This paper introduces shape-guided object inpainting, a novel task where a model generates a complete, semantically consistent object to fill a hole based on its shape and contextual surroundings. The authors propose CogNet, a two-stream generative network with a predictive class embedding and top-down object generation, achieving state-of-the-art performance with FID scores as low as 3.801 on Places2 and 4.700 on COCO.
Previous works on image inpainting mainly focus on inpainting background or partially missing objects, while the problem of inpainting an entire missing object remains unexplored. This work studies a new image inpainting task, i.e. shape-guided object inpainting. Given an incomplete input image, the goal is to fill in the hole by generating an object based on the context and implicit guidance given by the hole shape. Since previous methods for image inpainting are mainly designed for background inpainting, they are not suitable for this task. Therefore, we propose a new data preparation method and a novel Contextual Object Generator (CogNet) for the object inpainting task. On the data side, we incorporate object priors into training data by using object instances as holes. The CogNet has a two-stream architecture that combines the standard bottom-up image completion process with a top-down object generation process. A predictive class embedding module bridges the two streams by predicting the class of the missing object from the bottom-up features, from which a semantic object map is derived as the input of the top-down stream. Experiments demonstrate that the proposed method can generate realistic objects that fit the context in terms of both visual appearance and semantic meanings. Code can be found at the project page \url{https://zengxianyu.github.io/objpaint}
Motivation & Objective
- Address the gap in image inpainting research, which has largely focused on background or partial object filling, not complete object re-generation.
- Overcome the inherent bias of existing inpainting models toward background generation by incorporating object priors into training data.
- Design a deep generative model that combines bottom-up context propagation with top-down semantic object generation for improved visual and semantic coherence.
- Enable context-aware, semantically meaningful object generation that aligns with lighting, color, and style of the surrounding scene.
Proposed method
- Propose a new data preparation method that uses object instances as holes during training, replacing random masking to embed object priors.
- Design a two-stream architecture: a bottom-up stream for context-based image completion and a top-down stream for semantic object generation.
- Introduce a Predictive Class Embedding (PCE) module that infers the missing object's class from bottom-up features to guide top-down generation.
- Use a semantic object map—derived from the predicted class and hole mask—as input to the top-down stream to enforce spatial and semantic consistency.
- Train the model end-to-end using adversarial loss and perceptual losses to ensure realistic appearance and high-level semantic alignment.
- Leverage latent noise vectors in the top-down stream to generate diverse, plausible object variations for the same input.
Experimental results
Research questions
- RQ1Can image inpainting models be adapted to generate entire objects rather than just background or partial objects?
- RQ2How can training data be restructured to reduce the bias of existing models toward background generation?
- RQ3What architectural components are necessary to ensure both visual realism and semantic consistency in generated objects?
- RQ4To what extent does top-down semantic guidance improve object inpainting compared to purely bottom-up context modeling?
- RQ5Can the model generalize to generate diverse, contextually coherent objects for the same input using different latent codes?
Key findings
- The proposed method achieves state-of-the-art performance on COCO, Places2, and Cityscapes, with FID scores of 4.700, 3.801, and 7.411, respectively.
- The ablation study shows that removing the predictive class embedding or top-down stream increases FID by over 1.0 point, demonstrating their critical role.
- Without object-prior training data, the model fails to generate objects and instead fills holes with background-like textures.
- The model generates diverse, contextually coherent object instances across multiple random latent codes, as shown in Figure 7.
- Quantitative results show that the proposed method outperforms CoModGAN, DeepFillV2, and RFR across all metrics, especially in FID and LPIPS.
- Qualitative results confirm that generated objects are visually realistic, semantically plausible, and well-aligned with scene context in terms of lighting and style.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.