AI Industrial Inspection is an end-to-end deep learning application built to classify steel surface inspection images into 10 industrial defect categories.
The project uses a trained EfficientNet-B0 model with transfer learning and balanced training. The deployed Streamlit application takes a single uploaded image and returns the predicted defect, confidence score, Top-3 predictions, and a Grad-CAM visual explanation.
Project focus: combining practical image classification, interpretable model output, and a usable web interface into one complete computer-vision workflow.
|
10 industrial defect categories The model predicts across the complete supported defect taxonomy. |
Prediction + confidence The application reports the model confidence associated with the predicted class. |
|
Ranked alternatives The three highest-probability predictions are displayed for additional context. |
Visual model attention The system generates an attention map and overlay for the predicted class. |
|
End-to-end workflow Upload one steel surface image and receive the complete inspection result. |
Interactive web application The complete inference interface is deployed through Streamlit Community Cloud. |
|
TEST ACCURACY Held-out evaluation |
TEST MACRO F1 10-class performance |
VALIDATION F1 Best validation score |
DEFECT CLASSES Industrial categories |
Evaluation note: These values are the project's existing evaluation metrics. They describe performance on the evaluated dataset and should not be interpreted as guaranteed real-world or production performance.
01crease |
02crescent_gap |
03inclusion |
04oil_spot |
05punching_hole |
06rolled_pit |
07silk_spot |
08waist_folding |
09water_spot |
10welding_line |
| 01 ๐ผ๏ธ IMAGE INPUT Steel surface |
โ | 02 โ๏ธ PREPROCESSING Grayscale + resize |
โ | 03 ๐ง EFFICIENTNET-B0 Feature extraction |
โ | 04 ๐ฏ PREDICTION Class + confidence |
โ | 05 ๐ฅ GRAD-CAM Visual explanation |
The inference pipeline connects image preprocessing, EfficientNet-B0 classification, ranked prediction output, and Grad-CAM explainability into one inspection workflow.
STEEL SURFACE IMAGE
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ PREPROCESSING โ
โ Grayscale+Resizeโ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ EFFICIENTNET-B0โ
โ CLASSIFIER โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ PREDICTION โ
โ Class+Confidenceโ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโดโโโโโโโ
โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโโ
โ TOP-3 โ โ GRAD-CAM โ
โ SCORES โ โ EXPLAIN. โ
โโโโโโฌโโโโโ โโโโโโโฌโโโโโ
โ โ
โโโโโโโโฌโโโโโโโโ
โผ
EXPLAINABLE RESULT
A predicted label tells us what the classifier selected. Grad-CAM adds a visual explanation by highlighting image regions associated with the model's prediction.
|
Inspection input |
Grad-CAM output |
Attention on image |
Class + confidence |
Interpretation: Grad-CAM is a visual model-explanation technique. It should not be treated as ground-truth defect localization.
The deployed application brings the complete inspection workflow into a focused dark industrial interface.
The landing interface presents the project, model performance, supported classes, and image upload workflow.
The inspection result displays the predicted defect, confidence, model information, inference type, and Top-3 predictions.
The explainability interface presents the original image, Grad-CAM attention map, and AI attention overlay.
The application exposes all 10 supported industrial defect categories.
|
Core vision architecture The project uses EfficientNet-B0 as the classification backbone for steel surface defect recognition. Learning strategy Transfer learning adapts the pretrained architecture to the project's 10-class industrial inspection task. |
Trained inspection model The deployed checkpoint is: The Streamlit application loads this trained checkpoint during inference. |
|
|
Python ยท PyTorch ยท EfficientNet-B0 ยท Torchvision ยท Grad-CAM ยท Streamlit
|
Extend the current single-image workflow to multiple inspection images. |
Explore more precise spatial localization of detected surface defects. |
Build richer class-level inspection summaries and dashboards. |
|
Maintain structured records of previous inspection results. |
Add human-review workflows around model predictions. |
Explore integration with real industrial inspection pipelines. |
These are future development directions and are not represented as currently implemented features.
AI_Industrial_Inspection/
โ
โโโ app/
โ โโโ app.py
โ
โโโ models/
โ โโโ best_efficientnet_b0_balanced.pth
โ
โโโ notebooks/
โ โโโ AI_Industrial_Inspection.ipynb
โ
โโโ screenshots/
โ โโโ 01_homepage.png
โ โโโ 02_inspection_result.png
โ โโโ 03_gradcam_explainability.png
โ โโโ 04_supported_defects.png
โ โโโ 05_system_architecture.png
โ โโโ 06_industrial_ai_hero.png
โ โโโ 07_explainable_ai.png
โ โโโ 08_model_technology.png
โ
โโโ src/
โ โโโ __init__.py
โ โโโ gradcam.py
โ โโโ inference.py
โ โโโ model.py
โ โโโ preprocessing.py
โ
โโโ .streamlit/
โ โโโ config.toml
โ
โโโ .gitignore
โโโ LICENSE
โโโ requirements.txt
โโโ README.md
git clone https://github.com/alinkumar/AI_Industrial_Inspection.git
cd AI_Industrial_InspectionWindows PowerShell
python -m venv .venv
.\.venv\Scripts\Activate.ps1pip install -r requirements.txtstreamlit run app/app.pyExplore the deployed application and test the complete inspection workflow.
The complete development notebook is included in:
notebooks/AI_Industrial_Inspection.ipynb
It documents the model development and evaluation workflow used for the project.
This project is an AI-assisted computer vision portfolio/research implementation, not a certified industrial inspection system.
- Model performance depends on the quality and distribution of inspection images.
- Reported evaluation metrics should not be interpreted as guaranteed production performance.
- Grad-CAM provides model attention visualization, not ground-truth defect localization.
- Real industrial deployment would require domain-specific validation, monitoring, calibration, and operational safety procedures.
The application is designed to demonstrate an end-to-end computer-vision workflow and should not be treated as an autonomous replacement for qualified industrial inspection processes.
| ๐ฆ Batch Inspection |
๐ Defect Localization |
๐ Class Dashboards |
| ๐๏ธ Inspection History |
๐ Review Workflows |
๐ญ Production Integration |
These are future directions and are not represented as currently implemented features.
This project is released under the MIT License.
See LICENSE for the complete license text.






