AhmadMM2024 commited on
Commit
ee34c33
·
verified ·
1 Parent(s): cc9dc94

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +177 -0
README.md CHANGED
@@ -22,4 +22,181 @@ configs:
22
  data_files:
23
  - split: train
24
  path: data/train-*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  data_files:
23
  - split: train
24
  path: data/train-*
25
+ license: cc-by-4.0
26
+ task_categories:
27
+ - image-classification
28
+ language:
29
+ - en
30
+ tags:
31
+ - endoscopy
32
+ - colonoscopy
33
+ - gastroenterology
34
+ - ulcerative-colitis
35
+ - inflammatory-bowel-disease
36
+ - mayo-endoscopic-score
37
+ - medical
38
+ - classification
39
+ pretty_name: LIMUC (Labeled Images for Ulcerative Colitis)
40
+ size_categories:
41
+ - 10K<n<100K
42
  ---
43
+ # LIMUC — Labeled Images for Ulcerative Colitis
44
+
45
+ > [!NOTE]
46
+ > This dataset description was generated with the help of generative AI. If you find anything wrong or missing, please report it in the [Community discussions](https://huggingface.co/datasets/chehablab/LIMUC/discussions).
47
+
48
+ This dataset is derived from the **LIMUC dataset** (Polat et al., 2022), a collection of colonoscopy images from patients with ulcerative colitis, originally hosted on **Zenodo**. The images were collected at Marmara University School of Medicine, Istanbul, between December 2011 and July 2019, and graded with the **Mayo endoscopic score** (MES) by experienced gastroenterologists.
49
+ Here, we used the patient-based release, read the patient ID and Mayo score from its folder structure, converted the images from BMP to PNG without loss, and added an integer label.
50
+ The dataset is designed for ulcerative colitis severity classification with **patient-level** evaluation.
51
+
52
+
53
+ ## 📦 Dataset Structure
54
+
55
+ The dataset has a single `train` split, with each row corresponding to a single colonoscopy image:
56
+
57
+ | Field | Description |
58
+ |---|---|
59
+ | `image_id` | Original image filename without extension (e.g., `UC_patient_190_16`) |
60
+ | `image` | RGB colonoscopy image (PNG, converted losslessly from the original BMP, native resolution) |
61
+ | `patient_id` | Patient ID from the original folder (e.g., `190`) |
62
+ | `mayo` | Mayo endoscopic score: `Mayo 0`, `Mayo 1`, `Mayo 2`, `Mayo 3` |
63
+ | `label` | Integer Mayo score: `0`–`3` (see Feature Descriptions) |
64
+
65
+ **Class Distribution:**
66
+ - Mayo 0: 6,105 images (54.1%)
67
+ - Mayo 1: 3,052 images (27.1%)
68
+ - Mayo 2: 1,254 images (11.1%)
69
+ - Mayo 3: 865 images (7.7%)
70
+ - Total: 11,276 images from 564 patients
71
+
72
+
73
+ ## ⚙️ Preprocessing
74
+
75
+ - `patient_based_classified_images.zip` was downloaded from Zenodo (record `5827695`); the authors' image-level `train_and_validation_sets.zip` and `test_set.zip` hold the same images and were not used
76
+ - The patient ID was taken from each image's patient folder, and the Mayo score from its `Mayo k` subfolder (`<patient>/Mayo k/UC_patient_<patient>_<n>.bmp`)
77
+ - Images were converted from BMP to PNG (lossless; no resizing, cropping or color change)
78
+ - All images were preserved
79
+
80
+
81
+ ## 🚀 Usage
82
+
83
+ ```python
84
+ from datasets import load_dataset
85
+ import matplotlib.pyplot as plt
86
+
87
+ ds = load_dataset("chehablab/LIMUC", split="train")
88
+
89
+ # One example image per Mayo score
90
+ classes = ["Mayo 0", "Mayo 1", "Mayo 2", "Mayo 3"]
91
+ labels = ds["label"]
92
+ fig, axes = plt.subplots(1, len(classes), figsize=(12, 3))
93
+ for ax, label in zip(axes, range(len(classes))):
94
+ sample = ds[labels.index(label)]
95
+ ax.imshow(sample["image"])
96
+ ax.set_title(f"{classes[label]} · patient {sample['patient_id']}", fontsize=9)
97
+ ax.axis("off")
98
+ plt.tight_layout()
99
+ plt.show()
100
+
101
+ # Split by patient (never by image)
102
+ from sklearn.model_selection import GroupShuffleSplit
103
+ df = ds.select_columns(["patient_id", "label"]).to_pandas()
104
+ gss = GroupShuffleSplit(n_splits=1, test_size=0.2, random_state=0)
105
+ train_idx, test_idx = next(gss.split(df, groups=df["patient_id"]))
106
+ train, test = ds.select(train_idx), ds.select(test_idx)
107
+ ```
108
+
109
+ ---
110
+
111
+ ## 🏷️ Feature Descriptions
112
+
113
+ ### Mayo Endoscopic Score
114
+ Four grades of ulcerative colitis activity:
115
+
116
+ - **Mayo 0** (`label=0`): 6,105 images — Normal or inactive disease
117
+ - **Mayo 1** (`label=1`): 3,052 images — Mild disease: erythema, decreased vascular pattern, mild friability
118
+ - **Mayo 2** (`label=2`): 1,254 images — Moderate disease: marked erythema, absent vascular pattern, friability, erosions
119
+ - **Mayo 3** (`label=3`): 865 images — Severe disease: spontaneous bleeding, ulceration
120
+
121
+ The scores are **ordinal**: neighboring grades (especially Mayo 1 and Mayo 2) are hard to tell apart, and errors between distant grades matter more than errors between neighbors.
122
+
123
+ ### Image Specifications
124
+
125
+ - **Modality**: White-light colonoscopy
126
+ - **Image format**: RGB, PNG (converted losslessly from the original BMP)
127
+ - **Content**: One endoscopic frame per image
128
+
129
+ ### Acquisition Protocol
130
+
131
+ All images were acquired at:
132
+ - **Department of Gastroenterology, Marmara University School of Medicine**, Istanbul, Turkey
133
+ - **Time period**: December 2011 – July 2019
134
+ - **Subjects**: 564 patients with ulcerative colitis, 1,043 colonoscopy procedures
135
+ - **Annotation**: Two experienced gastroenterologists graded every image independently and blindly; images they disagreed on were graded by a third reviewer, and the final score was set by majority vote
136
+
137
+ ---
138
+
139
+ ## 🧪 Use Cases
140
+
141
+ - Ulcerative colitis severity classification (Mayo endoscopic score)
142
+ - Remission vs active disease classification (e.g., Mayo 0–1 vs Mayo 2–3)
143
+ - Ordinal regression of disease severity
144
+ - Patient-level evaluation of endoscopy classifiers (via `patient_id`)
145
+ - Representation learning and feature extraction for gastrointestinal endoscopy
146
+
147
+
148
+ ## ⚠️ Important Notes
149
+
150
+ - **Split by patient, never by image**: Each patient contributes many images, often from the same procedure. A random image-level split leaks patients between training and evaluation and gives inflated scores. Use `patient_id` (see Usage).
151
+ - **Patients span several grades**: One patient can have images of different Mayo scores, as different colon segments can show different activity.
152
+ - **Class imbalance**: Mayo 0 images are about 7× more frequent than Mayo 3 images. Use weighted sampling or class balancing as needed.
153
+ - **Ordinal labels**: Accuracy treats all errors equally; the dataset authors suggest quadratic weighted kappa (QWK) as the main metric.
154
+ - **Image-level grades**: Each image is graded on its own, not with the patient's overall disease score.
155
+
156
+
157
+ ## 📚 Citation
158
+
159
+ This dataset is derived from data originally published on **Zenodo** under a **CC BY 4.0** license. If you use this dataset, please acknowledge [Chehab Lab](https://chehablab.com) and cite the original LIMUC dataset:
160
+
161
+ ```bibtex
162
+ @misc{Polat2022LIMUC,
163
+ author = {Polat, Gorkem and Kani, Haluk Tarik and Ergenc, Ilkay and Alahdab, Yesim Ozen and Temizel, Alptekin and Atug, Ozlen},
164
+ title = {Labeled Images for Ulcerative Colitis (LIMUC) Dataset [dataset]},
165
+ year = {2022},
166
+ publisher = {Zenodo},
167
+ doi = {10.5281/zenodo.5827695}
168
+ }
169
+ ```
170
+
171
+ Additionally, cite the research paper that introduced this dataset:
172
+
173
+ ```bibtex
174
+ @article{Polat2023LIMUC,
175
+ author = {Polat, Gorkem and Kani, Haluk Tarik and Ergenc, Ilkay and Alahdab, Yesim Ozen and Temizel, Alptekin and Atug, Ozlen},
176
+ title = {Improving the Computer-Aided Estimation of Ulcerative Colitis Severity According to Mayo Endoscopic Score by Using Regression-Based Deep Learning},
177
+ journal = {Inflammatory Bowel Diseases},
178
+ volume = {29},
179
+ number = {9},
180
+ pages = {1431--1439},
181
+ year = {2023},
182
+ doi = {10.1093/ibd/izac226}
183
+ }
184
+ ```
185
+
186
+ ## ✉️ Original Authors
187
+
188
+ **Gorkem Polat, Haluk Tarik Kani, Ilkay Ergenc, Yesim Ozen Alahdab, Alptekin Temizel, Ozlen Atug**
189
+ Graduate School of Informatics, Middle East Technical University (METU), Ankara, and Department of Gastroenterology, Marmara University School of Medicine, Istanbul, Turkey
190
+
191
+ **Zenodo**: https://zenodo.org/records/5827695 (original files)
192
+
193
+
194
+ ## 📜 License
195
+
196
+ This dataset is released under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license, consistent with the original LIMUC dataset.
197
+
198
+ You may copy, modify, distribute, and use the data **for any purpose (commercial or non-commercial)**, **provided that appropriate credit is given** to Polat et al., Zenodo, and the original paper.
199
+
200
+ [![CC BY 4.0](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/)
201
+
202
+ **Chehab Lab @ 2026**