CIMGEN: Controlled Image Manipulation by Finetuning Pretrained Generative Models on Limited Data

Chandrakanth Gudavalli, Erik Rosten, Lakshmanan Nataraj, Shivkumar Chandrasekaran, B. S. ManjunatharXiv 2024

TL;DR

CIMGEN introduces a framework for high-fidelity image manipulation—such as removing or inserting buildings in satellite imagery—by editing semantic maps and rendering the changes using fine-tuned GANs. The paper reveals a critical security vulnerability: these sophisticated forgeries can easily bypass state-of-the-art forensic detectors with simple post-processing like slight rotation or blurring.

What Problem Does This Paper Address?

Directly manipulating raw RGB pixels to add or remove complex objects is incredibly difficult to do convincingly. While Generative Adversarial Networks (GANs) have made massive strides in synthesizing realistic imagery, controlling exactly what they generate remains a challenge.

The authors address the need for "controlled" manipulation, particularly in the context of "deepfake geography." They aim to create a system where a user can edit a simple roadmap or segmentation mask (a semantic map) and have a generative model automatically translate those changes into a realistic image. Furthermore, they investigate the "arms race" between forgers and forensic analysts, testing whether current deep-learning-based detectors can actually spot these localized, high-quality edits.

Methods

The CIMGEN framework operates in three main stages:

  1. Semantic Map Manipulation: The user modifies a semantic map (e.g., a roadmap from Google Maps or a building mask). Because these maps are categorical (e.g., "this pixel is a building," "this pixel is a road"), editing them is as simple as using a digital paintbrush to add or erase shapes.
  2. GAN Fine-tuning and Translation: The system leverages pre-trained image-to-image translation models, specifically CycleGAN (for unpaired data) and Pix2PixHD (for high-resolution paired data). To ensure the generated content perfectly matches the specific style of the target image, the models are fine-tuned on a small, localized dataset ("smalldata"). This forces the GAN to "memorize" the relationship between the map and the specific textures of that geographic area.
  3. Local Blending: Instead of replacing the entire image, the GAN-generated patch is blended back into the original image at the manipulated location. This preserves the original pixels in all unaltered regions, making the forgery much harder to detect.
Figure 3: Overview of proposed image manipulation framework.

Datasets

The authors evaluated their method across three distinct domains:

  • map2sat-urban: A custom dataset of 470 pairs of 512x512 roadmap and satellite images of US capital cities, scraped via the Google Maps API.
  • Building2Sat: Based on the Inria Aerial Image Labeling Dataset, this contains 3,600 tiles (500x500 pixels) specifically focused on building segmentation masks in Austin, Texas.
  • Cityscapes: A standard benchmark for urban street scenes, using a subset of 5,000 high-quality image-map pairs.

Key Insights and Ideas

  • Semantic Maps as the "User Interface": The core insight is that semantic maps are the ideal intermediate representation. They are easy for humans to edit and provide the structural constraints generative models need to produce coherent results.
  • Memorization is a Feature, Not a Bug: In typical machine learning, we avoid "memorizing" training data to ensure generalization. Here, fine-tuning on a tiny dataset to achieve memorization is intentional; it ensures the GAN produces a patch that is stylistically identical to the surrounding original pixels.
  • The Fragility of Forensic Detectors: The most alarming finding is how easily forensic tools are thwarted. A detector might have 99.9% accuracy on raw GAN output, but that accuracy plummets when the image is subjected to standard post-processing like a 1-degree rotation or a tiny amount of Gaussian blur.

Key Results

The authors demonstrated successful object removal and insertion across all datasets. For example, they were able to seamlessly remove large buildings from city centers or replace bodies of water with roads and new structures.

Figure 1: Illustration of our proposed method, in which a building is removed from the center of an image.

Quantitatively, the quality was measured using standard metrics:

  • Cityscapes yielded the best results with a Fréchet Inception Distance (FID) of 21.44 and a Structural Similarity Index (SSIM) of 0.73.
  • Forensic Robustness: While a standard ResNet50 detector achieved 99.95% accuracy on pristine GAN outputs, simple transforms made it "significantly less accurate." The authors tested two defense strategies: Adversarial Training (AT) and Barrage of Random Transform (BaRT). While these improved robustness, they reduced overall accuracy to around 85%, which the authors argue is too noisy for reliable real-world use.

Limitations and Future Work

The authors acknowledge that their method currently relies on the availability of some paired or domain-specific data for fine-tuning. Furthermore, while the forgeries are visually convincing, the forensic heatmaps generated by their robust detectors are still "noisy," making them less reliable for automated real-time detection.

Future work includes exploring more advanced generative architectures, such as Stable Diffusion, to replace GANs in the rendering pipeline. They also suggest that ensembling BaRT and Adversarial Training strategies might be the key to developing the next generation of robust image manipulation detectors.

Summary updated

BibTeX
@misc{gudavalli2024cimgen,
  author = {Chandrakanth Gudavalli and Erik Rosten and Lakshmanan Nataraj and Shivkumar Chandrasekaran and B. S. Manjunath},
  title = {{CIMGEN: Controlled Image Manipulation by Finetuning Pretrained Generative Models on Limited Data}},
  year = {2024},
  eprint = {2401.13006},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.13006},
}
Figure