Raytracing Ultrasound Simulator#
A high-performance GPU-accelerated ultrasound simulator using NVIDIA OptiX raytracing.
The simulator implements the straight-ray approach of Bürger et al. (2013), IEEE Transactions on Medical Imaging: plausible, real-time B-mode images from labeled surface meshes, well suited to sim-to-real robotics perception and ML data generation. Wave effects such as diffraction, interference, and phase are not modeled — see capabilities and limitations before relying on it for quantitative acoustics or signal-processing work.
Features#
- GPU acceleration with CUDA and NVIDIA OptiX
- Python interface for ease of use
- Real-time simulation capabilities
- Support for curvilinear, linear, and phased array ultrasound probe simulation
Requirements#
Quick start#
Option 1: Using the I4H CLI (Recommended)#
The ./i4h CLI builds and runs inside a Docker container with all dependencies pre-installed.
# Launch the interactive web server (default mode)
./i4h run ultrasound-simulator
# Run the sphere-sweep demo (no mesh download needed)
./i4h run ultrasound-simulator sphere_sweep
# Run the liver-sweep demo
./i4h run ultrasound-simulator liver_sweep
# Run the performance benchmark
./i4h run ultrasound-simulator benchmark
# List available modes
./i4h modes ultrasound-simulator
# Launch an interactive shell inside the container
./i4h run-container ultrasound-simulator
Open your browser to http://0.0.0.0:8000 when running the server mode.
Note: With
./i4h, mesh-backed modes (server,liver_sweep,benchmark) use the default container mesh path (/opt/ultrasound-mesh) automatically.sphere_sweepdoes not use mesh assets.

Option 2: Using build_and_run.sh#
cd ultrasound-simulator
./build_and_run.sh examples/server.py
Option 3: Docker#
Instructions to build and run the examples in a docker environment can be found in the docs/docker_build.
Option 4: Bare-Metal Installation#
Instructions to build and run the examples on a bare-metal installation can be found in the docs/baremetal_build.
Start Simulating#
For a comprehensive guide on using the simulator, understanding its features, and exploring advanced topics, please refer to our documentation:
- Getting Started Guide: A step-by-step tutorial for beginners.
- Technical Guide: An in-depth look at the physics and implementation details.
Benchmark Results#
To reproduce these results, run python examples/benchmark.py.
Benchmark Results:
Total frames: 200
Average frame time: 0.0073 seconds
Average FPS: 136.28
Minimum FPS: 59.66
Maximum FPS: 249.62
Date: 2025-03-16 07:38:46
System Information:
GPU: NVIDIA RTX 6000 Ada Generation (48.0 GB, Driver: 565.57.01)
CPU: AMD Ryzen Threadripper PRO 7975WX 32-Cores (64 cores)