Parth1503 commited on
Commit
efad2cc
·
verified ·
1 Parent(s): 5625723

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +241 -105
README.md CHANGED
@@ -1,108 +1,244 @@
1
  ---
2
- dataset_info:
3
- - config_name: annotated
4
- features:
5
- - name: image
6
- dtype: image
7
- - name: mask
8
- dtype: image
9
- - name: video_id
10
- dtype: string
11
- - name: folder
12
- dtype: string
13
- - name: site
14
- dtype: string
15
- - name: subject
16
- dtype: string
17
- - name: view
18
- dtype: string
19
- - name: split
20
- dtype: string
21
- - name: frame_index
22
- dtype: int32
23
- - name: n_frames
24
- dtype: int32
25
- - name: height
26
- dtype: int32
27
- - name: width
28
- dtype: int32
29
- - name: has_mask
30
- dtype: bool
31
- - name: gt_dense
32
- dtype: bool
33
- - name: gt_source
34
- dtype: string
35
- - name: mask_filled_from_contour
36
- dtype: bool
37
- - name: label_remapped
38
- dtype: bool
39
- - name: video_truncated
40
- dtype: bool
41
- - name: group_id
42
- dtype: string
43
- - name: deid_blanked_rows
44
- dtype: int32
45
- splits:
46
- - name: train
47
- num_bytes: 179037353
48
- num_examples: 2257
49
- download_size: 178848651
50
- dataset_size: 179037353
51
- - config_name: full_video
52
- features:
53
- - name: image
54
- dtype: image
55
- - name: mask
56
- dtype: image
57
- - name: video_id
58
- dtype: string
59
- - name: folder
60
- dtype: string
61
- - name: site
62
- dtype: string
63
- - name: subject
64
- dtype: string
65
- - name: view
66
- dtype: string
67
- - name: split
68
- dtype: string
69
- - name: frame_index
70
- dtype: int32
71
- - name: n_frames
72
- dtype: int32
73
- - name: height
74
- dtype: int32
75
- - name: width
76
- dtype: int32
77
- - name: has_mask
78
- dtype: bool
79
- - name: gt_dense
80
- dtype: bool
81
- - name: gt_source
82
- dtype: string
83
- - name: mask_filled_from_contour
84
- dtype: bool
85
- - name: label_remapped
86
- dtype: bool
87
- - name: video_truncated
88
- dtype: bool
89
- - name: group_id
90
- dtype: string
91
- - name: deid_blanked_rows
92
- dtype: int32
93
- splits:
94
- - name: train
95
- num_bytes: 3130572528
96
- num_examples: 38619
97
- download_size: 3126242510
98
- dataset_size: 3130572528
99
  configs:
100
- - config_name: annotated
101
- data_files:
102
- - split: train
103
- path: annotated/train-*
104
- - config_name: full_video
105
- data_files:
106
- - split: train
107
- path: full_video/train-*
 
108
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ pretty_name: CardiacUDC
4
+ task_categories:
5
+ - image-segmentation
6
+ tags:
7
+ - medical-imaging
8
+ - echocardiography
9
+ - ultrasound
10
+ - cardiac
11
+ - four-chamber
12
+ - 2d-echo
13
+ - video-segmentation
14
+ size_categories:
15
+ - 10K<n<100K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  configs:
17
+ - config_name: annotated
18
+ default: true
19
+ data_files:
20
+ - split: train
21
+ path: annotated/train-*
22
+ - config_name: full_video
23
+ data_files:
24
+ - split: train
25
+ path: full_video/train-*
26
  ---
27
+
28
+ # CardiacUDC — apical four-chamber echocardiography video segmentation
29
+
30
+ 2D transthoracic echocardiography from two hospitals ("Site G" and "Site R"),
31
+ annotated for the four cardiac chambers. Introduced as **CardiacUDA** in
32
+ [GraphEcho (ICCV 2023)](https://arxiv.org/abs/2309.11145); the Kaggle release
33
+ spells it *cardiacUDC*. Converted from the official Kaggle release — see
34
+ [Provenance](#provenance).
35
+
36
+ This is a **video** dataset: 364 recordings, 38,619 frames, one row per frame.
37
+
38
+ ## Configs
39
+
40
+ | Config | Rows | Contents | Mask |
41
+ |---|---|---|---|
42
+ | **`annotated`** *(default)* | **2,257** | every frame that carries ground truth | always present |
43
+ | `full_video` | **38,619** | every frame of all 364 videos | present on 2,257, `null` elsewhere |
44
+
45
+ `annotated` is exactly `full_video[has_mask == True]` — same schema, same rows.
46
+ Use `annotated` for scoring; use `full_video` for temporal propagation, ordering
47
+ by `frame_index` and grouping by `video_id`.
48
+
49
+ ## Classes
50
+
51
+ | Value | Structure |
52
+ |---|---|
53
+ | 0 | background |
54
+ | 1 | LV — left ventricle |
55
+ | 2 | LA — left atrium |
56
+ | 3 | RA — right atrium |
57
+ | 4 | RV — right ventricle |
58
+
59
+ **Value 2 is the left atrium, not the right ventricle; RV is 4.** The numbering
60
+ walks the heart in a loop. This matches the authors' own loader
61
+ ([`datasets/cardiac_uda.py`](https://github.com/xmed-lab/GraphEcho/blob/main/datasets/cardiac_uda.py),
62
+ view `'4'` branch). Figure 2 of the paper labels the left atrium "(RA)" and lists
63
+ a fifth structure, "epicardium of left ventricle", which does not exist in this
64
+ release.
65
+
66
+ ## Composition
67
+
68
+ Seven source folders. No train/val/test directories ship.
69
+
70
+ | Folder | Videos | With GT | Site |
71
+ |---|---|---|---|
72
+ | Site_G_100 | 97 | 97 | G |
73
+ | Site_G_29 | 29 | 29 | G |
74
+ | Site_G_20 | 21 | 21 | G |
75
+ | Site_R_126 | 85 | 84 | R |
76
+ | Site_R_52 | 52 | 52 | R |
77
+ | Site_R_73 | 70 | **0** | R |
78
+ | label_all_frame | 10 | 10 | mixed |
79
+ | **Total** | **364** | **293** | |
80
+
81
+ Folder-name numbers do not match their contents (`Site_G_100` holds 97,
82
+ `Site_R_126` holds 85). Frame counts range 41–284 (mean 106). Three
83
+ resolutions ship — 800×600 (335 videos), 1024×768 (24), 640×480 (5) — not the
84
+ two the source description states.
85
+
86
+ ### Two annotation regimes
87
+
88
+ - **`Site_*` folders — sparse.** 5–8 frames annotated per video (mean 5.9), out
89
+ of ~106. This is the paper's *training* annotation budget.
90
+ - **`label_all_frame` — dense.** Every frame annotated, 548 frames over 10
91
+ videos. The paper's val/test analogue.
92
+
93
+ `gt_dense` distinguishes them; `gt_source` records which pipeline produced each
94
+ mask.
95
+
96
+ ## ⚠️ `label_all_frame` overlaps `Site_R_126` — do not split them apart
97
+
98
+ Eight of the ten `label_all_frame` videos are **the same recordings** as videos
99
+ in `Site_R_126`: same subject id, identical frame count, ~88% bit-identical
100
+ pixels (mean absolute difference ≈4.5/255, correlation 0.70–0.94). They are a
101
+ dense re-annotation of footage that also ships sparsely annotated, not new
102
+ material. The remaining two have no `Site_*` counterpart.
103
+
104
+ Putting `label_all_frame` in a test split and `Site_*` in train therefore leaks
105
+ 8 of 10 test videos into training. **`group_id` ties each twin pair together** —
106
+ split on `group_id`, never on `video_id` or `subject`.
107
+
108
+ ## Splits
109
+
110
+ **A single `train` split ships.** The paper's 8:1:1 division is not distributed,
111
+ and the near-duplication above makes any naive split leak. Downstream consumers
112
+ should construct their own split, grouping on `group_id`.
113
+
114
+ ## Subject ids are not unique
115
+
116
+ 85 subject names occur in more than one folder, and those collisions are
117
+ **different recordings** (0 of 85 are byte-identical). `video_id` is
118
+ `{folder}/{subject}` and is the only safe key. Grouping on bare `subject` will
119
+ silently merge unrelated patients.
120
+
121
+ ## What this release changes from source
122
+
123
+ Every modification below is deliberate and reversible from the original Kaggle
124
+ archive; nothing else is altered.
125
+
126
+ 1. **Contour masks filled.** `label_all_frame` ships hollow ~1px contour
127
+ *outlines*, whereas `Site_*` ships filled regions. Scoring a raw outline
128
+ measures the rim, not the chamber. Outlines are filled per class with
129
+ `scipy.ndimage.binary_fill_holes` (with a 1–3 iteration `binary_closing`
130
+ fallback for open contours). Validated: post-fill area/bbox ratio is
131
+ **0.689**, against **0.68** for the natively-filled `Site_*` masks. Two class
132
+ instances out of ~2,150 could not be closed and were dropped rather than
133
+ shipped as rings. `mask_filled_from_contour` flags affected rows.
134
+
135
+ The authors' `contour_to_mask` was **not** used: it selects classes by rank
136
+ within `set(unique_values)`, so on a volume with a missing class it silently
137
+ renumbers the remaining ones.
138
+
139
+ 2. **Stray label values remapped.** Two `label_all_frame` volumes encode two of
140
+ the chambers as 5 and 6 instead of 1 and 4. Verified spatially against the
141
+ eight consistent volumes — the stray values sit at the class centroids of 1
142
+ and 4 (normalised distance 0.013–0.078, every value matching exactly one
143
+ class) — and remapped `{5→1, 6→4}`. `label_remapped` flags affected rows.
144
+
145
+ 3. **One truncated source file salvaged.** One `Site_R_126` label volume is a
146
+ truncated gzip **in the source archive** — the enclosing zip's CRC verifies,
147
+ so this is not a transfer defect. Its 42 intact frames (7 annotated) are
148
+ kept; the remaining 21 frames carry no ground truth. `video_truncated` flags
149
+ the video.
150
+
151
+ 4. **Orientation normalised.** Source arrays are `(W, H, T)`; each frame is
152
+ transposed and rotated 180° into the orientation in which the scanner's
153
+ on-screen text reads correctly. Applied identically to images and masks.
154
+
155
+ 5. **De-identification band.** The top `max(45, ceil(0.075 × H))` rows of every
156
+ frame of every video are zeroed — 45 rows at 480px and 600px, 58 at 768px.
157
+ Some source videos retained scanner header text containing patient
158
+ identifiers; the band is applied **uniformly to all 364 videos** rather than
159
+ selectively, so the redaction does not itself indicate which files were
160
+ affected. **This is a MedOtter modification — upstream is unmodified in this
161
+ respect.**
162
+
163
+ The band costs no annotation. Over all 294 label volumes / 2,257 annotated
164
+ frames at native resolution, the topmost mask row is 81 (480px), 83 (600px)
165
+ and 144 (768px), against a maximum blank of 58. The build re-checks this per
166
+ frame and refuses to write a row whose mask intersects the band.
167
+ `deid_blanked_rows` records the band height applied to each row.
168
+
169
+ ## Known limitations of the source release
170
+
171
+ - **Only the A4C view ships.** The paper describes 992 videos across four views
172
+ (LVLA, PALA, LVSA, A4C); the public release is view 4 only, 364 videos. The
173
+ other three views and the pulmonary-artery class were announced for late 2024
174
+ and have not appeared — Kaggle remains at version 1 (2023-10-30).
175
+ - **70 videos in `Site_R_73` have no labels at all**, and one `Site_R_126` label
176
+ volume is present but entirely empty. Both are shipped in `full_video` as
177
+ image-only rows and excluded from `annotated`.
178
+ - Third-party catalogues describing this dataset as "5 structures (LV, RV, MYO,
179
+ LA, RA)" or "29,283 slices" do not match the public release.
180
+
181
+ ## Schema
182
+
183
+ | Column | Type | Notes |
184
+ |---|---|---|
185
+ | `image` | Image | PNG, grayscale, de-identification band applied |
186
+ | `mask` | Image | PNG, values 0–4; `null` where no GT |
187
+ | `video_id` | string | `{folder}/{subject}` — the only unique key |
188
+ | `folder`, `site`, `subject` | string | `site` is `G`, `R`, or `unknown` |
189
+ | `view` | string | `A4C` throughout |
190
+ | `frame_index`, `n_frames` | int32 | order within the recording |
191
+ | `height`, `width` | int32 | native resolution |
192
+ | `has_mask`, `gt_dense` | bool | GT presence / dense-annotation regime |
193
+ | `gt_source` | string | `site_sparse`, `label_all_frame_filled`, `none` |
194
+ | `mask_filled_from_contour` | bool | mask was reconstructed from an outline |
195
+ | `label_remapped` | bool | `{5→1, 6→4}` applied |
196
+ | `video_truncated` | bool | source label volume was truncated |
197
+ | `group_id` | string | **split on this** — ties near-duplicate videos |
198
+ | `deid_blanked_rows` | int32 | height of the zeroed header band |
199
+ | `split` | string | `train` (single split) |
200
+
201
+ ## Provenance
202
+
203
+ Retrieved from Kaggle `xiaoweixumedicalai/cardiacudc-dataset` (version 1,
204
+ 2023-10-30), 7-part split zip, 4,515,920,293 bytes, extracting to 658 NIfTI
205
+ files / 4,547,904,911 bytes. Archive CRC verified before conversion.
206
+
207
+ ## Licence and attribution
208
+
209
+ Released under the **Apache License, Version 2.0**, as declared by the dataset
210
+ authors on the source Kaggle record. (The GraphEcho *code* repository is
211
+ MIT-licensed — a separate grant covering the code, not this data.)
212
+
213
+ ```
214
+ This dataset is a re-hosted and reprocessed copy of "cardiacUDC_dataset"
215
+ (a.k.a. CardiacUDA), created by Xiaowei Xu et al., originally released at
216
+ https://www.kaggle.com/datasets/xiaoweixumedicalai/cardiacudc-dataset
217
+
218
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
219
+ this file except in compliance with the License. You may obtain a copy at
220
+ http://www.apache.org/licenses/LICENSE-2.0
221
+ Unless required by applicable law or agreed to in writing, the dataset is
222
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
223
+
224
+ Modifications by MedOtter, per Apache-2.0 section 4(b): conversion from NIfTI to
225
+ per-frame PNG in parquet; contour masks polygon-filled; two volumes' stray label
226
+ values remapped; one truncated source volume partially salvaged; frame
227
+ orientation normalised; a fixed-height header band zeroed on every frame.
228
+ See "What this release changes from source" above.
229
+ ```
230
+
231
+ Please cite:
232
+
233
+ ```bibtex
234
+ @inproceedings{yang2023graphecho,
235
+ title = {GraphEcho: Graph-Driven Unsupervised Domain Adaptation for
236
+ Echocardiogram Video Segmentation},
237
+ author = {Yang, Jiewen and Ding, Xinpeng and Zheng, Ziyang and
238
+ Xu, Xiaowei and Li, Xiaomeng},
239
+ booktitle = {Proceedings of the IEEE/CVF International Conference on
240
+ Computer Vision (ICCV)},
241
+ pages = {11878--11887},
242
+ year = {2023}
243
+ }
244
+ ```