YOLO26 Model for Shock-Wave Segmentation

This repository contains a YOLO26 model for automatic segmentation of shock waves in experimental shadowgraph images.

The model identifies visible shock-wave structures and returns instance segmentation masks. It is intended for automated processing of high-speed flow-visualization data in gas dynamics and shock-wave experiments.

Model authors: Igor Doroshchenko, Pavel Popov, Aleksei Moiseevskii, and Tahir Kuli-Zade.

Repository Files

  • shock_seg_model_YOLO26.pt β€” trained YOLO26 segmentation model.
  • shock_wave_segmentation_yolo26.py β€” ready-to-run Python script for processing image sequences.

Applications

The model can be used for:

  • automatic segmentation of shock waves;
  • extraction of shock-front geometry;
  • tracking shock-wave motion between frames;
  • determining the position and shape of shock fronts;
  • approximating shock fronts with polynomial curves;
  • processing large datasets obtained using high-speed shadowgraph imaging.

Installation

Install the required Python packages:

python -m pip install -U ultralytics opencv-python numpy matplotlib

A recent version of ultralytics with YOLO26 support is required. The accompanying script checks compatibility and can update ultralytics in the active Python environment when necessary.

Input Data

Place the model, script, and input directory in the same project folder:

project/
β”œβ”€β”€ shock_seg_model_YOLO26.pt
β”œβ”€β”€ shock_wave_segmentation_yolo26.py
└── frames/
    β”œβ”€β”€ frame_0001.png
    β”œβ”€β”€ frame_0002.png
    └── frame_0003.jpg

The frames directory may contain PNG, JPG, or JPEG images. Files are sorted and processed alphabetically.

Running the Model

Open shock_wave_segmentation_yolo26.py in PyCharm, configure the parameters at the top of the script, and run it.

The main parameters include:

  • model filename;
  • input and output directories;
  • confidence and IoU thresholds;
  • inference image size and device selection;
  • mask transparency and contour settings;
  • polynomial approximation degree;
  • optional frame-time display;
  • first-frame time and time step between frames;
  • plot and legend settings for the extracted shock-front lines.

Output

The script creates three output directories.

results

Contains the original shadowgraph images with predicted segmentation masks.

results_with_lines

Contains the images with thin median lines representing the detected shock-wave fronts. Polynomial equations are not printed on these images.

For each mask, the script extracts a median shock-front line and automatically selects its representation as either:

  • y = f(x) for predominantly horizontal fronts;
  • x = f(y) for predominantly vertical fronts.

results_lines_on_grid

Contains separate plots of the extracted shock-front lines on a coordinate grid. The polynomial equation of each fitted line is displayed in the legend.

Pixel coordinates are used, with the origin located at the upper-left corner of the image by default.

Optional Frame Time

Frame time can be printed in the upper-left corner of the output images:

printTime = True
firstFrameTime = 0.0
timeStep = 6.67
timeUnit = "us"

The time of each frame is calculated as:

frame time = firstFrameTime + frame index Γ— timeStep

The first frame after alphabetical sorting has index 0. The time unit is user-defined and must be consistent for firstFrameTime and timeStep.

Model Details

  • Task: Instance segmentation
  • Architecture: Ultralytics YOLO26
  • Target class: Shock wave
  • Input type: Experimental shadowgraph images
  • Output: Shock-wave instance masks
  • Weights: shock_seg_model_YOLO26.pt
  • Authors: Igor Doroshchenko, Pavel Popov, Aleksei Moiseevskii, and Tahir Kuli-Zade

Limitations

The model was developed for experimental shadowgraph images. Its performance may decrease for schlieren images, numerical visualizations, substantially different optical configurations, low-contrast shock fronts, strong illumination artifacts, or flow regimes not represented in the training dataset.

Predictions should be validated before the model is used for quantitative measurements. Spatial calibration is required to convert pixel coordinates into physical units.

Citation

If you use the exact model weights or the accompanying script, please cite this model repository:

@misc{doroshchenkoEtAl2026shockwaveyolo26,
  author       = {Doroshchenko, Igor and Popov, Pavel and Moiseevskii, Aleksei and Kuli-Zade, Tahir},
  title        = {YOLO26 Model for Shock-Wave Segmentation},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {Hugging Face model repository},
  url          = {ADD_HUGGING_FACE_REPOSITORY_URL}
}

Replace ADD_HUGGING_FACE_REPOSITORY_URL with the public URL of this repository after publication.

Related Publications

The publications below provide scientific and methodological background for computer-vision analysis of shock waves and other gas-dynamic structures in experimental shadowgraph images. They should not be interpreted as descriptions of the exact YOLO26 weights released in this repository.

If you use this model or the accompanying script in scientific work, please cite the model repository and one or both of the following publications, depending on the focus of your study.

Analysis of striped structures behind a shock wave

This article presents a computer-vision-based analysis of striped structures developing in the boundary layer behind a shock wave. It is particularly relevant to studies of shock-wave-induced unsteady flow structures and automated processing of high-speed flow-visualization data.

I. A. Znamenskaya, I. A. Doroshchenko, A. Kopylov, and T. A. Kuli-Zade, β€œAnalysis of Striped Structures in the Boundary Layer Behind a Shock Wave Using Computer Vision Techniques,” Journal of Flow Visualization and Image Processing, vol. 33, no. 2, pp. 1–19, 2026. https://doi.org/10.1615/JFlowVisImageProc.2025058234

@article{znamenskaya2026stripedstructures,
  author  = {Znamenskaya, Irina A. and Doroshchenko, Igor A. and Kopylov, Anatoly and Kuli-Zade, Tahir A.},
  title   = {Analysis of Striped Structures in the Boundary Layer Behind a Shock Wave Using Computer Vision Techniques},
  journal = {Journal of Flow Visualization and Image Processing},
  year    = {2026},
  volume  = {33},
  number  = {2},
  pages   = {1--19},
  doi     = {10.1615/JFlowVisImageProc.2025058234},
  url     = {https://doi.org/10.1615/JFlowVisImageProc.2025058234}
}

Computer-vision analysis of experimental shadowgraph images

This article is the most directly relevant methodological reference for automatic analysis of shock waves and bow shocks in experimental shadowgraph images. It describes both classical computer-vision algorithms and YOLO-based deep learning for recognizing gas-dynamic structures.

I. A. Doroshchenko, β€œAnalysis of the Experimental Flow Shadowgraph Images by Computer Vision Methods,” Numerical Methods and Programming (Vychislitel'nye Metody i Programmirovanie), vol. 24, no. 2, pp. 231–242, 2023. https://doi.org/10.26089/NumMet.v24r217

@article{doroshchenko2023shadowgraph,
  author  = {Doroshchenko, Igor A.},
  title   = {Analysis of the Experimental Flow Shadowgraph Images by Computer Vision Methods},
  journal = {Numerical Methods and Programming (Vychislitel'nye Metody i Programmirovanie)},
  year    = {2023},
  volume  = {24},
  number  = {2},
  pages   = {231--242},
  doi     = {10.26089/NumMet.v24r217},
  url     = {https://doi.org/10.26089/NumMet.v24r217}
}

For work focused specifically on the released YOLO26 weights, cite the model repository. For broader methodological and physical context, cite the most relevant publication above in addition to the repository.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support