Image Classification
Keras
English
art
benjaminStreltzin commited on
Commit
541050d
·
verified ·
1 Parent(s): 059de53

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -65
README.md CHANGED
@@ -1,70 +1,87 @@
1
  ---
2
  license: unknown
 
 
 
 
3
  ---
4
 
5
- Real Art vs AI-Generated Art Image Classification with CNN + ELA
6
- Project Overview
7
- This project combines a Convolutional Neural Network (CNN) with Error Level Analysis (ELA) for classifying images as 'real art' or 'fake art'. The CNN model extracts features from images, while ELA enhances artifacts that help in distinguishing real art from AI-generated art.
8
-
9
- Objective: Achieve at least 85% accuracy and 80% recall in classifying 'real art' versus 'fake art'.
10
-
11
- Installation
12
- Required Libraries:
13
-
14
- numpy
15
- pandas
16
- tensorflow
17
- keras
18
- matplotlib
19
- sklearn
20
- cv2
21
- pillow (for ELA)
22
- Data Preparation
23
- Data:
24
-
25
- 2,800 images (PNG, JPG)
26
- Labeled as 'real art' (0) and 'fake art' (1)
27
- Split: 90% for training and 10% for testing
28
- Preprocessing:
29
-
30
- Resize and normalize images.
31
- Apply Error Level Analysis (ELA) to highlight discrepancies in image quality.
32
- Model Architecture
33
- CNN Architecture:
34
-
35
- Convolutional Layers: Use 32 or 64 filters with a size of 3x3, activation function ReLU.
36
- MaxPooling Layers: Reduce spatial dimensions to 2x2.
37
- Flatten Layer: Convert multi-dimensional output to a 1D vector.
38
- Dropout Layer: Apply dropout with a rate of 0.5 after the first Dense layer.
39
- Dense Layer: Final classification layer with a sigmoid activation function.
40
- ELA Integration:
41
-
42
- Preprocessing: Apply ELA to images to emphasize differences between real and fake art.
43
- Feature Extraction: Combine ELA-enhanced images with CNN features for improved classification.
44
- Training
45
- Parameters:
46
-
47
- Epochs: [To be filled]
48
- Optimizer: [To be filled]
49
- Loss Function: Binary cross-entropy
50
- Validation: 20% of the training data reserved for validation
51
- Cross-Validation: 4-fold cross-validation
52
- Callbacks:
53
-
54
- EarlyStopping: Stops training if validation accuracy doesn't improve for a set patience period.
55
- ModelCheckpoint: Saves the best model weights based on validation accuracy.
56
- Performance Evaluation
57
- Metrics:
58
-
59
- Accuracy: Percentage of correct classifications
60
- Precision, Recall, F1-Score: Evaluate classification ability on both real and AI-generated images
61
- Confusion Matrix: Displays true positives, false positives, true negatives, and false negatives
62
- Instructions
63
- Organize Data: Place images into respective training and testing folders.
64
- Preprocess Images: Resize, normalize, and apply ELA.
65
- Train the Model: Use the provided code and specified parameters.
66
- Evaluate Performance: Assess the model on the test set.
67
- Visualization
68
- Confusion Matrix: To visualize classification performance.
69
- Training and Validation Metrics: Plots for accuracy and loss over epochs.
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
 
1
  ---
2
  license: unknown
3
+ metrics:
4
+ - accuracy
5
+ tags:
6
+ - art
7
  ---
8
 
9
+ # Model Card for Model ID
10
+
11
+ This model is designed for classifying images as either 'real art' or 'fake art' using a Convolutional Neural Network (CNN) combined with Error Level Analysis (ELA). The CNN extracts features from images, and ELA enhances artifacts that help distinguish between real and AI-generated art.
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+
17
+ This model utilizes a CNN architecture augmented with ELA techniques to classify images into two categories: 'real art' and 'fake art'. The CNN is trained to detect patterns and features, while ELA highlights inconsistencies or artifacts that are characteristic of AI-generated images.
18
+
19
+
20
+ ### Direct Use
21
+
22
+ This model can be used to classify images as 'real art' or 'fake art' based on the presence of artifacts and features characteristic of each category.
23
+
24
+
25
+
26
+ ### Out-of-Scope Use
27
+
28
+ The model may not perform well on images outside the scope of art or where the visual characteristics are drastically different from those in the training dataset. It is not suitable for use in other domains like medical imaging or non-artistic visual data.
29
+
30
+ ## Bias, Risks, and Limitations
31
+
32
+ Users should be aware of the limitations and potential biases of the model, including the possibility of misclassification for artworks that significantly differ from those in the training set. Continuous evaluation and refinement may be required to maintain accuracy.
33
+
34
+ ### Recommendations
35
+
36
+
37
+ ## How to Get Started with the Model
38
+
39
+ Prepare Data: Organize your images into appropriate folders and preprocess them by resizing and normalizing.
40
+ Train the Model: Use the provided code to train the model on your dataset.
41
+ Evaluate: Test the model on a separate set of images to assess performance.
42
+
43
+ [More Information Needed]
44
+
45
+ ## Training Details
46
+
47
+ ### Training Data
48
+
49
+ Dataset: [Link to dataset or description]
50
+ Preprocessing: Images are resized, normalized, and enhanced with ELA to highlight features.
51
+
52
+ ### Training Procedure
53
+
54
+ Images are resized to a uniform dimension and normalized. ELA is applied to emphasize artifacts in the images.
55
+
56
+
57
+
58
+ #### Training Hyperparameters
59
+
60
+
61
+
62
+ ## Evaluation
63
+
64
+
65
+
66
+ ### Testing Data, Factors & Metrics
67
+
68
+
69
+ #### Testing Data
70
+
71
+
72
+
73
+ #### Factors
74
+
75
+
76
+
77
+ #### Metrics
78
+
79
+
80
+
81
+ ### Results
82
+
83
+
84
+
85
+ #### Summary
86
+
87