Abstract
Generating high-resolution, realistic images from natural language descriptions is a significant challenge in computer vision. Existing multi-stage generative models often suffer from two primary limitations: a heavy dependency on the quality of the initial low-resolution image and the use of static text representations that do not adapt during the refinement process. This paper introduces DM-GAN (Dynamic Memory Generative Adversarial Network), which incorporates a novel Dynamic Memory mechanism. This architecture allows the model to dynamically select and integrate relevant text information at each refinement stage, enabling the "self-correction" of initial generation errors. Experimental results on the CUB and MS-COCO datasets demonstrate that DM-GAN significantly outperforms previous state-of-the-art models in both visual quality and text-image alignment.
Introduction
Text-to-image synthesis is a "one-to-many" problem characterized by a massive search space. Most contemporary methods adopt a multi-stage approach, first generating a low-resolution "fuzzy" image and then refining it into a high-resolution version. However, these methods face two major bottlenecks. First, if the initial stage produces a low-quality or incorrect image (e.g., wrong color or distorted shape), subsequent refinement stages often fail to correct these fundamental flaws. Second, existing models typically use static word features throughout the refinement process, ignoring the fact that different words vary in importance as an image evolves from basic shapes to fine textures.
Methods
DM-GAN addresses these bottlenecks through a novel architecture consisting of an initial generation stage followed by multiple refinement stages powered by a Dynamic Memory component. This component operates through four key steps:
- Memory Writing: Word features are stored in a key-value memory structure. A Memory Writing Gate dynamically selects relevant words based on current image features, allowing the model to focus on missed or critical information.
- Key Addressing & Value Reading: The model uses current image features as "queries" to search the memory for the most relevant word information (values) using similarity probabilities.
- Gated Response: A Response Gate adaptively fuses retrieved information with existing image features. This mechanism allows the model to correct discrepancies (e.g., changing a bird's color to match the text) without overwriting correctly generated portions of the image.
Experimental Evaluation
The model was evaluated on two standard benchmarks:
- CUB (Caltech-UCSD Birds 200): 11,788 images of 200 bird categories.
- MS-COCO (Microsoft Common Objects in Context): A complex dataset of 120k images featuring diverse real-world scenes.
Key Results and Insights
DM-GAN achieved substantial quantitative improvements over the previous state-of-the-art, AttnGAN:
- Inception Score (IS): Improved from 4.36 to 4.75 on CUB (8.94% increase) and from 25.89 to 30.49 on MS-COCO (17.77% increase).
- Fréchet Inception Distance (FID): On CUB, FID was reduced from 23.98 to 16.09, indicating a significant leap in visual realism.
- R-precision: Text-image alignment improved by 4.49% on CUB and 3.09% on MS-COCO.
Qualitatively, DM-GAN produces sharper details and more consistent textures. The "self-correction" ability is a primary driver of these results; by treating memory as a persistent knowledge base, the model can query and update features more robustly than standard attention mechanisms.
Conclusion and Future Work
While DM-GAN represents a major step forward, it remains limited by its dependency on the initial layout generated in the first stage. If the initial "organization" of objects is fundamentally flawed, refinement stages can improve local textures but struggle to reposition entire objects. Future research will focus on generating better initial layouts for multi-subject scenes to further enhance the synthesis pipeline.
Summary updated