Datasets:
File size: 10,811 Bytes
3e636eb 7f29408 3e636eb a2c943a 3e636eb 7c0fb7c 3e636eb 7c0fb7c 3e636eb ba5657b 7c0fb7c 7f29408 ba5657b 7f29408 ba5657b 7f29408 10943e1 ce4cceb 8e79ea8 ce4cceb ba5657b 8e79ea8 ba5657b 3e636eb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | ---
task_categories:
- object-detection
tags:
- microscopy
- biology
- few-shot
- cell-detection
- biomedical
- malaria
- blood-cells
- live-cell-imaging
- fibroblast
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: example
path: data/example.parquet
- split: test
path: data/test.parquet
---
# Micro-OD
**Micro-OD** is a few-shot microscopy object detection benchmark. It aggregates four publicly available biological imaging datasets across distinct microscopy domains and cell types, and packages them into a standardised format designed for evaluating vision models — in particular, large vision-language models (VLMs) — under few-shot, in-context prompting conditions.
## Motivation
Microscopy object detection is a challenging setting for general-purpose vision models: images are domain-specific, class vocabularies are narrow but fine-grained, and labelled data is scarce. Micro-OD is designed to probe how well a model can detect cells and parasites in a new domain when given only a handful of annotated example images at inference time — without any fine-tuning.
## Dataset Splits
The dataset contains two splits that together constitute the few-shot evaluation protocol:
| Split | Role | Images per sub-dataset | Total images |
|---|---|---|---|
| `example` | Few-shot support set | 10 | 40 |
| `test` | Evaluation query set | 53 | 212 |
**Evaluation protocol:** For each sub-dataset, a model may be provided with up to **10 example images** (from the `example` split) as in-context demonstrations. It is then evaluated on each of the **53 test images** in the `test` split. No fine-tuning on the example images is assumed — they serve solely as few-shot context.
## Sub-datasets
| Sub-dataset | Domain | Classes | Original size | Format | Source |
|---|---|---|---|---|---|
| BBBC | Bright-field blood smear; malaria parasite detection | Red Blood Cells, Trophozoite Cells, Ring Cells, Gametocyte Cells, Schizont Cells, White Blood Cells | 1,328 images | PNG | [Broad Bioimage Benchmark Collection](https://bbbc.broadinstitute.org/) |
| BCCD | Peripheral blood smear; blood cell counting | Red Blood Cells, White Blood Cells, Platelets | 364 images | JPG | [BCCD Dataset](https://github.com/Shenggan/BCCD_Dataset) |
| LIVECell | Phase-contrast live cell imaging (RatC6) | Spindle Cells, Polygonal Cells, Round Cells | 420 images | PNG | [LIVECell](https://sartorius-research.github.io/LIVECell/) (images); annotations in-lab |
| NIH-3T3 | Phase-contrast mouse fibroblast imaging | Polygonal Cells, Spindle Cells, Round Cells | 63 images | PNG | In-lab collection and annotation |
## Folder Structure
```
Micro-OD/
├── data/ # Generated Parquet files (HuggingFace viewer)
│ ├── example.parquet # 40 rows — few-shot support set
│ └── test.parquet # 212 rows — evaluation query set
│
├── example/ # Few-shot support set (raw files)
│ ├── BBBC/
│ │ ├── annotation.jsonl # Bounding-box annotations
│ │ ├── images/ # 10 PNG images
│ │ └── images_overlay/ # 10 images with bounding boxes drawn
│ ├── BCCD/
│ │ ├── annotation.jsonl
│ │ ├── images/ # 10 JPG images
│ │ └── images_overlay/
│ ├── LIVECell/
│ │ ├── annotation.jsonl
│ │ ├── images/ # 10 PNG images
│ │ └── images_overlay/
│ ├── NIH-3T3/
│ │ ├── annotation.jsonl
│ │ ├── images/ # 10 PNG images
│ │ └── images_overlay/
│ └── stat.txt # Split-level statistics
│
└── test/ # Evaluation query set (raw files)
├── BBBC/
│ ├── annotation.jsonl
│ ├── images/ # 53 PNG images
│ └── images_overlay/
├── BCCD/
│ ├── annotation.jsonl
│ ├── images/ # 53 JPG images
│ └── images_overlay/
├── LIVECell/
│ ├── annotation.jsonl
│ ├── images/ # 53 PNG images
│ └── images_overlay/
├── NIH-3T3/
│ ├── annotation.jsonl
│ ├── images/ # 53 PNG images
│ └── images_overlay/
└── stat.txt # Split-level statistics
```
Each `images_overlay/` folder contains copies of the images with ground-truth bounding boxes rendered on top, useful for visual verification.
## Annotation Format
Annotations are stored as [JSON Lines](https://jsonlines.org/) (`.jsonl`) files — one JSON object per line, one line per image.
```json
{
"image_path": "images/<filename>",
"bbox": {
"<class_name>": [
[[x_min, y_min], [x_max, y_max]],
[[x_min, y_min], [x_max, y_max]]
],
"<class_name>": [
[[x_min, y_min], [x_max, y_max]]
]
}
}
```
**Coordinate convention:**
- All coordinates are in **pixel space**.
- Each bounding box is represented as two points: `[x_min, y_min]` (top-left corner) and `[x_max, y_max]` (bottom-right corner).
- A class key is present only if at least one instance of that class appears in the image.
**Concrete example** (from `example/BCCD/annotation.jsonl`):
```json
{
"image_path": "images/BCCD_example_1.jpg",
"bbox": {
"Red Blood Cells": [
[[201, 223], [314, 322]],
[[1, 252], [89, 357]],
[[203, 336], [292, 441]]
],
"White Blood Cells": [
[[211, 4], [338, 132]]
],
"Platelets": [
[[330, 442], [373, 480]]
]
}
}
```
## Usage
To load the dataset:
```python
from datasets import load_dataset
ds = load_dataset("stumbledparams/Micro-OD")
# Access splits
example_split = ds["example"] # 40 images — few-shot support set
test_split = ds["test"] # 212 images — evaluation query set
# Each row contains:
# image — PIL image
# image_id — "<subdataset>/images/<filename>"
# subdataset — one of: BBBC, BCCD, LIVECell, NIH-3T3
# objects — dict with keys:
# bbox : list of [x_min, y_min, width, height] (COCO format, float32)
# category : list of int (ClassLabel index; decode with int2str)
row = test_split[0]
# Image (PIL.Image)
image = row["image"]
# Bounding boxes and category indices
bboxes = row["objects"]["bbox"] # list of [x_min, y_min, width, height] (float32)
categories = row["objects"]["category"] # list of int (ClassLabel index)
# Class names in ClassLabel index order (alphabetically sorted)
CLASS_NAMES = [
"Gametocyte Cells", "Platelets", "Polygonal Cells", "Red Blood Cells",
"Ring Cells", "Round Cells", "Schizont Cells", "Spindle Cells",
"Trophozoite Cells", "White Blood Cells",
]
for bbox, cat_idx in zip(bboxes, categories):
x_min, y_min, width, height = bbox
label = CLASS_NAMES[cat_idx]
print(f"{label}: [{x_min:.1f}, {y_min:.1f}, {width:.1f}, {height:.1f}]")
```
> **Note on bbox format:** The Parquet files store bboxes in COCO format `[x_min, y_min, width, height]` as float32. `category` is stored as a `ClassLabel` integer index. The raw `annotation.jsonl` files use `[[x_min, y_min], [x_max, y_max]]` (top-left / bottom-right pixel coordinates) — see [Annotation Format](#annotation-format).
## Dataset Statistics
Detailed per-class statistics are available in `example/stat.txt` and `test/stat.txt`. Summaries are provided below.
### Test Split — 212 images
| Sub-dataset | Images | Classes | Total boxes | Boxes/image (mean) | Boxes/image (range) |
|---|---|---|---|---|---|
| BBBC | 53 | 6 | 4,000 | 75.5 | 19–135 |
| BCCD | 53 | 3 | 952 | 18.0 | 9–30 |
| LIVECell | 53 | 3 | 223 | 4.2 | 1–15 |
| NIH-3T3 | 53 | 3 | 376 | 7.1 | 1–14 |
| **Total** | **212** | **10** | **5,551** | — | — |
### Example Split — 40 images
The **Support-Spread Score** (SS) is a composite metric reflecting both class coverage (fraction of classes represented in the sample) and class balance (how evenly instances are distributed across represented classes). Higher is better; a score of 1.0 indicates perfect coverage and balance.
| Sub-dataset | Images | Total boxes | Boxes/image (mean) | Support-Spread Score |
|---|---|---|---|---|
| BBBC | 10 | 734 | 73.4 | 0.136 |
| BCCD | 10 | 78 | 7.8 | 0.680 |
| LIVECell | 10 | 40 | 4.0 | 0.763 |
| NIH-3T3 | 10 | 62 | 6.2 | 0.612 |
| **Total** | **40** | **914** | — | — |
The low SS for BBBC (0.136) reflects the extreme dominance of Red Blood Cells in the malaria dataset, which makes it difficult to achieve a balanced 10-image sample across all 6 classes.
### Class Inventory
| Class | Sub-dataset(s) | Test boxes |
|---|---|---|
| Gametocyte Cells | BBBC | 24 |
| Platelets | BCCD | 159 |
| Polygonal Cells | LIVECell, NIH-3T3 | 417 |
| Red Blood Cells | BBBC, BCCD | 4,427 |
| Ring Cells | BBBC | 34 |
| Round Cells | LIVECell, NIH-3T3 | 24 |
| Schizont Cells | BBBC | 10 |
| Spindle Cells | LIVECell, NIH-3T3 | 158 |
| Trophozoite Cells | BBBC | 193 |
| White Blood Cells | BBBC, BCCD | 105 |
Note that Polygonal Cells, Round Cells, and Spindle Cells appear in both LIVECell and NIH-3T3 but describe morphologically similar — not biologically identical — phenotypes in different cell lines.
## Attribution
Micro-OD combines images and annotations from multiple sources. Please credit the original sources as appropriate:
- **BBBC (malaria):** Ljosa, V., Sokolnicki, K. L., & Carpenter, A. E. (2012). Annotated high-throughput microscopy image sets for validation. *Nature Methods*, 9(7), 637. [https://bbbc.broadinstitute.org/](https://bbbc.broadinstitute.org/)
- **BCCD:** Shenggan. *BCCD Dataset*. GitHub. [https://github.com/Shenggan/BCCD_Dataset](https://github.com/Shenggan/BCCD_Dataset)
- **LIVECell (images):** Edlund, C., et al. (2021). LIVECell — A large-scale dataset for label-free live cell segmentation. *Nature Methods*, 18(9), 1038–1045. [https://doi.org/10.1038/s41592-021-01249-6](https://doi.org/10.1038/s41592-021-01249-6). The morphology-based bounding-box annotations used in Micro-OD were produced in-lab and are not part of the original LIVECell release.
- **NIH-3T3:** Images and bounding-box annotations are an in-lab collection and are not sourced from a public dataset.
|