Downloads · 30 days
0
Wajiddev99/ultrasound-beamforming-unet
ultrasound-beamforming-unet is a machine learning model from Wajiddev99. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A residual U-Net trained to reconstruct high-quality B-mode ultrasound images from single-angle (sparse) plane-wave RF data, using a 31-angle Delay-and-Sum compound as ground truth.
Downloads · 30 days
0
Access
Public
Updated Sep 22, 2026
Repo size
47.2 MB
Likes
1
Public
Click a slice to open those files.
.pt47.2 MB · 100%
From the Hugging Face model README
A residual U-Net trained to reconstruct high-quality B-mode ultrasound images from single-angle (sparse) plane-wave RF data, using a 31-angle Delay-and-Sum compound as ground truth.
Built as part of a portfolio project for the Biomedical Ultrasound Laboratory, Department of Bio and Brain Engineering, KAIST (PI: Prof. Eun-Yeong Park).
Full code, methodology, and results: github.com/wajidali99/ultrasound-beamforming-deep-learning
[1, 128, 128]Evaluated on 25 held-out synthetic phantoms:
| Method | PSNR (dB) | SSIM |
|---|---|---|
| DAS | 13.26 ± 1.09 | 0.3268 ± 0.0132 |
| DMAS + CF | 10.98 ± 1.06 | 0.0456 ± 0.0066 |
| This model | 17.63 ± 0.67 | 0.3504 ± 0.0156 |
A +4.37 dB PSNR improvement over DAS with non-overlapping error bars (statistically robust). Benchmarked against classical DAS and Delay-Multiply-and-Sum with Coherence Factor (DMAS+CF) beamforming — replicating the algorithm family from Jeon, Park et al., "Real-Time Delay-Multiply-and-Sum Beamforming with Coherence Factor for In Vivo Clinical Photoacoustic Imaging of Humans," Photoacoustics 15 (2019).
Tested on phantoms with shifted physics parameters (not seen during training):
| Condition | PSNR Drop |
|---|---|
| Attenuation shift (0.5 → 0.8) | 0.16 dB |
| Scatterer density shift (6000 → 3000) | 0.56 dB |
Both drops fall within in-distribution noise, indicating the model learned generalizable imaging physics rather than overfitting to the exact training distribution.
import torch
# Load the model architecture (see GitHub repo for BeamformingUNet class)
model = BeamformingUNet(in_channels=1, out_channels=1, base_channels=48, depth=3)
model.load_state_dict(torch.load("model_best.pt", map_location="cpu"))
model.eval()
# input_img: numpy array [128, 128], sparse-angle DAS image, normalized [0,1]
x = torch.from_numpy(input_img[None, None, :, :].astype("float32"))
with torch.no_grad():
prediction = model(x).squeeze().numpy()
All training data is synthetically generated (point-scatterer phantom simulator with geometric time-of-flight RF synthesis) — no real patient data involved. See the GitHub repository for the full simulator implementation.