Skip to content

KCL-BMEIS/UltraFlwr

Repository files navigation

UltraFlwr: Federated Object Detection

UltraFlwr provides random and equally sized YOLO compatible data partitioning, federated training, and flexible testing capabilities. It integrates Ultralytics YOLO off-the-shelf within the Flower framework.

Poster Acceptance - MICCAI-AMAI'25 [ArXiv Link]


Inspiration from existing issues:

  1. Exact Ask in Ultralytics Library | Issue
  2. Problem of loading the YOLO state | dict Issue
  3. Need to easily integrate flower strategies with Ultralytics | Issue
  4. Request from mmlab support in flower indicates a want from the community to be able to do federated object detection | Issue

Inspiration from actual need:

  1. Ultralytics allows the easy change of final heads (during inference) for multiple tasks.
  2. The Ultralytics style datasets are also well supported for easy off-the-shelf testing (and coco benchmarking).
  3. Allow flower strategies become smoothly integrated with Ultralytics' YOLO.
  4. Create detection specifc partial aggregation strategies, such as YOLO-PA.

Benchmarks

Comprehensive benchmarks are included in the benchmarks folder.

Usage (Training)

We provide usage guides using pills dataset under these settings:

  1. Single machine simulation using Python virtual environment
  2. Single machine simulation using Docker

A deployment demo video is shown below, click to watch it!

Watch the video

Usage (Testing)

For testing and getting client-wise global and local scores: ./FedYOLO/test/test.sh

  • This automatically prints out tables in Ultralytics style.

To collect tables (suitable for latex) for all scores across all global and local data and models: python /FedYOLO/test/master_table.py

Baseline Tasks

  • Proper Federated Training using off-the-shelf Flower strategies.
  • Inference Code for Local and Global datasets using client models.
  • Inference Code for Local and Global datasets using server model.
  • Fast Prototyping through simple bash script launch and logging.
  • Propose new custom strategy in the Flwr framework. Our proposal: YOLO-PA
  • Dynamically adapt entire code base to any number of clients and not rely on manually changing code base.

To-Dos

  • Develop scripts more sophisticated/adaptable data splits.

Contribution Guideline

We are working on formulating rules but feel free to raise issues and PRs.

Citation

Please cite the following work if you use our code:

@article{li2025ultraflwr,
  title={UltraFlwr--An Efficient Federated Medical and Surgical Object Detection Framework},
  author={Li, Yang and Kundu, Soumya Snigdha and Boels, Maxence and Mahmoodi, Toktam and Ourselin, Sebastien and Vercauteren, Tom and Dasgupta, Prokar and Shapey, Jonathan and Granados, Alejandro},
  journal={arXiv preprint arXiv:2503.15161},
  year={2025}
}

About

[MICCAI-AMAI'25] Federated YOLO with Flower and Ultralytics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •