Saved in:
Bibliographic Details
Main Authors: Xu, Ziyang, Duan, Kangsheng, Shen, Xiaolei, Ding, Zhifeng, Liu, Wenyu, Ruan, Xiaohu, Chen, Xiaoxin, Wang, Xinggang
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.20438
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913812806893568
author Xu, Ziyang
Duan, Kangsheng
Shen, Xiaolei
Ding, Zhifeng
Liu, Wenyu
Ruan, Xiaohu
Chen, Xiaoxin
Wang, Xinggang
author_facet Xu, Ziyang
Duan, Kangsheng
Shen, Xiaolei
Ding, Zhifeng
Liu, Wenyu
Ruan, Xiaohu
Chen, Xiaoxin
Wang, Xinggang
contents Image inpainting is a fundamental research area between image editing and image generation. Recent state-of-the-art (SOTA) methods have explored novel attention mechanisms, lightweight architectures, and context-aware modeling, demonstrating impressive performance. However, they often struggle with complex structure (e.g., texture, shape, spatial relations) and semantics (e.g., color consistency, object restoration, and logical correctness), leading to artifacts and inappropriate generation. To address this challenge, we design a simple yet effective inpainting paradigm called latent categories guidance, and further propose a diffusion-based model named PixelHacker. Specifically, we first construct a large dataset containing 14 million image-mask pairs by annotating foreground and background (potential 116 and 21 categories, respectively). Then, we encode potential foreground and background representations separately through two fixed-size embeddings, and intermittently inject these features into the denoising process via linear attention. Finally, by pre-training on our dataset and fine-tuning on open-source benchmarks, we obtain PixelHacker. Extensive experiments show that PixelHacker comprehensively outperforms the SOTA on a wide range of datasets (Places2, CelebA-HQ, and FFHQ) and exhibits remarkable consistency in both structure and semantics. Project page at https://hustvl.github.io/PixelHacker.
format Preprint
id arxiv_https___arxiv_org_abs_2504_20438
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PixelHacker: Image Inpainting with Structural and Semantic Consistency
Xu, Ziyang
Duan, Kangsheng
Shen, Xiaolei
Ding, Zhifeng
Liu, Wenyu
Ruan, Xiaohu
Chen, Xiaoxin
Wang, Xinggang
Computer Vision and Pattern Recognition
Image inpainting is a fundamental research area between image editing and image generation. Recent state-of-the-art (SOTA) methods have explored novel attention mechanisms, lightweight architectures, and context-aware modeling, demonstrating impressive performance. However, they often struggle with complex structure (e.g., texture, shape, spatial relations) and semantics (e.g., color consistency, object restoration, and logical correctness), leading to artifacts and inappropriate generation. To address this challenge, we design a simple yet effective inpainting paradigm called latent categories guidance, and further propose a diffusion-based model named PixelHacker. Specifically, we first construct a large dataset containing 14 million image-mask pairs by annotating foreground and background (potential 116 and 21 categories, respectively). Then, we encode potential foreground and background representations separately through two fixed-size embeddings, and intermittently inject these features into the denoising process via linear attention. Finally, by pre-training on our dataset and fine-tuning on open-source benchmarks, we obtain PixelHacker. Extensive experiments show that PixelHacker comprehensively outperforms the SOTA on a wide range of datasets (Places2, CelebA-HQ, and FFHQ) and exhibits remarkable consistency in both structure and semantics. Project page at https://hustvl.github.io/PixelHacker.
title PixelHacker: Image Inpainting with Structural and Semantic Consistency
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2504.20438