Skip to content

harshvardhan-khachane/AI-Generated-Image-Detection-HarshvardhanK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

AI-Generated-Image-Detection-HarshvardhanK

Brief problem statement:

Hi! This project was created for the bitgrit competition for "Generative AI" (https://bitgrit.net/competition/18#). We must categorise the photos as real (label '0') or artificially created (label '1'). The datasets contain just 20 × 20 x 3 (channels) sized photos. Since the underlying information has already been altered, it cannot be changed back to the original images. The objective of this challenge is to forecast the 'labels' column using the supplied data.

Classifiers and techniques used

  1. *PCA(*Principal Component Analysis)
  2. Naive Bayes Classifier
  3. Softmax Classifier
  4. Support Vector Classifier
  5. Adaboost
  6. GradBoosting
  7. Random Forest
  8. Voting Classifier

Procedure

  1. After loading the data, preprocessed it by changing all features in the range of 0 to 1 using the MinMaxScaler.

  2. Divide the test and train sets of the training data (1:4).

  3. 3 different classifiers were applied to the data, and the accuracy was evaluated.

    1. Naive Bayes Classifier: The accuracy was 62.1904761904762% Pic 1

    2. Softmax Classifier The accuracy was 80.85714285714286% pic2

    3. Support Vector Classifier(with linear kernel) The accuracy was 80.95238095238095% pic3

  4. Following that, I proceeded to apply Principal Component Analysis (PCA) to the data and evaluated its accuracy using the aforementioned classifiers.The outcome of this analysis is as follows:

    pic4

    pic5

  5. The Support Vector Classifier (SVC) demonstrated the most favourable outcomes, displaying the highest performance among the classifiers used. Through meticulous adjustment of the number of components, it was determined that when set to 208, the Linear Kernel achieved a prediction accuracy of 86.47619047619047%.

    pic6

  6. PCA+SVC Linear performed pretty well, with a f1 score of 0.7968 .

  7. Subsequently, I explored more advanced techniques such as bagging, boosting, and other methods in an attempt to enhance the accuracy even further.

  8. Initially, I employed the Bagging technique, which resulted in an f1 score of 0.85588235. pic7

  9. Next, I experimented with GradBoosting. However, when using lower learning rates, the accuracy did not meet expectations. On the other hand, when using higher learning rates, the model demonstrated overfitting, with the validation set showing significantly poorer accuracy compared to the testing set. Consequently, I decided not to include this approach in the final submission. pic8

  10. Lastly, I employed AdaBoosting with SVC as the base classifier, considering its superior accuracy from previous attempts. Notably, this approach yielded the highest accuracy thus far, achieving an f1 score of 0.87572254. pic9

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published