Datasets:
video video 0.75 80.8 | video_id stringlengths 25 25 | patient_id int64 0 29 | boxes dict | n_boxes int64 17 8.98k | histological_type stringclasses 7
values | num_frames int64 510 5.47k | light_mode stringclasses 2
values |
|---|---|---|---|---|---|---|---|
P000_cystoscopy_track_000 | 0 | {
"track_id": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
... | 233 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_001 | 0 | {
"track_id": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
... | 101 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_002 | 0 | {
"track_id": [
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
... | 135 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_003 | 0 | {
"track_id": [
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
... | 622 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_004 | 0 | {
"track_id": [
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
... | 709 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_005 | 0 | {
"track_id": [
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
... | 138 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_006 | 0 | {"track_id":[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7(...TRUNCATED) | 1,006 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P000_cystoscopy_track_007 | 0 | {"track_id":[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8(...TRUNCATED) | 72 | Urothelial carcinoma pTaLG | 3,011 | CLARA + CHROMA | |
P001_cystoscopy_track_008 | 1 | {"track_id":[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9],"f(...TRUNCATED) | 42 | Urothelial carcinoma pTaLG | 2,307 | CLARA + CHROMA | |
P001_cystoscopy_track_009 | 1 | {"track_id":[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,(...TRUNCATED) | 38 | Urothelial carcinoma pTaLG | 2,307 | CLARA + CHROMA |
End of preview. Expand in Data Studio
Cystoscopy Tumor Detection
Cystoscopic video dataset with per-frame tumor bounding-box annotations,
paired with patient-level clinical metadata. Flattened into a single train
split with one row per video; videos are embedded in the Parquet shards as HF
Video features and bounding boxes are stored inline.
Why no splits
This dataset ships one train split only. Use the patient_id column to
build your own patient-grouped splits to prevent leakage. 30 unique patients.
Columns
| Column | Type | Description |
|---|---|---|
video |
Video |
Embedded video bytes (decode=False — returns {bytes, path}; cast to Video(decode=True) to decode frames, requires torchcodec). |
video_id |
string |
Filename stem, e.g. P000_cystoscopy_track_000. |
patient_id |
int64 |
Patient id — use this for group-aware splitting. |
boxes |
struct |
Per-box annotations as parallel lists (see below). n = len(boxes["frame"]) boxes for this video. |
n_boxes |
int64 |
Number of boxes for this video. |
histological_type |
string |
Patient-level histology (e.g. Urothelial carcinoma pTaLG). |
num_frames |
int64 |
Patient-level total annotated frames. |
light_mode |
string |
Imaging light mode (e.g. CLARA + CHROMA). |
boxes struct fields
Each field is a list of length n_boxes; index i across all fields
describes one box.
| Field | Type | Description |
|---|---|---|
track_id |
int64 |
Annotation track within the video. |
frame |
int64 |
Frame number the box belongs to. |
label |
string |
Box label (always tumor). |
xtl, ytl, xbr, ybr |
float32 |
Absolute pixel coordinates (CVAT format). |
occluded |
int64 |
Occlusion flag. |
outside |
int64 |
Outside flag. |
keyframe |
int64 |
Keyframe flag. |
z_order |
int64 |
Z-order. |
Contents
- 173 cystoscopy
.mp4videos (~4 GB, embedded). - 69 108 bounding boxes across 444 annotation tracks.
- 30 patients with clinical metadata.
Loading
from datasets import load_dataset
ds = load_dataset("milkyroad/B", split="train")
# video is not decoded by default (no torchcodec required to load)
print(ds[0]["video"]) # {'bytes': ..., 'path': 'P000_cystoscopy_track_000.mp4'}
print(ds[0]["n_boxes"]) # 233
boxes = ds[0]["boxes"]
print(boxes["frame"][0], boxes["label"][0], boxes["xtl"][0])
Decode video frames
To decode frames, install torchcodec and cast the column:
from datasets import Video
ds = ds.cast_column("video", Video(decode=True))
Group-aware split example
import random
ds = load_dataset("milkyroad/B", split="train")
pids = sorted({r["patient_id"] for r in ds})
random.Random(42).shuffle(pids)
n_test, n_val = 3, 3
test_pids = set(pids[:n_test])
val_pids = set(pids[n_test:n_test + n_val])
train = ds.filter(lambda r: r["patient_id"] not in test_pids and r["patient_id"] not in val_pids)
val = ds.filter(lambda r: r["patient_id"] in val_pids)
test = ds.filter(lambda r: r["patient_id"] in test_pids)
Notes
- Box coordinates are absolute pixel coordinates in the source video frames (CVAT format).
- Splits should be by patient to prevent leakage;
patient_idis provided for this purpose.
- Downloads last month
- 87