Skip to content

kexi-bq/acoustic-inversion-ml

Repository files navigation

Acoustic Inversion via Causal Wave Simulation and ML

This project implements a full pipeline for acoustic inversion using wave propagation, machine learning, and causal graph reasoning.


🧠 What It Does

  • Simulates acoustic wave propagation in heterogeneous 2D media
  • Generates pressure field p(t,x,y) and integrated hologram
  • Trains a direct model to simulate holograms from medium parameters
  • Trains an inverse model to reconstruct c(x,y) and ρ(x,y) from holograms
  • Builds causal and backtrace graphs from the wave tensor
  • Validates medium reconstruction without ground truth

📦 Key Files

File Description
TestVoln.py Simulates the wave using finite difference
generate_dataset.py Generates synthetic data samples
train_model_multisample.py Trains the direct CNN
inverse_model_full.py Trains and infers the inverse model
inference.py Runs inference without ground truth
build_graph.py Builds full causal graph
build_backtrace_graph.py Builds reduced backtrace graph
*.pt Trained models
*.png, *.gif Visualizations
*.graphml Graph files viewable in Gephi

📊 Visual Outputs

  • wave_propagation.gif: Simulated wave animation
  • train_results.png: Side-by-side ground truth and prediction
  • inferred_fields.png: Inferred c(x,y) and ρ(x,y) without GT
  • backtrace_graph.png: Final causal front

🔧 Requirements

pip install torch numpy matplotlib networkx tqdm
 License
MIT / CC-BY 4.0 — Open for academic and non-commercial use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages