Detecting Recolored Image by Spatial Correlation

Yushu Zhang, Nuo Chen, Shuren Qi, Mingfu Xue, Xiaochun Cao · DOI

Introduction: The Challenge of Image Recoloring

Image forensics has traditionally focused on "copy-move" or "splicing" forgeries—where objects are added or removed from a scene. However, image recoloring represents a subtler and increasingly prevalent threat. By changing the theme, style, or mood of an image without altering its semantic content, malicious actors can mislead human viewers or cause autonomous vision systems to misidentify objects.

Existing detection methods often struggle with modern, deep-learning-based recoloring techniques. These methods typically look for inconsistencies in lighting or correlations between color channels (e.g., Red vs. Green). Modern neural networks, however, are designed to maintain these very consistencies, rendering traditional detectors ineffective. This research proposes a generic detector capable of identifying both traditional and AI-generated recoloring by analyzing the statistical "fingerprints" left by camera hardware.

Taxonomy of image recoloring techniques, ranging from example-based to photorealistic style transfer.

Methodology: Exploiting the Hardware Fingerprint

The core observation of this work is that natural images possess a specific statistical structure created by the camera's hardware. When a digital camera captures a photo, it utilizes a Color Filter Array (CFA) and an interpolation process known as demosaicing to fill in missing color data. This process creates a very specific spatial correlation between neighboring pixels.

Recoloring algorithms—whether they use simple Photoshop filters or sophisticated neural networks—inevitably disrupt this hardware-level spatial correlation. Even if the resulting image looks perfect to the human eye, it fails to replicate the subtle mathematical relationships between adjacent pixels created by a physical sensor.

Contrast between the hardware-driven acquisition process of natural images and the algorithmic process of deep-learning style transfer.

The Detection Pipeline

To capture these disruptions, the researchers developed an end-to-end pipeline:

  1. Co-occurrence Matrices: The system calculates co-occurrence matrices in four directions (horizontal, vertical, diagonal, and anti-diagonal) for each of the three RGB channels. This results in 12 distinct 256×256 matrices that act as a statistical summary of the image's texture and pixel relationships.
  2. Modified ResNet18: These 12 matrices are stacked into a single tensor and fed into a modified ResNet18 architecture. Unlike a standard ResNet that processes 3-channel RGB images, this version is optimized to accept the 12-channel statistical tensor, allowing the network to learn high-level discriminative features of forgery.

Experimental Setup and Datasets

The model was trained and validated using a massive benchmark consisting of four distinct datasets:

  • D1 (Training): 102,000 image pairs (Natural vs. Recolored) using three distinct traditional methods.
  • D2 (Deep Learning Testing): 480 images generated by four deep-learning-based recoloring methods not seen during training.
  • D3 (Conventional Testing): 200 images from various traditional recoloring algorithms.
  • D4 (Manual Testing): 80 images manually recolored via mobile apps or Photoshop to test real-world generalization.

Key Results and Insights

The proposed method achieved state-of-the-art performance, demonstrating that spatial correlation (Pixel A vs. Pixel B) is a significantly more reliable indicator of tampering than inter-channel correlation (Red vs. Blue).

  • Baseline Accuracy: The model reached 95.56% accuracy on the D1 test set.
  • Generalization to AI: On the D2 set (unseen deep-learning methods), it maintained an accuracy of 85.21%, significantly outperforming previous state-of-the-art models.
  • Manual Forgery: On the D4 set, it achieved 70.00% accuracy. While manual edits remain difficult to detect due to their localized nature, this performance is 14.5% higher than that of human observers (55.5%) on the same data.
  • Ablation Study: Using the 12-matrix spatial correlation input resulted in a 20% accuracy boost compared to feeding raw RGB images into the same neural network architecture.

Conclusion

By shifting the focus from color distribution to spatial correlation, this research provides a robust framework for detecting digital forgeries. While manual recoloring remains a challenge for automated systems, the ability to detect sophisticated AI-driven style transfers marks a significant step forward in image forensics. Future work will explore more advanced feature encoding methods to further improve detection rates on localized, manual edits.

Summary updated

BibTeX
@misc{zhang2022detecting,
  author = {Yushu Zhang and Nuo Chen and Shuren Qi and Mingfu Xue and Xiaochun Cao},
  title = {{Detecting Recolored Image by Spatial Correlation}},
  year = {2022},
  eprint = {2204.10973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.10973},
}
Figure