PBC / README.md
wmakke's picture AhmadMM2024's picture
Update README.md (#1)
e67b697
|
Raw History Blame Contribute Delete
8.26 kB
metadata
dataset_info:
  features:
    - name: image_id
      dtype: string
    - name: image
      dtype: image
    - name: cell_type
      dtype: string
    - name: cell_subtype
      dtype: string
    - name: label
      dtype: int32
  splits:
    - name: train
      num_examples: 17092
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
license: cc-by-4.0
task_categories:
  - image-classification
language:
  - en
tags:
  - microscopy
  - blood
  - hematology
  - blood-cells
  - white-blood-cells
  - medical
  - classification
pretty_name: PBC (Peripheral Blood Cells)
size_categories:
  - 10K<n<100K

PBC (Peripheral Blood Cells) — Microscopic Images of Normal Peripheral Blood Cells

This dataset is derived from the PBC dataset (Acevedo et al., 2020), a collection of microscopic images of individual normal peripheral blood cells, originally hosted on Mendeley Data. The original images were acquired with the CellaVision DM96 analyzer in the core laboratory of the Hospital Clinic of Barcelona and labelled by expert clinical pathologists into eight cell groups. Here, we kept the original JPG images unchanged and added the cell type, the cell subtype from the image filename, and an integer label. The dataset is designed for blood-cell classification.

📦 Dataset Structure

The dataset has a single train split, with each row corresponding to a single blood-cell image:

Field Description
image_id Original image filename without extension (e.g., BA_100102)
image RGB microscopy image of a single cell (360 × 363 pixels, JPG)
cell_type Cell group: basophil, eosinophil, erythroblast, ig, lymphocyte, monocyte, neutrophil, platelet
cell_subtype Filename prefix of the original image (e.g., SNE, BNE, MY), which encodes finer subtypes for some groups
label Integer cell group: 0–7 (see Feature Descriptions)

Class Distribution:

  • Basophil: 1,218 images
  • Eosinophil: 3,117 images
  • Erythroblast: 1,551 images
  • Immature granulocyte (IG): 2,895 images
  • Lymphocyte: 1,214 images
  • Monocyte: 1,420 images
  • Neutrophil: 3,329 images
  • Platelet: 2,348 images
  • Total: 17,092 images

⚙️ Preprocessing

  • PBC_dataset_normal_DIB.zip was downloaded from Mendeley Data (snkd93bnjr, version 1)
  • Images were kept as the original JPG files (no re-encoding, resizing or color normalization)
  • Cell type was taken from each image's parent folder name
  • Cell subtype was taken from the image filename prefix (the part before the last _)
  • All images were preserved

🚀 Usage

from datasets import load_dataset
import matplotlib.pyplot as plt

ds = load_dataset("chehablab/PBC", split="train")

# One example image per cell group
classes = ["basophil", "eosinophil", "erythroblast", "ig",
           "lymphocyte", "monocyte", "neutrophil", "platelet"]
labels = ds["label"]
fig, axes = plt.subplots(1, len(classes), figsize=(16, 2.6))
for ax, label in zip(axes, range(len(classes))):
    sample = ds[labels.index(label)]
    ax.imshow(sample["image"])
    ax.set_title(f"{classes[label]}\n{sample['cell_subtype']}")
    ax.axis("off")
plt.tight_layout()
plt.show()

# Filter by cell group
neutrophils = ds.filter(lambda x: x["cell_type"] == "neutrophil")
print(f"Neutrophils: {len(neutrophils)}")

# No official split: make a stratified train/test split
split = ds.class_encode_column("label").train_test_split(test_size=0.2, stratify_by_column="label", seed=0)

🏷️ Feature Descriptions

Cell Groups

Eight groups of normal peripheral blood cells:

  • Basophil (label=0): 1,218 images — Granulocyte with large dark-purple granules
  • Eosinophil (label=1): 3,117 images — Granulocyte with orange-red granules
  • Erythroblast (label=2): 1,551 images — Nucleated red blood cell precursor
  • Immature granulocyte, IG (label=3): 2,895 images — Promyelocytes, myelocytes and metamyelocytes
  • Lymphocyte (label=4): 1,214 images — Mononuclear cell with a round nucleus and scant cytoplasm
  • Monocyte (label=5): 1,420 images — Large mononuclear cell with a folded or kidney-shaped nucleus
  • Neutrophil (label=6): 3,329 images — Segmented and band neutrophils
  • Platelet (label=7): 2,348 images — Platelets (thrombocytes)

Image Specifications

  • Modality: Brightfield microscopy of peripheral blood smears
  • Stain: May Grünwald-Giemsa
  • Acquisition: CellaVision DM96 automatic analyzer
  • Image size: 360 × 363 pixels, RGB, JPG
  • Content: One centered cell per image

Acquisition Protocol

All images were acquired at:

  • Core Laboratory, Hospital Clinic of Barcelona, Spain
  • Subjects: Individuals without infection, hematologic or oncologic disease, and free of any pharmacological treatment at the time of blood collection
  • Time period: 2015 – 2019

🧪 Use Cases

  • Multi-class classification of normal peripheral blood cells
  • White-blood-cell differential counting
  • Fine-grained classification of granulocyte maturation stages (via cell_subtype)
  • Representation learning and feature extraction for hematology microscopy
  • Self-supervised pretraining on blood-cell images
  • Reference set of normal cells for abnormal-cell or leukemia detection studies

⚠️ Important Notes

  • No official split: The dataset has a single train split. Make your own stratified train/validation/test split (see Usage).
  • No patient IDs: The original release does not say which images come from the same patient, so a random split can place cells from one smear in both training and evaluation.
  • Class imbalance: Neutrophils (3,329) and eosinophils (3,117) are about 2.7× more frequent than lymphocytes (1,214) and basophils (1,218). Use weighted sampling or class balancing as needed.
  • cell_subtype: This field is read from the original filename prefix and is not an official label; check its values (ds.to_pandas().groupby(["cell_type", "cell_subtype"]).size()) before using it.
  • Normal cells only: All images come from healthy individuals; the dataset contains no pathological (e.g., leukemic) cells.

📚 Citation

This dataset is derived from data originally published on Mendeley Data under a CC BY 4.0 license. If you use this dataset, please acknowledge Chehab Lab and cite the original PBC dataset:

@misc{Acevedo2020PBCData,
  author    = {Acevedo, Andrea and Merino, Anna and Alf{\'e}rez, Santiago and Molina, {\'A}ngel and Bold{\'u}, Laura and Rodellar, Jos{\'e}},
  title     = {A dataset for microscopic peripheral blood cell images for development of automatic recognition systems [dataset]},
  year      = {2020},
  publisher = {Mendeley Data},
  version   = {1},
  doi       = {10.17632/snkd93bnjr.1}
}

Additionally, cite the research paper that introduced this dataset:

@article{Acevedo2020PBC,
  author  = {Acevedo, Andrea and Merino, Anna and Alf{\'e}rez, Santiago and Molina, {\'A}ngel and Bold{\'u}, Laura and Rodellar, Jos{\'e}},
  title   = {A dataset of microscopic peripheral blood cell images for development of automatic recognition systems},
  journal = {Data in Brief},
  volume  = {30},
  pages   = {105474},
  year    = {2020},
  doi     = {10.1016/j.dib.2020.105474}
}

✉️ Original Authors

Andrea Acevedo, Anna Merino, Santiago Alférez, Ángel Molina, Laura Boldú, José Rodellar
Core Laboratory, Biochemistry and Molecular Genetics Department, Hospital Clinic of Barcelona, and Department of Mathematics, Universitat Politècnica de Catalunya (UPC), Barcelona, Spain

Mendeley Data: https://data.mendeley.com/datasets/snkd93bnjr/1 (original files)

📜 License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, consistent with the original PBC dataset.

You may copy, modify, distribute, and use the data for any purpose (commercial or non-commercial), provided that appropriate credit is given to Acevedo et al., Mendeley Data, and the original paper.

CC BY 4.0

Chehab Lab @ 2026