I have developed a deep learning algorythm that uses the Tensorflow library to train the data and create a CNN model. By using this trained model, the program will be able to accurately detect defective products and provide the necessary visual representation. Also basic structure that I use can be applied to almost on anything
-To run this project correctly, first we need to import libraries. "pip" command can be used to instal all of them one by one or use Pycharm to auto install all of them
IMPORTANT: There are 2 different type of defects on buttons : Dots and Scratches. I will be trying to test my data if oven buttons are defected or not. There was about 200 photos in the folders. I deleted almost all of them because of upload limit. I left a few of them just to show how data should be.
import os
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.models import Sequential, load_model
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.optimizers import Adam
from sklearn.metrics import confusion_matrix, classification_report