Data analysis pre-processing

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 ...

Get Deep Learning By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.