LIMUC / README.md
AhmadMM2024's picture
Update README.md
ee34c33 verified
|
Raw History Blame Contribute Delete
8.39 kB
metadata
dataset_info:
  features:
    - name: image_id
      dtype: string
    - name: image
      dtype: image
    - name: patient_id
      dtype: string
    - name: mayo
      dtype: string
    - name: label
      dtype: int32
  splits:
    - name: train
      num_bytes: 1318668664
      num_examples: 11276
  download_size: 1319315720
  dataset_size: 1318668664
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
license: cc-by-4.0
task_categories:
  - image-classification
language:
  - en
tags:
  - endoscopy
  - colonoscopy
  - gastroenterology
  - ulcerative-colitis
  - inflammatory-bowel-disease
  - mayo-endoscopic-score
  - medical
  - classification
pretty_name: LIMUC (Labeled Images for Ulcerative Colitis)
size_categories:
  - 10K<n<100K

LIMUC — Labeled Images for Ulcerative Colitis

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.

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. 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. The dataset is designed for ulcerative colitis severity classification with patient-level evaluation.

📦 Dataset Structure

The dataset has a single train split, with each row corresponding to a single colonoscopy image:

Field Description
image_id Original image filename without extension (e.g., UC_patient_190_16)
image RGB colonoscopy image (PNG, converted losslessly from the original BMP, native resolution)
patient_id Patient ID from the original folder (e.g., 190)
mayo Mayo endoscopic score: Mayo 0, Mayo 1, Mayo 2, Mayo 3
label Integer Mayo score: 0–3 (see Feature Descriptions)

Class Distribution:

  • Mayo 0: 6,105 images (54.1%)
  • Mayo 1: 3,052 images (27.1%)
  • Mayo 2: 1,254 images (11.1%)
  • Mayo 3: 865 images (7.7%)
  • Total: 11,276 images from 564 patients

⚙️ Preprocessing

  • 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
  • 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)
  • Images were converted from BMP to PNG (lossless; no resizing, cropping or color change)
  • All images were preserved

🚀 Usage

from datasets import load_dataset
import matplotlib.pyplot as plt

ds = load_dataset("chehablab/LIMUC", split="train")

# One example image per Mayo score
classes = ["Mayo 0", "Mayo 1", "Mayo 2", "Mayo 3"]
labels = ds["label"]
fig, axes = plt.subplots(1, len(classes), figsize=(12, 3))
for ax, label in zip(axes, range(len(classes))):
    sample = ds[labels.index(label)]
    ax.imshow(sample["image"])
    ax.set_title(f"{classes[label]} · patient {sample['patient_id']}", fontsize=9)
    ax.axis("off")
plt.tight_layout()
plt.show()

# Split by patient (never by image)
from sklearn.model_selection import GroupShuffleSplit
df = ds.select_columns(["patient_id", "label"]).to_pandas()
gss = GroupShuffleSplit(n_splits=1, test_size=0.2, random_state=0)
train_idx, test_idx = next(gss.split(df, groups=df["patient_id"]))
train, test = ds.select(train_idx), ds.select(test_idx)

🏷️ Feature Descriptions

Mayo Endoscopic Score

Four grades of ulcerative colitis activity:

  • Mayo 0 (label=0): 6,105 images — Normal or inactive disease
  • Mayo 1 (label=1): 3,052 images — Mild disease: erythema, decreased vascular pattern, mild friability
  • Mayo 2 (label=2): 1,254 images — Moderate disease: marked erythema, absent vascular pattern, friability, erosions
  • Mayo 3 (label=3): 865 images — Severe disease: spontaneous bleeding, ulceration

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.

Image Specifications

  • Modality: White-light colonoscopy
  • Image format: RGB, PNG (converted losslessly from the original BMP)
  • Content: One endoscopic frame per image

Acquisition Protocol

All images were acquired at:

  • Department of Gastroenterology, Marmara University School of Medicine, Istanbul, Turkey
  • Time period: December 2011 – July 2019
  • Subjects: 564 patients with ulcerative colitis, 1,043 colonoscopy procedures
  • 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

🧪 Use Cases

  • Ulcerative colitis severity classification (Mayo endoscopic score)
  • Remission vs active disease classification (e.g., Mayo 0–1 vs Mayo 2–3)
  • Ordinal regression of disease severity
  • Patient-level evaluation of endoscopy classifiers (via patient_id)
  • Representation learning and feature extraction for gastrointestinal endoscopy

⚠️ Important Notes

  • 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).
  • Patients span several grades: One patient can have images of different Mayo scores, as different colon segments can show different activity.
  • Class imbalance: Mayo 0 images are about 7× more frequent than Mayo 3 images. Use weighted sampling or class balancing as needed.
  • Ordinal labels: Accuracy treats all errors equally; the dataset authors suggest quadratic weighted kappa (QWK) as the main metric.
  • Image-level grades: Each image is graded on its own, not with the patient's overall disease score.

📚 Citation

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 and cite the original LIMUC dataset:

@misc{Polat2022LIMUC,
  author    = {Polat, Gorkem and Kani, Haluk Tarik and Ergenc, Ilkay and Alahdab, Yesim Ozen and Temizel, Alptekin and Atug, Ozlen},
  title     = {Labeled Images for Ulcerative Colitis (LIMUC) Dataset [dataset]},
  year      = {2022},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.5827695}
}

Additionally, cite the research paper that introduced this dataset:

@article{Polat2023LIMUC,
  author  = {Polat, Gorkem and Kani, Haluk Tarik and Ergenc, Ilkay and Alahdab, Yesim Ozen and Temizel, Alptekin and Atug, Ozlen},
  title   = {Improving the Computer-Aided Estimation of Ulcerative Colitis Severity According to Mayo Endoscopic Score by Using Regression-Based Deep Learning},
  journal = {Inflammatory Bowel Diseases},
  volume  = {29},
  number  = {9},
  pages   = {1431--1439},
  year    = {2023},
  doi     = {10.1093/ibd/izac226}
}

✉️ Original Authors

Gorkem Polat, Haluk Tarik Kani, Ilkay Ergenc, Yesim Ozen Alahdab, Alptekin Temizel, Ozlen Atug
Graduate School of Informatics, Middle East Technical University (METU), Ankara, and Department of Gastroenterology, Marmara University School of Medicine, Istanbul, Turkey

Zenodo: https://zenodo.org/records/5827695 (original files)

📜 License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, consistent with the original LIMUC dataset.

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.

CC BY 4.0

Chehab Lab @ 2026