Larrivhan commited on
Commit
5ddf3e9
·
verified ·
1 Parent(s): 36a6802

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - image-segmentation
5
+ - image-classification
6
+ language:
7
+ - en
8
+ pretty_name: KidNet Renal Injury Pathology Dataset
9
+ size_categories:
10
+ - 100<n<1K
11
+ tags:
12
+ - pathology
13
+ - histopathology
14
+ - renal-injury
15
+ - kidney
16
+ - semantic-segmentation
17
+ - weakly-supervised-learning
18
+ - labelme
19
+ ---
20
+
21
+ # KidNet Renal Injury Pathology Dataset
22
+
23
+ KidNet is a curated hematoxylin and eosin (H&E) kidney pathology image dataset for renal injury recognition. Each sample contains one microscopy image and one LabelMe annotation file with polygon-level labels for renal tubules and related pathological structures.
24
+
25
+ The dataset was built for small-sample renal injury modeling, especially:
26
+
27
+ - pixel-level segmentation of `injury_tubules`
28
+ - tile-level injury classification
29
+ - weakly supervised heatmap localization
30
+ - family-level generalization analysis across whole-slide-image (WSI) groups
31
+
32
+ ## Dataset Summary
33
+
34
+ | Item | Count |
35
+ | --- | ---: |
36
+ | Images | 411 |
37
+ | Annotation files | 411 |
38
+ | WSI families | 11 |
39
+ | Injury-positive images | 319 |
40
+ | Injury-negative images | 92 |
41
+ | Total annotated shapes | 16,932 |
42
+ | `injury_tubules` annotations | 8,996 |
43
+
44
+ ## Directory Structure
45
+
46
+ Each sample is stored in its own folder:
47
+
48
+ ```text
49
+ KidNet/
50
+ WSI1_1/
51
+ WSI1_1.jpg
52
+ WSI1_1.json
53
+ WSI1_2/
54
+ WSI1_2.jpg
55
+ WSI1_2.json
56
+ ...
57
+ ```
58
+
59
+ Each `.json` file follows the LabelMe format and contains:
60
+
61
+ - `imagePath`: image filename
62
+ - `imageHeight`, `imageWidth`: original image size
63
+ - `shapes`: polygon or circle annotations
64
+ - `label`: annotation class name
65
+ - `points`: vertex coordinates in image pixel space
66
+ - `shape_type`: usually `polygon`, with occasional `circle`
67
+
68
+ Some LabelMe files may contain an `imageData` field. The paired `.jpg` file is the authoritative image file; `imageData` can be removed before upload if a smaller repository size is required.
69
+
70
+ ## Label Schema
71
+
72
+ | Label | Count | Description |
73
+ | --- | ---: | --- |
74
+ | `injury_tubules` | 8,996 | Tubules annotated as injured; main binary segmentation target |
75
+ | `healthy_tubules` | 3,756 | Tubules annotated as morphologically healthy |
76
+ | `necrotic_tubules` | 2,369 | Necrotic tubule regions |
77
+ | `cast` | 688 | Tubular cast regions |
78
+ | `glomerulus` | 665 | Glomerular structures |
79
+ | `unknown` | 458 | Ambiguous or uncertain regions |
80
+
81
+ For binary renal injury segmentation, use `injury_tubules` as the positive class and all other pixels as background. For broader pathology modeling, the remaining labels can be used as auxiliary or multilabel targets.
82
+
83
+ ## Family-Level Distribution
84
+
85
+ The recommended split unit is the WSI family, which is the prefix of each sample ID before the final numeric index. Random image-level splitting is not recommended because images from the same family may share staining, acquisition, tissue-source, and morphology patterns.
86
+
87
+ | Family | Images | Injury-positive | Injury-negative | Injury annotations | Total shapes |
88
+ | --- | ---: | ---: | ---: | ---: | ---: |
89
+ | WSI1 | 20 | 2 | 18 | 5 | 669 |
90
+ | WSI14 | 10 | 0 | 10 | 0 | 380 |
91
+ | WSI15 | 10 | 0 | 10 | 0 | 383 |
92
+ | WSI19 | 103 | 103 | 0 | 2,046 | 2,766 |
93
+ | WSI2 | 20 | 5 | 15 | 18 | 720 |
94
+ | WSI20 | 36 | 36 | 0 | 1,242 | 1,989 |
95
+ | WSI3 | 34 | 20 | 14 | 770 | 1,658 |
96
+ | WSI4 | 20 | 19 | 1 | 168 | 946 |
97
+ | WSI5 | 118 | 115 | 3 | 4,587 | 5,780 |
98
+ | WSI6 | 20 | 8 | 12 | 61 | 907 |
99
+ | WSI7 | 20 | 11 | 9 | 99 | 734 |
100
+
101
+ ## Recommended Evaluation Protocol
102
+
103
+ Use family-level held-out evaluation:
104
+
105
+ 1. Select one WSI family as the test family.
106
+ 2. Select another WSI family as validation.
107
+ 3. Train on the remaining families.
108
+ 4. Repeat across all 11 held-out families.
109
+
110
+ This protocol is stricter than random image splitting and better measures generalization to unseen WSI families.
111
+
112
+ Recommended metrics:
113
+
114
+ - Segmentation: Dice, IoU, precision, recall, specificity
115
+ - Tile classification: recall, precision, F1, balanced accuracy, AUROC when applicable
116
+ - Heatmap localization: image-level recall, false-positive area, thresholded heatmap quality
117
+
118
+ ## Loading Example
119
+
120
+ ```python
121
+ from pathlib import Path
122
+ import json
123
+ from PIL import Image
124
+
125
+ root = Path("KidNet")
126
+ samples = []
127
+
128
+ for sample_dir in sorted(p for p in root.iterdir() if p.is_dir()):
129
+ image_path = next(sample_dir.glob("*.jpg"))
130
+ json_path = next(sample_dir.glob("*.json"))
131
+ with json_path.open("r", encoding="utf-8") as f:
132
+ ann = json.load(f)
133
+
134
+ labels = [shape["label"] for shape in ann.get("shapes", [])]
135
+ samples.append(
136
+ {
137
+ "sample_id": image_path.stem,
138
+ "family": image_path.stem.split("_")[0],
139
+ "image": Image.open(image_path).convert("RGB"),
140
+ "annotation": ann,
141
+ "has_injury": "injury_tubules" in labels,
142
+ }
143
+ )
144
+
145
+ print(len(samples))
146
+ ```
147
+
148
+ ## Converting `injury_tubules` to a Binary Mask
149
+
150
+ ```python
151
+ from PIL import Image, ImageDraw
152
+
153
+ def injury_mask(annotation):
154
+ width = int(annotation["imageWidth"])
155
+ height = int(annotation["imageHeight"])
156
+ mask = Image.new("L", (width, height), 0)
157
+ draw = ImageDraw.Draw(mask)
158
+
159
+ for shape in annotation.get("shapes", []):
160
+ if shape.get("label") != "injury_tubules":
161
+ continue
162
+ points = [tuple(p) for p in shape.get("points", [])]
163
+ if shape.get("shape_type") == "polygon" and len(points) >= 3:
164
+ draw.polygon(points, fill=1)
165
+ elif shape.get("shape_type") == "circle" and len(points) >= 2:
166
+ (cx, cy), (px, py) = points[:2]
167
+ r = ((px - cx) ** 2 + (py - cy) ** 2) ** 0.5
168
+ draw.ellipse((cx - r, cy - r, cx + r, cy + r), fill=1)
169
+
170
+ return mask
171
+ ```
172
+
173
+ ## Intended Use
174
+
175
+ This dataset is intended for academic research on renal injury recognition from pathology images. Suitable use cases include segmentation baselines, weakly supervised classification, heatmap localization, and small-sample generalization studies.
176
+
177
+ The dataset is not intended for clinical diagnosis, treatment decisions, or deployment as a medical device.
178
+
179
+ ## Limitations
180
+
181
+ - The dataset is small and strongly imbalanced across WSI families.
182
+ - Some families are injury-rich, while others are sparse-positive or fully negative.
183
+ - Labels are research annotations and should not be treated as exhaustive clinical ground truth.
184
+ - Pixel-level boundaries can be uncertain for subtle tubular injury patterns.
185
+ - Models evaluated with random image-level splits may report overly optimistic performance.
186
+
187
+ ## Ethics And Privacy
188
+
189
+ The current release contains experimental kidney histopathology images and does not include human-identifiable personal information. Users should still follow institutional, animal research, and data-use requirements applicable to their own setting.
190
+
191
+ ## License
192
+
193
+ License information should be confirmed by the dataset owner before public redistribution. The current metadata uses `other` as a placeholder. If the dataset is released publicly, replace it with the final approved license.
194
+
195
+ ## Citation
196
+
197
+ If you use this dataset, please cite the project or competition report associated with KidNet. A formal citation can be added here after release.
198
+
199
+ ```bibtex
200
+ @dataset{kidnet_renal_injury_pathology,
201
+ title = {KidNet Renal Injury Pathology Dataset},
202
+ year = {2026},
203
+ note = {H&E kidney pathology images with LabelMe annotations for renal injury recognition}
204
+ }
205
+ ```
WSI15_1/WSI15_1.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI15_7/WSI15_7.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI15_9/WSI15_9.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_2/WSI19_2.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_3/WSI19_3.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_31/WSI19_31.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_36/WSI19_36.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_38/WSI19_38.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_39/WSI19_39.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_4/WSI19_4.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_5/WSI19_5.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_52/WSI19_52.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_53/WSI19_53.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_54/WSI19_54.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_55/WSI19_55.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_62/WSI19_62.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_63/WSI19_63.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_64/WSI19_64.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_65/WSI19_65.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_90/WSI19_90.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_90_dup2/WSI19_90_dup2.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_91/WSI19_91.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_96/WSI19_96.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_97/WSI19_97.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_98/WSI19_98.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI19_99/WSI19_99.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI1_7/WSI1_7.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI1_9/WSI1_9.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_2/WSI3_2.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_3/WSI3_3.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_32/WSI3_32.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_33/WSI3_33.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_34/WSI3_34.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_35/WSI3_35.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI3_4/WSI3_4.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI4_13/WSI4_13.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI4_14/WSI4_14.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_1/WSI5_1.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_112/WSI5_112.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_113/WSI5_113.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_115/WSI5_115.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_6/WSI5_6.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_7/WSI5_7.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_8/WSI5_8.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI5_9/WSI5_9.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI7_2/WSI7_2.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI7_3/WSI7_3.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI7_4/WSI7_4.json ADDED
The diff for this file is too large to render. See raw diff
 
WSI7_5/WSI7_5.json ADDED
The diff for this file is too large to render. See raw diff