The folder './JBMClassification2' contains subfolder YE358311_Healthy & YE358311_defects which has dataset
- Open playingwithmodel.py
- Cd to JBMClassification2
- Make sure to modify the path to your local dir in Line No. 43
- Now the Classifier can be trained by executing the below command. 4.1. python playingwithmodels.py
- Saved network at the end or training is generated with file name JBM_Classification
Already trained model present in ./JBMClassification2/
(with name JBM_Classification.h5 )directory can be used for testing on new images. Execute the below command.
- Open test_model.py
- Cd to JBMClassification2
- Modify the path for trained_model_path (
./JBMClassification2/JBM_Classification.h5
), incept_model_path(./JBMClassification2/incept_model.h5
) Line No. 31 & 32 - Make a Test folder inside the JBMClassification2 and keep test images(Healthy/Defective) inside this folder with image name being test.img Line No. 33 in test_model.py
OR
python ./test_model.py \
--images_path={Path of the Image file or Folder of images} \
--trained_model_path = ./ JBM_Classification.h5\
--incept_model_path = ./incept_model.h5
The trained model achieved ~93.55 % accuracy with following parameters :-
- Epochs = 150
- Batch size = 32
- Learning Rate = 1e-5 (RMSprop)
In ./JBMClassification2/
we have following video demo.
QualityTesterByJBM
A Demo of AI model deployed on the android AppGuidetoTestNetwork
Guide on how to use test_model.py to predict from saved network.TraningRecord
Screen Capture while traning, Accuracy reaches to 93.55% towards epoch 150