SlideShare a Scribd company logo
1 of 50
Download to read offline
ahmed.fawzy@ci.menofia.edu.eg
‫المنوفية‬ ‫جامعة‬
‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬
‫المعلومات‬ ‫تكنولوجيا‬
‫بالحاسب‬ ‫الرؤية‬‫المنوفية‬ ‫جامعة‬
September 2018
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad2
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad3
• Computer vision aims to enable the computer to see the world
same as or better than humans. Computer should analyze the
images to identify objects and recognize them to understand the
image.
• To do this, computer needs to store and process images.
CAT
9/21/2018Ahmed F. Gad4
• Preprocessing Noise
Filter
9/21/2018Ahmed F. Gad5
• Preprocessing
• Feature Extraction
819,840 Values
640x427x3
Size in Bytes
819,840
8 bits
Size in KBytes
819,840/1,024=
800.625 KByte
KByte
Size in MBytes
800.625/1,024=
0.782 MByte
MByte
9/21/2018Ahmed F. Gad6
• Preprocessing
• Feature Extraction
Dataset: 2,000 Images
Dataset Size
0.782x2,000 = 1,564 MByte
1,564/1,024=
1.527 GByte
GByte
9/21/2018Ahmed F. Gad7
• Preprocessing
• Feature Extraction
Dataset: 50,000 38.18 GByteSize
Intensive in its Memory and
Processing Requirements
Reduce Amounts of Data
How to Represent Image
using Less Amount of Data?
Feature
Extraction
9/21/2018Ahmed F. Gad8
• Preprocessing
• Feature Extraction
Summarizes Images
For example, use 2,000 values rather than 819,840
Element 0 Element 0 … Element 1,999
Histogram of Oriented Gradients
(HOG)
Scale-Invariant Feature Transform
(SIFT)
Examples
Advantage of using Features rather Image Pixels
Values is that Features are Robust to Variations
such as illumination, scale, and rotation.
9/21/2018Ahmed F. Gad9
• Preprocessing
• Feature Extraction
• Application (e.g. Classification)
9/21/2018Ahmed F. Gad10
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad11
List
TupleData
Structures
Which one is suitable for
storing images?
Let`s See.
Dict
Set
9/21/2018Ahmed F. Gad12
• Image is MD. Which one supports MD storage?
• Which one supports updating its elements?
Both
List
Tuples are immutable.
9/21/2018 Ahmed F. Gad13
• So, lets start storing an
image into a Python list.
The following code reads
an image in the img_list
variable.
• Let`s use the PIL (Python Image Library) for reading an image in a list.
9/21/2018Ahmed F. Gad14
9/21/2018Ahmed F. Gad15
Original Result
Core i7 Machine
9/21/2018Ahmed F. Gad16
• Why not applying arithmetic operations rather than looping?
img_list = img_list + 50
9/21/2018Ahmed F. Gad17
• List makes doing operations over the images more complex and also
time consuming because they require pixel by pixel processing.
• The best way for storing images is using arrays.
• Rather than being time efficient in processing images, arrays has
many other advantages. Can you imagine what?
9/21/2018Ahmed F. Gad18
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad19
• Lists are already available in Python. To use Python arrays,
additional libraries must be installed.
• The library supporting arrays in Python is called Numerical Python
(NumPy).
• NumPy can be installed using Python command-line.
• It is also available in all-in-one packages such as Anaconda.
9/21/2018Ahmed F. Gad20
• Based on your environment, you can install new modules.
• For traditional Python distributions, use the PIP installer.
pip install numpy
• For Anaconda, use the conda installed
conda install numpy
• It is by default available in Anaconda.
9/21/2018Ahmed F. Gad21
• After installing NumPy, we can import it in our programs and scripts.
9/21/2018Ahmed F. Gad22
9/21/2018Ahmed F. Gad23
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad24
9/21/2018
Ahmed F. Gad
25
• The problem is expecting uint8 data type but another data type was
used.
• To know what is the array data type, use the dtype array property.
How to make the conversion to uint8?
9/21/2018Ahmed F. Gad26
• When creating the array, set the dtype argument of numpy.array to
the desired data type.
• dtype argument can be set to multiple types.
9/21/2018Ahmed F. Gad27
9/21/2018Ahmed F. Gad28
• After array being created, use the astype method of numpy.ndarray.
• It make a new copy of the array after being casted to the specified
type in the dtype argument.
9/21/2018Ahmed F. Gad29
• Arithemetic Operations
• Operations between arrays
9/21/2018Ahmed F. Gad30
• Array Creation
• arange
• linspace
arange vs. linspace 9/21/2018Ahmed F. Gad31
• Indexing can be forward or backward.
• Forward indexing: from start to end.
• Backward indexing: from end to start.
• General form of indexing:
my_array[start:stop:step]
• In backward indexing, the index of the last element is -1.
Start End
0 2
End Start
-3 -1
Forward Backward9/21/2018Ahmed F. Gad32
• Forward: my_array[start=0:stop=6:step=2]
• Backward: my_array[start=-1:stop=-6:step=-2]
• Get all elements starting from index 3
9/21/2018Ahmed F. Gad33
• For MD arrays, indexing can be applied for each individual
dimension. Intersection between the different dimensions will be
returned.
• Forward: my_array[start=0:stop=3:step=2, start=1:stop=4:step=1]
• Forward: my_array[start=-1:stop=-3:step=-1, start=0:stop=3:step=1]
9/21/2018Ahmed F. Gad34
For
While
9/21/2018Ahmed F. Gad35
9/21/2018
Ahmed F. Gad36
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad37
• The main use of NumPy is to support numerical
arrays in Python. According to the official
documentation, NumPy supports nothing but the
array data type and most basic operations:
indexing, sorting, reshaping, basic element-wise
functions, etc.
• SciPy supports everything in NumPy and also adds
new features not existing in NumPy. We can
imagine that NumPy is a subset of SciPy.
• Let`s explore what is in SciPy.
SciPy
NumPy
9/21/2018Ahmed F. Gad38
• SciPy has a collection of algorithms and functions based on NumPy.
User can use high-level commands to perform complex operations.
• SciPy is organized into a number of sub-packages.
9/21/2018Ahmed F. Gad39
• SciPy provides modules for working with images from reading,
processing, and saving an image.
• This example applies Sobel edge detector to an image using SciPy.
9/21/2018Ahmed F. Gad
40
• In addition to Scipy, there are other Python libraries for working
with images.
• Examples:
• Python Image Library (PIL)
• OpenCV
• scikit-image
9/21/2018Ahmed F. Gad41
• Apply erosion morphology operation using skimage.morphology
sub-module.
Binary Result
9/21/2018Ahmed F. Gad
42
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad43
• After extracting features, next is to train a machine learning (ML)
model for building applications such as classification.
• One of the most popular Python library for building and training ML
algorithms is scikit-learn.
• We will discuss an example in which the random forest ensemble
technique is trained based on the Sonar Dataset for classifying an
object as either a mine or a rock. It is available at this page
(https://archive.ics.uci.edu/ml/machine-learning-
databases/undocumented/connectionist-bench/sonar/sonar.all-
data).
• The dataset has 208 samples and each sample has 60 numerical
inputs and a single output. The target is M when the object is mine
and R for rocks.
• In our example, half of the samples within each class are used for
training and the other half for testing. In other words, 104 samples
for training and another 104 samples for testing.
9/21/2018Ahmed F. Gad44
9/21/2018Ahmed F. Gad45
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad46
• Sometimes the problem is complex and needs deep
learning. Some of the libraries used for building deep
learning models include:
• TensorFlow
• Keras
• Theano
• PyTorch
9/21/2018Ahmed F. Gad47
• Overview about Computer Vision
• Traditional Data Storage in Python
• NumPy Arrays
• Matplotlib
• SciPy
• scikit-learn
• Other Libraries
• Further Reading
9/21/2018Ahmed F. Gad48
• Books
• Ahmed F. Gad 'Practical Computer Vision
Applications Using Deep Learning with CNNs'.
Apress, 2019, 978-1-4842-4167-7.
https://amazon.com/Practical-Computer-Vision-
Applications-Learning/dp/1484241665
• Ahmed F. Gad "TensorFlow: A Guide To Build
Artificial Neural Networks Using Python". LAP
LAMBERT Academic Publishing, 2017, 978-620-2-
07312-7. https://www.amazon.com/TensorFlow-
Artificial-Networks-artificial-
explanation/dp/6202073128
• Tutorials
• https://www.kdnuggets.com/author/ahmed-gad
• http://youtube.com/AhmedGadFCIT
• http://slideshare.com/AhmedGadFCIT
• https://linkedin.com/in/AhmedFGad
9/21/2018
Ahmed F. Gad
49
• SciPy
• https://docs.scipy.org/doc/scipy/reference
• NumPy
• https://docs.scipy.org/doc/numpy/reference
• Matplotlib
• https://matplotlib.org/contents.html
• Anaconda
• https://www.anaconda.com
• scikit-image
• http://scikit-image.org
• scikit-learn
• http://scikit-learn.org
• TensorFlow
• https://tensorflow.org
• Keras
• https://keras.io
• Theano
• http://deeplearning.net/software/theano
• PyTorch
• https://pytorch.org
9/21/2018Ahmed F. Gad50

More Related Content

What's hot

Computer Vision with Deep Learning
Computer Vision with Deep LearningComputer Vision with Deep Learning
Computer Vision with Deep LearningCapgemini
 
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)Journal For Research
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using pythonJerlyn Manohar
 
Data mining seminar report
Data mining seminar reportData mining seminar report
Data mining seminar reportmayurik19
 
Brain tumor detection using image segmentation ppt
Brain tumor detection using image segmentation pptBrain tumor detection using image segmentation ppt
Brain tumor detection using image segmentation pptRoshini Vijayakumar
 
Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Ulaş Bağcı
 
GANs and Applications
GANs and ApplicationsGANs and Applications
GANs and ApplicationsHoang Nguyen
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classificationWael Badawy
 
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BARThyunyoung Lee
 
Diabetic Retinopathy.pptx
Diabetic Retinopathy.pptxDiabetic Retinopathy.pptx
Diabetic Retinopathy.pptxNGOKUL3
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Rajesh Kamboj
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnnRahat Yasir
 
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen..."Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...Edge AI and Vision Alliance
 
Medical image analysis
Medical image analysisMedical image analysis
Medical image analysisGichelle Amon
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsasodariyabhavesh
 
Face recognization using artificial nerual network
Face recognization using artificial nerual networkFace recognization using artificial nerual network
Face recognization using artificial nerual networkDharmesh Tank
 

What's hot (20)

Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)
 
Computer Vision with Deep Learning
Computer Vision with Deep LearningComputer Vision with Deep Learning
Computer Vision with Deep Learning
 
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)
LEAF DISEASE DETECTION USING IMAGE PROCESSING AND SUPPORT VECTOR MACHINE (SVM)
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using python
 
Data mining seminar report
Data mining seminar reportData mining seminar report
Data mining seminar report
 
Brain tumor detection using image segmentation ppt
Brain tumor detection using image segmentation pptBrain tumor detection using image segmentation ppt
Brain tumor detection using image segmentation ppt
 
Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction Lec1: Medical Image Computing - Introduction
Lec1: Medical Image Computing - Introduction
 
GANs and Applications
GANs and ApplicationsGANs and Applications
GANs and Applications
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classification
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART
(Presentation)NLP Pretraining models based on deeplearning -BERT, GPT, and BART
 
Diabetic Retinopathy.pptx
Diabetic Retinopathy.pptxDiabetic Retinopathy.pptx
Diabetic Retinopathy.pptx
 
Object detection
Object detectionObject detection
Object detection
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)
 
Object detection
Object detectionObject detection
Object detection
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
 
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen..."Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...
"Using Deep Learning for Video Event Detection on a Compute Budget," a Presen...
 
Medical image analysis
Medical image analysisMedical image analysis
Medical image analysis
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
Face recognization using artificial nerual network
Face recognization using artificial nerual networkFace recognization using artificial nerual network
Face recognization using artificial nerual network
 

Similar to Python for Computer Vision - Revision 2nd Edition

How GPU Computing literally saved me at work!
How GPU Computing literally saved me at work!How GPU Computing literally saved me at work!
How GPU Computing literally saved me at work!Abhishek Mungoli
 
Processing malaria HTS results using KNIME: a tutorial
Processing malaria HTS results using KNIME: a tutorialProcessing malaria HTS results using KNIME: a tutorial
Processing malaria HTS results using KNIME: a tutorialGreg Landrum
 
Let’s talk about reproducible data analysis
Let’s talk about reproducible data analysisLet’s talk about reproducible data analysis
Let’s talk about reproducible data analysisGreg Landrum
 
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...Alok Singh
 
Lessons learned processing 70 billion data points a day using the hybrid cloud
Lessons learned processing 70 billion data points a day using the hybrid cloudLessons learned processing 70 billion data points a day using the hybrid cloud
Lessons learned processing 70 billion data points a day using the hybrid cloudDataWorks Summit
 
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...Databricks
 
Dataframes Showdown (miniConf 2022)
Dataframes Showdown (miniConf 2022)Dataframes Showdown (miniConf 2022)
Dataframes Showdown (miniConf 2022)8thLight
 
Graph Databases and Machine Learning | November 2018
Graph Databases and Machine Learning | November 2018Graph Databases and Machine Learning | November 2018
Graph Databases and Machine Learning | November 2018TigerGraph
 
Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)Anand Sampat
 
Master the RETE algorithm
Master the RETE algorithmMaster the RETE algorithm
Master the RETE algorithmMasahiko Umeno
 
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...NETWAYS
 
Predicting Flight Delays with Spark Machine Learning
Predicting Flight Delays with Spark Machine LearningPredicting Flight Delays with Spark Machine Learning
Predicting Flight Delays with Spark Machine LearningCarol McDonald
 

Similar to Python for Computer Vision - Revision 2nd Edition (20)

How GPU Computing literally saved me at work!
How GPU Computing literally saved me at work!How GPU Computing literally saved me at work!
How GPU Computing literally saved me at work!
 
Session 2
Session 2Session 2
Session 2
 
Processing malaria HTS results using KNIME: a tutorial
Processing malaria HTS results using KNIME: a tutorialProcessing malaria HTS results using KNIME: a tutorial
Processing malaria HTS results using KNIME: a tutorial
 
Let’s talk about reproducible data analysis
Let’s talk about reproducible data analysisLet’s talk about reproducible data analysis
Let’s talk about reproducible data analysis
 
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
 
Lessons learned processing 70 billion data points a day using the hybrid cloud
Lessons learned processing 70 billion data points a day using the hybrid cloudLessons learned processing 70 billion data points a day using the hybrid cloud
Lessons learned processing 70 billion data points a day using the hybrid cloud
 
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
 
Py tables
Py tablesPy tables
Py tables
 
PyTables
PyTablesPyTables
PyTables
 
Large Data Analyze With PyTables
Large Data Analyze With PyTablesLarge Data Analyze With PyTables
Large Data Analyze With PyTables
 
Dataframes Showdown (miniConf 2022)
Dataframes Showdown (miniConf 2022)Dataframes Showdown (miniConf 2022)
Dataframes Showdown (miniConf 2022)
 
PyTables
PyTablesPyTables
PyTables
 
CFD on Power
CFD on Power CFD on Power
CFD on Power
 
Sci computing using python
Sci computing using pythonSci computing using python
Sci computing using python
 
Graph Databases and Machine Learning | November 2018
Graph Databases and Machine Learning | November 2018Graph Databases and Machine Learning | November 2018
Graph Databases and Machine Learning | November 2018
 
Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)
 
Master the RETE algorithm
Master the RETE algorithmMaster the RETE algorithm
Master the RETE algorithm
 
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...
OSDC 2018 | Apache Ignite - the in-memory hammer for your data science toolki...
 
Predicting Flight Delays with Spark Machine Learning
Predicting Flight Delays with Spark Machine LearningPredicting Flight Delays with Spark Machine Learning
Predicting Flight Delays with Spark Machine Learning
 
Python ml
Python mlPython ml
Python ml
 

More from Ahmed Gad

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmAhmed Gad
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...Ahmed Gad
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Ahmed Gad
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesAhmed Gad
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Ahmed Gad
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Ahmed Gad
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Ahmed Gad
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with RegularizationAhmed Gad
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleAhmed Gad
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisAhmed Gad
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepAhmed Gad
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientAhmed Gad
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - RevisionAhmed Gad
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAhmed Gad
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsAhmed Gad
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleAhmed Gad
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingAhmed Gad
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...Ahmed Gad
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Ahmed Gad
 
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...Ahmed Gad
 

More from Ahmed Gad (20)

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic Algorithm
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with Regularization
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step Example
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and Gradient
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - Revision
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNs
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by Example
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...
 
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
 

Recently uploaded

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 

Recently uploaded (20)

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 

Python for Computer Vision - Revision 2nd Edition

  • 1. ahmed.fawzy@ci.menofia.edu.eg ‫المنوفية‬ ‫جامعة‬ ‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬ ‫المعلومات‬ ‫تكنولوجيا‬ ‫بالحاسب‬ ‫الرؤية‬‫المنوفية‬ ‫جامعة‬ September 2018
  • 2. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad2
  • 3. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad3
  • 4. • Computer vision aims to enable the computer to see the world same as or better than humans. Computer should analyze the images to identify objects and recognize them to understand the image. • To do this, computer needs to store and process images. CAT 9/21/2018Ahmed F. Gad4
  • 6. • Preprocessing • Feature Extraction 819,840 Values 640x427x3 Size in Bytes 819,840 8 bits Size in KBytes 819,840/1,024= 800.625 KByte KByte Size in MBytes 800.625/1,024= 0.782 MByte MByte 9/21/2018Ahmed F. Gad6
  • 7. • Preprocessing • Feature Extraction Dataset: 2,000 Images Dataset Size 0.782x2,000 = 1,564 MByte 1,564/1,024= 1.527 GByte GByte 9/21/2018Ahmed F. Gad7
  • 8. • Preprocessing • Feature Extraction Dataset: 50,000 38.18 GByteSize Intensive in its Memory and Processing Requirements Reduce Amounts of Data How to Represent Image using Less Amount of Data? Feature Extraction 9/21/2018Ahmed F. Gad8
  • 9. • Preprocessing • Feature Extraction Summarizes Images For example, use 2,000 values rather than 819,840 Element 0 Element 0 … Element 1,999 Histogram of Oriented Gradients (HOG) Scale-Invariant Feature Transform (SIFT) Examples Advantage of using Features rather Image Pixels Values is that Features are Robust to Variations such as illumination, scale, and rotation. 9/21/2018Ahmed F. Gad9
  • 10. • Preprocessing • Feature Extraction • Application (e.g. Classification) 9/21/2018Ahmed F. Gad10
  • 11. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad11
  • 12. List TupleData Structures Which one is suitable for storing images? Let`s See. Dict Set 9/21/2018Ahmed F. Gad12
  • 13. • Image is MD. Which one supports MD storage? • Which one supports updating its elements? Both List Tuples are immutable. 9/21/2018 Ahmed F. Gad13
  • 14. • So, lets start storing an image into a Python list. The following code reads an image in the img_list variable. • Let`s use the PIL (Python Image Library) for reading an image in a list. 9/21/2018Ahmed F. Gad14
  • 17. • Why not applying arithmetic operations rather than looping? img_list = img_list + 50 9/21/2018Ahmed F. Gad17
  • 18. • List makes doing operations over the images more complex and also time consuming because they require pixel by pixel processing. • The best way for storing images is using arrays. • Rather than being time efficient in processing images, arrays has many other advantages. Can you imagine what? 9/21/2018Ahmed F. Gad18
  • 19. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad19
  • 20. • Lists are already available in Python. To use Python arrays, additional libraries must be installed. • The library supporting arrays in Python is called Numerical Python (NumPy). • NumPy can be installed using Python command-line. • It is also available in all-in-one packages such as Anaconda. 9/21/2018Ahmed F. Gad20
  • 21. • Based on your environment, you can install new modules. • For traditional Python distributions, use the PIP installer. pip install numpy • For Anaconda, use the conda installed conda install numpy • It is by default available in Anaconda. 9/21/2018Ahmed F. Gad21
  • 22. • After installing NumPy, we can import it in our programs and scripts. 9/21/2018Ahmed F. Gad22
  • 24. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad24
  • 26. • The problem is expecting uint8 data type but another data type was used. • To know what is the array data type, use the dtype array property. How to make the conversion to uint8? 9/21/2018Ahmed F. Gad26
  • 27. • When creating the array, set the dtype argument of numpy.array to the desired data type. • dtype argument can be set to multiple types. 9/21/2018Ahmed F. Gad27
  • 29. • After array being created, use the astype method of numpy.ndarray. • It make a new copy of the array after being casted to the specified type in the dtype argument. 9/21/2018Ahmed F. Gad29
  • 30. • Arithemetic Operations • Operations between arrays 9/21/2018Ahmed F. Gad30
  • 31. • Array Creation • arange • linspace arange vs. linspace 9/21/2018Ahmed F. Gad31
  • 32. • Indexing can be forward or backward. • Forward indexing: from start to end. • Backward indexing: from end to start. • General form of indexing: my_array[start:stop:step] • In backward indexing, the index of the last element is -1. Start End 0 2 End Start -3 -1 Forward Backward9/21/2018Ahmed F. Gad32
  • 33. • Forward: my_array[start=0:stop=6:step=2] • Backward: my_array[start=-1:stop=-6:step=-2] • Get all elements starting from index 3 9/21/2018Ahmed F. Gad33
  • 34. • For MD arrays, indexing can be applied for each individual dimension. Intersection between the different dimensions will be returned. • Forward: my_array[start=0:stop=3:step=2, start=1:stop=4:step=1] • Forward: my_array[start=-1:stop=-3:step=-1, start=0:stop=3:step=1] 9/21/2018Ahmed F. Gad34
  • 37. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad37
  • 38. • The main use of NumPy is to support numerical arrays in Python. According to the official documentation, NumPy supports nothing but the array data type and most basic operations: indexing, sorting, reshaping, basic element-wise functions, etc. • SciPy supports everything in NumPy and also adds new features not existing in NumPy. We can imagine that NumPy is a subset of SciPy. • Let`s explore what is in SciPy. SciPy NumPy 9/21/2018Ahmed F. Gad38
  • 39. • SciPy has a collection of algorithms and functions based on NumPy. User can use high-level commands to perform complex operations. • SciPy is organized into a number of sub-packages. 9/21/2018Ahmed F. Gad39
  • 40. • SciPy provides modules for working with images from reading, processing, and saving an image. • This example applies Sobel edge detector to an image using SciPy. 9/21/2018Ahmed F. Gad 40
  • 41. • In addition to Scipy, there are other Python libraries for working with images. • Examples: • Python Image Library (PIL) • OpenCV • scikit-image 9/21/2018Ahmed F. Gad41
  • 42. • Apply erosion morphology operation using skimage.morphology sub-module. Binary Result 9/21/2018Ahmed F. Gad 42
  • 43. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad43
  • 44. • After extracting features, next is to train a machine learning (ML) model for building applications such as classification. • One of the most popular Python library for building and training ML algorithms is scikit-learn. • We will discuss an example in which the random forest ensemble technique is trained based on the Sonar Dataset for classifying an object as either a mine or a rock. It is available at this page (https://archive.ics.uci.edu/ml/machine-learning- databases/undocumented/connectionist-bench/sonar/sonar.all- data). • The dataset has 208 samples and each sample has 60 numerical inputs and a single output. The target is M when the object is mine and R for rocks. • In our example, half of the samples within each class are used for training and the other half for testing. In other words, 104 samples for training and another 104 samples for testing. 9/21/2018Ahmed F. Gad44
  • 46. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad46
  • 47. • Sometimes the problem is complex and needs deep learning. Some of the libraries used for building deep learning models include: • TensorFlow • Keras • Theano • PyTorch 9/21/2018Ahmed F. Gad47
  • 48. • Overview about Computer Vision • Traditional Data Storage in Python • NumPy Arrays • Matplotlib • SciPy • scikit-learn • Other Libraries • Further Reading 9/21/2018Ahmed F. Gad48
  • 49. • Books • Ahmed F. Gad 'Practical Computer Vision Applications Using Deep Learning with CNNs'. Apress, 2019, 978-1-4842-4167-7. https://amazon.com/Practical-Computer-Vision- Applications-Learning/dp/1484241665 • Ahmed F. Gad "TensorFlow: A Guide To Build Artificial Neural Networks Using Python". LAP LAMBERT Academic Publishing, 2017, 978-620-2- 07312-7. https://www.amazon.com/TensorFlow- Artificial-Networks-artificial- explanation/dp/6202073128 • Tutorials • https://www.kdnuggets.com/author/ahmed-gad • http://youtube.com/AhmedGadFCIT • http://slideshare.com/AhmedGadFCIT • https://linkedin.com/in/AhmedFGad 9/21/2018 Ahmed F. Gad 49
  • 50. • SciPy • https://docs.scipy.org/doc/scipy/reference • NumPy • https://docs.scipy.org/doc/numpy/reference • Matplotlib • https://matplotlib.org/contents.html • Anaconda • https://www.anaconda.com • scikit-image • http://scikit-image.org • scikit-learn • http://scikit-learn.org • TensorFlow • https://tensorflow.org • Keras • https://keras.io • Theano • http://deeplearning.net/software/theano • PyTorch • https://pytorch.org 9/21/2018Ahmed F. Gad50