SlideShare a Scribd company logo
image classification using cnn
[no math version]
@debarko
Practo
whoami
Debarko De
Practo
Talk : twitter/debarko
Code : github/debarko
Practo : dd@practo.comwhat to expect
Why use CNN and not regular image processing
How to easily build one for your tasks
How you can implement
This is NOT a tutorial for any of the libraries involved
Where to study more?
Agenda
Features
Problem statement & Impact
Trainable Feature Extractors
What is a CNN
Transfer Learning
Libraries
Projects
Fanciness
References
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Problem Statement & Impact
Hand Crafted
Feature Extractor
Simple classifiers
Trainable Feature
Extractor
Trainable
Classifiers
CNN
if x input
then y output
x * W = y’
W is
kernel/filter
y != y’
E = f(Y,Y’)
CNN
Convolution Layer
(Dot Product)
1 0 1
0 1 0
1 0 1
Kernel
Pooling Layer
(Max, Mean, Avg)
Gradient
Descent
Why now?
2006 DeepNet paper [Link]
Computational power
Libraries
Lot of data → Imagenet
GPU Power
Image classification using cnn
Image classification using cnn
Image classification using cnn
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# load pima indians dataset
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# load pima indians dataset
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
# split into input (X) and output (Y) variables
X = dataset[:,0:8]
Y = dataset[:,8]
# create model
model = Sequential()
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Fit the model
model.fit(X, Y, nb_epoch=150, batch_size=10)
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Fit the model
model.fit(X, Y, nb_epoch=150, batch_size=10)
# evaluate the model
scores = model.evaluate(X, Y)
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Fit the model
model.fit(X, Y, nb_epoch=150, batch_size=10)
# evaluate the model
scores = model.evaluate(X, Y)
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
Entire Code
# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# load pima indians dataset
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
# split into input (X) and output (Y) variables
X = dataset[:,0:8]
Y = dataset[:,8]
# create model
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Fit the model
model.fit(X, Y, nb_epoch=150, batch_size=10)
# evaluate the model
scores = model.evaluate(X, Y)
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
VGGNet
Layer 1
Layer 2
Layer 3
Layer 4
Layer 5
Visual Geometry Group
ImageNet
Image classification using cnn
Few projects that you guys can easily work on
Review sentiment analysis on Practo / Zomato / Flipkart
Customer Conversion Analysis based on behavioural data
Inventory Stocking based on Search queries w.r.t location
Auto analysis and tagging of Support calls
Transcribe audio based on audio in phone calls and create tickets automatically
Any data understanding which can be spread out in a visual format or any time
series data
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
Image classification using cnn
References
Basic Upto Speed Slideshow
Basic Lingo Catchup video for CNN
CS231n → Defacto & Best Online Course Work for CNNs
CS231n Assignments → http://cs231n.github.io/
Follow
@karpathy @drfeifei
Book
Fundamentals of Deep Learning: Designing Next-Generation Machine Intelligence Algorithms 1st Edition by Nikhil Buduma
धन्यवा
द
twitter.com/debarko

More Related Content

What's hot (20)

PPTX
Machine Learning - Convolutional Neural Network
Richard Kuo
 
PDF
Deep Learning - Convolutional Neural Networks
Christian Perone
 
PDF
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
PPTX
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
PPTX
CNN Machine learning DeepLearning
Abhishek Sharma
 
PPTX
Deep neural networks
Si Haem
 
PPTX
Object detection with deep learning
Sushant Shrivastava
 
PPTX
Convolutional Neural Network (CNN)
Abdulrazak Zakieh
 
PDF
Faster R-CNN: Towards real-time object detection with region proposal network...
Universitat Politècnica de Catalunya
 
PDF
Convolutional neural network
Itachi SK
 
PDF
CIFAR-10
satyam_madala
 
PPTX
Introduction to Deep learning
leopauly
 
PPTX
Convolutional Neural Network
Vignesh Suresh
 
PPTX
AlexNet
Bertil Hatt
 
PDF
Real-time object detection coz YOLO!
J On The Beach
 
PPTX
Introduction to CNN
Shuai Zhang
 
PDF
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
PPTX
Multiple object detection
SAURABH KUMAR
 
PPTX
Introduction to pandas
Piyush rai
 
PPTX
NumPy
AbhijeetAnand88
 
Machine Learning - Convolutional Neural Network
Richard Kuo
 
Deep Learning - Convolutional Neural Networks
Christian Perone
 
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
CNN Machine learning DeepLearning
Abhishek Sharma
 
Deep neural networks
Si Haem
 
Object detection with deep learning
Sushant Shrivastava
 
Convolutional Neural Network (CNN)
Abdulrazak Zakieh
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Universitat Politècnica de Catalunya
 
Convolutional neural network
Itachi SK
 
CIFAR-10
satyam_madala
 
Introduction to Deep learning
leopauly
 
Convolutional Neural Network
Vignesh Suresh
 
AlexNet
Bertil Hatt
 
Real-time object detection coz YOLO!
J On The Beach
 
Introduction to CNN
Shuai Zhang
 
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
Multiple object detection
SAURABH KUMAR
 
Introduction to pandas
Piyush rai
 

Similar to Image classification using cnn (20)

DOCX
LSTM Framework For Univariate Time series
bilyamine1
 
PDF
Viktor Tsykunov: Azure Machine Learning Service
Lviv Startup Club
 
PDF
Need an detailed analysis of what this code-model is doing- Thanks #St.pdf
actexerode
 
PDF
Power ai tensorflowworkloadtutorial-20171117
Ganesan Narayanasamy
 
PPTX
Learning Predictive Modeling with TSA and Kaggle
Yvonne K. Matos
 
PDF
Can someone please explain what the code below is doing and comment on.pdf
kuldeepkumarapgsi
 
PPTX
Introduzione Deep Learning & TensorFlow
MeetupDataScienceRoma
 
PDF
What is in that image
Debarko De
 
PPTX
Training course lect2
Noor Dhiya
 
PDF
Gradient Descent Code Implementation.pdf
MubashirHussain792093
 
PPTX
Unsupervised Aspect Based Sentiment Analysis at Scale
Aaron (Ari) Bornstein
 
PDF
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
PPTX
Diving into Deep Learning (Silicon Valley Code Camp 2017)
Oswald Campesato
 
PPTX
Android and Deep Learning
Oswald Campesato
 
PDF
Need helping adding to the code below to plot the images from the firs.pdf
actexerode
 
PPTX
29-kashyap-mask-detaction.pptx
KASHYAPPATHAK7
 
PDF
maXbox starter65 machinelearning3
Max Kleiner
 
PDF
Assignment 6.1.pdf
dash41
 
PDF
Competition 1 (blog 1)
TarunPaparaju
 
PDF
Introduction to deep learning using python
Lino Coria
 
LSTM Framework For Univariate Time series
bilyamine1
 
Viktor Tsykunov: Azure Machine Learning Service
Lviv Startup Club
 
Need an detailed analysis of what this code-model is doing- Thanks #St.pdf
actexerode
 
Power ai tensorflowworkloadtutorial-20171117
Ganesan Narayanasamy
 
Learning Predictive Modeling with TSA and Kaggle
Yvonne K. Matos
 
Can someone please explain what the code below is doing and comment on.pdf
kuldeepkumarapgsi
 
Introduzione Deep Learning & TensorFlow
MeetupDataScienceRoma
 
What is in that image
Debarko De
 
Training course lect2
Noor Dhiya
 
Gradient Descent Code Implementation.pdf
MubashirHussain792093
 
Unsupervised Aspect Based Sentiment Analysis at Scale
Aaron (Ari) Bornstein
 
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
Diving into Deep Learning (Silicon Valley Code Camp 2017)
Oswald Campesato
 
Android and Deep Learning
Oswald Campesato
 
Need helping adding to the code below to plot the images from the firs.pdf
actexerode
 
29-kashyap-mask-detaction.pptx
KASHYAPPATHAK7
 
maXbox starter65 machinelearning3
Max Kleiner
 
Assignment 6.1.pdf
dash41
 
Competition 1 (blog 1)
TarunPaparaju
 
Introduction to deep learning using python
Lino Coria
 
Ad

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Ad

Image classification using cnn

  • 1. image classification using cnn [no math version] @debarko Practo
  • 2. whoami Debarko De Practo Talk : twitter/debarko Code : github/debarko Practo : [email protected] to expect Why use CNN and not regular image processing How to easily build one for your tasks How you can implement This is NOT a tutorial for any of the libraries involved Where to study more?
  • 3. Agenda Features Problem statement & Impact Trainable Feature Extractors What is a CNN Transfer Learning Libraries Projects Fanciness References
  • 12. Hand Crafted Feature Extractor Simple classifiers Trainable Feature Extractor Trainable Classifiers
  • 13. CNN
  • 14. if x input then y output
  • 15. x * W = y’
  • 19. CNN
  • 20. Convolution Layer (Dot Product) 1 0 1 0 1 0 1 0 1 Kernel
  • 23. Why now? 2006 DeepNet paper [Link] Computational power Libraries Lot of data → Imagenet GPU Power
  • 27. # Create first network with Keras from keras.models import Sequential from keras.layers import Dense import numpy
  • 28. # Create first network with Keras from keras.models import Sequential from keras.layers import Dense import numpy # fix random seed for reproducibility seed = 7 numpy.random.seed(seed)
  • 29. # Create first network with Keras from keras.models import Sequential from keras.layers import Dense import numpy # fix random seed for reproducibility seed = 7 numpy.random.seed(seed) # load pima indians dataset dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
  • 30. # Create first network with Keras from keras.models import Sequential from keras.layers import Dense import numpy # fix random seed for reproducibility seed = 7 numpy.random.seed(seed) # load pima indians dataset dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") # split into input (X) and output (Y) variables X = dataset[:,0:8] Y = dataset[:,8]
  • 31. # create model model = Sequential()
  • 32. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
  • 33. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu'))
  • 34. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid'))
  • 35. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid')) # Compile model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  • 36. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid')) # Compile model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) # Fit the model model.fit(X, Y, nb_epoch=150, batch_size=10)
  • 37. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid')) # Compile model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) # Fit the model model.fit(X, Y, nb_epoch=150, batch_size=10) # evaluate the model scores = model.evaluate(X, Y)
  • 38. # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid')) # Compile model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) # Fit the model model.fit(X, Y, nb_epoch=150, batch_size=10) # evaluate the model scores = model.evaluate(X, Y) print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
  • 40. # Create first network with Keras from keras.models import Sequential from keras.layers import Dense import numpy # fix random seed for reproducibility seed = 7 numpy.random.seed(seed) # load pima indians dataset dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") # split into input (X) and output (Y) variables X = dataset[:,0:8] Y = dataset[:,8] # create model model = Sequential() model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) model.add(Dense(8, init='uniform', activation='relu')) model.add(Dense(1, init='uniform', activation='sigmoid')) # Compile model model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) # Fit the model model.fit(X, Y, nb_epoch=150, batch_size=10) # evaluate the model scores = model.evaluate(X, Y) print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
  • 42. Layer 1 Layer 2 Layer 3 Layer 4 Layer 5 Visual Geometry Group ImageNet
  • 44. Few projects that you guys can easily work on Review sentiment analysis on Practo / Zomato / Flipkart Customer Conversion Analysis based on behavioural data Inventory Stocking based on Search queries w.r.t location Auto analysis and tagging of Support calls Transcribe audio based on audio in phone calls and create tickets automatically Any data understanding which can be spread out in a visual format or any time series data
  • 51. References Basic Upto Speed Slideshow Basic Lingo Catchup video for CNN CS231n → Defacto & Best Online Course Work for CNNs CS231n Assignments → http://cs231n.github.io/ Follow @karpathy @drfeifei Book Fundamentals of Deep Learning: Designing Next-Generation Machine Intelligence Algorithms 1st Edition by Nikhil Buduma

Editor's Notes

  • #27: Keras + tensorflow
  • #28: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #29: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #30: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #31: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #32: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #33: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #34: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #35: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #36: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #37: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #38: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #39: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #40: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #41: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/
  • #42: http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/