Industrial desktop application for automated weld measurement using Computer Vision and Deep Learning.
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.
- π€ 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)
Inspecting Friction Stir Weld (FSW) cross-sections typically requires engineers to measure each weld manually using microscopy software.
The workflow is repetitive:
- Draw measurements β Manually place measurement lines on the weld image.
- Record results β Transfer measurements into an Excel spreadsheet or quality report.
- 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.
assets/gui_main.png
assets/review_window.png
assets/prediction.png
assets/excel_output.png
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
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.
| 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.
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.
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
| Category | Technology |
|---|---|
| Language | Python |
| Deep Learning | PyTorch |
| Training | PyTorch Lightning |
| Computer Vision | OpenCV |
| Image Augmentation | Albumentations |
| GUI | PyQt6 |
| Excel Export | OpenPyXL |
| Packaging | PyInstaller |
- Manual keypoint correction
- Active Learning
- Confidence estimation
- Automatic retraining
- Support for additional microscope configurations
- Multi-model management
- Customer-specific project profiles
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.
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.
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
This project is released under the MIT License.
See the LICENSE file for details.