Overview This project is an end-to-end steel defect detection system leveraging a pre-trained ResNet152V2 deep learning model. The system identifies different types of defects on steel surfaces, providing bounding boxes and defect classifications.
It performs two main tasks:
- Bounding Box Prediction: Detects the location of defects on steel surfaces.
- Defect Classification: Classifies the type of defect from multiple categories.
The model is trained using a custom dataset with annotated bounding boxes and defect classes. The dataset includes images and corresponding XML annotation files.
images/
: Directory containing the steel defect images linked to download.label/
: Directory containing XML annotation files with bounding box and class information Linked to download.resnet152v2.h5
: The trained model (not included in this repository).steel_defect_detection.py
: Jupyter notebook for training and saving the trained model.link.txt
: Link to Python script to load the model and perform inference.
-
Clone the repository:
git clone https://github.com/MohiniDeshpande/steel-defect-detection.git
cd steel-defect-detection
pip install -r requirements.txt
-
Train the model or run inference:
To train the model, download data from links above and use the 'steel_defect_detection.py' file.
To run inference, use the colab link.
The model is based on the ResNet152V2 architecture and is pre-trained on ImageNet. The model has been adapted for object detection (bounding box prediction) and classification of defects.
Layers: Base Model: Pre-trained ResNet152V2 (Frozen for initial training).
Bounding Box Prediction: Dense layers predicting xmin, ymin, xmax, ymax.
Defect Classification: Dense layers predicting the defect type.
The model achieved high accuracy on defect classification and precise bounding box predictions for defect locations.