Skip to content

LabIA-UFBA/tutorial-mm

Repository files navigation

Tutorial: Multiple Myeloma Datasets

A hands-on tutorial on applying AI to Multiple Myeloma diagnosis from bone marrow smear images, built around two public plasma cell datasets from LabIA-UFBA.

Datasets

# Dataset Paper Original Model
1 Multiple Myeloma Dataset Andrade et al. (2024), Scientific Reports 14:11176 YOLOv7
2 PCMMD Andrade et al. (2025), Scientific Data 12:161 YOLOv8
  • Dataset 1 — 1,024 bone marrow aspirate smear images, Wright-Giemsa staining, smartphone-captured, single-class YOLO bounding box annotations, 10-fold validation.
  • Dataset 2 (PCMMD) — 10 patients, detection + segmentation annotations, CC-BY-4.0, 5-fold validation.

This tutorial reproduces the original pipelines using YOLO26 (latest Ultralytics release) instead of the original YOLOv7/YOLOv8, favoring fast, live-demoable runs (nano model, few epochs) over state-of-the-art accuracy.

Notebooks

  1. 01_image_presentation.ipynb — Downloads both datasets and visualizes images with their YOLO annotations.
  2. 02_training_yolo.ipynb — Fine-tunes YOLO26n on Dataset 1 (single class), shows training curves, and evaluates on the test set.
  3. 03_diagnosis.ipynb — Trains a 2-class (plasma / non-plasma) detector on PCMMD, aggregates per-patient detections into a plasma cell percentage, and applies a clinical threshold (>10%) for diagnosis.
  4. 04_synthetic_data_augmentation.ipynb — Builds a synthetic data pipeline: per-slide statistics (KDE) → cell crops/masks → color deconvolution (Beer-Lambert) → DDPM (diffusion) training → synthetic slide composition → baseline vs. augmented comparison.

Run them in order; each notebook downloads any data it needs if not already present.

Setup

pip install -r requirements.txt

Requires Python with Jupyter (ipykernel), PyTorch, Ultralytics YOLO, and Hugging Face diffusers for the generative pipeline in notebook 04.

Data & Models

Datasets and model weights are downloaded automatically by the notebooks into data/ and are not tracked in git (see .gitignore). No manual setup is required beyond internet access on first run.

Slides

slides/ holds the presentation materials for the tutorial.

Citation

If you use these datasets, please cite the original papers:

  • Batista Filho, J.L.S., Nogueira Rios, T., Araújo Rios, R.: Synthetic Data Augmentation for Plasmocyte Detection in Bone Marrow Images. In: Brazilian Conference on Intelligent Systems (BRACIS) (2026).
  • Andrade, C.L.B., Ferreira, M.V., Alencar, B.M., et al.: PCMMD: A novel dataset of plasma cells to support the diagnosis of multiple myeloma. Scientific Data 12(1), 161 (2025). doi.org/10.1038/s41597-025-04459-1.
  • Andrade, C.L.B., Ferreira, M.V., Alencar, B.M., et al.: Enhancing diagnostic accuracy of multiple myeloma through ML-driven analysis of hematological slides. Scientific Reports 14(1), 11176 (2024). doi.org/10.1038/s41598-024-61420-9.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors