LMOD-Cataract-1K / README.md
mehti's picture
Upload dataset files
75f9037 verified
metadata
pretty_name: Cataract-1K
license: cc-by-4.0
task_categories:
  - image-segmentation
  - object-detection
tags:
  - medical
  - ophthalmology
  - surgery
  - cataract
size_categories:
  - 1k<n<10k

Cataract-1K Dataset Processing

This module describes the Cataract-1K image dataset, a component of the LMOD (Large Multimodal Ophthalmology Dataset) benchmark.

Dataset Overview

Cataract-1K is a comprehensive dataset of cataract surgery videos.

The original dataset is provided in video format. This processing pipeline extracts relevant frames and annotations (bounding boxes, segmentations) into a unified format for training vision models.

Data Representation

The processed dataset uses the Hugging Face datasets library. To maintain data integrity and optimize storage, images are serialized into bytes.

Image Conversion Note

We utilize features.image.image_to_bytes from the datasets library to convert image objects into byte streams during processing.

Accessing Images

You can decode the image bytes back into visual formats using the standard PIL and io libraries.

Example: Reading an image from the dataset

import io
from PIL import Image as pil_image
import numpy as np

# Access the byte stream of the first sample
image_bytes = ds[0]["image"]["bytes"]

# Decode to PIL Image
image = pil_image.open(io.BytesIO(image_bytes))

# Convert to NumPy array for processing
image_array = np.array(image)

Experimental Setup & Splitting

5-Fold Cross-Validation

To ensure rigorous evaluation and comparability with prior work, we recommend employing a 5-fold cross-validation strategy.

Critical Note on Data Leakage: The dataset contains multiple frames from the same surgery. Splits must be performed at the case (surgery) level, not the frame level.

  • Grouping: Aggregate all frames belonging to the same case_id.
  • Splitting: Partition the unique case_ids into 5 exclusive folds.
  • Assignment: All frames associated with a case_id should reside in the same fold.

This approach prevents temporally correlated frames from the same surgery appearing in both training and validation sets, ensuring a fair assessment of model generalization.

License

The datasets are licensed under Creative Commons 4.0 International (CC BY, Creative Commons License).

References

If you use this dataset, please cite the following papers:

@inproceedings{Cataract-1K,
    author    = {Negin Ghamsarian and
                Yosuf El-Shabrawi and
                Sahar Nasirihaghighi and
                Doris Putzgruber-Adamitsch and
                Martin Zinkernagel and
                Sebastian Wolf and
                Klaus Schoeffmann and
                Raphael Sznitman},
    title     = {Cataract-1K: Cataract Surgery Dataset for Scene Segmentation, Phase Recognition, and Irregularity Detection (to appear)},
}
@misc{qin2025lmodlargemultimodalophthalmology,
      title={LMOD: A Large Multimodal Ophthalmology Dataset and Benchmark for Large Vision-Language Models}, 
      author={Zhenyue Qin and Yu Yin and Dylan Campbell and Xuansheng Wu and Ke Zou and Yih-Chung Tham and Ninghao Liu and Xiuzhen Zhang and Qingyu Chen},
      year={2025},
      eprint={2410.01620},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2410.01620}, 
}

NOTE: This documentation is generated using Gemini 3 Pro and verified by human.