Downloads · 30 days
0
shashikantkaushik/Surface-defects-classification-of-the-hot-rolled-steel-strip
Surface-defects-classification-of-the-hot-rolled-steel-strip is a image classification model from shashikantkaushik. Use it when you need a label for an image. It is set up for keras. The card lists the license as apache-2.0.
A ResNet50-based deep learning model for automated visual inspection of hot-rolled steel surfaces, built using the Aargus DIY visual inspection tool. The model classifies steel surface defects with 97.50% accuracy.
Downloads · 30 days
0
Access
Public
Updated Sep 1, 2026
Repo size
102 MB
Likes
0
Public
Click a slice to open those files.
.h5101 MB · 99%
From the Hugging Face model README
A ResNet50-based deep learning model for automated visual inspection of hot-rolled steel surfaces, built using the Aargus DIY visual inspection tool. The model classifies steel surface defects with 97.50% accuracy.
Note: This release covers 4 defect classes (
crazing,inclusion,patches,scratches). A 6-class version (addingpitted_surfaceandrolled-in_scale) is in progress — see Roadmap.
This model performs automated visual inspection of hot-rolled steel surfaces to detect and classify manufacturing defects, replacing slow and inconsistent manual inspection with a fast, consistent AI-based system. It was built using the Aargus DIY visual inspection tool — covering data ingestion, augmentation, transfer learning, and statistical validation.
Defect Classes: crazing, inclusion, patches, scratches
| Metric | Score |
|---|---|
| Accuracy | 97.50% |
| Matthews Correlation Coefficient (MCC) | 0.9674 |
| Cohen's Kappa | 0.9667 |
| Top-2 Accuracy | 99.17% |
| 95% Confidence Interval (bootstrap, 1000 resamples) | [95.42%, 99.17%] |
| Class | Accuracy | AUC | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|---|---|
| Crazing | 98.33% | 1.000 | 1.00 | 0.98 | 0.99 | 60 |
| Inclusion | 100.00% | 1.000 | 0.91 | 1.00 | 0.95 | 60 |
| Patches | 100.00% | 1.000 | 1.00 | 1.00 | 1.00 | 60 |
| Scratches | 91.67% | 1.000 | 1.00 | 0.92 | 0.96 | 60 |
Total misclassified: 6 out of 240 validation images
| Mean Confidence | |
|---|---|
| Correct predictions | 0.9681 |
| Incorrect predictions | 0.6244 |
The large gap between correct and incorrect prediction confidence indicates the model is well-calibrated — it tends to be less confident when it makes a mistake, rather than being confidently wrong.








pip install tensorflow pillow numpy
import tensorflow as tf
from tensorflow.keras.applications.resnet50 import preprocess_input
import numpy as np
from PIL import Image
# Load model
model = tf.keras.models.load_model("final_model.h5")
class_names = ["crazing", "inclusion", "patches", "scratches"]
# Load and preprocess an image
img = Image.open("your_steel_surface_image.jpg").resize((224, 224))
arr = preprocess_input(np.array(img))
arr = np.expand_dims(arr, axis=0)
# Predict
preds = model.predict(arr)[0]
predicted_class = class_names[np.argmax(preds)]
confidence = np.max(preds)
print(f"Predicted defect: {predicted_class} ({confidence*100:.2f}% confidence)")
Industrial quality control automation for steel manufacturing — reduces manual inspection time and improves defect detection consistency across production lines.
pitted_surface, rolled-in_scale)| Platform | Link |
|---|---|
| Hugging Face | https://huggingface.co/shashikantkaushik/Surface-defects-classification-of-the-hot-rolled-steel-strip |
| AIKosh (India AI) |
This project is licensed under the Apache 2.0 License.
Aargus — DIY Visual Inspection AI Platform