-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
166 lines (125 loc) Β· 5.29 KB
/
Copy pathREADME.txt
File metadata and controls
166 lines (125 loc) Β· 5.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
[](https://doi.org/10.5281/zenodo.18498701)
# Metaheuristic-Driven Optimization of Ensemble Deep Learning Model for Image Manipulation Classification- https://github.com/deepbrainscu/ImageManipulation
## π Description
This repository provides the implementation of deep learning models for **multi-manipulation classification** in digital images.
The framework leverages **SE-ResNet50**, **SE-DenseNet121**, **SE-InceptionV3**, and **ViT-Base/32** architectures to detect various preprocessing manipulations applied to images.
Models were trained from scratch (no transfer learning) and evaluated on three benchmark datasets.
---
## π Dataset Information
This study utilized **three benchmark datasets** to evaluate the proposed method under diverse image formats and compression characteristics:
- **BOSSBase** (Boroumand & Fridrich, 2018)
Format: `.pgm` (uncompressed)
Widely adopted in digital image forensics and steganalysis.
Publicly available: [https://dde.binghamton.edu/download/](https://dde.binghamton.edu/download/)
- **UCID** (Schaefer & Stich, 2003; Nguyen et al., 2022)
Format: `.tif` (uncompressed)
Originally developed for research on image compression and retrieval.
Accessible at: [https://www.kaggle.com/datasets/flamense160/ucid-dataset/data](https://www.kaggle.com/datasets/flamense160/ucid-dataset/data)
- **ImageNet-Mini10K** (subset of Deng et al., 2009)
Format: `.jpeg`
Contains randomly selected images from 10 classes of the original ImageNet database.
Full ImageNet available at: [https://www.image-net.org/](https://www.image-net.org/)
π **Preprocessing**
- All images were resized to `512Γ512`.
- Split: **70% training / 20% testing / 10% validation**.
### βοΈ Manipulation Classes
To generate the manipulated image classes, preprocessing operations were applied with MATLAB:
#### πΉ Compressed-only image class
Double JPEG compression:
- QF1 β {85, 86, β¦, 97, 98} (random)
- QF2 β {75, 85, 95} (fixed)
#### πΉ Intensity-adjustment class
Gamma correction and histogram equalization:
````matlab
imadjust(I, [low high] = stretchlim(I, 2/100), [], gamma=0.8)
imadjust(I, [low high] = stretchlim(I, 6/100), [], gamma=1.2)
histeq(I)
````
#### πΉ Low-pass class
Gaussian and average filtering:
````matlab
imfilter(I, fspecial('gaussian', 3, 1), 'symmetric')
imfilter(I, fspecial('gaussian', 5, 1.5), 'symmetric')
imfilter(I, fspecial('average', 3), 'symmetric')
````
#### πΉ High-pass class
Sharpening filters:
````matlab
imfilter(I, fspecial('unsharp', 0.5), 'symmetric')
imsharpen(I, 'Radius', 1.5, 'Amount', 2)
imsharpen(I, 'Radius', 2, 'Amount', 2)
````
#### πΉ Denoising class
Wiener and wavelet filtering:
````matlab
wiener2(I, [3 3])
wiener2(I, [5 5])
wdencmp('gbl', I, 'db12', 2, 8, 'h', 'one')
````
---
## π Usage Instructions
Clone the repository:
````bash
git clone https://github.com/deepbrainscu/ImageManipulation.git
cd ImageManipulation
````
Install dependencies:
````bash
pip install -r requirements.txt
````
Prepare datasets (download from links above, preprocess as described).
Train a model:
````bash
python im_history.py
````
### π₯ Model Weights
Pretrained model weights can be downloaded from the following link:
π [Download Weights (Google Drive)](https://drive.google.com/drive/folders/1peKxjK1ZCMFJ4gq3_6H_SkyVgpsiUEQm?usp=drive_link)
Place the downloaded `.h5` files in the `weights/` directory or specify their path when running evaluation:
Evaluate:
````bash
python predict_genetic_ucid.py --image "D:\\Imhistory\\ImageHistory\\Datasets\\UCID\\Test\\QF=75\\Adjustment\\3_uniformT75_adj1.jpg" --qf 75
````
## π¦ Requirements
- Python 3.9+
- TensorFlow 2.9+
- NumPy
- OpenCV
- scikit-learn
- Matplotlib
---
## π§ͺ Methodology
1. Preprocessing and manipulation of datasets using MATLAB functions.
2. Training deep learning models from scratch (no transfer learning).
3. Evaluation metrics: Accuracy, Precision, Recall, F1-Score.
4. Comparison between standard CNNs and SE-enhanced versions, plus Vision Transformers.
---
## π Citations
If you use this repository, please cite:
```bibtex
@article{karakis2025imagemanipulation,
author = {Karakis, Rukiye, Gurkahraman Kali, Unsal Emre, Ates Volkan},
title = {Metaheuristic-Driven Optimization of Ensemble Deep Learning Model for Image Manipulation Classification},
journal = {PeerJ Computer Science},
year = {2025},
note = {Under review}
}
```
Additional references:
- He et al., 2016 β ResNet
- Huang et al., 2017 β DenseNet
- Szegedy et al., 2016 β InceptionV3
- Hu et al., 2018 β Squeeze-and-Excitation Networks
- Dosovitskiy et al., 2021 β Vision Transformers
- Boroumand & Fridrich, 2018 β BOSSBase
- Schaefer & Stich, 2003 β UCID
---
## π License & Contributions
- Licensed under the **MIT License**.
- Contributions are welcome via pull requests.
- Parts of SE-ResNet, SE-DenseNet, and SE-Inception implementations were adapted from:
[keras-squeeze-excite-network](https://github.com/titu1994/keras-squeeze-excite-network) (MIT License).
---
## π Acknowledgments
We thank the authors of open-source repositories that inspired this work.
Special thanks to the **DeepBrain research group** and **SCU team members** for their support.