ID3: Intelligent Steel Surface Defect Detection System using Supervised and Unsupervised Learning Techniques
The project was a part of the AME 505 course at USC. the objective of the project is to create an application to defect steel surface defects using supervised and unsupervised learning methods.
The following dependencies need to be installed before running the project.
- Docker - framework for running the application on any platforms.
- WSL - Linux shell platform. (Only for Windows Users)
Clone the master branch of the repository in your selected destination using
git clone -b master https://github.com/jd509/USC-AME-505-ID3-Intelligent-Defect-Detection-System.git
Source into the cloned folder and run the install.sh script to generate a docker image for the project.
./install.sh
This will generate the docker image with the necessary dependencies.
To run the application:
Run the launch_app.sh script.
./launch_app.sh
This will start a docker container with the name "defect_detector" which will load and run the application.
The user can specify the input values for all the machine learning models and train the models individually.
To read further about these models:
-
Grey-Level Co-occurence Matrix - Feature extraction method using GLCM algorithm.
-
Local Binary Patterns + Grey-Level Co-occurence Matrix - Feature extraction method using LBGLCM algorithm.
The training results can be viewed on the user interface after all the models have been trained.
Post-training, the user interface can be used to predict the classification label for a given image and identify the defect associated with it.
The repository contains python scripts to train and test the model. It also contains the dataset on which the model was trained.
- train_machine_learning_models.py : Python script to train the models and extract features.
- predict_defects.py : Python script to predict the defect for a single image using trained models.
- user_interface.py : UI for interacting with the application.
- image_feature_extraction_config.json : JSON file for default parameters to extract features from training dataset
- machine_learning_params.json : JSON file for default parameters to train the machine learning models
- train_dataset: Contains the dataset for six types of surface defects : Crazing, Inclusion, Patches, Pitted Surfaces, Scratches, Residues
- test_dataset: Sample images to test the model
Currently, there are no known issues to run the application. However, if any issues have been found, please open an issue forum for the same
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.