Files changed (1) hide show
  1. README.md +183 -3
README.md CHANGED
@@ -13,13 +13,193 @@ dataset_info:
13
  dtype: int32
14
  splits:
15
  - name: train
16
- num_bytes: 303078398
17
  num_examples: 17092
18
- download_size: 281772168
19
- dataset_size: 303078398
20
  configs:
21
  - config_name: default
22
  data_files:
23
  - split: train
24
  path: data/train-*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  dtype: int32
14
  splits:
15
  - name: train
 
16
  num_examples: 17092
 
 
17
  configs:
18
  - config_name: default
19
  data_files:
20
  - split: train
21
  path: data/train-*
22
+ license: cc-by-4.0
23
+ task_categories:
24
+ - image-classification
25
+ language:
26
+ - en
27
+ tags:
28
+ - microscopy
29
+ - blood
30
+ - hematology
31
+ - blood-cells
32
+ - white-blood-cells
33
+ - medical
34
+ - classification
35
+ pretty_name: PBC (Peripheral Blood Cells)
36
+ size_categories:
37
+ - 10K<n<100K
38
  ---
39
+ # PBC (Peripheral Blood Cells) — Microscopic Images of Normal Peripheral Blood Cells
40
+
41
+ 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.
42
+ Here, we kept the original JPG images unchanged and added the cell type, the cell subtype from the image filename, and an integer label.
43
+ The dataset is designed for blood-cell classification.
44
+
45
+
46
+ ## 📦 Dataset Structure
47
+
48
+ The dataset has a single `train` split, with each row corresponding to a single blood-cell image:
49
+
50
+ | Field | Description |
51
+ |---|---|
52
+ | `image_id` | Original image filename without extension (e.g., `BA_100102`) |
53
+ | `image` | RGB microscopy image of a single cell (360 × 363 pixels, JPG) |
54
+ | `cell_type` | Cell group: `basophil`, `eosinophil`, `erythroblast`, `ig`, `lymphocyte`, `monocyte`, `neutrophil`, `platelet` |
55
+ | `cell_subtype` | Filename prefix of the original image (e.g., `SNE`, `BNE`, `MY`), which encodes finer subtypes for some groups |
56
+ | `label` | Integer cell group: `0`–`7` (see Feature Descriptions) |
57
+
58
+ **Class Distribution:**
59
+ - Basophil: 1,218 images
60
+ - Eosinophil: 3,117 images
61
+ - Erythroblast: 1,551 images
62
+ - Immature granulocyte (IG): 2,895 images
63
+ - Lymphocyte: 1,214 images
64
+ - Monocyte: 1,420 images
65
+ - Neutrophil: 3,329 images
66
+ - Platelet: 2,348 images
67
+ - Total: 17,092 images
68
+
69
+
70
+ ## ⚙️ Preprocessing
71
+
72
+ - `PBC_dataset_normal_DIB.zip` was downloaded from Mendeley Data (`snkd93bnjr`, version 1)
73
+ - Images were kept as the original JPG files (no re-encoding, resizing or color normalization)
74
+ - Cell type was taken from each image's parent folder name
75
+ - Cell subtype was taken from the image filename prefix (the part before the last `_`)
76
+ - All images were preserved
77
+
78
+
79
+ ## 🚀 Usage
80
+
81
+ ```python
82
+ from datasets import load_dataset
83
+ import matplotlib.pyplot as plt
84
+
85
+ ds = load_dataset("chehablab/PBC", split="train")
86
+
87
+ # One example image per cell group
88
+ classes = ["basophil", "eosinophil", "erythroblast", "ig",
89
+ "lymphocyte", "monocyte", "neutrophil", "platelet"]
90
+ labels = ds["label"]
91
+ fig, axes = plt.subplots(1, len(classes), figsize=(16, 2.6))
92
+ for ax, label in zip(axes, range(len(classes))):
93
+ sample = ds[labels.index(label)]
94
+ ax.imshow(sample["image"])
95
+ ax.set_title(f"{classes[label]}\n{sample['cell_subtype']}")
96
+ ax.axis("off")
97
+ plt.tight_layout()
98
+ plt.show()
99
+
100
+ # Filter by cell group
101
+ neutrophils = ds.filter(lambda x: x["cell_type"] == "neutrophil")
102
+ print(f"Neutrophils: {len(neutrophils)}")
103
+
104
+ # No official split: make a stratified train/test split
105
+ split = ds.class_encode_column("label").train_test_split(test_size=0.2, stratify_by_column="label", seed=0)
106
+ ```
107
+
108
+ ---
109
+
110
+ ## 🏷️ Feature Descriptions
111
+
112
+ ### Cell Groups
113
+ Eight groups of normal peripheral blood cells:
114
+
115
+ - **Basophil** (`label=0`): 1,218 images — Granulocyte with large dark-purple granules
116
+ - **Eosinophil** (`label=1`): 3,117 images — Granulocyte with orange-red granules
117
+ - **Erythroblast** (`label=2`): 1,551 images — Nucleated red blood cell precursor
118
+ - **Immature granulocyte, IG** (`label=3`): 2,895 images — Promyelocytes, myelocytes and metamyelocytes
119
+ - **Lymphocyte** (`label=4`): 1,214 images — Mononuclear cell with a round nucleus and scant cytoplasm
120
+ - **Monocyte** (`label=5`): 1,420 images — Large mononuclear cell with a folded or kidney-shaped nucleus
121
+ - **Neutrophil** (`label=6`): 3,329 images — Segmented and band neutrophils
122
+ - **Platelet** (`label=7`): 2,348 images — Platelets (thrombocytes)
123
+
124
+ ### Image Specifications
125
+
126
+ - **Modality**: Brightfield microscopy of peripheral blood smears
127
+ - **Stain**: May Grünwald-Giemsa
128
+ - **Acquisition**: CellaVision DM96 automatic analyzer
129
+ - **Image size**: 360 × 363 pixels, RGB, JPG
130
+ - **Content**: One centered cell per image
131
+
132
+ ### Acquisition Protocol
133
+
134
+ All images were acquired at:
135
+ - **Core Laboratory, Hospital Clinic of Barcelona**, Spain
136
+ - **Subjects**: Individuals without infection, hematologic or oncologic disease, and free of any pharmacological treatment at the time of blood collection
137
+ - **Time period**: 2015 – 2019
138
+
139
+ ---
140
+
141
+ ## 🧪 Use Cases
142
+
143
+ - Multi-class classification of normal peripheral blood cells
144
+ - White-blood-cell differential counting
145
+ - Fine-grained classification of granulocyte maturation stages (via `cell_subtype`)
146
+ - Representation learning and feature extraction for hematology microscopy
147
+ - Self-supervised pretraining on blood-cell images
148
+ - Reference set of normal cells for abnormal-cell or leukemia detection studies
149
+
150
+
151
+ ## ⚠️ Important Notes
152
+
153
+ - **No official split**: The dataset has a single `train` split. Make your own stratified train/validation/test split (see Usage).
154
+ - **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.
155
+ - **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.
156
+ - **`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.
157
+ - **Normal cells only**: All images come from healthy individuals; the dataset contains no pathological (e.g., leukemic) cells.
158
+
159
+
160
+ ## 📚 Citation
161
+
162
+ 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](https://chehablab.com) and cite the original PBC dataset:
163
+
164
+ ```bibtex
165
+ @misc{Acevedo2020PBCData,
166
+ author = {Acevedo, Andrea and Merino, Anna and Alf{\'e}rez, Santiago and Molina, {\'A}ngel and Bold{\'u}, Laura and Rodellar, Jos{\'e}},
167
+ title = {A dataset for microscopic peripheral blood cell images for development of automatic recognition systems [dataset]},
168
+ year = {2020},
169
+ publisher = {Mendeley Data},
170
+ version = {1},
171
+ doi = {10.17632/snkd93bnjr.1}
172
+ }
173
+ ```
174
+
175
+ Additionally, cite the research paper that introduced this dataset:
176
+
177
+ ```bibtex
178
+ @article{Acevedo2020PBC,
179
+ author = {Acevedo, Andrea and Merino, Anna and Alf{\'e}rez, Santiago and Molina, {\'A}ngel and Bold{\'u}, Laura and Rodellar, Jos{\'e}},
180
+ title = {A dataset of microscopic peripheral blood cell images for development of automatic recognition systems},
181
+ journal = {Data in Brief},
182
+ volume = {30},
183
+ pages = {105474},
184
+ year = {2020},
185
+ doi = {10.1016/j.dib.2020.105474}
186
+ }
187
+ ```
188
+
189
+ ## ✉️ Original Authors
190
+
191
+ **Andrea Acevedo, Anna Merino, Santiago Alférez, Ángel Molina, Laura Boldú, José Rodellar**
192
+ Core Laboratory, Biochemistry and Molecular Genetics Department, Hospital Clinic of Barcelona, and Department of Mathematics, Universitat Politècnica de Catalunya (UPC), Barcelona, Spain
193
+
194
+ **Mendeley Data**: https://data.mendeley.com/datasets/snkd93bnjr/1 (original files)
195
+
196
+
197
+ ## 📜 License
198
+
199
+ This dataset is released under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license, consistent with the original PBC dataset.
200
+
201
+ 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.
202
+
203
+ [![CC BY 4.0](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/)
204
+
205
+ **Chehab Lab @ 2026**