SlideShare a Scribd company logo
1 of 43
Download to read offline
Computer Vision
A Beginner’s Guide
How do computers
actually see?
Like this?
Okay…maybe like this?
Actually it’s more like
this
Matrix Math
• From basic to complex
• “Seeing the Matrix”
So how do you “do”
computer vision?
OpenCV
Step zero is to install OpenCV
and python
• OpenCV no walk in the park
• Resources at the end of my slides
OpenCV
Step one is to start with your
image source
import cv2
image =
cv2.imread(“nebraska_small.jpg")
OpenCV
Step two is to convert to
greyscale for most libraries /
functions
import cv2
image =
cv2.imread(“nebraska_small.jpg”, 0)
OpenCV
Step three is to use OpenCV
to process your image
import cv2
image = cv2.imread(“nebraska_small.jpg”, 0)
ret, thresh1 = cv2.threshold(image, 127, 255,
cv2.THRESH_BINARY)
ret, thresh2 = cv2.threshold(image, 127, 255,
cv2.THRESH_BINARY_INV)
ret, thresh3 = cv2.threshold(image, 127, 255,
cv2.THRESH_TRUNC)
ret, thresh4 = cv2.threshold(image, 127, 255,
cv2.THRESH_TOZERO)
Binary Binary Inverse
Trunc To Zero
OpenCV
Step four is to use AI and ML
to create powerful projects!
•TensorFlow + Inception
•Google Vision API
•Microsoft Azure Computer
Vision
•Amazon Rekognition API
•…OpenCV
OpenCV
Easier to use in mobile
• iOS - pod ‘OpenCV'
• Android - OpenCV4Android SDK
• Natural fit with built in camera
About Me
Unconventional Background = Outsider
Hard work and passion creates amazing opportunities
Wide Wide World of
Computer Vision
Windows vs. Mac vs.
Linux vs. iOS vs. Android
vs. Raspberry Pi
• HOG Detectors (Histogram of Oriented
Gradients)
• SLAM (Simultaneous Localization And Mapping)
• CNN (Convolutional Neural Networks)
• GAN (Generative Adversarial Nets)
• Structure from Motion
TensorFlow +
Inception
C++ vs. Python
TensorFlow + Inception
giant panda, panda, panda bear,
coon bear, Ailuropoda melanoleuca
(score = 0.89107)
indri, indris, Indri indri, Indri
brevicaudatus
(score = 0.00779)
lesser panda, red panda, panda,
bear cat, cat bear, Ailurus
fulgens
(score = 0.00296)
custard apple
(score = 0.00147)
earthstar
(score = 0.00117)
TensorFlow + Inception
seashore, coast, seacoast,
sea-coast (score = 0.24771)
monitor
(score = 0.08148)
bell cote, bell cot
(score = 0.06853)
dome
(score = 0.05676)
palace
(score = 0.05457)
Google Cloud Vision
API
Label Detection
{
"mid": "/m/0j_s4",
"description": "metropolitan area",
"score": 0.9773918
},
{
"mid": "/m/01w5c_",
"description": "aerial photography",
"score": 0.9537865
},
{
"mid": "/m/08863x",
"description": "bird's eye view",
"score": 0.9332659
},
Landmark Detection
"mid": "/m/04f57c",
"description": "Union Station",
"score": 0.553656,
"boundingPoly": {
"vertices": […]
},
"locations": [
{
"latLng": {
"latitude": 39.081365,
"longitude": -94.58586931228638
}
Text Detection
• Recognized about 1,700
words
• Fairly high success %
import io
import os
# Imports the Google Cloud client library
from google.cloud import vision
# Instantiates a client
vision_client = vision.Client()
image = vision_client.image(source_uri='http://u.b5z.net/i/u/10192948/i/
Restaurant_Association_Marker_2014.jpg')
# Performs label detection on the image file
labels = image.detect_text()
print('Text:')
fullText = ""
for label in labels:
fullText += label.description + " "
print fullText
Microsoft Azure
Computer Vision
Visual Features
{
"categories": [{
"name": "outdoor_",
"score": 0.01171875
}, {
"name": "outdoor_sportsfield",
"score": 0.81640625
}],
"requestId": “e6…df”,
"metadata": {
"width": 838,
"height": 546,
"format": "Jpeg"
}
}
Landmarks
{
"categories": [{
"name": "building_",
"score": 0.54296875,
"detail": {
"landmarks": []
}
}, {
"name": "outdoor_",
"score": 0.01171875
}],
"requestId": “0e…f026”,
"metadata": {
"width": 960,
"height": 540,
"format": "Jpeg"
OCR
THE GREATER KANSAS CITY RESTAURANT ASSOCIAT!ON The Greater
Cit' Restaurant • in 1916. when three Visionary My row, C e
orge Fowler. and Guy Taylor began meeting the baseme#i Of
Myron Green" Cafeteria on this at Walnut. 'g17ö . 'the;
asuocIat20n organized a boycott to combat the rtslnq-
co$t„ eggs from Suppliers Charging unfair prices. effect* -
attention and 1919 the group launched ASSOC i •tiOn CNR A).
The NRA headquarters remained tn Kansas City until 1927 yhen
moved to Chicago. and eventually to Washington. D.C. Today.
the NRA supports the foodservice Industry, which consists of
13.1 employees (10% of the U.S. workforce) generates $660.5
billion in annual sales of the U.S. gross domestic product),
The GKCRA remains One of the strongest chapters of the NRA.
serving the needs of the area's hospitality industry tn parts
of Missouri and Kansas. Focused education and community
support. each year the GKCRA invests thoussnds of dollars into
hospitality scholarships for area youth, Wen as continuing the
education gf alt hospitality employees. Also dedicated to the
financial wen- being or Keans City end the promotion Of
businesses in our reglon, the CKCRA joined the city's effort
to initiate convention and tourism funding in 1974. Original
construction and continued maintenance of Bartle Hall end
other taurtsm and neighborhood development project' ere fUnded
by patrons Of the restaurant and hotel Industries. 2016 marks
the centennial anniversary of the Greater Kansas City
Restaurant Association. 1214 T KE SONS of KANSAS
• Not quiet as good as Google
• JSON structure is a PAIN
using System;

using System.IO;

using System.Net.Http;

using System.Net.Http.Headers;



namespace CSHttpClientSample

{

static class Program

{

static void Main()

{

MakeAnalysisRequest("/Users/me/Desktop/nebraska_small.jpg");



Console.WriteLine("nnnHit ENTER to exit...");

Console.ReadLine();

}



static byte[] GetImageAsByteArray(string imageFilePath)

{

FileStream fileStream = new FileStream(imageFilePath, FileMode.Open, FileAccess.Read);

BinaryReader binaryReader = new BinaryReader(fileStream);

return binaryReader.ReadBytes((int)fileStream.Length);

}



static async void MakeAnalysisRequest(string imageFilePath)

{

var client = new HttpClient();



// Request headers - replace this example key with your valid subscription key.

client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "key");



// Request parameters. A third optional parameter is "details".

string requestParameters = "visualFeatures=Categories&language=en&details=Landmarks";

string uri = "https://westus.api.cognitive.microsoft.com/vision/v1.0/analyze?" + requestParameters;

Console.WriteLine(uri);



HttpResponseMessage response;



// Request body. Try this sample with a locally stored JPEG image.

byte[] byteData = GetImageAsByteArray(imageFilePath);



using (var content = new ByteArrayContent(byteData))

{

// This example uses content type "application/octet-stream".

// The other content types you can use are "application/json" and "multipart/form-data".

content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");

response = await client.PostAsync(uri, content);

string responseBody = await response.Content.ReadAsStringAsync();

Console.Write(responseBody);

}

}

}

}

Amazon Rekognition
Object and Scene Detection
Aerial View 99%
City 95.9%
Downtown 95.9%
Neighborhood 74.3%
Town 74.3%
Metropolis 73.7%
Urban 73.7%
Building 67.7%
Computer Vision
• Standing on the shoulders of giants
• Projects over tools
• Explore, Use, Learn
• Taking the leap
Computer Vision at VML
Computer Vision at VML
Special Thanks
• David Mitchell VML
• Heather Downing VML
• u/davis685
• u/run7b
• u/dcc194
• u/slippy0
• u/vraGG_
Resources
• Install OpenCV http://www.pyimagesearch.com/
2016/12/19/install-opencv-3-on-macos-with-
homebrew-the-easy-way/
• Master OpenCV in Python Udemy https://
www.udemy.com/master-computer-vision-with-
opencv-in-python/
• http://www.learnopencv.com/histogram-of-oriented-gradients/
• https://ocw.mit.edu/courses/aeronautics-and-astronautics/
16-412j-cognitive-robotics-spring-2005/projects/
1aslam_blas_repo.pdf
• http://eric-yuan.me/cnn/
• http://bamos.github.io/2016/08/09/deep-completion/
• http://www.morethantechnical.com/2012/02/07/structure-from-
motion-and-3d-reconstruction-on-the-easy-in-opencv-2-3-w-
code/
• http://docs.opencv.org/trunk/d7/d8b/
tutorial_py_face_detection.html

More Related Content

What's hot

MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineAndy McKay
 
Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Ben Lesh
 
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram VaswaniHigh Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswanivvaswani
 
Programming the cloud with Skywriting
Programming the cloud with SkywritingProgramming the cloud with Skywriting
Programming the cloud with SkywritingDerek Murray
 
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2KZepto.js, a jQuery-compatible mobile JavaScript framework in 2K
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2KThomas Fuchs
 
Naked Performance With Clojure
Naked Performance With ClojureNaked Performance With Clojure
Naked Performance With ClojureMetosin Oy
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Domenic Denicola
 
Malli: inside data-driven schemas
Malli: inside data-driven schemasMalli: inside data-driven schemas
Malli: inside data-driven schemasMetosin Oy
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using RoomNelson Glauber Leal
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2MongoDB
 
FwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.jsFwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.jsTimur Shemsedinov
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScriptersgerbille
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 

What's hot (20)

MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
 
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
 
Sensmon couchdb
Sensmon couchdbSensmon couchdb
Sensmon couchdb
 
FalcorJS
FalcorJSFalcorJS
FalcorJS
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
Lambda expressions in C++
Lambda expressions in C++Lambda expressions in C++
Lambda expressions in C++
 
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram VaswaniHigh Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
High Performance XQuery Processing in PHP with Zorba by Vikram Vaswani
 
New Design of OneRing
New Design of OneRingNew Design of OneRing
New Design of OneRing
 
Programming the cloud with Skywriting
Programming the cloud with SkywritingProgramming the cloud with Skywriting
Programming the cloud with Skywriting
 
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2KZepto.js, a jQuery-compatible mobile JavaScript framework in 2K
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K
 
Naked Performance With Clojure
Naked Performance With ClojureNaked Performance With Clojure
Naked Performance With Clojure
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
 
Malli: inside data-driven schemas
Malli: inside data-driven schemasMalli: inside data-driven schemas
Malli: inside data-driven schemas
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using Room
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
 
FwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.jsFwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.js
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScripters
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 

Similar to Computer vision Nebraska (Nebraska Code)

Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .netStephen Lorello
 
"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
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1Bitla Software
 
Intro to computer vision in .net update
Intro to computer vision in .net   updateIntro to computer vision in .net   update
Intro to computer vision in .net updateStephen Lorello
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017Patrik Suzzi
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)Igor Bronovskyy
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)Oswald Campesato
 
Information from pixels
Information from pixelsInformation from pixels
Information from pixelsDave Snowdon
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billynimbleltd
 
Vertically Scaled Design Patters
Vertically Scaled Design PattersVertically Scaled Design Patters
Vertically Scaled Design PattersJeff Malnick
 
Hi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreTextHi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreTextMugunth Kumar
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivAmazon Web Services
 
Canvas
CanvasCanvas
CanvasRajon
 

Similar to Computer vision Nebraska (Nebraska Code) (20)

Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .net
 
"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...
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Intro to computer vision in .net update
Intro to computer vision in .net   updateIntro to computer vision in .net   update
Intro to computer vision in .net update
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Yavorsky
YavorskyYavorsky
Yavorsky
 
Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)
 
Information from pixels
Information from pixelsInformation from pixels
Information from pixels
 
Couchbas for dummies
Couchbas for dummiesCouchbas for dummies
Couchbas for dummies
 
Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billy
 
Vertically Scaled Design Patters
Vertically Scaled Design PattersVertically Scaled Design Patters
Vertically Scaled Design Patters
 
Hi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreTextHi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreText
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 
Canvas
CanvasCanvas
Canvas
 

Recently uploaded

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
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...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Computer vision Nebraska (Nebraska Code)

  • 6.
  • 7.
  • 8. Matrix Math • From basic to complex • “Seeing the Matrix”
  • 9. So how do you “do” computer vision?
  • 10. OpenCV Step zero is to install OpenCV and python • OpenCV no walk in the park • Resources at the end of my slides
  • 11. OpenCV Step one is to start with your image source import cv2 image = cv2.imread(“nebraska_small.jpg")
  • 12. OpenCV Step two is to convert to greyscale for most libraries / functions import cv2 image = cv2.imread(“nebraska_small.jpg”, 0)
  • 13. OpenCV Step three is to use OpenCV to process your image import cv2 image = cv2.imread(“nebraska_small.jpg”, 0) ret, thresh1 = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY) ret, thresh2 = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY_INV) ret, thresh3 = cv2.threshold(image, 127, 255, cv2.THRESH_TRUNC) ret, thresh4 = cv2.threshold(image, 127, 255, cv2.THRESH_TOZERO) Binary Binary Inverse Trunc To Zero
  • 14. OpenCV Step four is to use AI and ML to create powerful projects! •TensorFlow + Inception •Google Vision API •Microsoft Azure Computer Vision •Amazon Rekognition API •…OpenCV
  • 15. OpenCV Easier to use in mobile • iOS - pod ‘OpenCV' • Android - OpenCV4Android SDK • Natural fit with built in camera
  • 16. About Me Unconventional Background = Outsider Hard work and passion creates amazing opportunities
  • 17. Wide Wide World of Computer Vision
  • 18. Windows vs. Mac vs. Linux vs. iOS vs. Android vs. Raspberry Pi
  • 19. • HOG Detectors (Histogram of Oriented Gradients) • SLAM (Simultaneous Localization And Mapping) • CNN (Convolutional Neural Networks) • GAN (Generative Adversarial Nets) • Structure from Motion
  • 22. TensorFlow + Inception giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca (score = 0.89107) indri, indris, Indri indri, Indri brevicaudatus (score = 0.00779) lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens (score = 0.00296) custard apple (score = 0.00147) earthstar (score = 0.00117)
  • 23. TensorFlow + Inception seashore, coast, seacoast, sea-coast (score = 0.24771) monitor (score = 0.08148) bell cote, bell cot (score = 0.06853) dome (score = 0.05676) palace (score = 0.05457)
  • 25. Label Detection { "mid": "/m/0j_s4", "description": "metropolitan area", "score": 0.9773918 }, { "mid": "/m/01w5c_", "description": "aerial photography", "score": 0.9537865 }, { "mid": "/m/08863x", "description": "bird's eye view", "score": 0.9332659 },
  • 26. Landmark Detection "mid": "/m/04f57c", "description": "Union Station", "score": 0.553656, "boundingPoly": { "vertices": […] }, "locations": [ { "latLng": { "latitude": 39.081365, "longitude": -94.58586931228638 }
  • 27. Text Detection • Recognized about 1,700 words • Fairly high success %
  • 28. import io import os # Imports the Google Cloud client library from google.cloud import vision # Instantiates a client vision_client = vision.Client() image = vision_client.image(source_uri='http://u.b5z.net/i/u/10192948/i/ Restaurant_Association_Marker_2014.jpg') # Performs label detection on the image file labels = image.detect_text() print('Text:') fullText = "" for label in labels: fullText += label.description + " " print fullText
  • 30. Visual Features { "categories": [{ "name": "outdoor_", "score": 0.01171875 }, { "name": "outdoor_sportsfield", "score": 0.81640625 }], "requestId": “e6…df”, "metadata": { "width": 838, "height": 546, "format": "Jpeg" } }
  • 31. Landmarks { "categories": [{ "name": "building_", "score": 0.54296875, "detail": { "landmarks": [] } }, { "name": "outdoor_", "score": 0.01171875 }], "requestId": “0e…f026”, "metadata": { "width": 960, "height": 540, "format": "Jpeg"
  • 32. OCR THE GREATER KANSAS CITY RESTAURANT ASSOCIAT!ON The Greater Cit' Restaurant • in 1916. when three Visionary My row, C e orge Fowler. and Guy Taylor began meeting the baseme#i Of Myron Green" Cafeteria on this at Walnut. 'g17ö . 'the; asuocIat20n organized a boycott to combat the rtslnq- co$t„ eggs from Suppliers Charging unfair prices. effect* - attention and 1919 the group launched ASSOC i •tiOn CNR A). The NRA headquarters remained tn Kansas City until 1927 yhen moved to Chicago. and eventually to Washington. D.C. Today. the NRA supports the foodservice Industry, which consists of 13.1 employees (10% of the U.S. workforce) generates $660.5 billion in annual sales of the U.S. gross domestic product), The GKCRA remains One of the strongest chapters of the NRA. serving the needs of the area's hospitality industry tn parts of Missouri and Kansas. Focused education and community support. each year the GKCRA invests thoussnds of dollars into hospitality scholarships for area youth, Wen as continuing the education gf alt hospitality employees. Also dedicated to the financial wen- being or Keans City end the promotion Of businesses in our reglon, the CKCRA joined the city's effort to initiate convention and tourism funding in 1974. Original construction and continued maintenance of Bartle Hall end other taurtsm and neighborhood development project' ere fUnded by patrons Of the restaurant and hotel Industries. 2016 marks the centennial anniversary of the Greater Kansas City Restaurant Association. 1214 T KE SONS of KANSAS • Not quiet as good as Google • JSON structure is a PAIN
  • 33. using System;
 using System.IO;
 using System.Net.Http;
 using System.Net.Http.Headers;
 
 namespace CSHttpClientSample
 {
 static class Program
 {
 static void Main()
 {
 MakeAnalysisRequest("/Users/me/Desktop/nebraska_small.jpg");
 
 Console.WriteLine("nnnHit ENTER to exit...");
 Console.ReadLine();
 }
 
 static byte[] GetImageAsByteArray(string imageFilePath)
 {
 FileStream fileStream = new FileStream(imageFilePath, FileMode.Open, FileAccess.Read);
 BinaryReader binaryReader = new BinaryReader(fileStream);
 return binaryReader.ReadBytes((int)fileStream.Length);
 }
 
 static async void MakeAnalysisRequest(string imageFilePath)
 {
 var client = new HttpClient();
 
 // Request headers - replace this example key with your valid subscription key.
 client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "key");
 
 // Request parameters. A third optional parameter is "details".
 string requestParameters = "visualFeatures=Categories&language=en&details=Landmarks";
 string uri = "https://westus.api.cognitive.microsoft.com/vision/v1.0/analyze?" + requestParameters;
 Console.WriteLine(uri);
 
 HttpResponseMessage response;
 
 // Request body. Try this sample with a locally stored JPEG image.
 byte[] byteData = GetImageAsByteArray(imageFilePath);
 
 using (var content = new ByteArrayContent(byteData))
 {
 // This example uses content type "application/octet-stream".
 // The other content types you can use are "application/json" and "multipart/form-data".
 content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
 response = await client.PostAsync(uri, content);
 string responseBody = await response.Content.ReadAsStringAsync();
 Console.Write(responseBody);
 }
 }
 }
 }

  • 35. Object and Scene Detection Aerial View 99% City 95.9% Downtown 95.9% Neighborhood 74.3% Town 74.3% Metropolis 73.7% Urban 73.7% Building 67.7%
  • 36. Computer Vision • Standing on the shoulders of giants • Projects over tools • Explore, Use, Learn • Taking the leap
  • 40. • David Mitchell VML • Heather Downing VML • u/davis685 • u/run7b • u/dcc194 • u/slippy0 • u/vraGG_
  • 42. • Install OpenCV http://www.pyimagesearch.com/ 2016/12/19/install-opencv-3-on-macos-with- homebrew-the-easy-way/ • Master OpenCV in Python Udemy https:// www.udemy.com/master-computer-vision-with- opencv-in-python/
  • 43. • http://www.learnopencv.com/histogram-of-oriented-gradients/ • https://ocw.mit.edu/courses/aeronautics-and-astronautics/ 16-412j-cognitive-robotics-spring-2005/projects/ 1aslam_blas_repo.pdf • http://eric-yuan.me/cnn/ • http://bamos.github.io/2016/08/09/deep-completion/ • http://www.morethantechnical.com/2012/02/07/structure-from- motion-and-3d-reconstruction-on-the-easy-in-opencv-2-3-w- code/ • http://docs.opencv.org/trunk/d7/d8b/ tutorial_py_face_detection.html