Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

PixelHacker: Image Inpainting with Structural and Semantic Consistency

About

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.

Ziyang Xu, Kangsheng Duan, Xiaolei Shen, Zhifeng Ding, Wenyu Liu, Xiaohu Ruan, Xiaoxin Chen, Xinggang Wang• 2025

Related benchmarks

TaskDatasetResultRank
Image InpaintingPlaces2 (test)
FID8.59
72
Image InpaintingFFHQ 256x256
LPIPS0.229
21
Image InpaintingCelebA-HQ 512x512 (test)
LPIPS0.115
20
Portrait InpaintingCelebA-HQ 512
FID4.75
18
Natural scene image inpaintingPlaces2 (Small)
FID0.82
14
Natural scene image inpaintingPlaces2 Large
FID2.05
14
Natural scene image inpaintingPlaces2 256
FID9.25
13
Object RemovalPico-Banana 400K unified (test)
FID26.01
10
Image InpaintingLVIS OOD Natural 11 (10k images)
FID13.84
7
Image InpaintingDeepFakeFace OOD Portrait wiki 39
FID15.5
6
Showing 10 of 11 rows

Other info

Follow for update