Reputation: 11
I have made a project in which i drew images on ms paint of symbols and numbers, i trained CNN to recognize those images. I built a canvas in which the user will draw the symbol and in output it will tell what that symbol is. Now the problem is my project is very simple and despite having high accuracy and low loss it is producing inaccurate results. Here are some problems with my project: Ambiguously drawn images are producing inaccurate results If the user is drawing a small image there is no way to handle it and it produces wrong results Many symbols are confusing like 0 and 9 are confused with one another and also 5 and 3. I have built this project strictly in python but i am familiar with C# and can use it .NET if necessery. I need to know few things What model should i use ? Since i drew images myself in ms paint, do i need to continue doing it or should i take the dataset from the internet My data set consists of 5000 images right now and 16 classes.
train = ImageDataGenerator(
rescale=1./255,
rotation_range=20,
width_shift_range=0.2,
height_shift_range=0.2,
shear_range=0.2,
zoom_range=0.2,
horizontal_flip=True,
fill_mode='nearest'
)
from keras.layers import Conv2D, MaxPool2D, Flatten, Dense
from keras.models import Sequential
model = Sequential()
model.add(Conv2D(16,(3,3) , activation='relu', input_shape=(28,28,3)))
model.add(MaxPool2D(2,2))
model.add(Conv2D(32,(3,3),activation='relu'))
model.add(MaxPool2D(2,2))
model.add(Conv2D(64,(3,3),activation='relu'))
model.add(MaxPool2D(2,2))
model.add(Flatten())
model.add(Dense(512, activation='relu'))
model.add(Dense(16,activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam',
metrics=['accuracy'])
model_fit = model.fit(train_dataset,epochs=50)
I want to know few things
Upvotes: 0
Views: 17