saiteja33 commited on
Commit
09bb7f6
·
verified ·
1 Parent(s): c155b61

Create README_eye-conjectiva_MedThinkSeg.md

Browse files
eye-conjectiva/README_eye-conjectiva_MedThinkSeg.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # eye-conjectiva (Eye Conjunctiva Segmentation Dataset) — packaged in `saiteja33/MedThink-Seg/eye-conjectiva`
2
+
3
+ This README documents:
4
+ 1) **The original Eye Conjunctiva Segmentation Dataset** (what it contains, size, and original file structure), and
5
+ 2) **How the dataset is organized inside this Hugging Face repo** (`saiteja33/MedThink-Seg`, under the `eye-conjectiva/` directory).
6
+
7
+ ---
8
+
9
+ ## 1) Original dataset (source)
10
+
11
+ **Original dataset record (Mendeley Data, Version 1):**
12
+ https://data.mendeley.com/datasets/yxwjgcndg2/1
13
+ DOI: `10.17632/yxwjgcndg2.1`
14
+
15
+ ### What kind of images are included?
16
+ - **Modality:** RGB photographs of the human **eye conjunctiva**.
17
+ - **Acquisition:** captured using two smartphones (**OnePlus 9R** and **OnePlus 9 Pro**) under adequate room lighting; lower eyelid gently pulled down to expose conjunctiva.
18
+ - **Image size / resolution:** images are **high-resolution ~3000 × 4000** pixels; **masks match the same resolution**.
19
+ - **Annotation tool:** labeled with **Labelme**.
20
+
21
+ ### Dataset size and counts
22
+ - **Total images:** **547** conjunctiva eye images.
23
+
24
+ ### Labels / annotations
25
+ - mask sets are provided:
26
+ - **Masks Annotator 1**
27
+
28
+ > 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.
29
+
30
+
31
+ ## 2) Dataset structure in this Hugging Face repo (`saiteja33/MedThink-Seg/eye-conjectiva`)
32
+
33
+ **HF path:** `eye-conjectiva/`
34
+ **Repo size (HF UI):** ~**4.58 GB**
35
+
36
+ ### Directory structure
37
+ This packaging contains only images + masks:
38
+
39
+ ```
40
+ eye-conjectiva/
41
+ ├─ images/ # conjunctiva images (PNG)
42
+ └─ masks/ # segmentation masks (PNG), same filenames as images/
43
+ ```
44
+
45
+ ### Naming convention (HF packaging)
46
+ - Filenames are numeric, like:
47
+ - `1.png`, `10.png`, `100.png`, ...
48
+ - **Image ↔ mask pairing rule:** `eye-conjectiva/images/<name>.png` pairs with `eye-conjectiva/masks/<name>.png`.
49
+
50
+ ### File sizes (HF packaging)
51
+ - Images are large PNGs (typically several MB each).
52
+ - Masks are much smaller PNGs (typically a few KB to tens of KB).
53
+
54
+ > Note: The original dataset provides **two** annotators’ masks; this HF packaging exposes a **single** `masks/` folder. If you need both annotators, download from Mendeley.
55
+
56
+ ---
57
+
58
+ ## How to download / use (recommended)
59
+
60
+ ### A) Download only `eye-conjectiva/` from this HF repo
61
+ ```python
62
+ from huggingface_hub import snapshot_download
63
+
64
+ local_dir = snapshot_download(
65
+ repo_id="saiteja33/MedThink-Seg",
66
+ repo_type="dataset",
67
+ allow_patterns=["eye-conjectiva/**"], # only pull this subdir
68
+ )
69
+ print(local_dir)
70
+ ```
71
+
72
+ ### B) Create (image, mask) pairs
73
+ ```python
74
+ from pathlib import Path
75
+
76
+ root = Path(local_dir) / "eye-conjectiva"
77
+ img_dir = root / "images"
78
+ msk_dir = root / "masks"
79
+
80
+ images = sorted(img_dir.glob("*.png"))
81
+ pairs = [(p, msk_dir / p.name) for p in images]
82
+
83
+ # Quick checks
84
+ missing = [p.name for p, m in pairs if not m.exists()]
85
+ print("num_images:", len(images))
86
+ print("missing_masks:", len(missing))
87
+ print("example_pair:", pairs[0])
88
+ ```
89
+
90
+ ### C) Load with 🤗 Datasets (images only)
91
+ If you want to load just the images as a dataset:
92
+
93
+ ```python
94
+ from datasets import load_dataset
95
+
96
+ ds_imgs = load_dataset("imagefolder", data_dir=str(img_dir))
97
+ print(ds_imgs)
98
+ ```
99
+
100
+ (For paired image+mask training, most people keep pairs via the folder structure as in section **B**.)
101
+
102
+ ---
103
+
104
+ ## Citation
105
+ If you use this dataset, please cite the Mendeley record:
106
+
107
+ - *Eye Conjunctiva Segmentation Dataset* (Mendeley Data, V1). DOI: `10.17632/yxwjgcndg2.1`