File size: 4,112 Bytes
a24c847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6fd608
a24c847
 
 
 
 
 
 
 
f6fd608
a24c847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
pretty_name: PathOPEN
language:
- en
license: cc-by-4.0
task_categories:
- visual-question-answering
tags:
- histopathology
- digital-pathology
- medical-vqa
size_categories:
- n<1K
configs:
- config_name: originals
  default: true
  data_files:
  - split: full
    path: data/originals.parquet
- config_name: cases
  data_files:
  - split: full
    path: data/cases.parquet
---

# PathOPEN

PathOPEN is a dataset for visual question answering in histopathology. Two clinical pathologists selected cases and wrote open-ended, five-option multiple-choice and yes/no questions. This Hugging Face edition repackages the original images, annotations and metadata from [PathOPEN v1.0.0 on Zenodo](https://doi.org/10.5281/zenodo.24358341). It preserves the original image bytes and the wording of the questions and answers.

## Configurations

| Configuration | Rows | Contents |
| --- | ---: | --- |
| `originals` | 229 | One available original image per row, with its image ID, magnification and the questions, answers and metadata for its case. These images belong to 155 cases. |
| `cases` | 157 | One row per case, with metadata, questions and answers, and the list of collected image slots. This includes cases 9 and 79, whose original images are unavailable. |

The case records contain 309 open-ended questions, 157 multiple-choice questions and 157 yes/no questions. An open-ended wrong answer is available for 201 of the 309 questions. Questions apply to all available images in a case and repeat across the corresponding `originals` rows. Count questions from `cases` to count each case-level annotation once.

The full Zenodo archive also contains 6,870 augmented images and four manifests for selecting balanced subsets. Download that version when reproducing analyses that use those assets.

## Load the original images and case records

```python
from datasets import load_dataset

repo_id = "xuzhl/PathOPEN"
originals = load_dataset(repo_id, "originals", split="full", revision="v1.0.0")
cases = load_dataset(repo_id, "cases", split="full", revision="v1.0.0")

example = originals[0]
image = example["image"]
questions = example["open_ended"]
```

Pass `streaming=True` to `load_dataset()` to iterate through the rows without first downloading the whole configuration.

## Fields

- `case_id` joins the two configurations. Organ, categorization and regional anatomy retain their stored values.
- In `originals`, `image` holds the original image bytes, `image_id` identifies the image, and `image_slot` gives its 1-based position within the case. `magnification` retains the stored value.
- In `cases`, `image_slots` records the slot number, image ID, original filename and magnification. Missing originals have null image IDs and filenames.
- `open_ended` contains the 1-based source question slot, question, correct answer and optional wrong answer. Empty question slots are omitted and missing wrong answers are null.
- `mcq.options` preserves the five source options in order. `mcq.answer_key` retains the source key such as `Option 3`, which refers to the third option. `closed_ended` contains the yes/no question and its answer.

The `full` split contains the full configuration. For model evaluation, assign splits by `case_id` before selecting images or questions. Keep all images and annotations from each case together. PathOPEN draws on cases from one institution and includes teaching cases, so subgroup results depend on the cases represented.

## Licence and citation

The dataset is available under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). Cite the Zenodo version DOI for the dataset and report the Hugging Face configuration if using this edition.

Naeem, A. et al. PathOPEN: A pathologist-curated histopathology dataset for visual question answering. Zenodo (2026), v1.0.0. [https://doi.org/10.5281/zenodo.24358341](https://doi.org/10.5281/zenodo.24358341).

The [PathOPEN pipeline](https://github.com/embedded-robotics/path-open-data/tree/4660b400d633e9ad8f875c1f0985f0eed6c8d787) contains the code used to build the dataset.