Introduction
One-shot image synthesis—the task of generating new variations from a single training image—presents a significant challenge in computer vision. While models like SinGAN excel at capturing repetitive textures, they often struggle with structured objects, leading to "fragmentation." Furthermore, existing model-inversion techniques often lack precise spatial control.
MAGIC (Mask-Guided Image Composition) addresses these gaps by allowing users to manipulate a single image through simple binary masks. By inverting a "quasi-robust" classifier, MAGIC generates high-fidelity results that preserve original semantics and textures while adhering to new spatial constraints such as moving, resizing, or deforming objects.
Methodology
The MAGIC framework is built upon three technical pillars designed to balance structural integrity with fine-grained texture:
- Quasi-robust Classifier Inversion: Standard neural networks produce noisy gradients, while strongly robust networks lose fine detail. MAGIC utilizes a "quasi-robust" model (ResNet-50 trained with $\epsilon = 0.05$). This provides perceptually aligned gradients that guide shape preservation without sacrificing texture.
- Large Receptive Field PatchGAN: To maintain local texture consistency, MAGIC employs a discriminator with a $21 \times 21$ receptive field. This larger view prevents structured objects from breaking into disjointed pieces, a common failure mode in previous work.
- Mask-Guided Encoder-Decoder (ED) Inversion: An internal model maps the input image to its binary mask. During synthesis, this process is inverted: a target mask is provided, and the generation process is forced to produce pixels that correspond to that specific mask.
Key Insights: The "Goldilocks" Zone
A central finding of this work is the existence of a "Goldilocks" zone of adversarial robustness. While full robustness is detrimental to synthesis because it ignores high-frequency details, quasi-robustness provides gradients structured enough to guide global shape while remaining sensitive enough to capture local textures. By treating a pre-trained classifier as a source of structural knowledge, MAGIC effectively uses the network's internal understanding of object categories to supervise the synthesis process.
Experimental Results
MAGIC was evaluated using images from the ImageNet validation set and "in-the-wild" web images.
- Quantitative Performance: MAGIC achieved a Single Image FID (SIFID) of 0.032, significantly outperforming baselines like IMAGINE (0.082) and DEEPSIM (0.271).
- Human Evaluation: In a user study with over 100 participants, MAGIC was preferred over DEEPSIM 55.4% of the time for object manipulation and 86.8% for scene manipulation.
- Efficiency: Despite its superior performance, MAGIC is highly efficient, with approximately 26M parameters—nearly 7 times smaller than DEEPSIM.
Conclusion and Future Work
MAGIC demonstrates that simple binary masks are sufficient for complex image manipulations when paired with strong structural priors from quasi-robust models. While the current implementation cannot "hallucinate" unseen parts of an object, it sets a new standard for one-shot synthesis. Future research will explore extending the framework to image inpainting and investigating the theoretical links between quasi-robust inversion and score-matching generative models.
Summary updated