Swin Transformer for Robust Differentiation of Real and Synthetic Images: Intra and Inter-dataset Analysis
摘要
This study aims to address the growing challenge of distinguishing computer-generated imagery (CGI) from authentic digital images in the RGB color space. Given the limitations of existing classification methods in handling the complexity and variability of CGI, this research proposes a Swin Transformer-based model that captures both local and global features for accurate differentiation between natural and synthetic images. The model’s performance was evaluated through intra-dataset and inter-dataset testing across three distinct datasets: CiFAKE, JSSSTU, and Columbia. The datasets were tested individually (D1, D2, D3) and in combination (D1+D2+D3) to assess the model’s robustness and domain generalization capabilities. The model consistently achieved high accuracy (97–99%), demonstrating robustness and strong domain generalization. These results highlight the Swin Transformer as a powerful tool for digital image forensics, capable of reliably distinguishing CGI from natural images across different scenarios.