Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

FedReID

> 开发工具
Open source

Implementation of Federated Learning to Person Re-identification (Code for ACMMM 2020 paper)

100 stars0 likes0 views
WebsiteGitHub

About

Implementation of Federated Learning to Person Re-identification (Code for ACMMM 2020 paper)

FedReID

Code for ACMMM 2020 oral paper - Performance Optimization for Federated Person Re-identification via Benchmark Analysis

Personal re-identification is an important computer vision task, but its development is constrained by the increasing privacy concerns. Federated learning is a privacy-preserving machine learning technique that learns a shared model across decentralized clients. In this work, we implement federated learning to person re-identification (FedReID) and optimize its performance affected by statistical heterogeneity in the real-world scenario.

Algorithm: Federated Partial Averaging (FedPav)

Prerequisite

  • Install the libraries listed in requirements.txt
    bash
    pip install -r requirements.txt

Datasets preparation

** We are now releasing the processed datasets.** (April, 2022)

Please email us (cc this email in case it is filtered as spam) to request for the datasets with:

  1. A short self-introduction.
  2. The purposes of using these datasets.

⚠️ Further distribution of the datasets are prohibited.

We use 9 popular ReID datasets for the benchmark.

Dataset Preprocess From Scratch

You can obtain the datasets from awesome-reid-dataset

Dataset folder structure after preprocessing is provided here

You can follow the following steps to preprocess datasets:

  1. Download all datasets to data_preprocess/data folder.
  2. We provide the Json files for spliting the small datasets. (We haven't officially release the split.json files. Please send an email with short introduction to request for them.)
  3. Run the following script to prepare all datasets:
    bash
    python prepare_all_datasets.py
  4. Move the data folder to the root directory.
    move data_preprocess/data ./
  5. For federated-by-identity scenario:
    bash
    python split_id_data.py
  6. For federated-by-camera scenario:
    bash
    python split_camera_data.py
  7. For merging all datasets to do merge training, you can use rename_dataset.py and mix_datasets.py.

Run the experiments

Remember to save the log file for later use!

  • Run Federated Partial Averaging (FedPav):
    bash
    python main.py
  • Run FedPav with knowledge distillation (KD):
    bash
    python main.py --kd --regularization
  • Run FedPav with cosine distance weight (CDW):
    bash
    python main.py --cdw
  • Run FedPav with knowledge distillation and cosine distance weight:
    bash
    python main.py --cdw --kd --regularization

Citation

…

Maintainers

  • Weiming Zhuang, Nanyang Technological University. :octocat:
  • Xin Gan, Nanyang Technological University. :octocat:
  • Daiying Yin, Nanyang Technological University. (Contributor)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonfederated-learningfederated-learning-algorithmfederated-learning-applicationperson-reidentification

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具