An industrial analysis tool for detecting and classifying defects in material surfaces using machine learning.
MatScan: Material Surface Analyzer System is a desktop application that helps manufacturing and quality control professionals identify and classify defects in material surfaces. Using computer vision and deep learning, the system can detect six common types of industrial material defects with high accuracy.
The model was trained on the NEU Surface Defect Database, which contains six types of typical surface defects of hot-rolled steel strips. Each class contains 300 grayscale images (200×200 pixels).
- User-Friendly GUI – Clean, tabbed interface built for ease of use
- Multi-Class Defect Detection – Supports classification of:
- Crazing (fine network of surface cracks)
- Inclusions (embedded foreign particles)
- Patches (irregular surface areas)
- Pitted Surfaces (small depressions or holes)
- Rolled-in Scale (pressed scale particles)
- Scratches (linear marks or grooves)
- Real-Time Image Analysis – Fast and responsive defect prediction
- Grad-CAM Heatmap Visualization – Understand what influenced the model’s decision
- Confidence Scores – Displayed for primary and alternative predictions
- Run the application: python material_defect_analyzer.py
- The application will load the pre-trained model automatically. Else load the model manually.
- Click "Select Material Image" to choose an image file to analyze.
- Click "Analyze Defect" to process the image and see the classification results.
- View the detailed results in the "Analysis Results" tab, including:
-Primary defect type -Confidence score -Alternative possible defect types
- Switch to the "Defect Visualization" tab to see a heatmap highlighting areas that influenced the model's decision.


