Official implementation of the paper:
"Source Camera Model Identification via Federated Learning using Laplacian-based Patches"
Published in IEEE Transactions on Artificial Intelligence (IEEE TAI).
This work proposes a Federated Learning (FL) based framework for Source Camera Model Identification (SCMI) using Laplacian-based image patches and the proposed FedFFTNet architecture.
The framework consists of:
- 📌 Laplacian-based informative patch extraction
- 🌐 Federated data distribution across clients
- 🧠 Federated model training using FedFFTNet
- 📷 Source Camera Model Identification
📄 Paper Link:
Source Camera Model Identification via Federated Learning using Laplacian-based Patches
The complete pipeline consists of two major stages:
Raw Images
│
▼
Laplacian-based Patch Extraction
│
▼
Federated Client Distribution
│
▼
FedFFTNet Training
│
▼
Source Camera Model Prediction
Ensure your dataset is pre-split into train and test folders.
data/
├── train/
│ ├── class_1/
│ ├── class_2/
│ └── ...
│
├── test/
│ ├── class_1/
│ ├── class_2/
│ └── ...
Notebook:
Fed_DataSplit_Laplacian.ipynb
This notebook performs:
- Laplacian-based informative patch extraction
- Federated client data distribution
- Global server data allocation
- Test set generation
| Variable | Type | Default | Description |
|---|---|---|---|
datapath |
str |
./data |
Source dataset directory |
number_clients |
int |
5 |
Number of federated clients |
initial_ratio |
float |
0.06 |
Ratio of globally available data |
dist_type |
str |
equal |
Data distribution type (equal, random, skew) |
Figure 1. Laplacian-based patch extraction and federated data distribution.
After execution, the generated patches/ directory should look like:
patches/
├── initial/
├── clients/
│ ├── client_1/
│ ├── client_2/
│ └── ...
│
└── test/
Notebook:
FedLearn_FedFFTNet.ipynb
This notebook performs:
- Federated training
- Global aggregation
- Local client optimization
- Source Camera Model classification
| Variable | Type | Default | Description |
|---|---|---|---|
root |
str |
./patches |
Patched dataset directory |
global_available |
bool |
True |
Availability of global server data |
batchsize |
int |
128 |
Training batch size |
ROUNDS |
int |
100 |
Number of communication rounds |
CLIENT_EPOCHS |
int |
1 |
Local client epochs per round |
GLOBAL_EPOCHS |
int |
30 |
Global server training epochs |
learning_rate |
float |
0.001 |
Optimizer learning rate |
device |
str |
cuda:0 |
Training device |
Figure 2. Proposed FedFFTNet architecture for federated SCMI.
Run:
Fed_DataSplit_Laplacian.ipynbThis creates the federated patch dataset.
Run:
FedLearn_FedFFTNet.ipynbThis starts federated training across all clients.
| Distribution | Description |
|---|---|
equal |
Equal data distribution across all clients |
random |
Random client-wise data distribution |
skew |
Non-IID skewed distribution |
If you use this work in your research, please cite:
@article{chakraborty2025source,
title={Source Camera Model Identification via Federated Learning using Laplacian-based Patches},
author={Chakraborty, Rejoy and Goyal, Puneet},
journal={IEEE Transactions on Artificial Intelligence},
year={2025},
publisher={IEEE}
}This repository is intended strictly for:
- Academic research
- Educational purposes
- Experimental evaluation
- Rejoy Chakraborty
- Puneet Goyal
If you find this repository useful, consider giving it a ⭐ on GitHub.

