Create README_eye-conjectiva_MedThinkSeg.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107# eye-conjectiva (Eye Conjunctiva Segmentation Dataset) — packaged in `saiteja33/MedThink-Seg/eye-conjectiva`
This README documents:1) **The original Eye Conjunctiva Segmentation Dataset** (what it contains, size, and original file structure), and 2) **How the dataset is organized inside this Hugging Face repo** (`saiteja33/MedThink-Seg`, under the `eye-conjectiva/` directory).
---
## 1) Original dataset (source)
**Original dataset record (Mendeley Data, Version 1):** https://data.mendeley.com/datasets/yxwjgcndg2/1 DOI: `10.17632/yxwjgcndg2.1`
### What kind of images are included?- **Modality:** RGB photographs of the human **eye conjunctiva**.- **Acquisition:** captured using two smartphones (**OnePlus 9R** and **OnePlus 9 Pro**) under adequate room lighting; lower eyelid gently pulled down to expose conjunctiva.- **Image size / resolution:** images are **high-resolution ~3000 × 4000** pixels; **masks match the same resolution**.- **Annotation tool:** labeled with **Labelme**.
### Dataset size and counts- **Total images:** **547** conjunctiva eye images.
### Labels / annotations- mask sets are provided: - **Masks Annotator 1**
> The Mendeley record does not specify the exact pixel-value encoding (e.g., binary 0/255). Inspect a few masks to confirm your expected mask format.
## 2) Dataset structure in this Hugging Face repo (`saiteja33/MedThink-Seg/eye-conjectiva`)
**HF path:** `eye-conjectiva/` **Repo size (HF UI):** ~**4.58 GB**
### Directory structureThis packaging contains only images + masks:
```eye-conjectiva/├─ images/ # conjunctiva images (PNG)└─ masks/ # segmentation masks (PNG), same filenames as images/```
### Naming convention (HF packaging)- Filenames are numeric, like: - `1.png`, `10.png`, `100.png`, ...- **Image ↔ mask pairing rule:** `eye-conjectiva/images/<name>.png` pairs with `eye-conjectiva/masks/<name>.png`.
### File sizes (HF packaging)- Images are large PNGs (typically several MB each).- Masks are much smaller PNGs (typically a few KB to tens of KB).
> Note: The original dataset provides **two** annotators’ masks; this HF packaging exposes a **single** `masks/` folder. If you need both annotators, download from Mendeley.
---
## How to download / use (recommended)
### A) Download only `eye-conjectiva/` from this HF repo```pythonfrom huggingface_hub import snapshot_download
local_dir = snapshot_download( repo_id="saiteja33/MedThink-Seg", repo_type="dataset", allow_patterns=["eye-conjectiva/**"], # only pull this subdir)print(local_dir)```
### B) Create (image, mask) pairs```pythonfrom pathlib import Path
root = Path(local_dir) / "eye-conjectiva"img_dir = root / "images"msk_dir = root / "masks"
images = sorted(img_dir.glob("*.png"))pairs = [(p, msk_dir / p.name) for p in images]
# Quick checksmissing = [p.name for p, m in pairs if not m.exists()]print("num_images:", len(images))print("missing_masks:", len(missing))print("example_pair:", pairs[0])```
### C) Load with 🤗 Datasets (images only)If you want to load just the images as a dataset:
```pythonfrom datasets import load_dataset
ds_imgs = load_dataset("imagefolder", data_dir=str(img_dir))print(ds_imgs)```
(For paired image+mask training, most people keep pairs via the folder structure as in section **B**.)
---
## CitationIf you use this dataset, please cite the Mendeley record:
- *Eye Conjunctiva Segmentation Dataset* (Mendeley Data, V1). DOI: `10.17632/yxwjgcndg2.1`eye-conjectiva/README_eye-conjectiva_MedThinkSeg.mdAdded+107