SlideShare a Scribd company logo
1 of 18
Surveys of Image
Recognition Algorithms
Local Binary Pattern with Sci-kit
 Local Binary Patterns, or LBPs for short, are a texture descriptor made popular by
the work of Ojala.
 If the current pixel value is greater or equal to the neighboring pixel value, the
corresponding bit in the binary array is set to 1 else if the current pixel value is less
than the neighboring pixel value, the corresponding bit in the binary array is set to
0.
LBP Descriptor
Working on Images
Example 1
Example 2
Working Steps
1. Load the color image.
2. Convert to grayscale image.
3. Calculate the LBP mask.
4. Calculate the LBP Histogram and normalize it.
Where it is used?
Haar Classifier + OpenCV
 Object Detection using Haar feature-based cascade classifiers is an effective
object detection method proposed by Paul Viola and Michael Jones in their paper,
"Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001.
 Initially, the algorithm needs a lot of positive images (images of faces) and
negative images (images without faces) to train the classifier. Then we need to
extract features from it.
Methods
 Three tools to use – “createsamples”, “haartraining” and “performance”
 CreateSamples
 Tool from OpenCV to automate creation of training samples
Four functionalities
1. create training samples from one image applying distortions.
2. create training samples from a collection of images, without distortions.
3. create testing samples with ground truth from one image applying distortions.
4. show images from the .vec internal format which contains a collection of samples.
 Best to use a combination of the functionalities to create many samples from
many images with distortions and merge them.
Images
 Positive Images:
 Negative Images
 Sample Images
Query and Parameters
 For positive image creation:
perl bin/createsamples.pl positives.txt negatives.txt samples 1500 "opencv_createsamples
-bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80
-h 40 ”
 To start the testing:
opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20
–minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 600 -w 80 -h 40
mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
 The software that performs the viola-jones algorithm and creates the cascade file
Sample run:
opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt
-numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000
-numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024
 “data” is the directory in which to store the output
 “vec” is the .vec file containing the positive images
 “bg” is a text file with a collection of paths to background (negative) images
 “nstages” is the number of stages of boosting
 “minhitrate” and “maxfalsealarm” are cutoff values for hit rate and false alarm, per stage
 “npos” and “nneg” are the number of positive and negative images to be used from the given sets
 “w” and “h” are the width and the height of the sample
 “precalcValBufSize” buffer size to store the feature values
Advantages & Disadvantages
 Advantages:
1. Easy to implement once classifier is ready.
 Disadvantages:
1. Does not detect for all the images.
2. Training the classifier takes time.
3. Needs a lot of training data.
Tensorflow
 Tensorflow is Google's open source deep learning library.
 We will load the Inception-v3 model to generate descriptive labels for an image.
 The Inception model is a deep convolutional neural network and was trained on
the ImageNet dataset, where the task was to classify images into 1000 classes.
Build Training
 Place the directory with all the images in respective folder.
 Give path of the directory while starting the training.
 bazel build tensorflow/examples/image_retraining:retrain
bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/fruits
Advantages & Disadvantages
 ADVANTAGES
1. Pre-trained classifier can be used.
2. Training on our classes doesn't take much time.
3. Has a good accuracy rate.
4. Can be trained with any variations of the image.
 DISADVANTAGES
1. Image detection may go wrong with Inception.
2. Single class cannot be trained.
THANK YOU

More Related Content

What's hot

Object extraction from satellite imagery using deep learning
Object extraction from satellite imagery using deep learningObject extraction from satellite imagery using deep learning
Object extraction from satellite imagery using deep learningAly Abdelkareem
 
Henrik Christensen - Vision for co-robot applications
Henrik Christensen  -  Vision for co-robot applicationsHenrik Christensen  -  Vision for co-robot applications
Henrik Christensen - Vision for co-robot applicationsDaniel Huber
 
Metric based meta_learning
Metric based meta_learningMetric based meta_learning
Metric based meta_learningSEMINARGROOT
 
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and Architectures
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and ArchitecturesMetaPerturb: Transferable Regularizer for Heterogeneous Tasks and Architectures
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and ArchitecturesMLAI2
 
Human uncertainty makes classification more robust, ICCV 2019 Review
Human uncertainty makes classification more robust, ICCV 2019 ReviewHuman uncertainty makes classification more robust, ICCV 2019 Review
Human uncertainty makes classification more robust, ICCV 2019 ReviewLEE HOSEONG
 
Bring your neural networks to the browser with TF.js - Simone Scardapane
Bring your neural networks to the browser with TF.js - Simone ScardapaneBring your neural networks to the browser with TF.js - Simone Scardapane
Bring your neural networks to the browser with TF.js - Simone ScardapaneMeetupDataScienceRoma
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowDebasisMohanty37
 
Keras on tensorflow in R & Python
Keras on tensorflow in R & PythonKeras on tensorflow in R & Python
Keras on tensorflow in R & PythonLonghow Lam
 
Btv thesis defense_v1.02-final
Btv thesis defense_v1.02-finalBtv thesis defense_v1.02-final
Btv thesis defense_v1.02-finalVinh Bui
 
Reading group nfm - 20170312
Reading group  nfm - 20170312Reading group  nfm - 20170312
Reading group nfm - 20170312Shuai Zhang
 
Stacking ensemble
Stacking ensembleStacking ensemble
Stacking ensemblekalung0313
 
Teach a neural network to read handwriting
Teach a neural network to read handwritingTeach a neural network to read handwriting
Teach a neural network to read handwritingVipul Kaushal
 

What's hot (15)

Object extraction from satellite imagery using deep learning
Object extraction from satellite imagery using deep learningObject extraction from satellite imagery using deep learning
Object extraction from satellite imagery using deep learning
 
Henrik Christensen - Vision for co-robot applications
Henrik Christensen  -  Vision for co-robot applicationsHenrik Christensen  -  Vision for co-robot applications
Henrik Christensen - Vision for co-robot applications
 
Dl
DlDl
Dl
 
Metric based meta_learning
Metric based meta_learningMetric based meta_learning
Metric based meta_learning
 
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and Architectures
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and ArchitecturesMetaPerturb: Transferable Regularizer for Heterogeneous Tasks and Architectures
MetaPerturb: Transferable Regularizer for Heterogeneous Tasks and Architectures
 
Project 8
Project 8Project 8
Project 8
 
Human uncertainty makes classification more robust, ICCV 2019 Review
Human uncertainty makes classification more robust, ICCV 2019 ReviewHuman uncertainty makes classification more robust, ICCV 2019 Review
Human uncertainty makes classification more robust, ICCV 2019 Review
 
Bring your neural networks to the browser with TF.js - Simone Scardapane
Bring your neural networks to the browser with TF.js - Simone ScardapaneBring your neural networks to the browser with TF.js - Simone Scardapane
Bring your neural networks to the browser with TF.js - Simone Scardapane
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flow
 
Keras on tensorflow in R & Python
Keras on tensorflow in R & PythonKeras on tensorflow in R & Python
Keras on tensorflow in R & Python
 
Btv thesis defense_v1.02-final
Btv thesis defense_v1.02-finalBtv thesis defense_v1.02-final
Btv thesis defense_v1.02-final
 
Reading group nfm - 20170312
Reading group  nfm - 20170312Reading group  nfm - 20170312
Reading group nfm - 20170312
 
N ns 1
N ns 1N ns 1
N ns 1
 
Stacking ensemble
Stacking ensembleStacking ensemble
Stacking ensemble
 
Teach a neural network to read handwriting
Teach a neural network to read handwritingTeach a neural network to read handwriting
Teach a neural network to read handwriting
 

Similar to Surveys of Image Recoginition.ppt

A local metric for defocus blur detection cnn feature learning screenshots
A local metric for defocus blur detection   cnn feature learning screenshotsA local metric for defocus blur detection   cnn feature learning screenshots
A local metric for defocus blur detection cnn feature learning screenshotsVenkat Projects
 
Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Alex Conway
 
Report face recognition : ArganRecogn
Report face recognition :  ArganRecognReport face recognition :  ArganRecogn
Report face recognition : ArganRecognIlyas CHAOUA
 
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...StampedeCon
 
cvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptxcvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptxPyariMohanJena
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptxManeetBali
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer FarooquiDatabricks
 
Fake Image Identification Screenshots
Fake Image Identification ScreenshotsFake Image Identification Screenshots
Fake Image Identification ScreenshotsVenkat Projects
 
Fake Image Identification
Fake Image IdentificationFake Image Identification
Fake Image IdentificationVenkat Projects
 
Convolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsAlex Conway
 
Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Sneha Ravikumar
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection SystemAbhiroop Ghatak
 
Computer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonComputer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonAkash Satamkar
 
Using Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesUsing Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesHJ van Veen
 
Bangla Handwritten Digit Recognition Report.pdf
Bangla Handwritten Digit Recognition  Report.pdfBangla Handwritten Digit Recognition  Report.pdf
Bangla Handwritten Digit Recognition Report.pdfKhondokerAbuNaim
 
Ai in 45 minutes
Ai in 45 minutesAi in 45 minutes
Ai in 45 minutes昉达 王
 
Jaemin_230701_Simple_Copy_paste.pptx
Jaemin_230701_Simple_Copy_paste.pptxJaemin_230701_Simple_Copy_paste.pptx
Jaemin_230701_Simple_Copy_paste.pptxJAEMINJEONG5
 

Similar to Surveys of Image Recoginition.ppt (20)

A local metric for defocus blur detection cnn feature learning screenshots
A local metric for defocus blur detection   cnn feature learning screenshotsA local metric for defocus blur detection   cnn feature learning screenshots
A local metric for defocus blur detection cnn feature learning screenshots
 
Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017
 
Report face recognition : ArganRecogn
Report face recognition :  ArganRecognReport face recognition :  ArganRecogn
Report face recognition : ArganRecogn
 
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
 
Depth estimation using deep learning
Depth estimation using deep learningDepth estimation using deep learning
Depth estimation using deep learning
 
cvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptxcvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptx
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptx
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
Fake Image Identification Screenshots
Fake Image Identification ScreenshotsFake Image Identification Screenshots
Fake Image Identification Screenshots
 
Fake Image Identification
Fake Image IdentificationFake Image Identification
Fake Image Identification
 
Convolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision Applications
 
Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
 
Computer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonComputer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and Python
 
Using Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesUsing Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar Dresses
 
Bangla Handwritten Digit Recognition Report.pdf
Bangla Handwritten Digit Recognition  Report.pdfBangla Handwritten Digit Recognition  Report.pdf
Bangla Handwritten Digit Recognition Report.pdf
 
Ai in 45 minutes
Ai in 45 minutesAi in 45 minutes
Ai in 45 minutes
 
cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
 
Jaemin_230701_Simple_Copy_paste.pptx
Jaemin_230701_Simple_Copy_paste.pptxJaemin_230701_Simple_Copy_paste.pptx
Jaemin_230701_Simple_Copy_paste.pptx
 
Ai use cases
Ai use casesAi use cases
Ai use cases
 

Surveys of Image Recoginition.ppt

  • 2. Local Binary Pattern with Sci-kit  Local Binary Patterns, or LBPs for short, are a texture descriptor made popular by the work of Ojala.  If the current pixel value is greater or equal to the neighboring pixel value, the corresponding bit in the binary array is set to 1 else if the current pixel value is less than the neighboring pixel value, the corresponding bit in the binary array is set to 0.
  • 7. Working Steps 1. Load the color image. 2. Convert to grayscale image. 3. Calculate the LBP mask. 4. Calculate the LBP Histogram and normalize it.
  • 8. Where it is used?
  • 9. Haar Classifier + OpenCV  Object Detection using Haar feature-based cascade classifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper, "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001.  Initially, the algorithm needs a lot of positive images (images of faces) and negative images (images without faces) to train the classifier. Then we need to extract features from it.
  • 10. Methods  Three tools to use – “createsamples”, “haartraining” and “performance”  CreateSamples  Tool from OpenCV to automate creation of training samples Four functionalities 1. create training samples from one image applying distortions. 2. create training samples from a collection of images, without distortions. 3. create testing samples with ground truth from one image applying distortions. 4. show images from the .vec internal format which contains a collection of samples.  Best to use a combination of the functionalities to create many samples from many images with distortions and merge them.
  • 11. Images  Positive Images:  Negative Images  Sample Images
  • 12. Query and Parameters  For positive image creation: perl bin/createsamples.pl positives.txt negatives.txt samples 1500 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40 ”  To start the testing: opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 –minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 600 -w 80 -h 40 mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
  • 13.  The software that performs the viola-jones algorithm and creates the cascade file Sample run: opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024  “data” is the directory in which to store the output  “vec” is the .vec file containing the positive images  “bg” is a text file with a collection of paths to background (negative) images  “nstages” is the number of stages of boosting  “minhitrate” and “maxfalsealarm” are cutoff values for hit rate and false alarm, per stage  “npos” and “nneg” are the number of positive and negative images to be used from the given sets  “w” and “h” are the width and the height of the sample  “precalcValBufSize” buffer size to store the feature values
  • 14. Advantages & Disadvantages  Advantages: 1. Easy to implement once classifier is ready.  Disadvantages: 1. Does not detect for all the images. 2. Training the classifier takes time. 3. Needs a lot of training data.
  • 15. Tensorflow  Tensorflow is Google's open source deep learning library.  We will load the Inception-v3 model to generate descriptive labels for an image.  The Inception model is a deep convolutional neural network and was trained on the ImageNet dataset, where the task was to classify images into 1000 classes.
  • 16. Build Training  Place the directory with all the images in respective folder.  Give path of the directory while starting the training.  bazel build tensorflow/examples/image_retraining:retrain bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/fruits
  • 17. Advantages & Disadvantages  ADVANTAGES 1. Pre-trained classifier can be used. 2. Training on our classes doesn't take much time. 3. Has a good accuracy rate. 4. Can be trained with any variations of the image.  DISADVANTAGES 1. Image detection may go wrong with Inception. 2. Single class cannot be trained.