In this section we are going to analyze and preprocess the input images and have it in an acceptable format for our learning algorithm, which is the convolution neural networks here.
So let's start off by importing the required packages for this implementation:
import numpy as npnp.random.seed(2018)
import osimport globimport cv2import datetimeimport pandas as pdimport timeimport warningswarnings.filterwarnings("ignore")
from sklearn.cross_validation import KFoldfrom keras.models import Sequentialfrom keras.layers.core import Dense, Dropout, Flattenfrom keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2Dfrom keras.optimizers import SGDfrom keras.callbacks import EarlyStoppingfrom keras.utils ...