The paper describing MDIF is available in the paper directory.
The architecture for MDIF is shown in the below flowchart
flowchart LR
A[Image Input]
subgraph Stream-A [Stream A]
B[MobileNetV3-Small] --> C[576D Spatial<br>Feature Vector]
end
subgraph Stream-B [Stream B]
D[Signal Processing<br>using DCT + DFT] --> E[192D Spectral<br>Feature Vector]
end
subgraph Stream-C [Stream C]
F[Extract Depth Features<br>using Sobel Operator] --> G[Train MiDaS 3.0] --> H[9D Depth<br>Feature Vector]
end
A --> B
A --> D
A --> F
C --> I[777D Concatenated<br>Vector]
E --> I
H --> I
I --> J[3 Layer MLP]
J --> Classes
subgraph Classes
K[Authentic<br>Photograph]
L[Fully<br>AI-Generated]
M[Partially<br>AI-Inpainted]
end
style Stream-A fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px,color:#000
style Stream-B fill:#e8f5e9,stroke:#4caf50,stroke-width:2px,color:#000
style Stream-C fill:#fff3e0,stroke:#ff9800,stroke-width:2px,color:#000
Note
Refer to the readme in the data/* directory for how to set up the datasets!
| Dataset | Type |
|---|---|
| CIFAKE | Generated Images |
| Unbiased Tiny GenImage | Generated Images |
| AutoSplice | Inpainted Images |
| CocoGlide | Inpainted Images |
| SAGI | Inpainted Images |
Firstly, clone this repo,
git clone https://github.com/joejo-joestar/MDIF.git
cd MDIFThen install Miniconda from the Anaconda Website.
Note
The notebooks running locally assumes you are using a conda environment!
Then open a command prompt, and run the following. This will create and activate a python 3.11 environment called mdif. The environment.yml will be used to create the environment and install all needed dependencies.
conda env createconda activate mdifAfter running this, your CMD prompt should have a "(mdif)" prefixed at the start.
Then install the mdif/* directory as an editable package
pip install -e .And now you can check out the mdif.ipynb notebook to see how the framework works!
Tip
To deactivate the environment, simply run:
conda deactivateTo remove the environment completely, run:
conda env remove -n mdifNote
Remember to select mdif as the kernel for all the notebooks!
This work is builds on and uses Intel ISL's MiDaS and Qualcomm's MobileNet V3 Small model.
The framework has been fine-tuned and trained on the AutoSplice, CIFAKE, CocoGlide, and Unbiased Tiny GenImage datasets.
The sample image app/sample/flower_real is a photo by joejo joestar on Unsplash and the app/sample/flower_gen was generated using Google's Nano Banana (Gemini 2.5 Flash Image)
Note
This repo also includes the isl-org/MIDAS repository to help speed up the deployed streamlit app!
| ID No. | Name |
|---|---|
| 2022A7PS0019U | Joseph Cijo |
| 2022A7PS0077U | Adithya Sunoj |
| 2022A7PS0140U | Akamksha Ranil |
