Image Classification
Keras
litav commited on
Commit
502662f
·
verified ·
1 Parent(s): 06de433

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -9,12 +9,14 @@ CNN is a type of deep learning model specifically designed to process and analyz
9
  Our goal is to accurately classify the source of the image with at least 85% accuracy and achieve at least 80% in the Recall test.
10
 
11
  *Installation instructions*
 
12
  The following libraries or packages are required: numpy, pandas, tensorflow, keras, matplotlib, sklearn, cv2.
13
  We prepare the data for the model by sorted the images into 2 types of folders which are divided equally(real art- labeled as 0, fake art- labeled as 1).
14
  Our CNN model is based on 2,800 images that have been resized and normalized, the files formats is PNG‬, JPG‬.
15
  The images are divided into a training set that contains 90% from data and a testing set that contains the remaining 10%.
16
 
17
  *CNN model architecture*
 
18
  Convolutional Layers: for feature extraction from images, applying 32 or 64 filters with a size of 3x3, the activation function used id ReLU .
19
  MaxPooling Layers: for reducing the spatial dimensions to a size of 2x2.
20
  Flatten: converts the multi-dimensional output of previous layers into a one-dimensional vector for input into fully connected layers.
@@ -22,6 +24,7 @@ Dropout Layer: to prevent overfitting with a thinning rate of 0.5 after the firs
22
  Dense Layer: last layer of dense for classification with a sigmoid activation function.
23
 
24
  *Training Details*
 
25
  The model is trained using binary cross-entropy loss and the Adam optimizer. It is validated with 20% of the training data reserved for validation.
26
  The model employs 4-fold cross-validation to ensure robust performance.
27
  The following callbacks are used during training:
@@ -30,6 +33,7 @@ ModelCheckpoint: Saves the best weights during training based on validation accu
30
  The best-performing model from each fold is saved, and the model with the best weights overall is selected for final testing.
31
 
32
  *Performance Evaluation*
 
33
  After training, the model is evaluated on the test set. The following metrics are used to measure performance:
34
  Accuracy: The percentage of correct classifications.
35
  Precision, Recall, F1-Score: For evaluating the model’s classification ability on both real and AI-generated images.
@@ -37,11 +41,13 @@ Confusion Matrix: Displays true positives, false positives, true negatives, and
37
  Instructions
38
 
39
  *To run the project*
 
40
  Place the images in the respective training and testing folders.
41
  Preprocess the images by resizing and normalizing them.
42
  Train the model using the provided code.
43
  Evaluate the model on the test set.
44
 
45
  *Visualization results*
 
46
  Confusion Matrix: To visualize the classification performance.
47
  Training and Validation Metrics: Plots for accuracy and loss over the epochs.
 
9
  Our goal is to accurately classify the source of the image with at least 85% accuracy and achieve at least 80% in the Recall test.
10
 
11
  *Installation instructions*
12
+
13
  The following libraries or packages are required: numpy, pandas, tensorflow, keras, matplotlib, sklearn, cv2.
14
  We prepare the data for the model by sorted the images into 2 types of folders which are divided equally(real art- labeled as 0, fake art- labeled as 1).
15
  Our CNN model is based on 2,800 images that have been resized and normalized, the files formats is PNG‬, JPG‬.
16
  The images are divided into a training set that contains 90% from data and a testing set that contains the remaining 10%.
17
 
18
  *CNN model architecture*
19
+
20
  Convolutional Layers: for feature extraction from images, applying 32 or 64 filters with a size of 3x3, the activation function used id ReLU .
21
  MaxPooling Layers: for reducing the spatial dimensions to a size of 2x2.
22
  Flatten: converts the multi-dimensional output of previous layers into a one-dimensional vector for input into fully connected layers.
 
24
  Dense Layer: last layer of dense for classification with a sigmoid activation function.
25
 
26
  *Training Details*
27
+
28
  The model is trained using binary cross-entropy loss and the Adam optimizer. It is validated with 20% of the training data reserved for validation.
29
  The model employs 4-fold cross-validation to ensure robust performance.
30
  The following callbacks are used during training:
 
33
  The best-performing model from each fold is saved, and the model with the best weights overall is selected for final testing.
34
 
35
  *Performance Evaluation*
36
+
37
  After training, the model is evaluated on the test set. The following metrics are used to measure performance:
38
  Accuracy: The percentage of correct classifications.
39
  Precision, Recall, F1-Score: For evaluating the model’s classification ability on both real and AI-generated images.
 
41
  Instructions
42
 
43
  *To run the project*
44
+
45
  Place the images in the respective training and testing folders.
46
  Preprocess the images by resizing and normalizing them.
47
  Train the model using the provided code.
48
  Evaluate the model on the test set.
49
 
50
  *Visualization results*
51
+
52
  Confusion Matrix: To visualize the classification performance.
53
  Training and Validation Metrics: Plots for accuracy and loss over the epochs.