Dataset Viewer
Auto-converted to Parquet Duplicate
image
imagewidth (px)
596
774
mask
imagewidth (px)
596
774
image_id
stringlengths
1
6
0
015975
03425
06625
10275
1125
11400
13025
14825
15975
16475
1700
18925
20650
20900
21625
21875
2200
22375
23850
25025
25050
25075
25100
25125
25150
25175
25200
25225
25250
25275
25300
25325
25350
25375
25400
25425
25450
25475
25500
25525
25550
25575
25600
25625
25650
25675
25700
25725
25775
25800
25825
25850
25875
25900
25925
25950
25975
26000
26025
26050
26075
26100
26125
26150
26175
26200
26225
26250
26275
26300
26325
26350
26375
26400
26425
26450
26475
26500
26525
26550
26575
26600
26625
26650
26675
26700
26725
26750
26775
26800
26825
26925
26950
26975
2700
27000
27025
27050
27075
End of preview. Expand in Data Studio

m2caiSeg - Surgical Scene Segmentation Dataset

Multi-class semantic segmentation dataset for surgical instrument and anatomy segmentation from the m2cai16 challenge.

Dataset Preview

Dataset Details

Property Value
Source m2cai16 Challenge
Modality Endoscopy (RGB)
Task Multi-class Semantic Segmentation
Classes 19 (1 background + 17 foreground + 1 unknown)
Train 245 images
Test 62 images
Image Format JPEG (variable resolution)
Mask Format PNG (RGB color-coded)

Class Mapping (19 Classes)

This dataset uses preprocessed masks. The color-to-class mapping is:

Class ID Class Name RGB Color
0 background (255, 255, 255)
1 grasper (0, 85, 170)
2 bipolar (0, 85, 255)
3 hook (0, 170, 85)
4 scissors (0, 255, 85)
5 clipper (0, 255, 170)
6 irrigator (85, 0, 170)
7 specimen-bag (85, 0, 255)
8 trocars (170, 85, 85)
9 clip (170, 170, 170)
10 liver (85, 170, 0)
11 gall-bladder (85, 170, 255)
12 fat (85, 255, 0)
13 upperwall (85, 255, 170)
14 artery (170, 0, 255)
15 intestine (255, 0, 255)
16 bile (255, 255, 0)
17 blood (255, 0, 0)
18 unknown (0, 0, 0)

The full mapping is also available as class_mapping.json.

Usage

from datasets import load_dataset

# Load from HuggingFace
dataset = load_dataset("Angelou0516/m2caiSeg")

# Access a sample
sample = dataset["train"][0]
image = sample["image"]       # PIL Image (RGB)
mask = sample["mask"]          # PIL Image (RGB color-coded mask)
image_id = sample["image_id"] # e.g., "0"

# Convert mask to class labels
import numpy as np
from json import load

with open("class_mapping.json") as f:
    mapping = load(f)

mask_rgb = np.array(mask)
# Use color_to_class mapping to convert RGB -> class IDs

Reference

Jin, Y., et al. "Tool Detection and Operative Skill Assessment in Surgical Videos Using Region-Based Convolutional Neural Networks." IEEE Winter Conference on Applications of Computer Vision (WACV), 2018.

License

Research use only.

Downloads last month
34