wsimson commited on
Commit
346e58b
·
verified ·
1 Parent(s): bbd0f9e

Add waterloo-carotid README + pipeline(s) from accepted_submissions

Browse files
waterloo-carotid/README.md ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: UW-CarotidRF
3
+ license: cc-by-4.0
4
+ task_categories:
5
+ - other
6
+ tags:
7
+ - ultrasound
8
+ - rf
9
+ - openh-rf
10
+ - medical-imaging
11
+ - in-vivo
12
+ - carotid-artery
13
+ - beamforming
14
+ - vector-doppler
15
+ - vector-flow-imaging
16
+ language:
17
+ - en
18
+ size_categories:
19
+ - n<4.5M
20
+ ---
21
+
22
+ # UW-Carotid RF
23
+
24
+ Dataset consisting of raw RF data and vector velocity measurements of carotid
25
+ arteries acquired in in vivo carotid artery studies conducted by LITMUS @
26
+ University of Waterloo. The dataset consists of longitudinal and cross-sectional
27
+ images of the common and internal carotid arteries respectively.
28
+
29
+
30
+ ## Dataset Description
31
+
32
+ This is a dataset consisting of raw RF frames (plane wave) and vector flow
33
+ profiles of the carotid arteries (Common Carotid Artery and Internal Carotid
34
+ Artery) in humans, acquired using a programmable research scanner configured for
35
+ high frame rate vector flow imaging. The data was collected as part of studies
36
+ conducted by the LITMUS research group at the University of Waterloo, focusing on
37
+ carotid artery hemodynamics during baseline and physiological maneuvers (such as
38
+ the Valsalva Maneuver, head-down tilt, and supine postures).
39
+
40
+ ## Dataset Contributor(s)
41
+
42
+ Hassan Nahas, Jason Y. -H. Hsu, Theresa Gu, Adrian J. Y. Chee, Alfred C. H. Yu
43
+
44
+ Correspondence emails:
45
+ hassan.nahas@uwaterloo.ca
46
+ jason.hsu@uwaterloo.ca
47
+ theresa.gu@uwaterloo.ca
48
+ alfred.yu@uwaterloo.ca
49
+
50
+ ## Dataset Creation Date
51
+
52
+ 07/16/2026
53
+
54
+ ## License / Terms of Use
55
+
56
+ [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/legalcode.en).
57
+
58
+ All human studies were approved by the University of Waterloo’s Human Research
59
+ Ethics Board (ORE #46278). All included data was acquired from participants who
60
+ provided both written and verbal consent prior to participating in the study
61
+ regarding public data sharing.
62
+
63
+ ## Intended Usage
64
+
65
+ Developing, benchmarking, and evaluating methods for ultrasound image
66
+ reconstruction, motion estimation, clutter filtering, multi-angle Doppler
67
+ processing, and vector flow imaging (VFI) in carotid artery imaging.
68
+
69
+ ## Dataset Characterization
70
+
71
+ - **Data Collection Method:** In vivo imaging of human carotid arteries (Common Carotid Artery and Internal Carotid Artery).
72
+ - **Labeling Method:** Categorized by target artery (Anatomy), view direction (Longitudinal or Cross-sectional), and physiological condition/maneuver (Baseline, Valsalva Maneuver, Valsalva Maneuver – Supine, Valsalva Maneuver – Head Down Tilt, Head Down Tilt).
73
+ - **Acquisition system:**
74
+ Raw RF data was acquired from programmable research scanners (US4R/US4R-Lite, US4US, Warsaw, Poland) equipped with an L14-5 linear array transducer.
75
+
76
+ ## Dataset Format
77
+
78
+ Submitted in the [`zea` file format](https://zea.readthedocs.io/en/v0.1.0a3/data-acquisition.html) (one HDF5 file per acquisition).
79
+
80
+ Per-sample contents of the converted HDF5:
81
+
82
+ | Group / field | Shape | Dtype | Units | Description |
83
+ |---|---|---|---|---|
84
+ | `metadata/credit` | `[]` | str | -- | Dataset attribution (LITMUS @ University of Waterloo) |
85
+ | `metadata/subject/id` | `[]` | str | -- | Participant ID (needed for subject-wise splits) |
86
+ | `metadata/subject/type` | `[]` | str | -- | Subject type (`human`) |
87
+ | `metadata/subject/age` | `[]` | uint8 | years | Subject age (`0` if not available) |
88
+ | `metadata/subject/sex` | `[]` | str | -- | Subject sex (`M` or `F`) |
89
+ | `metadata/annotations/anatomy` | `[]` | str | -- | Target artery (e.g., `Common Carotid Artery`, `Internal Carotid Artery`) |
90
+ | `metadata/annotations/view` | `[]` | str | -- | View orientation (`Longitudinal` or `Cross-sectional`) |
91
+ | `metadata/annotations/label` | `[]` | str | -- | Physiological condition (e.g., `Baseline`, `Valsalva Maneuver`) |
92
+ | `probe/name` | `[]` | str | -- | Probe identifier (`L14-5`) |
93
+ | `probe/type` | `[]` | str | -- | Probe structure type (`linear`) |
94
+ | `probe/probe_geometry` | `[128, 3]` | float32 | m | Transducer element Cartesian positions (x, y, z) |
95
+ | `data/raw_data` | `[n_frames, n_tx, n_ax, n_el, 1]` | float32 | -- | Raw RF channel data |
96
+ | `data/image` | `[n_frames, z, x]` (+ `coordinates` `[z, x, 3]`) | float32 | dB | Stored log-compressed B-mode intensity (relative to peak) |
97
+ | `data/vector_velocity_x` | `[n_frames, z, x]` (+ `coordinates` `[z, x, 3]`) | float32 | m/s | Lateral component of vector velocity ($v_x$) |
98
+ | `data/vector_velocity_z` | `[n_frames, z, x]` (+ `coordinates` `[z, x, 3]`) | float32 | m/s | Axial component of vector velocity ($v_z$) |
99
+ | `data/power_doppler` | `[n_frames, z, x]` (+ `coordinates` `[z, x, 3]`) | float32 | dB | Power Doppler intensity |
100
+ | `data/color_doppler` | `[n_frames, z, x]` (+ `coordinates` `[z, x, 3]`) | float32 | m/s | Color Doppler map |
101
+ | `scan/*` | -- | -- | -- | Probe geometry, sampling/center/demodulation frequency, t0 delays, sound speed, transmit angles, focus distances, transmit origins, apodizations, PRI... |
102
+
103
+ All `coordinates` arrays are per-pixel Cartesian positions in meters, last axis
104
+ `[x, y, z]` (y = 0 for 2-D maps).
105
+
106
+ ## Shipped Example Acquisitions
107
+
108
+ Two example acquisitions are included under `hdf5/` as a representative subset of
109
+ the full dataset:
110
+
111
+ | File | Subject | Anatomy | View | Condition | Frames |
112
+ |---|---|---|---|---|---|
113
+ | `hdf5/Acq0.hdf5` | 1 | Common Carotid Artery | Longitudinal | Baseline | 500 |
114
+ | `hdf5/Acq62.hdf5` | 1 | Internal Carotid Artery | Cross-sectional | Baseline | 500 |
115
+
116
+ Each common carotid artery frame comprises 2 steered plane-wave transmits (`n_tx = 2`), 2048 axial
117
+ samples, and 128 receive channels. Each internal carotid artery frame comprises 1 steered plane-wave transmits (`n_tx = 1`), 1536 axial
118
+ samples, and 128 receive channels.
119
+
120
+ The frame count in these examples is truncated for demonstration; full acquisitions contain the frame counts described below.
121
+
122
+ ## Dataset Quantification
123
+
124
+ Data was collected from 8 participants, spanning carotid arteries (Common Carotid
125
+ Artery and Internal Carotid Artery) in both longitudinal and cross-sectional
126
+ views. In total, the dataset consists of 93 acquisitions, containing
127
+ 36,000/60,000 frames of raw RF data per acquisition.
128
+
129
+ ## Subject Metadata
130
+
131
+ | Metric | Value |
132
+ | :--- | :--- |
133
+ | **Total Number of Subjects** | 8 |
134
+ | **Total Number of Files (Acquisitions)** | 93 |
135
+ | **Sex Composition** | M: 6 (75.0%), F: 2 (25.0%) |
136
+ | **Total RF Frames** | 4,476,000 |
137
+
138
+ ## Known Issues
139
+
140
+ - Acquisitions made with US4R-lite include x2 receive multiplexing, so the full frame is constructed from two transmissions (receiving the first 64 channels first, then the second 64 channels).
141
+ - Participants may overlap with other UWaterloo submissions.
142
+ - Due to hardware, some acquisitions may have elevated Doppler noise on the right side of the image.
143
+ - Some acquisitions may have not hit the target view optimally, leading to poor flow detection.
144
+ - Due to the reduced PRF with the US4R-lite, some internal carotid artery acquisitions may contain sporadic/minor aliasing.
145
+
146
+ ## Beamforming and Processing
147
+
148
+ 1. **Pre-Filtering:**
149
+ Channel RF data is pre-filtered using a 5 MHz bandpass filter before beamforming.
150
+ 2. **GPU-Accelerated Beamforming (DAS):**
151
+ Beamforming is carried out via a GPU-accelerated Delay-and-Sum (DAS) module.
152
+ - **Aperture & Apodization:** 64-element Hanning window apodization and an F-number of 1.5.
153
+ - **Dual Angle-Compounding:** Beamforming for B-mode and power Doppler is performed twice with opposite receive angles ($+15^{\circ}$ and $-15^{\circ}$). The final high-resolution beamformed image (HRI) is the average of these two acquisitions:
154
+ $$HRI = \frac{HRI_{+15^{\circ}} + HRI_{-15^{\circ}}}{2}$$
155
+ - **Reconstruction Grid:** Cartesian coordinates mapped by a `PixelMap` representing a lateral range of $[-19, 19]\text{ mm}$ and axial depth of $[0, 30]\text{ mm}$ at $0.1\text{ mm}$ spatial resolution.
156
+ 3. **Clutter Filtering:**
157
+ Clutter filtering is performed on the beamformed ensemble using a high-pass wall filter (normalized cut-off frequencies of 0.1 and 0.15, filter length of 100).
158
+ 4. **Multi-Angle Doppler Frequency Estimation:**
159
+ Angle-specific Doppler frequencies are computed using an ensemble size of 64 frames with a step size of 1.
160
+ - For acquisitions with 2 tx angles, we used the following Tx-Rx angles:
161
+ Tx: [-10, -10, 10, 10]; Rx: [-10, 10, -10, 10]
162
+ - For acquisitions with 1 tx angle:
163
+ Tx: [-10, -10, -10]; Rx: [-10, 0, 10]
164
+ 5. **Vector Doppler Velocity Estimation:**
165
+ Lateral ($v_x$) and axial ($v_z$) velocity components are computed from the multi-angle Doppler frequency estimates using least-squares estimation.
166
+
167
+ The full LITMUS processing pipeline (GPU DAS beamforming + multi-angle vector
168
+ Doppler) is documented in [`convert.py`](convert.py). That script is included for
169
+ provenance and reproducibility; it depends on the LITMUS core Python package and
170
+ the raw acquisition frames, so it is not runnable from this folder alone.
171
+
172
+ Papers relevant to our pipeline:
173
+
174
+ Y. -H. Hsu (2025). High-frame-rate ultrasound characterization of carotid pulse waves to assess cerebrovascular resistance [Doctoral dissertation, University of Waterloo]. UWSpace. https://hdl.handle.net/10012/21738
175
+
176
+ H. Nahas, B. Y. S. Yiu, A. J. Y. Chee, T. Ishii and A. C. H. Yu, "Bedside Ultrasound Vector Doppler Imaging System With GPU Processing and Deep Learning," in IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control, vol. 72, no. 8, pp. 1079-1094, Aug. 2025, doi: 10.1109/TUFFC.2025.3582773
177
+
178
+ B. Y. S. Yiu and A. C. H. Yu, "Least-Squares Multi-Angle Doppler Estimators for Plane-Wave Vector Flow Imaging," in IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control, vol. 63, no. 11, pp. 1733-1744, Nov. 2016, doi: 10.1109/TUFFC.2016.2582514
179
+
180
+ ## Data Validation
181
+
182
+ [`reconstruct.py`](reconstruct.py) builds a `zea.Pipeline` of DAS beamforming →
183
+ envelope detection → normalization → log-compression **in code** and
184
+ reconstructs a B-mode directly from `raw_data`, showing the raw-to-image flow
185
+ without any config file. It also saves the pipeline to
186
+ [`pipeline.yaml`](pipeline.yaml) as a shareable recipe. Comparing the
187
+ reconstruction against the stored (LITMUS) B-mode is a sanity check that the
188
+ acquisition parameters and probe geometry are recorded correctly, and serves as
189
+ a reproducible reference reconstruction.
190
+
191
+ When the vector-flow fields (`vector_velocity_x/z` + `power_doppler`) are present,
192
+ a third panel overlays the vector velocity field on the stored B-mode. The
193
+ overlay uses `draw_velocity_field`, a single self-contained (numpy + matplotlib)
194
+ helper reproduced inside `reconstruct.py` from the LITMUS core Python package
195
+ (`litmus.core_py.visualization`), so the script has no dependency on the full
196
+ LITMUS GPU stack.
197
+
198
+ The result is written to `reconstruct_output.png`:
199
+
200
+ ![reference reconstruction](reconstruct_output.png)
201
+
202
+ ### Example Usage of reconstruct.py
203
+
204
+ ```bash
205
+ # Reconstruct the default file (hdf5/Acq0.hdf5) at frame 100
206
+ python reconstruct.py
207
+
208
+ # Reconstruct a specific file and frame, and adjust the power-Doppler mask
209
+ python reconstruct.py --input hdf5/Acq1.hdf5 --frame 250 --power-threshold 55.0
210
+ ```
211
+
212
+ ## Ethical Considerations
213
+
214
+ All human studies were approved by the University of Waterloo’s Human Research
215
+ Ethics Board (ORE #46278). All included data was acquired from participants who
216
+ provided both written and verbal consent prior to participating in the study
217
+ regarding public data sharing.
218
+
219
+ ## Citation
220
+
221
+ ```bibtex
222
+ @phdthesis{Hsu2025Carotid,
223
+ title = {High-frame-rate ultrasound characterization of carotid pulse waves to assess cerebrovascular resistance},
224
+ author = {Hsu, Jason Y.-H.},
225
+ school = {University of Waterloo},
226
+ year = {2025},
227
+ note = {UWSpace, https://hdl.handle.net/10012/21738},
228
+ }
229
+ ```
waterloo-carotid/pipeline.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pipeline:
2
+ operations:
3
+ - name: keras.ops.cast
4
+ params:
5
+ dtype: float32
6
+ - name: band_pass_filter
7
+ params:
8
+ passband:
9
+ - 3000000.0
10
+ - 7000000.0
11
+ - demodulate
12
+ - name: beamform
13
+ params:
14
+ num_patches: 1000
15
+ - envelope_detect
16
+ - name: normalize
17
+ params:
18
+ output_range:
19
+ - 0.0
20
+ - 1.0
21
+ - log_compress
22
+ parameters:
23
+ dynamic_range:
24
+ - -50
25
+ - 0