This project aims to classify images into two categories: AI-generated images and real images. The motivation behind this project is to distinguish between authentic images and those created by artificial intelligence.
Before running this project, ensure you have the following prerequisites installed and set up:
- NumPy, PyTorch, Matplotlib, Timm, Torchmetrics, cv2
The dataset used for this project is available on Kaggle and can be downloaded directly into your project directory using the Kaggle API. The dataset is titled "AI Generated Images vs. Real Images" and consists of two main categories representing the two classes of images we aim to classify.
Dataset class imbalance analysis (Can be fixed in future)
I used the pretrained RexNet_150 model for this project. It was a viable option because of it's classification scores.
The accuracy of the model on test data came out to be 80% in this experiment. Prediction results on test data
Overall, this project could serve as a preliminary to high-end classifiers that can help us identify real, organic and authentic images from the AI generated ones. In the future, this could be coupled with even more powerful CNNs to improve accuracy and be trained on larger datasets.