From f324a12da007a9f39eb718d23e7349fad4e6f870 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 19 Jan 2020 13:11:50 +0530 Subject: Publish deploy 2020-01-19 13:11 --- Themes/styles.css | 5 +- assets/posts/kaggle-colab/ss1.png | Bin 0 -> 151575 bytes assets/posts/kaggle-colab/ss2.png | Bin 0 -> 43899 bytes assets/posts/kaggle-colab/ss3.png | Bin 0 -> 54283 bytes assets/posts/kaggle-colab/ss4.png | Bin 0 -> 14510 bytes feed.rss | 222 ++++++++++++++++++++- index.html | 2 +- .../index.html | 9 + .../index.html | 213 ++++++++++++++++++++ posts/index.html | 2 +- sitemap.xml | 2 +- styles.css | 5 +- tags/colab/index.html | 2 +- tags/index.html | 2 +- tags/kaggle/index.html | 1 + tags/turicreate/index.html | 2 +- tags/tutorial/index.html | 2 +- 17 files changed, 459 insertions(+), 10 deletions(-) create mode 100644 assets/posts/kaggle-colab/ss1.png create mode 100644 assets/posts/kaggle-colab/ss2.png create mode 100644 assets/posts/kaggle-colab/ss3.png create mode 100644 assets/posts/kaggle-colab/ss4.png create mode 100644 posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab/index.html create mode 100644 posts/2020-01-16-Image-Classifier-Using-Turicreate/index.html create mode 100644 tags/kaggle/index.html diff --git a/Themes/styles.css b/Themes/styles.css index afc641a..5328b36 100644 --- a/Themes/styles.css +++ b/Themes/styles.css @@ -186,6 +186,8 @@ a { img { max-width: 100%; + margin-bottom: 1em; + margin-top: 1em; width: auto\9; height: auto; vertical-align: middle; @@ -205,7 +207,8 @@ pre { display: block; background-color: #fdf6e3; color: #586e75; - + margin-bottom: 1em; + margin-top: 1em; border-radius: 4px; } diff --git a/assets/posts/kaggle-colab/ss1.png b/assets/posts/kaggle-colab/ss1.png new file mode 100644 index 0000000..b618236 Binary files /dev/null and b/assets/posts/kaggle-colab/ss1.png differ diff --git a/assets/posts/kaggle-colab/ss2.png b/assets/posts/kaggle-colab/ss2.png new file mode 100644 index 0000000..0777cdd Binary files /dev/null and b/assets/posts/kaggle-colab/ss2.png differ diff --git a/assets/posts/kaggle-colab/ss3.png b/assets/posts/kaggle-colab/ss3.png new file mode 100644 index 0000000..186db99 Binary files /dev/null and b/assets/posts/kaggle-colab/ss3.png differ diff --git a/assets/posts/kaggle-colab/ss4.png b/assets/posts/kaggle-colab/ss4.png new file mode 100644 index 0000000..4d60648 Binary files /dev/null and b/assets/posts/kaggle-colab/ss4.png differ diff --git a/feed.rss b/feed.rss index 0da058c..b55ce6f 100644 --- a/feed.rss +++ b/feed.rss @@ -1,4 +1,224 @@ -Navan ChauhanWelcome to my personal fragment of the internet.https://navanchauhan.github.io/enSat, 18 Jan 2020 19:19:50 +0530Sat, 18 Jan 2020 19:19:50 +0530250https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPyConverting between image and NumPy arrayShort code snippet for converting between PIL image and NumPy arrays.https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPyTue, 14 Jan 2020 00:10:00 +0530Converting between image and NumPy array
import numpy +Navan ChauhanWelcome to my personal fragment of the internet.https://navanchauhan.github.io/enSun, 19 Jan 2020 13:11:26 +0530Sun, 19 Jan 2020 13:11:26 +0530250https://navanchauhan.github.io/posts/2020-01-16-Image-Classifier-Using-TuricreateCreating a Custom Image Classifier using Turicreate to detect Smoke and FireTutorial on creating a custom Image Classifier using Turicreate and a dataset from Kagglehttps://navanchauhan.github.io/posts/2020-01-16-Image-Classifier-Using-TuricreateThu, 16 Jan 2020 10:36:00 +0530Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire

For setting up Kaggle with Google Colab, please refer to my previous post

Dataset

Mounting Google Drive

import os +from google.colab import drive +drive.mount('/content/drive') +
+ +

Downloading Dataset from Kaggle

os.environ['KAGGLE_CONFIG_DIR'] = "/content/drive/My Drive/" +!kaggle datasets download ashutosh69/fire-and-smoke-dataset +!unzip "fire-and-smoke-dataset.zip" +
+ +

Pre-Processing

!mkdir default smoke fire +
+ +


!ls data/data/img_data/train/default/*.jpg +
+ +


img_1002.jpg img_20.jpg img_519.jpg img_604.jpg img_80.jpg +img_1003.jpg img_21.jpg img_51.jpg img_60.jpg img_8.jpg +img_1007.jpg img_22.jpg img_520.jpg img_61.jpg img_900.jpg +img_100.jpg img_23.jpg img_521.jpg 'img_62 (2).jpg' img_920.jpg +img_1014.jpg img_24.jpg 'img_52 (2).jpg' img_62.jpg img_921.jpg +img_1018.jpg img_29.jpg img_522.jpg 'img_63 (2).jpg' img_922.jpg +img_101.jpg img_3000.jpg img_523.jpg img_63.jpg img_923.jpg +img_1027.jpg img_335.jpg img_524.jpg img_66.jpg img_924.jpg +img_102.jpg img_336.jpg img_52.jpg img_67.jpg img_925.jpg +img_1042.jpg img_337.jpg img_530.jpg img_68.jpg img_926.jpg +img_1043.jpg img_338.jpg img_531.jpg img_700.jpg img_927.jpg +img_1046.jpg img_339.jpg 'img_53 (2).jpg' img_701.jpg img_928.jpg +img_1052.jpg img_340.jpg img_532.jpg img_702.jpg img_929.jpg +img_107.jpg img_341.jpg img_533.jpg img_703.jpg img_930.jpg +img_108.jpg img_3.jpg img_537.jpg img_704.jpg img_931.jpg +img_109.jpg img_400.jpg img_538.jpg img_705.jpg img_932.jpg +img_10.jpg img_471.jpg img_539.jpg img_706.jpg img_933.jpg +img_118.jpg img_472.jpg img_53.jpg img_707.jpg img_934.jpg +img_12.jpg img_473.jpg img_540.jpg img_708.jpg img_935.jpg +img_14.jpg img_488.jpg img_541.jpg img_709.jpg img_938.jpg +img_15.jpg img_489.jpg 'img_54 (2).jpg' img_70.jpg img_958.jpg +img_16.jpg img_490.jpg img_542.jpg img_710.jpg img_971.jpg +img_17.jpg img_491.jpg img_543.jpg 'img_71 (2).jpg' img_972.jpg +img_18.jpg img_492.jpg img_54.jpg img_71.jpg img_973.jpg +img_19.jpg img_493.jpg 'img_55 (2).jpg' img_72.jpg img_974.jpg +img_1.jpg img_494.jpg img_55.jpg img_73.jpg img_975.jpg +img_200.jpg img_495.jpg img_56.jpg img_74.jpg img_980.jpg +img_201.jpg img_496.jpg img_57.jpg img_75.jpg img_988.jpg +img_202.jpg img_497.jpg img_58.jpg img_76.jpg img_9.jpg +img_203.jpg img_4.jpg img_59.jpg img_77.jpg +img_204.jpg img_501.jpg img_601.jpg img_78.jpg +img_205.jpg img_502.jpg img_602.jpg img_79.jpg +img_206.jpg img_50.jpg img_603.jpg img_7.jpg +
+ +

The image files are not actually JPEG, thus we first need to save them in the correct format for Turicreate

from PIL import Image +import glob + + +folders = ["default","smoke","fire"] +for folder in folders: + n = 1 + for file in glob.glob("./data/data/img_data/train/" + folder + "/*.jpg"): + im = Image.open(file) + rgb_im = im.convert('RGB') + rgb_im.save((folder + "/" + str(n) + ".jpg"), quality=100) + n +=1 + for file in glob.glob("./data/data/img_data/train/" + folder + "/*.jpg"): + im = Image.open(file) + rgb_im = im.convert('RGB') + rgb_im.save((folder + "/" + str(n) + ".jpg"), quality=100) + n +=1 +
+ +


!mkdir train +!mv default ./train +!mv smoke ./train +!mv fire ./train +
+ +

Making the Image Classifier

Making an SFrame

!pip install turicreate +
+ +


import turicreate as tc +import os + +data = tc.image_analysis.load_images("./train", with_path=True) + +data["label"] = data["path"].apply(lambda path: os.path.basename(os.path.dirname(path))) + +print(data) + +data.save('fire-smoke.sframe') +
+ +


+-------------------------+------------------------+ +| path | image | ++-------------------------+------------------------+ +| ./train/default/1.jpg | Height: 224 Width: 224 | +| ./train/default/10.jpg | Height: 224 Width: 224 | +| ./train/default/100.jpg | Height: 224 Width: 224 | +| ./train/default/101.jpg | Height: 224 Width: 224 | +| ./train/default/102.jpg | Height: 224 Width: 224 | +| ./train/default/103.jpg | Height: 224 Width: 224 | +| ./train/default/104.jpg | Height: 224 Width: 224 | +| ./train/default/105.jpg | Height: 224 Width: 224 | +| ./train/default/106.jpg | Height: 224 Width: 224 | +| ./train/default/107.jpg | Height: 224 Width: 224 | ++-------------------------+------------------------+ +[2028 rows x 2 columns] +Note: Only the head of the SFrame is printed. +You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns. ++-------------------------+------------------------+---------+ +| path | image | label | ++-------------------------+------------------------+---------+ +| ./train/default/1.jpg | Height: 224 Width: 224 | default | +| ./train/default/10.jpg | Height: 224 Width: 224 | default | +| ./train/default/100.jpg | Height: 224 Width: 224 | default | +| ./train/default/101.jpg | Height: 224 Width: 224 | default | +| ./train/default/102.jpg | Height: 224 Width: 224 | default | +| ./train/default/103.jpg | Height: 224 Width: 224 | default | +| ./train/default/104.jpg | Height: 224 Width: 224 | default | +| ./train/default/105.jpg | Height: 224 Width: 224 | default | +| ./train/default/106.jpg | Height: 224 Width: 224 | default | +| ./train/default/107.jpg | Height: 224 Width: 224 | default | ++-------------------------+------------------------+---------+ +[2028 rows x 3 columns] +Note: Only the head of the SFrame is printed. +You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns. +
+ +

Making the Model

import turicreate as tc + +# Load the data +data = tc.SFrame('fire-smoke.sframe') + +# Make a train-test split +train_data, test_data = data.random_split(0.8) + +# Create the model +model = tc.image_classifier.create(train_data, target='label') + +# Save predictions to an SArray +predictions = model.predict(test_data) + +# Evaluate the model and print the results +metrics = model.evaluate(test_data) +print(metrics['accuracy']) + +# Save the model for later use in Turi Create +model.save('fire-smoke.model') + +# Export for use in Core ML +model.export_coreml('fire-smoke.mlmodel') +
+ +


Performing feature extraction on resized images... +Completed 64/1633 +Completed 128/1633 +Completed 192/1633 +Completed 256/1633 +Completed 320/1633 +Completed 384/1633 +Completed 448/1633 +Completed 512/1633 +Completed 576/1633 +Completed 640/1633 +Completed 704/1633 +Completed 768/1633 +Completed 832/1633 +Completed 896/1633 +Completed 960/1633 +Completed 1024/1633 +Completed 1088/1633 +Completed 1152/1633 +Completed 1216/1633 +Completed 1280/1633 +Completed 1344/1633 +Completed 1408/1633 +Completed 1472/1633 +Completed 1536/1633 +Completed 1600/1633 +Completed 1633/1633 +PROGRESS: Creating a validation set from 5 percent of training data. This may take a while. + You can set ``validation_set=None`` to disable validation tracking. + +Logistic regression: +-------------------------------------------------------- +Number of examples : 1551 +Number of classes : 3 +Number of feature columns : 1 +Number of unpacked features : 2048 +Number of coefficients : 4098 +Starting L-BFGS +-------------------------------------------------------- ++-----------+----------+-----------+--------------+-------------------+---------------------+ +| Iteration | Passes | Step size | Elapsed Time | Training Accuracy | Validation Accuracy | ++-----------+----------+-----------+--------------+-------------------+---------------------+ +| 0 | 6 | 0.018611 | 0.891830 | 0.553836 | 0.560976 | +| 1 | 10 | 0.390832 | 1.622383 | 0.744681 | 0.792683 | +| 2 | 11 | 0.488541 | 1.943987 | 0.733075 | 0.804878 | +| 3 | 14 | 2.442703 | 2.512545 | 0.727917 | 0.841463 | +| 4 | 15 | 2.442703 | 2.826964 | 0.861380 | 0.853659 | +| 9 | 28 | 2.340435 | 5.492035 | 0.941328 | 0.975610 | ++-----------+----------+-----------+--------------+-------------------+---------------------+ +Performing feature extraction on resized images... +Completed 64/395 +Completed 128/395 +Completed 192/395 +Completed 256/395 +Completed 320/395 +Completed 384/395 +Completed 395/395 +0.9316455696202531 +
+ +

We just got an accuracy of 94% on Training Data and 97% on Validation Data!

]]>
https://navanchauhan.github.io/posts/2020-01-15-Setting-up-Kaggle-to-use-with-ColabSetting up Kaggle to use with Google ColabTutorial on setting up kaggle, to use with Google Colabhttps://navanchauhan.github.io/posts/2020-01-15-Setting-up-Kaggle-to-use-with-ColabWed, 15 Jan 2020 23:36:00 +0530Setting up Kaggle to use with Google Colab

In order to be able to access Kaggle Datasets, you will need to have an account on Kaggle (which is Free)

Grabbing Our Tokens

Go to Kaggle

Click on your User Profile and Click on My Account

Scroll Down untill you see Create New API Token

This will download your token as a JSON file

Copy the File to the root folder of your Google Drive

Setting up Colab

Mounting Google Drive

import os +from google.colab import drive +drive.mount('/content/drive') +
+ +

After this click on the URL in the output section, login and then paste the Auth Code

Configuring Kaggle

os.environ['KAGGLE_CONFIG_DIR'] = "/content/drive/My Drive/" +
+ +

Voila! You can now download kaggel datasets

]]>
https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPyConverting between image and NumPy arrayShort code snippet for converting between PIL image and NumPy arrays.https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPyTue, 14 Jan 2020 00:10:00 +0530Converting between image and NumPy array
import numpy import PIL # Convert PIL Image to NumPy array diff --git a/index.html b/index.html index 17e5bbf..8d8bd43 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Hi! | Navan Chauhan

Hi!

Welcome to my personal fragment of the internet.

Latest content

\ No newline at end of file +Hi! | Navan Chauhan

Hi!

Welcome to my personal fragment of the internet.

Latest content

\ No newline at end of file diff --git a/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab/index.html b/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab/index.html new file mode 100644 index 0000000..e549c0a --- /dev/null +++ b/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab/index.html @@ -0,0 +1,9 @@ +Setting up Kaggle to use with Google Colab | Navan Chauhan
🕑 1 minute read.

Setting up Kaggle to use with Google Colab

In order to be able to access Kaggle Datasets, you will need to have an account on Kaggle (which is Free)

Grabbing Our Tokens

Go to Kaggle

Click on your User Profile and Click on My Account

Scroll Down untill you see Create New API Token

This will download your token as a JSON file

Copy the File to the root folder of your Google Drive

Setting up Colab

Mounting Google Drive

import os +from google.colab import drive +drive.mount('/content/drive') +
+ +

After this click on the URL in the output section, login and then paste the Auth Code

Configuring Kaggle

os.environ['KAGGLE_CONFIG_DIR'] = "/content/drive/My Drive/" +
+ +

Voila! You can now download kaggel datasets

Tagged with:
\ No newline at end of file diff --git a/posts/2020-01-16-Image-Classifier-Using-Turicreate/index.html b/posts/2020-01-16-Image-Classifier-Using-Turicreate/index.html new file mode 100644 index 0000000..f6c84ef --- /dev/null +++ b/posts/2020-01-16-Image-Classifier-Using-Turicreate/index.html @@ -0,0 +1,213 @@ +Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire | Navan Chauhan
🕑 6 minute read.

Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire

For setting up Kaggle with Google Colab, please refer to my previous post

Dataset

Mounting Google Drive

import os +from google.colab import drive +drive.mount('/content/drive') +
+ +

Downloading Dataset from Kaggle

os.environ['KAGGLE_CONFIG_DIR'] = "/content/drive/My Drive/" +!kaggle datasets download ashutosh69/fire-and-smoke-dataset +!unzip "fire-and-smoke-dataset.zip" +
+ +

Pre-Processing

!mkdir default smoke fire +
+ +


!ls data/data/img_data/train/default/*.jpg +
+ +


img_1002.jpg img_20.jpg img_519.jpg img_604.jpg img_80.jpg +img_1003.jpg img_21.jpg img_51.jpg img_60.jpg img_8.jpg +img_1007.jpg img_22.jpg img_520.jpg img_61.jpg img_900.jpg +img_100.jpg img_23.jpg img_521.jpg 'img_62 (2).jpg' img_920.jpg +img_1014.jpg img_24.jpg 'img_52 (2).jpg' img_62.jpg img_921.jpg +img_1018.jpg img_29.jpg img_522.jpg 'img_63 (2).jpg' img_922.jpg +img_101.jpg img_3000.jpg img_523.jpg img_63.jpg img_923.jpg +img_1027.jpg img_335.jpg img_524.jpg img_66.jpg img_924.jpg +img_102.jpg img_336.jpg img_52.jpg img_67.jpg img_925.jpg +img_1042.jpg img_337.jpg img_530.jpg img_68.jpg img_926.jpg +img_1043.jpg img_338.jpg img_531.jpg img_700.jpg img_927.jpg +img_1046.jpg img_339.jpg 'img_53 (2).jpg' img_701.jpg img_928.jpg +img_1052.jpg img_340.jpg img_532.jpg img_702.jpg img_929.jpg +img_107.jpg img_341.jpg img_533.jpg img_703.jpg img_930.jpg +img_108.jpg img_3.jpg img_537.jpg img_704.jpg img_931.jpg +img_109.jpg img_400.jpg img_538.jpg img_705.jpg img_932.jpg +img_10.jpg img_471.jpg img_539.jpg img_706.jpg img_933.jpg +img_118.jpg img_472.jpg img_53.jpg img_707.jpg img_934.jpg +img_12.jpg img_473.jpg img_540.jpg img_708.jpg img_935.jpg +img_14.jpg img_488.jpg img_541.jpg img_709.jpg img_938.jpg +img_15.jpg img_489.jpg 'img_54 (2).jpg' img_70.jpg img_958.jpg +img_16.jpg img_490.jpg img_542.jpg img_710.jpg img_971.jpg +img_17.jpg img_491.jpg img_543.jpg 'img_71 (2).jpg' img_972.jpg +img_18.jpg img_492.jpg img_54.jpg img_71.jpg img_973.jpg +img_19.jpg img_493.jpg 'img_55 (2).jpg' img_72.jpg img_974.jpg +img_1.jpg img_494.jpg img_55.jpg img_73.jpg img_975.jpg +img_200.jpg img_495.jpg img_56.jpg img_74.jpg img_980.jpg +img_201.jpg img_496.jpg img_57.jpg img_75.jpg img_988.jpg +img_202.jpg img_497.jpg img_58.jpg img_76.jpg img_9.jpg +img_203.jpg img_4.jpg img_59.jpg img_77.jpg +img_204.jpg img_501.jpg img_601.jpg img_78.jpg +img_205.jpg img_502.jpg img_602.jpg img_79.jpg +img_206.jpg img_50.jpg img_603.jpg img_7.jpg +
+ +

The image files are not actually JPEG, thus we first need to save them in the correct format for Turicreate

from PIL import Image +import glob + + +folders = ["default","smoke","fire"] +for folder in folders: + n = 1 + for file in glob.glob("./data/data/img_data/train/" + folder + "/*.jpg"): + im = Image.open(file) + rgb_im = im.convert('RGB') + rgb_im.save((folder + "/" + str(n) + ".jpg"), quality=100) + n +=1 + for file in glob.glob("./data/data/img_data/train/" + folder + "/*.jpg"): + im = Image.open(file) + rgb_im = im.convert('RGB') + rgb_im.save((folder + "/" + str(n) + ".jpg"), quality=100) + n +=1 +
+ +


!mkdir train +!mv default ./train +!mv smoke ./train +!mv fire ./train +
+ +

Making the Image Classifier

Making an SFrame

!pip install turicreate +
+ +


import turicreate as tc +import os + +data = tc.image_analysis.load_images("./train", with_path=True) + +data["label"] = data["path"].apply(lambda path: os.path.basename(os.path.dirname(path))) + +print(data) + +data.save('fire-smoke.sframe') +
+ +


+-------------------------+------------------------+ +| path | image | ++-------------------------+------------------------+ +| ./train/default/1.jpg | Height: 224 Width: 224 | +| ./train/default/10.jpg | Height: 224 Width: 224 | +| ./train/default/100.jpg | Height: 224 Width: 224 | +| ./train/default/101.jpg | Height: 224 Width: 224 | +| ./train/default/102.jpg | Height: 224 Width: 224 | +| ./train/default/103.jpg | Height: 224 Width: 224 | +| ./train/default/104.jpg | Height: 224 Width: 224 | +| ./train/default/105.jpg | Height: 224 Width: 224 | +| ./train/default/106.jpg | Height: 224 Width: 224 | +| ./train/default/107.jpg | Height: 224 Width: 224 | ++-------------------------+------------------------+ +[2028 rows x 2 columns] +Note: Only the head of the SFrame is printed. +You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns. ++-------------------------+------------------------+---------+ +| path | image | label | ++-------------------------+------------------------+---------+ +| ./train/default/1.jpg | Height: 224 Width: 224 | default | +| ./train/default/10.jpg | Height: 224 Width: 224 | default | +| ./train/default/100.jpg | Height: 224 Width: 224 | default | +| ./train/default/101.jpg | Height: 224 Width: 224 | default | +| ./train/default/102.jpg | Height: 224 Width: 224 | default | +| ./train/default/103.jpg | Height: 224 Width: 224 | default | +| ./train/default/104.jpg | Height: 224 Width: 224 | default | +| ./train/default/105.jpg | Height: 224 Width: 224 | default | +| ./train/default/106.jpg | Height: 224 Width: 224 | default | +| ./train/default/107.jpg | Height: 224 Width: 224 | default | ++-------------------------+------------------------+---------+ +[2028 rows x 3 columns] +Note: Only the head of the SFrame is printed. +You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns. +
+ +

Making the Model

import turicreate as tc + +# Load the data +data = tc.SFrame('fire-smoke.sframe') + +# Make a train-test split +train_data, test_data = data.random_split(0.8) + +# Create the model +model = tc.image_classifier.create(train_data, target='label') + +# Save predictions to an SArray +predictions = model.predict(test_data) + +# Evaluate the model and print the results +metrics = model.evaluate(test_data) +print(metrics['accuracy']) + +# Save the model for later use in Turi Create +model.save('fire-smoke.model') + +# Export for use in Core ML +model.export_coreml('fire-smoke.mlmodel') +
+ +


Performing feature extraction on resized images... +Completed 64/1633 +Completed 128/1633 +Completed 192/1633 +Completed 256/1633 +Completed 320/1633 +Completed 384/1633 +Completed 448/1633 +Completed 512/1633 +Completed 576/1633 +Completed 640/1633 +Completed 704/1633 +Completed 768/1633 +Completed 832/1633 +Completed 896/1633 +Completed 960/1633 +Completed 1024/1633 +Completed 1088/1633 +Completed 1152/1633 +Completed 1216/1633 +Completed 1280/1633 +Completed 1344/1633 +Completed 1408/1633 +Completed 1472/1633 +Completed 1536/1633 +Completed 1600/1633 +Completed 1633/1633 +PROGRESS: Creating a validation set from 5 percent of training data. This may take a while. + You can set ``validation_set=None`` to disable validation tracking. + +Logistic regression: +-------------------------------------------------------- +Number of examples : 1551 +Number of classes : 3 +Number of feature columns : 1 +Number of unpacked features : 2048 +Number of coefficients : 4098 +Starting L-BFGS +-------------------------------------------------------- ++-----------+----------+-----------+--------------+-------------------+---------------------+ +| Iteration | Passes | Step size | Elapsed Time | Training Accuracy | Validation Accuracy | ++-----------+----------+-----------+--------------+-------------------+---------------------+ +| 0 | 6 | 0.018611 | 0.891830 | 0.553836 | 0.560976 | +| 1 | 10 | 0.390832 | 1.622383 | 0.744681 | 0.792683 | +| 2 | 11 | 0.488541 | 1.943987 | 0.733075 | 0.804878 | +| 3 | 14 | 2.442703 | 2.512545 | 0.727917 | 0.841463 | +| 4 | 15 | 2.442703 | 2.826964 | 0.861380 | 0.853659 | +| 9 | 28 | 2.340435 | 5.492035 | 0.941328 | 0.975610 | ++-----------+----------+-----------+--------------+-------------------+---------------------+ +Performing feature extraction on resized images... +Completed 64/395 +Completed 128/395 +Completed 192/395 +Completed 256/395 +Completed 320/395 +Completed 384/395 +Completed 395/395 +0.9316455696202531 +
+ +

We just got an accuracy of 94% on Training Data and 97% on Validation Data!

Tagged with:
\ No newline at end of file diff --git a/posts/index.html b/posts/index.html index c73301f..82fc009 100644 --- a/posts/index.html +++ b/posts/index.html @@ -1 +1 @@ -Posts | Navan Chauhan

Posts

Tips, tricks and tutorials which I think might be useful.

\ No newline at end of file +Posts | Navan Chauhan

Posts

Tips, tricks and tutorials which I think might be useful.

\ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index dc5fc4e..89ea75a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://navanchauhan.github.io/aboutdaily1.02020-01-14https://navanchauhan.github.io/postsdaily1.02020-01-14https://navanchauhan.github.io/posts/2019-12-08-Image-Classifier-Tensorflowmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-08-Splitting-Zipsmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-10-TensorFlow-Model-Predictionmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regressionmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detectormonthly0.52020-01-18https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPymonthly0.52020-01-18https://navanchauhan.github.io/posts/hello-worldmonthly0.52020-01-04https://navanchauhan.github.io/publicationsdaily1.02020-01-14https://navanchauhan.github.io/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Responsemonthly0.52020-01-04https://navanchauhan.github.io/tutorials/indexmonthly0.52020-01-18 \ No newline at end of file +https://navanchauhan.github.io/aboutdaily1.02020-01-14https://navanchauhan.github.io/postsdaily1.02020-01-16https://navanchauhan.github.io/posts/2019-12-08-Image-Classifier-Tensorflowmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-08-Splitting-Zipsmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-10-TensorFlow-Model-Predictionmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regressionmonthly0.52020-01-18https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detectormonthly0.52020-01-18https://navanchauhan.github.io/posts/2020-01-14-Converting-between-PIL-NumPymonthly0.52020-01-18https://navanchauhan.github.io/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colabmonthly0.52020-01-19https://navanchauhan.github.io/posts/2020-01-16-Image-Classifier-Using-Turicreatemonthly0.52020-01-19https://navanchauhan.github.io/posts/hello-worldmonthly0.52020-01-04https://navanchauhan.github.io/publicationsdaily1.02020-01-14https://navanchauhan.github.io/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Responsemonthly0.52020-01-04https://navanchauhan.github.io/tutorials/indexmonthly0.52020-01-18 \ No newline at end of file diff --git a/styles.css b/styles.css index afc641a..5328b36 100644 --- a/styles.css +++ b/styles.css @@ -186,6 +186,8 @@ a { img { max-width: 100%; + margin-bottom: 1em; + margin-top: 1em; width: auto\9; height: auto; vertical-align: middle; @@ -205,7 +207,8 @@ pre { display: block; background-color: #fdf6e3; color: #586e75; - + margin-bottom: 1em; + margin-top: 1em; border-radius: 4px; } diff --git a/tags/colab/index.html b/tags/colab/index.html index 41e6180..e2ed804 100644 --- a/tags/colab/index.html +++ b/tags/colab/index.html @@ -1 +1 @@ -Navan Chauhan

Tagged with colab

Browse all tags
\ No newline at end of file +Navan Chauhan

Tagged with colab

Browse all tags
\ No newline at end of file diff --git a/tags/index.html b/tags/index.html index 230748f..d8b001d 100644 --- a/tags/index.html +++ b/tags/index.html @@ -1 +1 @@ -Navan Chauhan
\ No newline at end of file +Navan Chauhan
\ No newline at end of file diff --git a/tags/kaggle/index.html b/tags/kaggle/index.html new file mode 100644 index 0000000..02a7baa --- /dev/null +++ b/tags/kaggle/index.html @@ -0,0 +1 @@ +Navan Chauhan

Tagged with kaggle

Browse all tags
\ No newline at end of file diff --git a/tags/turicreate/index.html b/tags/turicreate/index.html index b10b7f8..db64873 100644 --- a/tags/turicreate/index.html +++ b/tags/turicreate/index.html @@ -1 +1 @@ -Navan Chauhan

Tagged with turicreate

Browse all tags
\ No newline at end of file +Navan Chauhan

Tagged with turicreate

Browse all tags
\ No newline at end of file diff --git a/tags/tutorial/index.html b/tags/tutorial/index.html index 0e8002d..c2219e5 100644 --- a/tags/tutorial/index.html +++ b/tags/tutorial/index.html @@ -1 +1 @@ -Navan Chauhan

Tagged with tutorial

Browse all tags
\ No newline at end of file +Navan Chauhan

Tagged with tutorial

Browse all tags
\ No newline at end of file -- cgit v1.2.3