stanford-murine: add hero and main images, sync card and pipelines with GitHub
#78
by tristan-deep - opened
stanford-murine/README.md
CHANGED
|
@@ -23,6 +23,10 @@ size_categories:
|
|
| 23 |
|
| 24 |
# Stanford Murine Liver and Sound-Speed Phantom Ultrasound
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## Dataset Description
|
| 27 |
|
| 28 |
This dataset contains pre-beamformed pulse-echo ultrasound channel data from murine livers and sound-speed phantoms. The data were acquired on a Verasonics Vantage 256 using multifocal, Hadamard-encoded, and full synthetic aperture (FSA) transmit sequences. The dataset supports research on beamforming, sound-speed estimation, and aberration correction; it is not intended for clinical diagnosis.
|
|
@@ -99,7 +103,19 @@ Each output file bundles three tracks named `multifocal`, `hadamard`, and `synth
|
|
| 99 |
|
| 100 |
## Processing the Dataset
|
| 101 |
|
| 102 |
-
The acquisitions can be processed with the `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
## Dataset Format
|
| 105 |
|
|
@@ -176,30 +192,7 @@ The phantom data contain no human subjects. Phantom identifiers describe the pro
|
|
| 176 |
|
| 177 |
## Data Validation
|
| 178 |
|
| 179 |
-
The
|
| 180 |
-
|
| 181 |
-
From the repository root, generate the demo files and reference images with:
|
| 182 |
-
|
| 183 |
-
```bash
|
| 184 |
-
python examples/stanford/download.py --demo
|
| 185 |
-
python examples/stanford/convert.py --dataset rat --demo
|
| 186 |
-
python examples/stanford/convert.py --dataset phantom --demo
|
| 187 |
-
|
| 188 |
-
CUDA_VISIBLE_DEVICES=0 JAX_PLATFORMS=cuda KERAS_BACKEND=jax \
|
| 189 |
-
python examples/stanford/reconstruct.py --dataset rat --demo --rat-id 9
|
| 190 |
-
CUDA_VISIBLE_DEVICES=0 JAX_PLATFORMS=cuda KERAS_BACKEND=jax \
|
| 191 |
-
python examples/stanford/reconstruct.py --dataset phantom --demo
|
| 192 |
-
|
| 193 |
-
python examples/stanford/stitch.py --dataset rat --demo --rat-id 9
|
| 194 |
-
python examples/stanford/stitch.py --dataset phantom --demo
|
| 195 |
-
```
|
| 196 |
-
|
| 197 |
-
The reconstructed PNGs and demodulated spectra are written under `examples/stanford/outputs`. The stitched review documents are:
|
| 198 |
-
|
| 199 |
-
- `examples/stanford/outputs/RatExperiments/all_bmode_reconstructions.pdf`
|
| 200 |
-
- `examples/stanford/outputs/SoSExperiments/all_sos_bmode_reconstructions.pdf`
|
| 201 |
-
|
| 202 |
-
The reconstruction scripts are validated with zea 0.1.4.
|
| 203 |
|
| 204 |
## Known Issues
|
| 205 |
|
|
@@ -215,48 +208,6 @@ No human data are included. The murine study was approved by Stanford University
|
|
| 215 |
|
| 216 |
The phantom acquisitions require no human- or animal-subject approval. Both Figshare records confirm that no human personally identifiable information is present.
|
| 217 |
|
| 218 |
-
## Scripts and Paths
|
| 219 |
-
|
| 220 |
-
- `download.py`: download the raw Figshare demo subset or full records.
|
| 221 |
-
- `download_figshare_full.sh`: resumably mirror both full Figshare records to `/ultra20/figshare` with progress and checksum verification.
|
| 222 |
-
- `convert.py`: convert source MAT files to zea HDF5.
|
| 223 |
-
- `reconstruct.py`: reconstruct HDF5 tracks to B-mode PNGs and spectra.
|
| 224 |
-
- `stitch.py`: combine PNGs into review PDFs.
|
| 225 |
-
- `upload.py`: upload selected HDF5 files, this README, and pipeline YAMLs.
|
| 226 |
-
- `delete_hf.py`: delete existing remote `zea/` files before replacement.
|
| 227 |
-
|
| 228 |
-
Default paths:
|
| 229 |
-
|
| 230 |
-
- Raw rat input: `examples/stanford/data/RatExperiments`
|
| 231 |
-
- Raw phantom input: `examples/stanford/data/SoSExperiments`
|
| 232 |
-
- Converted rat output: `examples/stanford/data/RatExperiments_zea`
|
| 233 |
-
- Converted phantom output: `examples/stanford/data/SoSExperiments_zea`
|
| 234 |
-
- Reconstruction output: `examples/stanford/outputs`
|
| 235 |
-
|
| 236 |
-
For full conversion after downloading both Figshare records:
|
| 237 |
-
|
| 238 |
-
```bash
|
| 239 |
-
python examples/stanford/download.py --full
|
| 240 |
-
python examples/stanford/convert.py --dataset rat --full
|
| 241 |
-
python examples/stanford/convert.py --dataset phantom --full
|
| 242 |
-
python examples/stanford/reconstruct.py --dataset rat --full
|
| 243 |
-
python examples/stanford/reconstruct.py --dataset phantom --full
|
| 244 |
-
python examples/stanford/stitch.py --dataset rat --full
|
| 245 |
-
python examples/stanford/stitch.py --dataset phantom --full
|
| 246 |
-
```
|
| 247 |
-
|
| 248 |
-
To resume an interrupted conversion without rewriting completed bundles, add `--skip-existing`. A bundle is skipped only when both its atomic HDF5 output and text summary are present.
|
| 249 |
-
|
| 250 |
-
To keep a separate, resumable mirror of both complete Figshare records under `/ultra20/figshare`, with per-file and overall progress bars plus size and MD5 verification, run:
|
| 251 |
-
|
| 252 |
-
```bash
|
| 253 |
-
examples/stanford/download_figshare_full.sh
|
| 254 |
-
```
|
| 255 |
-
|
| 256 |
-
This writes `RatExperiments_download` and `SoSExperiments_download`. Use `examples/stanford/download_figshare_full.sh --dry-run` to validate and summarize the public records without downloading them.
|
| 257 |
-
|
| 258 |
-
Use `--min-rat N` or `--rat-id N` with `convert.py` to limit rat conversion. Raw MAT files remain local; `upload.py` selects converted HDF5 files and documentation explicitly.
|
| 259 |
-
|
| 260 |
## Citation
|
| 261 |
|
| 262 |
Please cite the applicable source dataset and its associated publication:
|
|
|
|
| 23 |
|
| 24 |
# Stanford Murine Liver and Sound-Speed Phantom Ultrasound
|
| 25 |
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
*Frame 0 reconstructed with `reconstruct.py` (L12-3v, 60 dB). Top: the exposed liver of [Rat3](https://huggingface.co/datasets/nvidia/OpenH-RF/blob/main/stanford-murine/data/RatExperiments/VerasonicsAcq/Rat3/ExposedLiver/DATA_Tracks_20190319_115804.hdf5), `multifocal` track. Bottom: the ATS 549 phantom's [lesions](https://huggingface.co/datasets/nvidia/OpenH-RF/blob/main/stanford-murine/data/SoSExperiments/august13_2020/L12_3v/ATS_phantom/lesion/DATA_Tracks_20200813_164505.hdf5) and [point targets](https://huggingface.co/datasets/nvidia/OpenH-RF/blob/main/stanford-murine/data/SoSExperiments/august13_2020/L12_3v/ATS_phantom/point_target/DATA_Tracks_20200813_164745.hdf5), `hadamard` track. The point targets curve into arcs because the phantom is beamformed at 1540 m/s while its own sound speed is lower — the mismatch this dataset is built to estimate and correct.*
|
| 29 |
+
|
| 30 |
## Dataset Description
|
| 31 |
|
| 32 |
This dataset contains pre-beamformed pulse-echo ultrasound channel data from murine livers and sound-speed phantoms. The data were acquired on a Verasonics Vantage 256 using multifocal, Hadamard-encoded, and full synthetic aperture (FSA) transmit sequences. The dataset supports research on beamforming, sound-speed estimation, and aberration correction; it is not intended for clinical diagnosis.
|
|
|
|
| 103 |
|
| 104 |
## Processing the Dataset
|
| 105 |
|
| 106 |
+
The acquisitions can be processed with the `pipeline_multifocal.yaml`, `pipeline_hadamard.yaml` and `pipeline_synthetic_aperture.yaml` definitions in this folder and the [zea library](https://github.com/tue-bmd/zea). Each file bundles three tracks, one per transmit sequence (`multifocal`, `hadamard`, `synthetic_aperture`), and each track has its own pipeline.
|
| 107 |
+
|
| 108 |
+
`zea` streams the data from the Hugging Face Hub and processes it according to the pipeline; pass the matching track with `--track`. You can try it out with the following command:
|
| 109 |
+
|
| 110 |
+
```bash
|
| 111 |
+
zea process \
|
| 112 |
+
--dataset hf://nvidia/OpenH-RF/stanford-murine/data/RatExperiments/VerasonicsAcq/Rat3/ExposedLiver/DATA_Tracks_20190319_115804.hdf5 \
|
| 113 |
+
--config hf://nvidia/OpenH-RF/stanford-murine/pipeline_synthetic_aperture.yaml \
|
| 114 |
+
--track synthetic_aperture \
|
| 115 |
+
--n-frames 1
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
Alternatively, you can use the `reconstruct.py` [script](https://github.com/open-h/OpenH-RF/blob/main/datasets/stanford-murine/reconstruct.py) as provided in the [OpenH-RF GitHub repository](https://github.com/open-h/OpenH-RF). It reconstructs the first frame of every track in `ZEA_FILE` with the same pipelines and writes one image per track to `assets/`. On top of the YAML, the script inserts a baseband FIR low-pass after demodulation, with its cutoff at half the probe bandwidth (4.0 MHz for L12-3v, 3.0 MHz for L12-5, 1.3 MHz for C5-2v). The cutoff depends on the probe, so it is not part of the pipeline YAMLs and `zea process` runs without it; the difference is small on the rat acquisitions and clearly visible at depth on the phantoms.
|
| 119 |
|
| 120 |
## Dataset Format
|
| 121 |
|
|
|
|
| 192 |
|
| 193 |
## Data Validation
|
| 194 |
|
| 195 |
+
The reference pipelines reconstruct the first stored frame of each track: RF demodulation, delay-and-sum beamforming without pressure-field weighting, envelope detection, maximum normalization and log compression, shown over a 60 dB dynamic range. The grid is derived at three pixels per acoustic wavelength over the acquired aperture and depth. `reconstruct.py` adds the probe-dependent baseband FIR described in [Processing the Dataset](#processing-the-dataset); without it, `zea process` and `reconstruct.py` produce the same image. The figure at the top of this card shows the `multifocal` track of Rat3 and the `hadamard` track of two ATS 549 acquisitions, reconstructed with `reconstruct.py`. `assets/main.png` is the same Rat3 `multifocal` reconstruction on its native grid, without axes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
## Known Issues
|
| 198 |
|
|
|
|
| 208 |
|
| 209 |
The phantom acquisitions require no human- or animal-subject approval. Both Figshare records confirm that no human personally identifiable information is present.
|
| 210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
## Citation
|
| 212 |
|
| 213 |
Please cite the applicable source dataset and its associated publication:
|
stanford-murine/assets/hero.png
ADDED
|
Git LFS Details
|
stanford-murine/assets/main.png
ADDED
|
Git LFS Details
|
stanford-murine/pipeline_hadamard.yaml
CHANGED
|
@@ -3,14 +3,9 @@ pipeline:
|
|
| 3 |
operations:
|
| 4 |
# Overlap averaging creates fractional RF, and Hadamard decoding can exceed int16.
|
| 5 |
- demodulate
|
| 6 |
-
- name: fir_filter
|
| 7 |
-
params:
|
| 8 |
-
axis: -3
|
| 9 |
-
complex_channels: true
|
| 10 |
- name: beamform
|
| 11 |
params:
|
| 12 |
enable_pfield: false
|
| 13 |
-
# Bound work units so the deep C5-2v grid fits on a 24 GB GPU.
|
| 14 |
- envelope_detect
|
| 15 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 16 |
- name: normalize
|
|
@@ -23,3 +18,6 @@ parameters:
|
|
| 23 |
sound_speed: 1540
|
| 24 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 25 |
pixels_per_wavelength: 3
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
operations:
|
| 4 |
# Overlap averaging creates fractional RF, and Hadamard decoding can exceed int16.
|
| 5 |
- demodulate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- name: beamform
|
| 7 |
params:
|
| 8 |
enable_pfield: false
|
|
|
|
| 9 |
- envelope_detect
|
| 10 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 11 |
- name: normalize
|
|
|
|
| 18 |
sound_speed: 1540
|
| 19 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 20 |
pixels_per_wavelength: 3
|
| 21 |
+
dynamic_range:
|
| 22 |
+
- -60
|
| 23 |
+
- 0
|
stanford-murine/pipeline_multifocal.yaml
CHANGED
|
@@ -3,14 +3,9 @@ pipeline:
|
|
| 3 |
operations:
|
| 4 |
# Coherent overlap averaging can create fractional RF samples; no cast is needed.
|
| 5 |
- demodulate
|
| 6 |
-
- name: fir_filter
|
| 7 |
-
params:
|
| 8 |
-
axis: -3
|
| 9 |
-
complex_channels: true
|
| 10 |
- name: beamform
|
| 11 |
params:
|
| 12 |
enable_pfield: false
|
| 13 |
-
# Bound work units so the deep C5-2v grid fits on a 24 GB GPU.
|
| 14 |
- envelope_detect
|
| 15 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 16 |
- name: normalize
|
|
@@ -23,3 +18,6 @@ parameters:
|
|
| 23 |
sound_speed: 1540
|
| 24 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 25 |
pixels_per_wavelength: 3
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
operations:
|
| 4 |
# Coherent overlap averaging can create fractional RF samples; no cast is needed.
|
| 5 |
- demodulate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- name: beamform
|
| 7 |
params:
|
| 8 |
enable_pfield: false
|
|
|
|
| 9 |
- envelope_detect
|
| 10 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 11 |
- name: normalize
|
|
|
|
| 18 |
sound_speed: 1540
|
| 19 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 20 |
pixels_per_wavelength: 3
|
| 21 |
+
dynamic_range:
|
| 22 |
+
- -60
|
| 23 |
+
- 0
|
stanford-murine/pipeline_synthetic_aperture.yaml
CHANGED
|
@@ -4,14 +4,9 @@ pipeline:
|
|
| 4 |
# Coherent overlap averaging can create fractional RF samples; no cast is needed.
|
| 5 |
- apply_window
|
| 6 |
- demodulate
|
| 7 |
-
- name: fir_filter
|
| 8 |
-
params:
|
| 9 |
-
axis: -3
|
| 10 |
-
complex_channels: true
|
| 11 |
- name: beamform
|
| 12 |
params:
|
| 13 |
enable_pfield: false
|
| 14 |
-
# Bound work units so the deep C5-2v grid fits on a 24 GB GPU.
|
| 15 |
- envelope_detect
|
| 16 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 17 |
- name: normalize
|
|
@@ -24,3 +19,6 @@ parameters:
|
|
| 24 |
sound_speed: 1540
|
| 25 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 26 |
pixels_per_wavelength: 3
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Coherent overlap averaging can create fractional RF samples; no cast is needed.
|
| 5 |
- apply_window
|
| 6 |
- demodulate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
- name: beamform
|
| 8 |
params:
|
| 9 |
enable_pfield: false
|
|
|
|
| 10 |
- envelope_detect
|
| 11 |
# Use the true maximum; percentile normalization would clip strong reflectors.
|
| 12 |
- name: normalize
|
|
|
|
| 19 |
sound_speed: 1540
|
| 20 |
# Derive both grid dimensions at three samples per acoustic wavelength.
|
| 21 |
pixels_per_wavelength: 3
|
| 22 |
+
dynamic_range:
|
| 23 |
+
- -60
|
| 24 |
+
- 0
|