A modular Python implementation of FairVFL adapted for the HAM10000 skin lesion dataset.
This project provides a research-ready codebase for exploring fairness and privacy in vertical federated learning using both image and tabular medical data and demonstrates metrics and plots on a modern front-end dashboard.
main.py— Entry point for training and evaluationdata.py— Data loading and preprocessing (HAM10000 images + metadata)model.py— Model architectures (CNN, tabular encoder, fairness heads)train.py— Training routinesevaluate.py— Evaluation and fairness audit routinesdashboard.py— Flask/SocketIO backend for dashboard live metricstemplates/dashboard.html— Dashboard front-end templatestatics/dashboard.css— Dashboard CSS stylesstatics/dashboard.js— Dashboard interactive JSrequirements.txt— Python dependencies.gitignore— Standard ignores for Python and data/data/— Place the HAM10000 dataset here
-
Clone this repository.
-
Download the HAM10000 dataset from here
Place the extracted folders and CSV in your/datadirectory as follows:data/ ├── HAM10000_images_part_1/ │ ├── ISIC_0024306.jpg │ ├── ... ├── HAM10000_images_part_2/ │ ├── ISIC_0032012.jpg │ ├── ... ├── HAM10000_metadata.csv -
Install dependencies:
pip install -r requirements.txt
To launch the live dashboard and start FairVFL training with real-time metrics, run:
python dashboard.pyIt opens http://localhost:5050 in your browser to view the dashboard. Dashboard front-end is served via Flask/SocketIO and will automatically update with training progress.
If you only want to run the core training and evaluation via CLI, use:
python main.pyNote: For faster testing, you can reduce the percentage of data used by setting the PERCENTAGE variable in main.py to a lower value (e.g., PERCENTAGE = 0.1 for 10% of the data). This will significantly speed up training and evaluation, making it ideal for quick experiments or debugging.**
PERCENTAGE = 0.1 # Use only 10% of data for fast testing