Skip to content

GPU-accelerated, fault-tolerant Schlieren/PIV shock tracking with interactive ROI, 1-px edges, and resumable training.

License

Notifications You must be signed in to change notification settings

Rajkamalsah/flow-hpc-shocktrack

Repository files navigation

flow-hpc-shocktrack

GPU-accelerated, fault-tolerant Schlieren/PIV shock tracking with interactive ROI, 1-px edges, and resumable training.

End-to-end pipeline to extract shock angle vs time and dominant oscillation frequency from Schlieren frames (PIV-friendly too). Designed for small datasets and Spyder. PyTorch is optional.

Features

  • Interactive ROI (OpenCV; Matplotlib fallback)
  • 1‑px thin edges (skeletonization) + sub‑pixel cv2.fitLine angle
  • (Optional) tiny U‑Net: synthetic pretrain + fine‑tune
  • Resumable training (epoch checkpoints, PAUSE file or Ctrl+C)
  • Outputs: overlays, time series, FFT/Strouhal, JSON summary

Quickstart

  1. pip install -r requirements.txt
  2. Unzip demo_schlieren_dataset.zip → set CONFIG["data_dir"] to demo_schlieren/images/ (and mask_dir to demo_schlieren/masks/).
  3. Run python shocktrack_roi.py (or in Spyder).
    ROI keys: click points → c close → y confirm (u=undo, r=reset, q=cancel).
  4. Results in runs/exp_roi/pred/ overlays, analysis/*.png, analysis/summary.json.

Pause / Resume

  • Create empty PAUSE file in the training dir (e.g., runs/exp_roi/finetune/PAUSE) to stop after current epoch.
  • Or press Ctrl+C; a checkpoint is saved.
  • Resume: set CONFIG["resume_finetune_dir"] (or pretrain) to that folder and run again.

Files

  • shocktrack_roi.py — main script (Spyder-friendly)
  • requirements.txt — core deps (no PyTorch)
  • requirements-torch.txt — optional torch deps
  • demo_schlieren_dataset.zip — tiny synthetic dataset (30 frames with masks)
  • LICENSE (MIT), .gitignore, .gitattributes

About

GPU-accelerated, fault-tolerant Schlieren/PIV shock tracking with interactive ROI, 1-px edges, and resumable training.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages