Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FSW Measurement Tool

AI-Assisted Friction Stir Weld Inspection

Industrial desktop application for automated weld measurement using Computer Vision and Deep Learning.


Developed by

Blagoja Budzakoski

Chemistry Γ— Machine Learning

Budzak AI Labs


Transform microscope images into engineering measurements in seconds.

FSW Measurement Tool automates one of the most repetitive tasks in Friction Stir Weld quality control by detecting weld geometry, calculating critical measurements, evaluating specification limits, and generating production-ready Excel reports.


πŸ–₯️ Architecture Preview

image


✨ Features

  • πŸ€– AI-powered weld geometry detection
  • πŸ“¦ Batch processing of ZIP archives
  • πŸ“ Automatic penetration & misalignment measurements
  • πŸ“Š Engineering specification evaluation (PASS / FAIL)
  • πŸ–ΌοΈ Annotated image generation
  • πŸ“„ Automatic Excel report generation
  • πŸ–₯️ Modern PyQt6 desktop interface
  • ⚑ Multi-threaded processing (responsive UI)

🎬 Demo

demo


πŸ“– Why I Built This

Inspecting Friction Stir Weld (FSW) cross-sections typically requires engineers to measure each weld manually using microscopy software.

The workflow is repetitive:

  1. Draw measurements – Manually place measurement lines on the weld image.
  2. Record results – Transfer measurements into an Excel spreadsheet or quality report.
  3. Repeat – Perform the same process for every weld specimen.

This approach is:

  • Time-consuming
  • Repetitive
  • Dependent on operator consistency
  • Prone to manual transcription errors

I wanted to investigate whether modern Computer Vision and Deep Learning could automate this workflow while integrating seamlessly into existing industrial quality-control procedures.

The result is FSW Measurement Toolβ€”an AI-assisted desktop application that analyzes microscope images and generates engineering measurements in seconds.

Example: For a batch of 30 weld specimens, the tool can reduce measurement time from several hours to just a few minutes, with the engineer verifying the results rather than performing every measurement manually.


πŸ“Έ Screenshots

Main Window

image

assets/gui_main.png

Prediction Review

image

assets/review_window.png

AI Detection

image

assets/prediction.png

Excel Report

image

assets/excel_output.png

🧠 Behind the Scenes

Unlike traditional image processing approaches, this application uses a deep neural network to detect weld geometry directly from microscope images.

The detected keypoints are converted into engineering measurements through a custom geometry engine before being evaluated against predefined quality specifications.

Pipeline:

Input Image

↓

Neural Network

↓

6 Keypoints

↓

Geometry Engine

↓

Measurements

↓

PASS / FAIL

↓

Excel Report

πŸ— AI Model

Model:

  • ResNet-50 Backbone
  • Heatmap Regression
  • PyTorch Lightning
  • OpenCV
  • Albumentations

Training:

  • 149 manually labeled weld cross-sections
  • Images annotated by the author
  • Data augmentation
  • Transfer learning
  • Heatmap-based keypoint localization

The model predicts six keypoints defining weld penetration and interface geometry before calculating engineering measurements.


πŸ“ˆ Performance

Metric Value
Best Validation Loss 0.0037
Validation PCK @ 5 px 84.8 %
Test PCK @ 5 px 66.7 %
Training Epochs 150

The test dataset consists of weld samples never seen during training.


🏭 Adaptable to New Manufacturing Lines

Every manufacturer has unique:

  • weld geometry
  • microscope configuration
  • acceptance criteria
  • annotation procedures

FSW Measurement Tool is designed to be retrained on customer-specific datasets, allowing the AI model to adapt to new production environments while preserving the existing desktop workflow.

This makes the software suitable as a customizable industrial inspection platform rather than a single-purpose application.


πŸ“‚ Repository Structure

FSW-Tool/
β”‚
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ gui.py
β”‚   β”œβ”€β”€ inference.py
β”‚   β”œβ”€β”€ pipeline.py
β”‚   └── report.py
β”‚
β”œβ”€β”€ training/
β”‚   β”œβ”€β”€ dataset.py
β”‚   β”œβ”€β”€ extract.py
β”‚   β”œβ”€β”€ model.py
β”‚   β”œβ”€β”€ train.py
β”‚   └── verify.py
β”‚
β”œβ”€β”€ configs/
β”‚
β”œβ”€β”€ assets/
β”‚
β”œβ”€β”€ docs/
β”‚
β”œβ”€β”€ models/
β”‚
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt

βš™ Tech Stack

Category Technology
Language Python
Deep Learning PyTorch
Training PyTorch Lightning
Computer Vision OpenCV
Image Augmentation Albumentations
GUI PyQt6
Excel Export OpenPyXL
Packaging PyInstaller

πŸš€ Future Improvements

  • Manual keypoint correction
  • Active Learning
  • Confidence estimation
  • Automatic retraining
  • Support for additional microscope configurations
  • Multi-model management
  • Customer-specific project profiles

πŸ”’ Model Availability

The trained model weights are not included in this repository.

The training dataset is proprietary and is therefore not distributed.

This repository focuses on demonstrating the software architecture, application workflow, and machine learning approach.


πŸ’Ό Commercial Use

FSW Measurement Tool was developed as both a portfolio project and a proof-of-concept for industrial AI-assisted quality control.

The software architecture allows adaptation to customer-specific weld geometries, annotation standards, and production requirements through retraining on proprietary datasets.

For collaboration, customization, or commercial inquiries, feel free to get in touch.


πŸ‘¨β€πŸ”¬ About the Author

Blagoja Budzakoski

Chemistry Γ— Machine Learning

Founder of Budzak AI Labs

I enjoy building machine learning applications that solve real engineering and scientific problems, with interests spanning:

  • Industrial Computer Vision
  • Deep Learning
  • Graph Neural Networks
  • Computational Chemistry
  • Scientific Machine Learning
  • AI for Manufacturing

πŸ“œ License

This project is released under the MIT License.

See the LICENSE file for details.

About

AI-powered desktop application for automated measurement of cross-section Friction Stir Welds.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages