Metaheuristic-Driven Optimization of Ensemble Deep Learning Model for Image Manipulation Classification
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.
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/ -
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 -
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/
📏 Preprocessing
- All images were resized to
512×512. - Split: 70% training / 20% testing / 10% validation.
To generate the manipulated image classes, preprocessing operations were applied with MATLAB:
Double JPEG compression:
- QF1 ∈ {85, 86, …, 97, 98} (random)
- QF2 ∈ {75, 85, 95} (fixed)
Gamma correction and histogram equalization:
imadjust(I, [low high] = stretchlim(I, 2/100), [], gamma=0.8)
imadjust(I, [low high] = stretchlim(I, 6/100), [], gamma=1.2)
histeq(I)Gaussian and average filtering:
imfilter(I, fspecial('gaussian', 3, 1), 'symmetric')
imfilter(I, fspecial('gaussian', 5, 1.5), 'symmetric')
imfilter(I, fspecial('average', 3), 'symmetric')Sharpening filters:
imfilter(I, fspecial('unsharp', 0.5), 'symmetric')
imsharpen(I, 'Radius', 1.5, 'Amount', 2)
imsharpen(I, 'Radius', 2, 'Amount', 2)Wiener and wavelet filtering:
wiener2(I, [3 3])
wiener2(I, [5 5])
wdencmp('gbl', I, 'db12', 2, 8, 'h', 'one')Clone the repository:
git clone https://github.com/deepbrainscu/ImageManipulation.git
cd ImageManipulationInstall dependencies:
pip install -r requirements.txtPrepare datasets (download from links above, preprocess as described).
Train a model:
python im_history.pyPretrained model weights can be downloaded from the following link:
👉 Download Weights (Google Drive)
Place the downloaded .h5 files in the weights/ directory or specify their path when running evaluation:
Evaluate:
python predict_genetic_ucid.py --image "D:\\Imhistory\\ImageHistory\\Datasets\\UCID\\Test\\QF=75\\Adjustment\\3_uniformT75_adj1.jpg" --qf 75- Python 3.9+
- TensorFlow 2.9+
- NumPy
- OpenCV
- scikit-learn
- Matplotlib
- Preprocessing and manipulation of datasets using MATLAB functions.
- Training deep learning models from scratch (no transfer learning).
- Evaluation metrics: Accuracy, Precision, Recall, F1-Score.
- Comparison between standard CNNs and SE-enhanced versions, plus Vision Transformers.
If you use this repository, please cite:
@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
- 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 (MIT License).
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.