From f6d2141a480dd6b5b8ee0e48d43bb64773232791 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 26 Mar 2024 23:38:14 -0600 Subject: add header ids --- .../2019-12-08-Image-Classifier-Tensorflow.html | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'docs/posts/2019-12-08-Image-Classifier-Tensorflow.html') diff --git a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html index 4d27f40..a5f7ef9 100644 --- a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html +++ b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html @@ -6,13 +6,13 @@ - Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria + id="creating-a-custom-image-classifier-using-tensorflow-2x-and-keras-for-detecting-malaria">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria - - + Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria" /> + Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria" /> @@ -44,11 +44,11 @@
-

Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria

+

Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria

Done during Google Code-In. Org: Tensorflow.

-

Imports

+

Imports

%tensorflow_version 2.x #This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
@@ -66,9 +66,9 @@
 
-

Dataset

+

Dataset

-

Fetching the Data

+

Fetching the Data

!wget ftp://lhcftp.nlm.nih.gov/Open-Access-Datasets/Malaria/cell_images.zip
@@ -76,7 +76,7 @@
 
-

Processing the Data

+

Processing the Data

We resize all the images as 50x50 and add the numpy array of that image as well as their label names (Infected or Not) to common arrays.

@@ -108,7 +108,7 @@ -

Splitting Data

+

Splitting Data

df = np.array(data)
@@ -125,9 +125,9 @@ y_train=y_train[s]
 X_train = X_train/255.0
 
-

Model

+

Model

-

Creating Model

+

Creating Model

By creating a sequential model, we create a linear stack of layers.

@@ -150,7 +150,7 @@ X_train = X_train/255.0
-

Compiling Model

+

Compiling Model

We use the Adam optimiser as it is an adaptive learning rate optimisation algorithm that's been designed specifically for training deep neural networks, which means it changes its learning rate automatically to get the best results

@@ -161,7 +161,7 @@ X_train = X_train/255.0 -

Training Model

+

Training Model

We train the model for 10 epochs on the training data and then validate it using the testing data

@@ -195,7 +195,7 @@ X_train = X_train/255.0 -

Results

+

Results

accuracy = history.history['accuracy'][-1]*100
-- 
cgit v1.2.3