Home

Awesome

Federated Domain Generalization with Generalization Adjustment - CVPR 2023

Video of our work

Alt text

Poster of our work

image

Paper of our work

This repo provides a demo for the CVPR 2023 paper "Federated Domain Generalization with Generalization Adjustment". paper link

To cite, please use:

@InProceedings{Zhang_2023_CVPR,
    author    = {Zhang, Ruipeng and Xu, Qinwei and Yao, Jiangchao and Zhang, Ya and Tian, Qi and Wang, Yanfeng},
    title     = {Federated Domain Generalization With Generalization Adjustment},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023},
    pages     = {3954-3963}
}

Requirements

Dataset

Firstly create directory for log files and change the dataset path (pacs_path, officehome_path and terrainc_path) and log path (log_count_path) in configs/default.py. Please download the datasets from the official links:

Training from scratch

We release the code for PACS dataset and the other two benchmarks can be applied by only changing the dataloader_obj in data/{officehome, terrainc}_dataset.py. All the five FedDG methods are released (FedAvg, FedProx, SCAFFOLD, AM, RSC).

Then running the code:

python algorithms/fedavg/train_pacs_GA.py --test_domain p --lr 0.001 --batch_size 16 --comm 40 --model resnet18 --note debug

Acknowledgement

Part of our code is borrowed from the following repositories.