This invention discloses a method, apparatus, device, and medium for multi-class image
forgery detection, relating to the field of
image processing technology. The method can identify real faces, forged faces, real
anime faces, forged
anime faces, real sketch faces, and forged sketch faces. A multi-
branch network, by integrating the characteristics of pre-trained models such as EfficientNet, ResNet, and DenseNet, combined with a
feature fusion attention layer, significantly improves the classification ability for complex image categories. To construct a high-quality forged sketch dataset, a CycleGAN-based forged
image generation framework was implemented. Adversarial loss, cycle consistency loss, and perceptual loss were used to optimize the generation effect, enhancing the diversity and robustness of the dataset. Experimental results show that the proposed model exhibits excellent performance in multi-class classification tasks, with an average accuracy and F1
score of 98.12%, demonstrating excellent generalization ability in both real and forged image classification.