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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
license_link: https://creativecommons.org/licenses/by-sa/4.0/
|
| 4 |
+
task_categories:
|
| 5 |
+
- image-classification
|
| 6 |
+
- video-classification
|
| 7 |
+
- object-detection
|
| 8 |
+
tags:
|
| 9 |
+
- medical
|
| 10 |
+
- cystoscopy
|
| 11 |
+
- bladder-cancer
|
| 12 |
+
- histopathology
|
| 13 |
+
- endoscopy
|
| 14 |
+
language:
|
| 15 |
+
- en
|
| 16 |
+
pretty_name: Cystoscopy Core Benchmark
|
| 17 |
+
size_categories:
|
| 18 |
+
- 1K<n<10K
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Cystoscopy Core Benchmark
|
| 22 |
+
|
| 23 |
+
Raw-source core dataset for cystoscopy image and video classification. Contains
|
| 24 |
+
cystoscopy videos with bounding-box annotations, and images with lesion-level
|
| 25 |
+
labels, grades, and stages. Designed as the source-of-truth from which derived
|
| 26 |
+
training datasets (v1, v2, G) are built.
|
| 27 |
+
|
| 28 |
+
## Sources
|
| 29 |
+
|
| 30 |
+
The dataset aggregates three publicly available cystoscopy datasets:
|
| 31 |
+
|
| 32 |
+
| Source | Origin | Modality | Patients | Images/Frames | Type |
|
| 33 |
+
|--------|--------|----------|----------|---------------|------|
|
| 34 |
+
| B | B_dataset | Video clips (CLARA+CHROMA / white light) | 30 | 173 videos (2448 annotated frames) | Track clips with bounding boxes |
|
| 35 |
+
| C | CystoDS | Still images (WLC / BLC) | 160 | 8067 images | Histopathology-confirmed stills |
|
| 36 |
+
| D | Lazo et al. | Still images (WLI / NBI) | 22 | 1754 images | Histopathology-confirmed stills |
|
| 37 |
+
|
| 38 |
+
## Dataset Structure
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
cystoscopy-core/
|
| 42 |
+
├── data/
|
| 43 |
+
│ ├── image_annotations.parquet # 12,269 rows: per-image labels, grade, stage, segmentation
|
| 44 |
+
│ ├── video_annotations.parquet # 173 rows: per-video metadata (histological type, grade, stage)
|
| 45 |
+
│ └── video_frame_boxes.parquet # 69,108 rows: per-frame bounding boxes (x,y,w,h)
|
| 46 |
+
├── B/videos/ # 173 .mp4 video clips (1920x1080)
|
| 47 |
+
├── C/images/<pid>/ # 8067 .png images organized by patient
|
| 48 |
+
└── D/images/<pid>/ # 1754 .png images organized by patient
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Annotation Schemas
|
| 52 |
+
|
| 53 |
+
### image_annotations.parquet (12,269 rows)
|
| 54 |
+
|
| 55 |
+
Per-image annotation table covering all C images, all D images, and B video
|
| 56 |
+
frames selected for the G-derived benchmark.
|
| 57 |
+
|
| 58 |
+
| Column | Type | Description |
|
| 59 |
+
|--------|------|-------------|
|
| 60 |
+
| `source_dataset` | string | B, C, or D |
|
| 61 |
+
| `patient_id` | int | Normalized patient ID (B: 1–30, C: 31–190, D: 191–212) |
|
| 62 |
+
| `lesion_id` | string | Lesion grouping (B: `B_<track>_<idx>`, C: `L0`–`L6`/`Multifocal`, D: `D_<case>_pt<pt>_<tissue>`) |
|
| 63 |
+
| `filename` | string | Image filename (C/D only; B uses video_id + frame_idx) |
|
| 64 |
+
| `label` | int | 0 = malignant tumor (MT), 1 = non-malignant lesion (NML), 2 = non-ROI (NROI) |
|
| 65 |
+
| `grade` | string | `low`, `high`, or null (inferred from histological type / subclass / tissue type) |
|
| 66 |
+
| `stage` | string | `Ta`, `T1`, `Tis`, `T2`, or null (D has no stage) |
|
| 67 |
+
| `subclass` | string | Source-native subclass (C: LowGradePapillary, HighGradePapillary, CIS, etc.) |
|
| 68 |
+
| `subclass2` | string | Secondary reclassification (C only; 16 rows) |
|
| 69 |
+
| `morphology` | string | C: Papillary, Non-papillary, etc. |
|
| 70 |
+
| `visit` | float | C: visit number |
|
| 71 |
+
| `multifocal` | string | C: multifocal flag |
|
| 72 |
+
| `imaging_type` | string | Unified modality (CLARA + CHROMA, white light, WLC, BLC, WLI, NBI) |
|
| 73 |
+
| `segmentation` | list | Polygon segmentation masks (C only; 768 of 8,067 images) |
|
| 74 |
+
| `video_id` | string | B: video clip identifier (e.g., P017_cystoscopy_track_077) |
|
| 75 |
+
| `frame_idx` | float | B: frame index within video clip |
|
| 76 |
+
|
| 77 |
+
### video_annotations.parquet (173 rows)
|
| 78 |
+
|
| 79 |
+
| Column | Type | Description |
|
| 80 |
+
|--------|------|-------------|
|
| 81 |
+
| `video_id` | string | Video clip identifier |
|
| 82 |
+
| `patient_id` | int | Normalized patient ID |
|
| 83 |
+
| `histological_type` | string | pTaLG, pT1LG, pTaHG, pT1HG, pT2HG, pT2, PUNLMP |
|
| 84 |
+
| `light_mode` | string | CLARA + CHROMA or white light |
|
| 85 |
+
| `num_frames` | int | Actual frame count of the .mp4 file (not original cystoscopy length) |
|
| 86 |
+
| `n_boxes` | int | Number of bounding boxes in this video |
|
| 87 |
+
| `stage` | string | Ta, T1, T2 (derived from histological_type) |
|
| 88 |
+
| `grade` | string | low, high, or null (pT2 and PUNLMP → null) |
|
| 89 |
+
| `imaging_type` | string | Same as light_mode for B |
|
| 90 |
+
|
| 91 |
+
### video_frame_boxes.parquet (69,108 rows)
|
| 92 |
+
|
| 93 |
+
| Column | Type | Description |
|
| 94 |
+
|--------|------|-------------|
|
| 95 |
+
| `video_id` | string | Video clip identifier |
|
| 96 |
+
| `patient_id` | int | Normalized patient ID |
|
| 97 |
+
| `track_id` | int | Track number within patient |
|
| 98 |
+
| `frame` | int | Frame index within video clip (0-indexed) |
|
| 99 |
+
| `label` | string | Box label (all "tumor"; class comes from video-level histological_type) |
|
| 100 |
+
| `xtl`, `ytl`, `xbr`, `ybr` | float | Bounding box coordinates (pixels, 1920x1080) |
|
| 101 |
+
| `occluded` | int | Occlusion flag |
|
| 102 |
+
| `outside` | int | Outside frame flag |
|
| 103 |
+
| `keyframe` | int | Keyframe flag |
|
| 104 |
+
| `z_order` | int | Z-order for overlap resolution |
|
| 105 |
+
|
| 106 |
+
## Label Distribution (image_annotations)
|
| 107 |
+
|
| 108 |
+
| Label | ID | Count |
|
| 109 |
+
|-------|----|-------|
|
| 110 |
+
| Malignant Tumor (MT) | 0 | 4,512 |
|
| 111 |
+
| Non-Malignant Lesion (NML) | 1 | 355 |
|
| 112 |
+
| Non-ROI (NROI) | 2 | 7,402 |
|
| 113 |
+
| **Total** | | **12,269** |
|
| 114 |
+
|
| 115 |
+
## Grade Distribution
|
| 116 |
+
|
| 117 |
+
| Grade | Count |
|
| 118 |
+
|-------|-------|
|
| 119 |
+
| Low | 2,633 |
|
| 120 |
+
| High | 1,888 |
|
| 121 |
+
|
| 122 |
+
## Stage Distribution
|
| 123 |
+
|
| 124 |
+
| Stage | Count |
|
| 125 |
+
|-------|-------|
|
| 126 |
+
| Ta | 2,017 |
|
| 127 |
+
| T1 | 1,124 |
|
| 128 |
+
| Tis | 71 |
|
| 129 |
+
| T2 | 261 |
|
| 130 |
+
|
| 131 |
+
## Histological Type Distribution (B videos)
|
| 132 |
+
|
| 133 |
+
| Type | Count |
|
| 134 |
+
|------|-------|
|
| 135 |
+
| Urothelial carcinoma pTaLG | 77 |
|
| 136 |
+
| Urothelial carcinoma pT1LG | 38 |
|
| 137 |
+
| Urothelial carcinoma pT1HG | 27 |
|
| 138 |
+
| PUNLMP | 12 |
|
| 139 |
+
| Urothelial carcinoma pTaHG | 8 |
|
| 140 |
+
| Urothelial carcinoma pT2HG | 7 |
|
| 141 |
+
| Urothelial carcinoma pT2 | 4 |
|
| 142 |
+
|
| 143 |
+
## Patient IDs
|
| 144 |
+
|
| 145 |
+
Normalized mapping (1-indexed):
|
| 146 |
+
- B: patients 1–30 (30 patients, 173 video track clips)
|
| 147 |
+
- C: patients 31–190 (160 patients, 8067 images)
|
| 148 |
+
- D: patients 191–212 (22 patients, 1754 images)
|
| 149 |
+
|
| 150 |
+
## Licensing
|
| 151 |
+
|
| 152 |
+
This is a mixed-license dataset:
|
| 153 |
+
- **Source B**: CC BY 4.0
|
| 154 |
+
- **Source C (CystoDS)**: CC BY 4.0
|
| 155 |
+
- **Source D (Lazo et al.)**: CC BY-SA 4.0
|
| 156 |
+
|
| 157 |
+
The combined dataset is distributed under CC BY-SA 4.0 (the most restrictive
|
| 158 |
+
component license).
|
| 159 |
+
|
| 160 |
+
## Citation
|
| 161 |
+
|
| 162 |
+
If you use this dataset, please cite the original source datasets.
|
| 163 |
+
|
| 164 |
+
## Usage
|
| 165 |
+
|
| 166 |
+
```python
|
| 167 |
+
from datasets import load_dataset
|
| 168 |
+
from huggingface_hub import hf_hub_download
|
| 169 |
+
|
| 170 |
+
# Load annotation tables
|
| 171 |
+
ds = load_dataset("milkyroad/cystoscopy-core")
|
| 172 |
+
|
| 173 |
+
# Download a specific image
|
| 174 |
+
hf_hub_download(
|
| 175 |
+
repo_id="milkyroad/cystoscopy-core",
|
| 176 |
+
filename="C/images/P031/d6df5610.png",
|
| 177 |
+
repo_type="dataset",
|
| 178 |
+
)
|
| 179 |
+
|
| 180 |
+
# Download a specific video
|
| 181 |
+
hf_hub_download(
|
| 182 |
+
repo_id="milkyroad/cystoscopy-core",
|
| 183 |
+
filename="B/videos/P000_cystoscopy_track_000.mp4",
|
| 184 |
+
repo_type="dataset",
|
| 185 |
+
)
|
| 186 |
+
```
|