Classification of Animals Using CNN Model
Classification of animals using CNN Model In this model, we try to predict whether the animal is a dog or a cat. #We will use the Keras library to create our model. Keras: is an open - source library that provides a python interface for artificial neural networks. from keras.models import Sequential from keras.layers import Conv2D,Activation,MaxPooling2D,Dense,Flatten,Dropout import numpy as np #Let’s initialize a convolutional neural network using the sequential model of Keras. classifier = Sequential() # Adding Convolution Layer classifier.add(Conv2D(32,(3,3),input_shape=(64,64,3))) #Conv2D stands for a 2-dimensional convolutional layer. Here, 32 is the number of filters needed. A filter is an array of numeric values. (3,3) is the size of the filter, which means 3 rows and 3 columns. The input image is 64 64 3 in dimensions, that is, 64 height, 64 widths, and 3 refer to RGB values. Each of the numbers in this array (64,64,3) is given values from 0 to 255, which describes the pixel in...