Video: https://youtu.be/8PiLAn2j9gw

1. Prepare the Project Folder

Make sure the project folder contains the required Python files:

(https://github.com/hkuspace-pu/Deekfake-detection/tree/main/Frontend)

deepfake_streamlit_modular/
│
├── app.py
├── config.py
├── model_architectures.py
├── checkpoint_utils.py
├── image_processing.py
├── inference.py
├── ui_components.py
├── requirements.txt
└── models/

The models/ folder should contain the trained .pth model files, for example:

(https://liveplymouthac-my.sharepoint.com/:f:/g/personal/ka_c_wong-1_students_plymouth_ac_uk/IgDQXqbmKXVVQI9mimKJIutVAVf6ikCFNYGPDCRjiUcr1gg?e=lKaeOe)

models/
├── spatial_resnet50_final_state_dict.pth
└── dft_resnet50_final_state_dict.pth

2. Create a Virtual Environment

Open a terminal inside the project folder.

Using Conda

conda create -n deepfake_app python=3.10
conda activate deepfake_app

Using Python venv

python -m venv deepfake_app_env

Activate on Windows PowerShell:

deepfake_app_env\Scripts\activate

Activate on Git Bash:

source deepfake_app_env/Scripts/activate