Abstract
The goal of our paper is to semantically edit parts of an image matching a given text that describes desired attributes (e.g., texture, colour, and background), while preserving other contents that are irrelevant to the text. To achieve this, we propose a novel generative adversarial network (ManiGAN), which contains two key components: text-image affine combination module (ACM) and detail correction module (DCM). The ACM selects image regions relevant to the given text and then correlates the regions with corresponding semantic words for effective manipulation. Meanwhile, it encodes original image features to help reconstruct text-irrelevant contents. The DCM rectifies mismatched attributes and completes missing contents of the synthetic image. Finally, we suggest a new metric for evaluating image manipulation results, in terms of both the generation of new attributes and the reconstruction of text-irrelevant contents. Extensive experiments on the CUB and COCO datasets demonstrate the superior performance of the proposed method.
Introduction
Text-guided image manipulation aims to modify specific attributes of an image based on natural language descriptions while maintaining the integrity of text-irrelevant content. For instance, given an image of a bird and the instruction "change this bird's crown to red," the model should update the crown color without altering the bird's pose, the branch it sits on, or the background.
Historically, this task has faced two major hurdles. First, existing methods often relied on simple feature concatenation, which lacks the precision to map specific words to exact image regions, resulting in coarse edits. Second, these models frequently suffered from "collateral damage," where the generative process inadvertently distorted backgrounds or unrelated objects. ManiGAN addresses these issues through a "surgical" approach to image editing.
Methodology
ManiGAN utilizes a multi-stage architecture enhanced by two novel components designed to improve regional selection and detail preservation.
Affine Combination Module (ACM)
The ACM replaces standard feature concatenation with a learned affine transformation. It processes image features ($h$) and text features ($v$) using the formula $h' = h \odot W(v) + b(v)$.
- The weight term $W(v)$ functions as a learned mask, identifying which image regions should be modified by the text.
- The bias term $b(v)$ explicitly carries over original image representations, providing a "shortcut" that ensures text-irrelevant parts are reconstructed with high fidelity.
Detail Correction Module (DCM)
Following the initial manipulation, the DCM acts as a refinement stage. It employs spatial and channel-wise attention mechanisms alongside shallow VGG features to rectify any mismatched attributes and fill in missing fine-grained details, preventing the "mushy" artifacts common in GAN-generated outputs.
Experimental Results
The model was rigorously tested on the CUB (Caltech-UCSD Birds-200-2011) dataset and the more complex MS-COCO dataset.
Quantitative Performance
ManiGAN demonstrates significant improvements over previous state-of-the-art models like SISGAN and TAGAN. On the CUB dataset, ManiGAN achieved an Inception Score (IS) of 8.47 (vs. TAGAN's 3.32). On the challenging COCO dataset, it reached an IS of 14.96, vastly outperforming SISGAN's 3.44. To further evaluate performance, the authors introduced the Manipulative Precision (MP) metric, which balances the success of attribute modification with the preservation of original content.
Qualitative Comparison
Visual results highlight ManiGAN's ability to handle fine-grained requests. While competing models often ignore specific descriptors like "black eye rings" or produce blurry results, ManiGAN successfully integrates these details while keeping the background sharp.
Conclusion
ManiGAN introduces a more effective way to fuse text and image features for precise manipulation. By leveraging the ACM for regional selection and the DCM for detail refinement, the model achieves superior results in both attribute generation and background preservation. While a trade-off exists between making requested changes and over-preserving the original image, ManiGAN sets a new benchmark for high-fidelity, text-guided image editing.
Summary updated