SlideShare a Scribd company logo
1 of 27
Using Deep Learning for Computer Vision
Applications
Farshid PirahanSiah, PhD
August 2018
Computer Vision with Deep Learning market
AI PLATFORM and AI SOLUTION
AUTOMOTIVE, ADAS (Advanced driver-assistance systems) &
INFOTAINMENT, AUTONOMOUS & SEMI AUTONOMOUS VEHICLES,
SPORTS & ENTERTAINMENT, AR / VR, BALL & PLAYER TRACKING,
COMMERCIAL INSERTION, CONSUMER, GAMING, CAMERAS,
WEARABLES, SMART PHONES, ROBOTICS & MACHINE VISION,
QUALITY ASSURANCE & INSPECTION, POSITIONING & GUIDANCE,
HEALTHCARE, RADIOLOGY, MEDICAL ADHERENCE, SECURITY &
SURVEILLANCE, BIOMETRICS, IMAGE & VIDEO ANALYTICS, AI in
GUIDED DRONE is BASED SURVEILLANCE, AGRICULTURE,...
Computer Vision with Deep Learning market
“ The AI ​​market for computer vision is expected to expand from US $ 3.62 billion
in 2018 to US $ 25.32 billion by 2023. Market is expected to grow by 47.54% at
CAGR (Composite Annual Growth Rate) from 2018 to 2023.”
Industry Sector
● Automobile
● Sports, Entertainment
● Consumer
● Robot, machine vision
● Health care
● Security, monitoring
● Agriculture
Main Innovator
● LEAP MOTION
● ALGOLUX
● CLARIFAI
● DITTO LABS
● MAD STREET DEN
Computer Vision with Deep Learning market
Deep Learning Market Analysis By Application (Image Recognition, Voice
Recognition, Video Surveillance) 2018 - 2025
“ The global deep learning market size was valued at USD 272.0 million in 2016.
Increasing applicability in the autonomous vehicles and healthcare industries is
expected to contribute to the industry growth significantly. This technology is
gaining prominence on account of its complex data driven applications including
voice and image recognition. It offers a huge investment opportunity as it can be
leveraged over other technologies to overcome the challenges of high data
volumes, high computing power, and improvement in data storage.”
Computer Vision with Deep Learning market
Deep Learning Market Analysis By Application (Image Recognition, Voice
Recognition, Video Surveillance) 2018 - 2025
Industry Sector
● Automobile
● Sports, Entertainment
● Consumer
● Robot, machine vision
● Health care
● Security, monitoring
● Agriculture
Main Innovator
● LEAP MOTION
● ALGOLUX
● CLARIFAI
● DITTO LABS
● MAD STREET DEN
What's new in OpenCV 4 (August 2018)
C++11
Deep Learning in OpenCV 4:
Caffe
TensorFlow
Torch
Darknet
Some updates:
Hardware-accelerated Video I/O module
HighGUI module
Graph API module
Point Cloud module
Tracking, Calibration, and Stereo Modules
Compile OpenCV 4 - part 1
Download (Cmake & Visual studio 2017 & Windows 10 (64 bit))
https://github.com/opencv/opencv
https://github.com/opencv/opencv_contrib
Create build folder
Using Cmake to generate visual studio project
Use the path of … opencv_contrib-mastermodules
Open “OpenCV.sln” project
Compile OpenCV 4 - part 2
Build
Debug
Release
Install
Set the environment variable
Add “C:opencv4buildinstallx64vc15bin” to windows path
Setup and configure your project (debug mode (64 bit))
Setup visual studio project to use OpenCV 4 (you only need install folder inside the build folder of
compiled OpenCV 4)
For the debug mode (64 bit)
Add the include folder of OpenCV 4 to include path of your visual studio project
C:opencv4buildinstallinclude
Add the lib folder of OpenCV 4 to lib path of your visual studio project
C:opencv4buildinstallx64vc15lib
Put list of lib files for the debug mode (64 bit) (linker->input->additional dependencies)
opencv_aruco400d.lib;opencv_bgsegm400d.lib;opencv_bioinspired400d.lib;opencv_calib3d400d.lib;opencv_ccalib400d.lib;o
pencv_core400d.lib;opencv_datasets400d.lib;opencv_dnn400d.lib;opencv_dnn_objdetect400d.lib;opencv_dpm400d.lib;ope
ncv_face400d.lib;opencv_features2d400d.lib;opencv_flann400d.lib;opencv_fuzzy400d.lib;opencv_hfs400d.lib;opencv_highg
ui400d.lib;opencv_imgcodecs400d.lib;opencv_imgproc400d.lib;opencv_img_hash400d.lib;opencv_line_descriptor400d.lib;o
pencv_ml400d.lib;opencv_objdetect400d.lib;opencv_optflow400d.lib;opencv_phase_unwrapping400d.lib;opencv_photo400d
.lib;opencv_plot400d.lib;opencv_reg400d.lib;opencv_rgbd400d.lib;opencv_saliency400d.lib;opencv_shape400d.lib;opencv_
stereo400d.lib;opencv_stitching400d.lib;opencv_structured_light400d.lib;opencv_superres400d.lib;opencv_surface_matchin
g400d.lib;opencv_text400d.lib;opencv_tracking400d.lib;opencv_video400d.lib;opencv_videoio400d.lib;opencv_videostab400
d.lib;opencv_xfeatures2d400d.lib;opencv_ximgproc400d.lib;opencv_xobjdetect400d.lib;opencv_xphoto400d.lib
Setup and configure your project (release mode (64 bit))
Setup visual studio project to use OpenCV 4 (you only need install folder inside the build folder of
compiled OpenCV 4)
For the released mode (64 bit)
Add the include folder of OpenCV 4 to include path of your visual studio project
C:opencv4buildinstallinclude
Add the lib folder of OpenCV 4 to lib path of your visual studio project
C:opencv4buildinstallx64vc15lib
Put list of lib files for the released mode (64 bit) (linker->input->additional dependencies)
opencv_aruco400.lib;opencv_bgsegm400.lib;opencv_bioinspired400.lib;opencv_calib3d400.lib;opencv_ccalib400.lib;opencv
_core400.lib;opencv_datasets400.lib;opencv_dnn400.lib;opencv_dnn_objdetect400.lib;opencv_dpm400.lib;opencv_face400
.lib;opencv_features2d400.lib;opencv_flann400.lib;opencv_fuzzy400.lib;opencv_hfs400.lib;opencv_highgui400.lib;opencv_i
mgcodecs400.lib;opencv_imgproc400.lib;opencv_img_hash400.lib;opencv_line_descriptor400.lib;opencv_ml400.lib;opencv
_objdetect400.lib;opencv_optflow400.lib;opencv_phase_unwrapping400.lib;opencv_photo400.lib;opencv_plot400.lib;opencv
_reg400.lib;opencv_rgbd400.lib;opencv_saliency400.lib;opencv_shape400.lib;opencv_stereo400.lib;opencv_stitching400.lib
;opencv_structured_light400.lib;opencv_superres400.lib;opencv_surface_matching400.lib;opencv_text400.lib;opencv_tracki
ng400.lib;opencv_video400.lib;opencv_videoio400.lib;opencv_videostab400.lib;opencv_xfeatures2d400.lib;opencv_ximgpro
c400.lib;opencv_xobjdetect400.lib;opencv_xphoto400.lib
Simple program to test
#include "stdafx.h"
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
int main()
{
cv::String filePath = "C:/opencv4/OpenCV4VS2017/OpenCV4VS2017/opencv-logo.png";
cv::Mat src = cv::imread(filePath);
cv::imshow("test", src);
cv::waitKey(10000);
return 0;
}
Using Caffe model in OpenCV 4 - part 1
Download
1. Synset_words.txt
https://raw.githubusercontent.com/HoldenCaulfieldRye/caffe/master/
data/ilsvrc12/synset_words.txt
1. Bvlc_googlenet.caffemodel
http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel
1. Bvlc_googlenet.prototxt
https://raw.githubusercontent.com/opencv/opencv_extra/master/test
data/dnn/bvlc_googlenet.prototxt
Using caffe model in OpenCV 4 - part 2
static void getMaxClass(const cv::Mat &probBlob, int *classId, double *classProb)
{
cv::Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix
cv::Point classNumber;
cv::minMaxLoc(probMat, NULL, classProb, NULL, &classNumber);
*classId = classNumber.x;
}
static std::vector<cv::String> readClassNames(const char *filename = "C:/opencv4/OpenCV4VS2017/DeepLearningFiles/synset_words.txt")
{
std::vector<cv::String> classNames;
std::ifstream fp(filename);
if (!fp.is_open())
{
std::cerr << "File with classes labels not found: " << filename << std::endl;
exit(-1);
}
std::string name;
while (!fp.eof())
{
std::getline(fp, name);
if (name.length())
classNames.push_back(name.substr(name.find(' ') + 1));
}
fp.close();
return classNames;
}
Using caffe model in OpenCV 4 - part 3
● float scale = 1.0;
● cv::Scalar meanG = cv::Scalar(104, 117, 123);
● bool swapRB = true;
● int inpWidth = 224;
● int inpHeight = 224;
● cv::String model = path + "bvlc_googlenet.caffemodel";
● cv::String config = path + "bvlc_googlenet.prototxt";
● cv::String nameClass = path + "synset_words.txt";
● cv::String nameImage = path + "space_shuttle.jpg";
● cv::String framework;
● int backendId = 0;
● int targetId = 0;
● cv::dnn::Net net;
● cv::Mat blob;
● cv::Mat img = imread(nameImage);
● net = cv::dnn::readNet(model, config);
● net.setPreferableBackend(backendId);
● net.setPreferableTarget(targetId);
● cv::dnn::blobFromImage(img, blob, scale, cv::Size(inpWidth,
inpHeight), meanG, swapRB, false);
● net.setInput(blob);
● cv::Mat prob = net.forward();
●
● cv::Point classIdPoint;
● double confidence;
● minMaxLoc(prob.reshape(1, 1), 0, &confidence, 0,
&classIdPoint);
● int classId = classIdPoint.x;
● std::vector<double> layersTimes;
● double freq = cv::getTickFrequency() / 1000;
● double t = net.getPerfProfile(layersTimes) / freq;
● std::string label = cv::format("Inference time: %.2f ms", t);
● putText(img, label, cv::Point(0, 15),
cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0, 255, 0));
● cv::imshow("https://www.youtube.com/tiziran", img);
● std::vector<cv::String> classNames = readClassNames();
● std::cout << "Best class: #" << classId << " '" <<
classNames.at(classId) << "'" << std::endl;
● std::cout << "Probability: " << confidence * 100 << "%" <<
std::endl;
● cv::waitKey(10000);
Using TensorFlow model in OpenCV 4 - part 1
TensorFlow API only for OpenCV 4
Download the inception model based on TensorFlow
● https://storage.googleapis.com/download.tensorflow.org/mo
dels/inception5h.zip
Using TensorFlow model in OpenCV 4 - part 2
● float scale = 1.0;
● cv::Scalar meanG = cv::Scalar(104, 117, 123);
● bool swapRB = true;
● int inpWidth = 224;
● int inpHeight = 224;
● cv::String model = path + "tensorflow_inception_graph.pb";
● cv::String nameImage = path + "space_shuttle.jpg";
● cv::String framework;
● int backendId = 0;
● int targetId = 0;
● cv::dnn::Net net;
● cv::Mat blob;
● cv::Mat img = imread(nameImage);
● net = cv::dnn::readNetFromTensorflow(model);
● net.setPreferableBackend(backendId);
● net.setPreferableTarget(targetId);
● cv::dnn::blobFromImage(img, blob, scale, cv::Size(inpWidth,
inpHeight), meanG, swapRB, false);
● net.setInput(blob);
● cv::Mat prob = net.forward();
● cv::Point classIdPoint;
● double confidence;
● minMaxLoc(prob.reshape(1, 1), 0, &confidence, 0,
&classIdPoint);
● int classId = classIdPoint.x;
● std::vector<double> layersTimes;
● double freq = cv::getTickFrequency() / 1000;
● double t = net.getPerfProfile(layersTimes) / freq;
● std::string label = cv::format("Inference time: %.2f ms", t);
● putText(img, label, cv::Point(0, 15),
cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0, 255, 0));
● cv::imshow("https://www.youtube.com/tiziran", img);
● std::vector<cv::String> classNames =
readClassNamesTensorFlow();
● std::cout << "Best class: #" << classId << " '" <<
classNames.at(classId) << "'" << std::endl;
● std::cout << "Probability: " << confidence * 100 << "%" <<
std::endl;
● cv::waitKey(10000);
Previous Videos, Courses, Classes, Training, Tutorials
❖ Compile full OpenCV 4 (main and
contribute) from source
➢ https://www.youtube.com/watc
h?v=VK70YdaMD44
❖ Setup and configure Visual Studio
2017 project (C++) for using
OpenCV 4 library
➢ https://www.youtube.com/watc
h?v=J0Exttz4_m4
❖ Using Caffe model in OpenCV 4
➢ https://www.youtube.com/watc
h?v=lj7AxKDoP9I
❖ Using TensorFlow model in
OpenCV 4
➢ https://www.youtube.com/watc
h?v=5JqX0CbxtNk
Linkedin groups
Computer Vision, Deep Learning, OpenCV 3, C++,
DIGITS, Caffe, TensorFlow, Theano, Torch
https://www.linkedin.com/groups/10320678
Telegram
Deep Learning in Computer Vision
(Channel) https://t.me/Dl4cv (Group) https://t.me/joinchat/CZ8vFgt1IdhUXkG615lsWA
WhatsApp Group
WhatsApp Group
Practical Deep Learning
https://chat.whatsapp.com/LE5FYddBYl68iAaTZnTuYq
Facebook group
Deep Learning, Computer Vision, Robotics
https://www.facebook.com/groups/185926728115336/
Slide share
Slide share
https://www.slideshare.net/pirahansiah
YouTube channel
https://www.youtube.com/tiziran
GitHub
Download source code from github
https://github.com/pirahansiah/opencv4
Outline
1 Compile full OpenCV 4 (main and contribute) from
source
https://www.youtube.com/watch?v=VK70YdaMD44
3 Using Caffe model in OpenCV 4
https://www.youtube.com/watch?v=lj7AxKDoP9I
2 Setup and configure Visual Studio 2017 project (C++)
for using OpenCV 4 library
https://www.youtube.com/watch?v=J0Exttz4_m4
4 Using TensorFlow model in OpenCV 4
https://www.youtube.com/watch?v=5JqX0CbxtNk
Reference - I
● Effect of Augmented Datasets to Train
Convolutional Neural Networks
● Pattern image significance for camera
calibration
● https://doi.org/10.1109/SCORED.2017.830544
0
● using an ant colony optimization algorithm for
image edge detection as a threshold
segmentation for ocr system
● http://www.jatit.org/volumes/Vol95No21/1Vol9
5No21.pdf
● GSFT-PSNR: Global Single Fuzzy Threshold
Based on PSNR for OCR Systems
● http://oldver.ijcsns.com/June.2016-Volume.4-
No.6/Article01.pdf
● Camera calibration for multi-modal robot
vision based on image quality assessment
● https://doi.org/10.1109/ASCC.2015.7360336
● Adaptive Image Thresholding Based on the
Peak Signal-to-noise Ratio
● http://www.academia.edu/download/44161592
/Adaptive_Image_Thresholding_Based_on_th
e20160328-31366-1wyb1jc.pdf
● peak signal-to-noise ratio based on threshold
method for image segmentation
● www.jatit.org/volumes/Vol57No2/4Vol57No2.p
df
● Simultaneous Localization And Mapping
Trends And Humanoid Robot Linkages
● http://ejournal.ukm.my/apjitm/article/download/
4164/2308
Reference - II
● character and object recognition based on
global feature extraction
● https://pdfs.semanticscholar.org/2d22/66bfb2f
5ba5cb40b5946b82c620dc713d793.pdf
● License plate recognition with multi-threshold
based on entropy
● https://doi.org/10.1109/ICEEI.2011.6021627
● Character recognition based on global feature
extraction
● https://doi.org/10.1109/ICEEI.2011.6021649
● Comparison single thresholding method for
handwritten images segmentation
● https://doi.org/10.1109/ICPAIR.2011.5976918
● TafreshGrid: Grid computing in Tafresh
university
● https://doi.org/10.1109/ICCSN.2011.6014009
● Multi-threshold approach for license plate
recognition system
● http://waset.org/publications/3636
● Adaptive image segmentation based on peak
signal-to-noise ratio for a license plate
recognition system
● https://doi.org/10.1109/ICCAIE.2010.5735125
● An evaluation of classification techniques
using enhanced Geometrical Topological
Feature Analysis
● https://scholar.google.com/scholar?oi=bibs&cl
uster=3038184255311332521&btnI=1&hl=en
● Augmented Optical Flow Methods for Video
● http://www.academia.edu/download/45596617
/farshid.pdf

More Related Content

Similar to Using Deep Learning for Computer Vision Applications

Kubernetes Deployments: A "Hands-off" Approach
Kubernetes Deployments: A "Hands-off" ApproachKubernetes Deployments: A "Hands-off" Approach
Kubernetes Deployments: A "Hands-off" ApproachRodrigo Reis
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyonddividiti
 
License Plate Recognition System using Python and OpenCV
License Plate Recognition System using Python and OpenCVLicense Plate Recognition System using Python and OpenCV
License Plate Recognition System using Python and OpenCVVishal Polley
 
Accelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slidesAccelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slidesDmitry Vostokov
 
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerMASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerIevgenii Katsan
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVEditor IJCATR
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Editor IJCATR
 
Ashutosh jaimini resume
Ashutosh jaimini resumeAshutosh jaimini resume
Ashutosh jaimini resumerit2007062
 
Ashutosh jaimini resume
Ashutosh jaimini resumeAshutosh jaimini resume
Ashutosh jaimini resumerit2007062
 
Leveraging Artificial Intelligence Processing on Edge Devices
Leveraging Artificial Intelligence Processing on Edge DevicesLeveraging Artificial Intelligence Processing on Edge Devices
Leveraging Artificial Intelligence Processing on Edge DevicesICS
 
Machine Vision On Embedded Platform
Machine Vision On Embedded Platform Machine Vision On Embedded Platform
Machine Vision On Embedded Platform Omkar Rane
 
Machine vision Application
Machine vision ApplicationMachine vision Application
Machine vision ApplicationAbhishek Sainkar
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...Edge AI and Vision Alliance
 
Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resumenotoha
 
Android – As a tool of innovation
Android – As a tool of innovation Android – As a tool of innovation
Android – As a tool of innovation Pallab Sarkar
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kitSteve Houël
 
Build Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanBuild Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanDavid Chen
 
Nvidia why every industry should be thinking about AI today
Nvidia why every industry should be thinking about AI todayNvidia why every industry should be thinking about AI today
Nvidia why every industry should be thinking about AI todayJustin Hayward
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...Christopher Diamantopoulos
 

Similar to Using Deep Learning for Computer Vision Applications (20)

Kubernetes Deployments: A "Hands-off" Approach
Kubernetes Deployments: A "Hands-off" ApproachKubernetes Deployments: A "Hands-off" Approach
Kubernetes Deployments: A "Hands-off" Approach
 
On technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyondOn technology transfer: experience from the CARP project... and beyond
On technology transfer: experience from the CARP project... and beyond
 
License Plate Recognition System using Python and OpenCV
License Plate Recognition System using Python and OpenCVLicense Plate Recognition System using Python and OpenCV
License Plate Recognition System using Python and OpenCV
 
Accelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slidesAccelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slides
 
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerMASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
 
Opencv
OpencvOpencv
Opencv
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCVAutomatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV Automatic License Plate Recognition using OpenCV
Automatic License Plate Recognition using OpenCV
 
Ashutosh jaimini resume
Ashutosh jaimini resumeAshutosh jaimini resume
Ashutosh jaimini resume
 
Ashutosh jaimini resume
Ashutosh jaimini resumeAshutosh jaimini resume
Ashutosh jaimini resume
 
Leveraging Artificial Intelligence Processing on Edge Devices
Leveraging Artificial Intelligence Processing on Edge DevicesLeveraging Artificial Intelligence Processing on Edge Devices
Leveraging Artificial Intelligence Processing on Edge Devices
 
Machine Vision On Embedded Platform
Machine Vision On Embedded Platform Machine Vision On Embedded Platform
Machine Vision On Embedded Platform
 
Machine vision Application
Machine vision ApplicationMachine vision Application
Machine vision Application
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
 
Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resume
 
Android – As a tool of innovation
Android – As a tool of innovation Android – As a tool of innovation
Android – As a tool of innovation
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kit
 
Build Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanBuild Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 Taiwan
 
Nvidia why every industry should be thinking about AI today
Nvidia why every industry should be thinking about AI todayNvidia why every industry should be thinking about AI today
Nvidia why every industry should be thinking about AI today
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
 

More from Farshid Pirahansiah

Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation
Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation
Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation Farshid Pirahansiah
 
Farshid tensorflow1.3 digits6.0caffe
Farshid tensorflow1.3 digits6.0caffeFarshid tensorflow1.3 digits6.0caffe
Farshid tensorflow1.3 digits6.0caffeFarshid Pirahansiah
 
Best Deep Learning Post from LinkedIn Group
Best Deep Learning Post from LinkedIn Group Best Deep Learning Post from LinkedIn Group
Best Deep Learning Post from LinkedIn Group Farshid Pirahansiah
 
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit, Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit, Farshid Pirahansiah
 
Layers in Deep Learning & Caffe layers (model architecture )
Layers in Deep Learning&Caffe layers (model architecture )Layers in Deep Learning&Caffe layers (model architecture )
Layers in Deep Learning & Caffe layers (model architecture )Farshid Pirahansiah
 
How to install Digits 5.1 on Ubuntu 14
How to install Digits 5.1 on Ubuntu 14How to install Digits 5.1 on Ubuntu 14
How to install Digits 5.1 on Ubuntu 14Farshid Pirahansiah
 
Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVFarshid Pirahansiah
 

More from Farshid Pirahansiah (7)

Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation
Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation
Deep Learning for Computer Vision in Ubuntu 19; Part 1 installation
 
Farshid tensorflow1.3 digits6.0caffe
Farshid tensorflow1.3 digits6.0caffeFarshid tensorflow1.3 digits6.0caffe
Farshid tensorflow1.3 digits6.0caffe
 
Best Deep Learning Post from LinkedIn Group
Best Deep Learning Post from LinkedIn Group Best Deep Learning Post from LinkedIn Group
Best Deep Learning Post from LinkedIn Group
 
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit, Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
Install, Compile, Setup, Setting OpenCV 3.2, Visual C++ 2015, Win 64bit,
 
Layers in Deep Learning & Caffe layers (model architecture )
Layers in Deep Learning&Caffe layers (model architecture )Layers in Deep Learning&Caffe layers (model architecture )
Layers in Deep Learning & Caffe layers (model architecture )
 
How to install Digits 5.1 on Ubuntu 14
How to install Digits 5.1 on Ubuntu 14How to install Digits 5.1 on Ubuntu 14
How to install Digits 5.1 on Ubuntu 14
 
Computer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCVComputer Vision, Deep Learning, OpenCV
Computer Vision, Deep Learning, OpenCV
 

Recently uploaded

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Using Deep Learning for Computer Vision Applications

  • 1. Using Deep Learning for Computer Vision Applications Farshid PirahanSiah, PhD August 2018
  • 2. Computer Vision with Deep Learning market AI PLATFORM and AI SOLUTION AUTOMOTIVE, ADAS (Advanced driver-assistance systems) & INFOTAINMENT, AUTONOMOUS & SEMI AUTONOMOUS VEHICLES, SPORTS & ENTERTAINMENT, AR / VR, BALL & PLAYER TRACKING, COMMERCIAL INSERTION, CONSUMER, GAMING, CAMERAS, WEARABLES, SMART PHONES, ROBOTICS & MACHINE VISION, QUALITY ASSURANCE & INSPECTION, POSITIONING & GUIDANCE, HEALTHCARE, RADIOLOGY, MEDICAL ADHERENCE, SECURITY & SURVEILLANCE, BIOMETRICS, IMAGE & VIDEO ANALYTICS, AI in GUIDED DRONE is BASED SURVEILLANCE, AGRICULTURE,...
  • 3. Computer Vision with Deep Learning market “ The AI ​​market for computer vision is expected to expand from US $ 3.62 billion in 2018 to US $ 25.32 billion by 2023. Market is expected to grow by 47.54% at CAGR (Composite Annual Growth Rate) from 2018 to 2023.” Industry Sector ● Automobile ● Sports, Entertainment ● Consumer ● Robot, machine vision ● Health care ● Security, monitoring ● Agriculture Main Innovator ● LEAP MOTION ● ALGOLUX ● CLARIFAI ● DITTO LABS ● MAD STREET DEN
  • 4. Computer Vision with Deep Learning market Deep Learning Market Analysis By Application (Image Recognition, Voice Recognition, Video Surveillance) 2018 - 2025 “ The global deep learning market size was valued at USD 272.0 million in 2016. Increasing applicability in the autonomous vehicles and healthcare industries is expected to contribute to the industry growth significantly. This technology is gaining prominence on account of its complex data driven applications including voice and image recognition. It offers a huge investment opportunity as it can be leveraged over other technologies to overcome the challenges of high data volumes, high computing power, and improvement in data storage.”
  • 5. Computer Vision with Deep Learning market Deep Learning Market Analysis By Application (Image Recognition, Voice Recognition, Video Surveillance) 2018 - 2025 Industry Sector ● Automobile ● Sports, Entertainment ● Consumer ● Robot, machine vision ● Health care ● Security, monitoring ● Agriculture Main Innovator ● LEAP MOTION ● ALGOLUX ● CLARIFAI ● DITTO LABS ● MAD STREET DEN
  • 6. What's new in OpenCV 4 (August 2018) C++11 Deep Learning in OpenCV 4: Caffe TensorFlow Torch Darknet Some updates: Hardware-accelerated Video I/O module HighGUI module Graph API module Point Cloud module Tracking, Calibration, and Stereo Modules
  • 7. Compile OpenCV 4 - part 1 Download (Cmake & Visual studio 2017 & Windows 10 (64 bit)) https://github.com/opencv/opencv https://github.com/opencv/opencv_contrib Create build folder Using Cmake to generate visual studio project Use the path of … opencv_contrib-mastermodules Open “OpenCV.sln” project
  • 8. Compile OpenCV 4 - part 2 Build Debug Release Install Set the environment variable Add “C:opencv4buildinstallx64vc15bin” to windows path
  • 9. Setup and configure your project (debug mode (64 bit)) Setup visual studio project to use OpenCV 4 (you only need install folder inside the build folder of compiled OpenCV 4) For the debug mode (64 bit) Add the include folder of OpenCV 4 to include path of your visual studio project C:opencv4buildinstallinclude Add the lib folder of OpenCV 4 to lib path of your visual studio project C:opencv4buildinstallx64vc15lib Put list of lib files for the debug mode (64 bit) (linker->input->additional dependencies) opencv_aruco400d.lib;opencv_bgsegm400d.lib;opencv_bioinspired400d.lib;opencv_calib3d400d.lib;opencv_ccalib400d.lib;o pencv_core400d.lib;opencv_datasets400d.lib;opencv_dnn400d.lib;opencv_dnn_objdetect400d.lib;opencv_dpm400d.lib;ope ncv_face400d.lib;opencv_features2d400d.lib;opencv_flann400d.lib;opencv_fuzzy400d.lib;opencv_hfs400d.lib;opencv_highg ui400d.lib;opencv_imgcodecs400d.lib;opencv_imgproc400d.lib;opencv_img_hash400d.lib;opencv_line_descriptor400d.lib;o pencv_ml400d.lib;opencv_objdetect400d.lib;opencv_optflow400d.lib;opencv_phase_unwrapping400d.lib;opencv_photo400d .lib;opencv_plot400d.lib;opencv_reg400d.lib;opencv_rgbd400d.lib;opencv_saliency400d.lib;opencv_shape400d.lib;opencv_ stereo400d.lib;opencv_stitching400d.lib;opencv_structured_light400d.lib;opencv_superres400d.lib;opencv_surface_matchin g400d.lib;opencv_text400d.lib;opencv_tracking400d.lib;opencv_video400d.lib;opencv_videoio400d.lib;opencv_videostab400 d.lib;opencv_xfeatures2d400d.lib;opencv_ximgproc400d.lib;opencv_xobjdetect400d.lib;opencv_xphoto400d.lib
  • 10. Setup and configure your project (release mode (64 bit)) Setup visual studio project to use OpenCV 4 (you only need install folder inside the build folder of compiled OpenCV 4) For the released mode (64 bit) Add the include folder of OpenCV 4 to include path of your visual studio project C:opencv4buildinstallinclude Add the lib folder of OpenCV 4 to lib path of your visual studio project C:opencv4buildinstallx64vc15lib Put list of lib files for the released mode (64 bit) (linker->input->additional dependencies) opencv_aruco400.lib;opencv_bgsegm400.lib;opencv_bioinspired400.lib;opencv_calib3d400.lib;opencv_ccalib400.lib;opencv _core400.lib;opencv_datasets400.lib;opencv_dnn400.lib;opencv_dnn_objdetect400.lib;opencv_dpm400.lib;opencv_face400 .lib;opencv_features2d400.lib;opencv_flann400.lib;opencv_fuzzy400.lib;opencv_hfs400.lib;opencv_highgui400.lib;opencv_i mgcodecs400.lib;opencv_imgproc400.lib;opencv_img_hash400.lib;opencv_line_descriptor400.lib;opencv_ml400.lib;opencv _objdetect400.lib;opencv_optflow400.lib;opencv_phase_unwrapping400.lib;opencv_photo400.lib;opencv_plot400.lib;opencv _reg400.lib;opencv_rgbd400.lib;opencv_saliency400.lib;opencv_shape400.lib;opencv_stereo400.lib;opencv_stitching400.lib ;opencv_structured_light400.lib;opencv_superres400.lib;opencv_surface_matching400.lib;opencv_text400.lib;opencv_tracki ng400.lib;opencv_video400.lib;opencv_videoio400.lib;opencv_videostab400.lib;opencv_xfeatures2d400.lib;opencv_ximgpro c400.lib;opencv_xobjdetect400.lib;opencv_xphoto400.lib
  • 11. Simple program to test #include "stdafx.h" #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> int main() { cv::String filePath = "C:/opencv4/OpenCV4VS2017/OpenCV4VS2017/opencv-logo.png"; cv::Mat src = cv::imread(filePath); cv::imshow("test", src); cv::waitKey(10000); return 0; }
  • 12. Using Caffe model in OpenCV 4 - part 1 Download 1. Synset_words.txt https://raw.githubusercontent.com/HoldenCaulfieldRye/caffe/master/ data/ilsvrc12/synset_words.txt 1. Bvlc_googlenet.caffemodel http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel 1. Bvlc_googlenet.prototxt https://raw.githubusercontent.com/opencv/opencv_extra/master/test data/dnn/bvlc_googlenet.prototxt
  • 13. Using caffe model in OpenCV 4 - part 2 static void getMaxClass(const cv::Mat &probBlob, int *classId, double *classProb) { cv::Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix cv::Point classNumber; cv::minMaxLoc(probMat, NULL, classProb, NULL, &classNumber); *classId = classNumber.x; } static std::vector<cv::String> readClassNames(const char *filename = "C:/opencv4/OpenCV4VS2017/DeepLearningFiles/synset_words.txt") { std::vector<cv::String> classNames; std::ifstream fp(filename); if (!fp.is_open()) { std::cerr << "File with classes labels not found: " << filename << std::endl; exit(-1); } std::string name; while (!fp.eof()) { std::getline(fp, name); if (name.length()) classNames.push_back(name.substr(name.find(' ') + 1)); } fp.close(); return classNames; }
  • 14. Using caffe model in OpenCV 4 - part 3 ● float scale = 1.0; ● cv::Scalar meanG = cv::Scalar(104, 117, 123); ● bool swapRB = true; ● int inpWidth = 224; ● int inpHeight = 224; ● cv::String model = path + "bvlc_googlenet.caffemodel"; ● cv::String config = path + "bvlc_googlenet.prototxt"; ● cv::String nameClass = path + "synset_words.txt"; ● cv::String nameImage = path + "space_shuttle.jpg"; ● cv::String framework; ● int backendId = 0; ● int targetId = 0; ● cv::dnn::Net net; ● cv::Mat blob; ● cv::Mat img = imread(nameImage); ● net = cv::dnn::readNet(model, config); ● net.setPreferableBackend(backendId); ● net.setPreferableTarget(targetId); ● cv::dnn::blobFromImage(img, blob, scale, cv::Size(inpWidth, inpHeight), meanG, swapRB, false); ● net.setInput(blob); ● cv::Mat prob = net.forward(); ● ● cv::Point classIdPoint; ● double confidence; ● minMaxLoc(prob.reshape(1, 1), 0, &confidence, 0, &classIdPoint); ● int classId = classIdPoint.x; ● std::vector<double> layersTimes; ● double freq = cv::getTickFrequency() / 1000; ● double t = net.getPerfProfile(layersTimes) / freq; ● std::string label = cv::format("Inference time: %.2f ms", t); ● putText(img, label, cv::Point(0, 15), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0, 255, 0)); ● cv::imshow("https://www.youtube.com/tiziran", img); ● std::vector<cv::String> classNames = readClassNames(); ● std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; ● std::cout << "Probability: " << confidence * 100 << "%" << std::endl; ● cv::waitKey(10000);
  • 15. Using TensorFlow model in OpenCV 4 - part 1 TensorFlow API only for OpenCV 4 Download the inception model based on TensorFlow ● https://storage.googleapis.com/download.tensorflow.org/mo dels/inception5h.zip
  • 16. Using TensorFlow model in OpenCV 4 - part 2 ● float scale = 1.0; ● cv::Scalar meanG = cv::Scalar(104, 117, 123); ● bool swapRB = true; ● int inpWidth = 224; ● int inpHeight = 224; ● cv::String model = path + "tensorflow_inception_graph.pb"; ● cv::String nameImage = path + "space_shuttle.jpg"; ● cv::String framework; ● int backendId = 0; ● int targetId = 0; ● cv::dnn::Net net; ● cv::Mat blob; ● cv::Mat img = imread(nameImage); ● net = cv::dnn::readNetFromTensorflow(model); ● net.setPreferableBackend(backendId); ● net.setPreferableTarget(targetId); ● cv::dnn::blobFromImage(img, blob, scale, cv::Size(inpWidth, inpHeight), meanG, swapRB, false); ● net.setInput(blob); ● cv::Mat prob = net.forward(); ● cv::Point classIdPoint; ● double confidence; ● minMaxLoc(prob.reshape(1, 1), 0, &confidence, 0, &classIdPoint); ● int classId = classIdPoint.x; ● std::vector<double> layersTimes; ● double freq = cv::getTickFrequency() / 1000; ● double t = net.getPerfProfile(layersTimes) / freq; ● std::string label = cv::format("Inference time: %.2f ms", t); ● putText(img, label, cv::Point(0, 15), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0, 255, 0)); ● cv::imshow("https://www.youtube.com/tiziran", img); ● std::vector<cv::String> classNames = readClassNamesTensorFlow(); ● std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; ● std::cout << "Probability: " << confidence * 100 << "%" << std::endl; ● cv::waitKey(10000);
  • 17. Previous Videos, Courses, Classes, Training, Tutorials ❖ Compile full OpenCV 4 (main and contribute) from source ➢ https://www.youtube.com/watc h?v=VK70YdaMD44 ❖ Setup and configure Visual Studio 2017 project (C++) for using OpenCV 4 library ➢ https://www.youtube.com/watc h?v=J0Exttz4_m4 ❖ Using Caffe model in OpenCV 4 ➢ https://www.youtube.com/watc h?v=lj7AxKDoP9I ❖ Using TensorFlow model in OpenCV 4 ➢ https://www.youtube.com/watc h?v=5JqX0CbxtNk
  • 18. Linkedin groups Computer Vision, Deep Learning, OpenCV 3, C++, DIGITS, Caffe, TensorFlow, Theano, Torch https://www.linkedin.com/groups/10320678
  • 19. Telegram Deep Learning in Computer Vision (Channel) https://t.me/Dl4cv (Group) https://t.me/joinchat/CZ8vFgt1IdhUXkG615lsWA
  • 20. WhatsApp Group WhatsApp Group Practical Deep Learning https://chat.whatsapp.com/LE5FYddBYl68iAaTZnTuYq
  • 21. Facebook group Deep Learning, Computer Vision, Robotics https://www.facebook.com/groups/185926728115336/
  • 24. GitHub Download source code from github https://github.com/pirahansiah/opencv4
  • 25. Outline 1 Compile full OpenCV 4 (main and contribute) from source https://www.youtube.com/watch?v=VK70YdaMD44 3 Using Caffe model in OpenCV 4 https://www.youtube.com/watch?v=lj7AxKDoP9I 2 Setup and configure Visual Studio 2017 project (C++) for using OpenCV 4 library https://www.youtube.com/watch?v=J0Exttz4_m4 4 Using TensorFlow model in OpenCV 4 https://www.youtube.com/watch?v=5JqX0CbxtNk
  • 26. Reference - I ● Effect of Augmented Datasets to Train Convolutional Neural Networks ● Pattern image significance for camera calibration ● https://doi.org/10.1109/SCORED.2017.830544 0 ● using an ant colony optimization algorithm for image edge detection as a threshold segmentation for ocr system ● http://www.jatit.org/volumes/Vol95No21/1Vol9 5No21.pdf ● GSFT-PSNR: Global Single Fuzzy Threshold Based on PSNR for OCR Systems ● http://oldver.ijcsns.com/June.2016-Volume.4- No.6/Article01.pdf ● Camera calibration for multi-modal robot vision based on image quality assessment ● https://doi.org/10.1109/ASCC.2015.7360336 ● Adaptive Image Thresholding Based on the Peak Signal-to-noise Ratio ● http://www.academia.edu/download/44161592 /Adaptive_Image_Thresholding_Based_on_th e20160328-31366-1wyb1jc.pdf ● peak signal-to-noise ratio based on threshold method for image segmentation ● www.jatit.org/volumes/Vol57No2/4Vol57No2.p df ● Simultaneous Localization And Mapping Trends And Humanoid Robot Linkages ● http://ejournal.ukm.my/apjitm/article/download/ 4164/2308
  • 27. Reference - II ● character and object recognition based on global feature extraction ● https://pdfs.semanticscholar.org/2d22/66bfb2f 5ba5cb40b5946b82c620dc713d793.pdf ● License plate recognition with multi-threshold based on entropy ● https://doi.org/10.1109/ICEEI.2011.6021627 ● Character recognition based on global feature extraction ● https://doi.org/10.1109/ICEEI.2011.6021649 ● Comparison single thresholding method for handwritten images segmentation ● https://doi.org/10.1109/ICPAIR.2011.5976918 ● TafreshGrid: Grid computing in Tafresh university ● https://doi.org/10.1109/ICCSN.2011.6014009 ● Multi-threshold approach for license plate recognition system ● http://waset.org/publications/3636 ● Adaptive image segmentation based on peak signal-to-noise ratio for a license plate recognition system ● https://doi.org/10.1109/ICCAIE.2010.5735125 ● An evaluation of classification techniques using enhanced Geometrical Topological Feature Analysis ● https://scholar.google.com/scholar?oi=bibs&cl uster=3038184255311332521&btnI=1&hl=en ● Augmented Optical Flow Methods for Video ● http://www.academia.edu/download/45596617 /farshid.pdf

Editor's Notes

  1. https://www.marketsandmarkets.com/pdfdownload.asp?id=141658064
  2. https://www.grandviewresearch.com/industry-analysis/deep-learning-market
  3. https://www.grandviewresearch.com/industry-analysis/deep-learning-market
  4. Dvds