Swin Transformer for Robust CGI Images Detection: Intra- and Inter-Dataset Analysis across Multiple Color Spaces
Preeti Mehta, Aman Sagar, Suchi Kumari · 2025
Read Swin Transformer for Robust CGI Images Detection: Intra- and Inter-Dataset Analysis across Multiple Color Spaces by Preeti Mehta, Aman Sagar, Suchi Kumari (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-16253.txt.
Introduction
Mehta, Sagar, and Kumari (2025) built a detector that tells computer-generated images from real photographs. Fakes are getting harder to spot, and older classifiers struggle with their variety. Their model uses a Swin Transformer, a vision network that reads an image at several scales at once. They tested it in three color spaces, including the usual red-green-blue encoding.
The model was trained and tested within and across three datasets, including mixed training on all of them, with augmentation to balance the sets. The standard color space gave the best accuracy everywhere, so it carried the cross-dataset tests. There the model beat two established convolutional networks. Visual maps of its features showed clean separation between real and generated images. The authors present it as a robust tool for image forensics that holds up on new data sources.
Catalog record
| CREATOR | Preeti Mehta, Aman Sagar, Suchi Kumari |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 31 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-16253
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Swin Transformer for Robust CGI Images Detection: Intra- and Inter-Dataset Analysis across Multiple Color Spaces Preeti Mehta, Aman Sagar, Suchi Kumari Abstract Purpose This study aims to address the growing challenge of distinguishing computer-generated imagery (CGI) from authentic digital images across three different color spaces; RGB, YCbCr, and HSV. Given the limitations of existing classification methods in handling the complexity and variability of CGI, this research proposes a Swin Transformer based model for accurate differentiation between natural and synthetic images. Methods The proposed model leverages the Swin Transformer’s hierarchical architecture to capture local and global features for distinguishing CGI from natural images. Its performance was assessed through intra- and inter-dataset testing across three datasets: CiFAKE, JSSSTU, and Columbia. The model was evaluated individually on each dataset (D1, D2, D3) and on the combined datasets (D1+D2+D3) to test its robustness and domain generalization. To address dataset imbalance, data augmentation techniques were applied. Additionally, t-SNE visualization was used to demonstrate the feature separability achieved by the Swin Transformer across the selected color spaces. Results The model’s performance was tested individually on all datasets across all color schemes, with the RGB color scheme yielding the highest accuracy for each dataset. As a result, RGB was selected for domain generalization analysis and compared with other CNN-based models, VGG-19 and ResNet-50. The comparative results demonstrate the proposed model’s effectiveness in detecting CGI, highlighting its robustness and reliability in both intra-dataset and inter-dataset evaluations. Conclusion The findings of this study highlight the Swin Transformer model’s potential as an advanced tool for digital image forensics, particularly in distinguishing CGI from natural images. The model’s strong performance across multiple datasets indicates its capability for domain generalization, making it a valuable asset in scenarios requiring precise and reliable image classification. 1 Introduction The rapid proliferation of computer-generated imagery (CGI) has posed a significant challenge in differentiating these synthetic images from natural images (NIs) captured by digital cameras. As advancements in computer graphics achieve increasingly photorealistic results, the visual distinction between CGI and NIs becomes more complex, making it a critical concern in digital forensics. The primary challenge lies in the goal of computer graphics, which is to create synthetic images that closely mimic the authenticity of natural scenes. Consequently, some CGI can appear indistinguishable from real photographs, as illustrated in Figure 1 with examples from the CIFAKE-10 [ 1 ] , columbia RCGI [ 2 ] and JSSSTU [ 3 ] datasets. Figure 1: Example of few Computer Generated (CG) images from dataset CIFAKE-10, columbia RCGI and JSSSTU datasets (from top to bottom row), respectively. The images shows the difficulty in distingushing between two classes of images with naked eye. Also, the variation in computer generated images Traditional methods for addressing this problem have typically been divided into subjective and objective approaches. Subjective methods often rely on human judgment through psychophysical experiments, whereas objective methods analyze images’ statistical and intrinsic properties. Conventional objective techniques usually involve crafting sophisticated and discriminative features and applying classifiers such as support vector machines (SVM) or ensemble models [ 6 , 7 , 8 ] . Various image editing platforms are examined using three techniques: cut-paste, copy-move, and erase-fill. The findings reveals that the accuracy of detecting forged images is influenced by several factors, including the number of images, the tampering method, image resolution, and many more. While these approaches may perform adequately on more straightforward datasets, they frequently must improve when confronted with complex datasets that include images from diverse sources. The recent rise of neural networks and vision transformers has transformed the field of computer vision, offering powerful alternatives to feature-based methods. Convolutional Neural Networks (CNNs) have demonstrated exceptional ability in learning multi-level representations from data in an end-to-end manner, making them particularly suitable for complex classification tasks. Inspired by the success of CNNs, there has been growing interest in applying these models to multimedia security and digital forensics [ 14 , 15 , 16 , 17 ] . This research introduces a novel methodology for distinguishing between computer-generated and real digital images, leveraging the capabilities of Swin Transformers. Unlike traditional approaches, Swin Transformers eliminate the reliance on handcrafted feature extraction by directly processing raw pixel data, making them particularly effective for this classification task. Our method involves both intra-dataset and inter-dataset testing, utilizing RGB, YCbCr and HSV color spaces data to enhance classification accuracy. The approach is rigorously evaluated on three diverse datasets; CiFAKE, JSSSTU, and Columbia, demonstrating its robustness and generalization across different domains. Our contributions are summarized as follows: • We propose a Swin Transformer-based framework for differentiating CGI from real digital images, emphasizing intra-dataset and inter-dataset testing to evaluate robustness. • The model incorporates advanced preprocessing techniques to enhance classification performance. • The proposed model was tested for different color spaces, namely, RGB, YCbCr and HSV. • The comparative analysis with different CNN and transfomer baseline models shows the effectiveness of our proposed model. • Our approach achieves state-of-the-art accuracy, consistently between 97-99% across multiple datasets, demonstrating its efficacy in CGI detection. The remainder of this paper is structured as follows: Section 1 outlines the challenge of distinguishing CGI from real images, emphasizing its importance in digital image forensics and the contributions of the research work. Section 2 reviews existing methods, from traditional techniques to recent profound learning advancements and the various dataset availablility. Section 3 details our proposed approach, including preprocessing steps and the Swin Transformer architecture used for classification. Section 4 presents the experimental results, describing dataset usage, experimental setups, comparative analysis and performance evaluation. Finally, Section 5 concludes the paper with a summary of findings, a discussion of limitations, and suggestions for future research directions. 2 Related Work Various methodologies have been developed in computer-generated (CG) image detection, primarily focusing on feature extraction and classification. One approach is to extract abnormal statistical traces left by specific graphic generation modules and employ threshold-based evaluation for detection. Ng et al. (2005) [ 8 ] identified physical disparities between photographic and computer-generated images, achieving an 83.5% classification accuracy by designing object geometry features. Wu et al. (2006) [ 18 ] utilized visual features such as color, edge, saturation, and texture with the Gabor filter as discriminative features. Dehnie et al. (2006) [ 19 ] emphasized differences in image acquisition between digital cameras and generative algorithms, designing features based on residual images extracted by wavelet-based denoising filters. Texture-based methods have also been developed for CG and photographic (PG) classification. Li et al. (2014) [ 20 ] achieved 95.1% accuracy using uniform gray-scale invariant local binary patterns. Peng et al. (2015) [ 21 ] combined statistical and textural features, enhancing performance with histogram and multi-fractal spectrum features. Despite their interpretability, hand-crafted feature-based methods are constrained by manual design limitations and feature description capacities. In response to the limitations of hand-crafted features, recent research has leaned towards leveraging deep learning methods for improved detection performance. For instance, Mo et al. (2018) [ 25 ] proposed a CNN-based method focusing on high-frequency components, achieving an average accuracy of over 98%. Meena and Tyagi (2021) [ 22 ] proposed a two-stream convolutional neural network, integrating a pre-trained VGG-19 network for trace learning and employing high-pass filters to emphasize noise-based features. Yao et al.