Developed the single object detection code to multilabel classification code and run the multilabel classification code
Changed the "softmax" output layer into "sigmoid" output layer
Changed the loss from "categorical" into "binary_crossentropy"
Use below code to observe the Prediction precentage for each classes
cat = category_dict[cat_index]
print(f'{path}\t\tPrediction: {cat}\t{int(pred.max()*100)}% Confident')
classes={0:'Tire', 1:'Tin', 2:' Non'}
proba=loaded_model.predict(img.reshape(1,64,64,3))
top_3=np.argsort(proba[0]) [:-4:-1]
for i in range(3):
print("{}".format(classes[top_3[i]])+" ({:.3})".format(proba[0][top_3[i]]))
Next week target-Improve the code for multi object detection