SlideShare una empresa de Scribd logo
1 de 19
Fusing AI with AR
By Stephen Wylie
Windy City DevFest - Chicago
Feb. 1, 2019
About Me
● Google Developer Expert in Machine Learning
● Fix old arcade machines & computers, and pinballs of all eras
● Love fancy men’s clothing & vintage TV game shows
● Lots of patents in this area
AI + AR: Does anyone do this themselves?
Yes, of course! But with help…
Vehicle Recognition & Auto Loans
● Blippar - AR/VR company
● Capital One - AR feature of
Auto Navigator
● USAA - Loans & insurance
APIs & Frameworks Are Your Friends!
Retail
● Burberry - Customize items,
detect counterfeits
● Cup Noodles - Turn cups into
musical instruments
Sports
● Homecourt- Practice
basketball, get coaching
● MLB - ID players, show stats
Key Terms
● MobileNet, SqueezeNet, Inception,
ResNet
Neural networks optimized for
computer vision tasks
● Tensorflow Lite
Inference engine optimized to run
.tflite models on mobile devices
● MLKit
APIs that enable specific Machine
Learning use cases on devices or
cloud
● ARCore
Cross-platform augmented
reality SDK using OpenGL for
motion tracking, scene
building
● Sceneform
AR SDK for Android saving
you from learning OpenGL
Establish your Android app
Preparation
Install prereqs
Install latest versions
of APIs, SDKs, IDEs,
and build tools
Preparation
Clone repo
Get Tensorflow
source from Docker,
Github, etc.
Understand & Build
Open app code
Edit app code to use
Sceneform fragment
rather than Camera-
ConnectionFragment
Bust your head
Build with Bazel
This smooths object
detection, improves
tracking on
recognized entities
Build More
Add AR code
Hit test the bounding
box and draw the 3D
model relative to
that point
Finish
Profit!
Or, fix problems and
build your own
TFLite model
Install Prerequisites
● Latest:
● Java JDK 10 (not 11, not 8)
● Building in Windows? You’ll need ~5GB worth of:
○ Visual C++ Build Tools - visualcppbuildtools_full.exe
■ Windows 10 SDK 10.0.10240
■ .NET Framework SDK
○ A real shell like MSYS2
● Pick your poison! Download Tensorflow source from
GitHub or Docker
- Android Studio
- Android API level
- Android NDK
- Gradle
- Bazel
Establish your Android app
Preparation
Install prereqs
Install latest versions
of APIs, SDKs, IDEs,
and build tools
Preparation
Clone repo
Get Tensorflow
source from Docker,
Github, etc.
Understand & Build
Open app code
Edit app code to use
Sceneform fragment
rather than Camera-
ConnectionFragment
Bust your head
Build with Bazel
This smooths object
detection, improves
tracking on
recognized entities
Build More
Add AR code
Hit test the bounding
box and draw the 3D
model relative to
that point
Finish
Profit!
Or, fix problems and
build your own
TFLite model
Start Modifying Code
Code root: tensorflow/tensorflow/lite/examples/android/app
● Consider copying to a different folder
● Add Sceneform dependencies to Gradle build
● Update Gradle build to latest Tools, API >= 26
● Add AR permissions to Android Manifest
● Make new Layout incorporating ArFragment
● Use this Layout in your CameraActivity
○ Or make it a separate class
○ Update Manifest with new Activity
○ Ensure DetectorActivity extends it
Gradle downloads ML model assets
Establish your Android app
Preparation
Install prereqs
Install latest versions
of APIs, SDKs, IDEs,
and build tools
Preparation
Clone repo
Get Tensorflow
source from Docker,
Github, etc.
Understand & Build
Open app code
Edit app code to use
Sceneform fragment
rather than Camera-
ConnectionFragment
Bust your head
Build with Bazel
This smooths object
detection, improves
tracking on
recognized entities
Build More
Add AR code
Hit test the bounding
box and draw the 3D
model relative to
that point
Finish
Profit!
Or, fix problems and
build your own
TFLite model
Build with Bazel
● Define androidsdk and androidndk path in WORKSPACE
● Omit API level & build tools version
● cd to tensorflow/
● Run bazel build
//tensorflow/lite/examples/android:tflite_demo
● Funky Windows business in “Windows Kits” directory
● Pray hard!
What
Success
Looks
Like
Establish your Android app
Preparation
Install prereqs
Install latest versions
of APIs, SDKs, IDEs,
and build tools
Preparation
Clone repo
Get Tensorflow
source from Docker,
Github, etc.
Understand & Build
Open app code
Edit app code to use
Sceneform fragment
rather than Camera-
ConnectionFragment
Bust your head
Build with Bazel
This smooths object
detection, improves
tracking on
recognized entities
Build More
Add AR code
Hit test the bounding
box and draw the 3D
model relative to
that point
Finish
Profit!
Or, fix problems and
build your own
TFLite model
Add Augmented Reality Code
● Can’t use Bazel anymore
○ Incorporate object detection model into src/main/jniLibs
○ Set parameter for CPU architecture in Gradle
● Sceneform Plugin or Gradle Instruction
○ Sceneform codelab calls for 1.4; Android Studio plugin is 1.6
○ Best to just use Gradle instructions to create SFB assets
● Add augmented reality code to MultiBoxTracker
Establish your Android app
Preparation
Install prereqs
Install latest versions
of APIs, SDKs, IDEs,
and build tools
Preparation
Clone repo
Get Tensorflow
source from Docker,
Github, etc.
Understand & Build
Open app code
Edit app code to use
Sceneform fragment
rather than Camera-
ConnectionFragment
Bust your head
Build with Bazel
This smooths object
detection, improves
tracking on
recognized entities
Build More
Add AR code
Hit test the bounding
box and draw the 3D
model relative to
that point
Finish
Profit!
Or, fix problems and
build your own
TFLite model
Pitfalls of AI + AR: Battery life
“Turn your phone into an incendiary device!
Run AI & AR at the same time.”
Throttling AI is key.
Pitfalls of AI + AR: Depth & size of object
Projecting 3D object in AR requires good understanding of 3D space:
● Size of object, in pixels,
proportional to the camera
● Size of object, in real life,
to position 3D object correctly
● Positioning 3D object visible
to user without maneuvering
● Improvement: Correlate bounding box with hit detection
Pitfalls of AI + AR: Sensor drift
Object out of the viewport?
● AR relies on point clouds, hardware sensors
● Hardware sensors likely to drift with lots of motion
● Objects anchored to world space likely to wander off
Solution?
● Ensure scene has good contrast, enough corners to see every frame
● Attach objects to anchors
● Scan enough of the scene ahead of time before drawing AR
Pitfalls of AI + AR: Tracking multiple objects
● Object detections could be missed, false, or switch IDs
● Discover correlations between objects moving on camera
○ Pairwise dependencies
○ Uniform or non-uniform hypergraph
● Multiple object tracking is easier with the tensorflowlite_demo library
● No library? Gotta code it yourself!
Mitigating This
● Consumption issues? Minimize anchors as you instantiate objects
● Take the time to set up NDK and/or libraries
Thank You
@SWebCEO
goshtastic.blogspot.com
github.com/mrcity/mlworkshop
Slideshare: StephenWylie3

Más contenido relacionado

Similar a Fusing Artificial Intelligence with Augmented Reality on Android - 1 Feb. 2019

Philipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with WikitudePhilipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with WikitudeAugmentedWorldExpo
 
Data Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing TransformationsData Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing TransformationsSafe Software
 
Augmented reality
Augmented realityAugmented reality
Augmented realitydzubovua
 
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSebastien Kuntz
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...Hafez Kamal
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGLGlobant
 
Scope of Android and Future Work
Scope of Android and Future WorkScope of Android and Future Work
Scope of Android and Future WorkRabiRehman1
 
Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Jesus Gumiel
 
Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Androidrahulverma1080
 
From Cardboard to Daydream - The Evolution of VR on Android
From Cardboard to Daydream - The Evolution of VR on AndroidFrom Cardboard to Daydream - The Evolution of VR on Android
From Cardboard to Daydream - The Evolution of VR on AndroidOscar Salguero
 
Solving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerSolving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerWill Hall
 
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...Jason Conger
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google DevsCraig Dunn
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023Pedro Vicente
 
sdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_publicsdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_publicRick Lau
 
Augmented Reality Application - Final Year Project
Augmented Reality Application - Final Year ProjectAugmented Reality Application - Final Year Project
Augmented Reality Application - Final Year ProjectYash Kaushik
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
 

Similar a Fusing Artificial Intelligence with Augmented Reality on Android - 1 Feb. 2019 (20)

Philipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with WikitudePhilipp Nagele (Wikitude): What's Next with Wikitude
Philipp Nagele (Wikitude): What's Next with Wikitude
 
Data Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing TransformationsData Scenarios 2020: 6 Amazing Transformations
Data Scenarios 2020: 6 Amazing Transformations
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGL
 
Scope of Android and Future Work
Scope of Android and Future WorkScope of Android and Future Work
Scope of Android and Future Work
 
Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016
 
Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Android
 
From Cardboard to Daydream - The Evolution of VR on Android
From Cardboard to Daydream - The Evolution of VR on AndroidFrom Cardboard to Daydream - The Evolution of VR on Android
From Cardboard to Daydream - The Evolution of VR on Android
 
Solving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerSolving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With Docker
 
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
 
Spark core intro
Spark core introSpark core intro
Spark core intro
 
sdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_publicsdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_public
 
Augmented Reality Application - Final Year Project
Augmented Reality Application - Final Year ProjectAugmented Reality Application - Final Year Project
Augmented Reality Application - Final Year Project
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 

Último

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Último (20)

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Fusing Artificial Intelligence with Augmented Reality on Android - 1 Feb. 2019

  • 1. Fusing AI with AR By Stephen Wylie Windy City DevFest - Chicago Feb. 1, 2019
  • 2. About Me ● Google Developer Expert in Machine Learning ● Fix old arcade machines & computers, and pinballs of all eras ● Love fancy men’s clothing & vintage TV game shows ● Lots of patents in this area
  • 3. AI + AR: Does anyone do this themselves? Yes, of course! But with help… Vehicle Recognition & Auto Loans ● Blippar - AR/VR company ● Capital One - AR feature of Auto Navigator ● USAA - Loans & insurance APIs & Frameworks Are Your Friends! Retail ● Burberry - Customize items, detect counterfeits ● Cup Noodles - Turn cups into musical instruments Sports ● Homecourt- Practice basketball, get coaching ● MLB - ID players, show stats
  • 4. Key Terms ● MobileNet, SqueezeNet, Inception, ResNet Neural networks optimized for computer vision tasks ● Tensorflow Lite Inference engine optimized to run .tflite models on mobile devices ● MLKit APIs that enable specific Machine Learning use cases on devices or cloud ● ARCore Cross-platform augmented reality SDK using OpenGL for motion tracking, scene building ● Sceneform AR SDK for Android saving you from learning OpenGL
  • 5. Establish your Android app Preparation Install prereqs Install latest versions of APIs, SDKs, IDEs, and build tools Preparation Clone repo Get Tensorflow source from Docker, Github, etc. Understand & Build Open app code Edit app code to use Sceneform fragment rather than Camera- ConnectionFragment Bust your head Build with Bazel This smooths object detection, improves tracking on recognized entities Build More Add AR code Hit test the bounding box and draw the 3D model relative to that point Finish Profit! Or, fix problems and build your own TFLite model
  • 6. Install Prerequisites ● Latest: ● Java JDK 10 (not 11, not 8) ● Building in Windows? You’ll need ~5GB worth of: ○ Visual C++ Build Tools - visualcppbuildtools_full.exe ■ Windows 10 SDK 10.0.10240 ■ .NET Framework SDK ○ A real shell like MSYS2 ● Pick your poison! Download Tensorflow source from GitHub or Docker - Android Studio - Android API level - Android NDK - Gradle - Bazel
  • 7. Establish your Android app Preparation Install prereqs Install latest versions of APIs, SDKs, IDEs, and build tools Preparation Clone repo Get Tensorflow source from Docker, Github, etc. Understand & Build Open app code Edit app code to use Sceneform fragment rather than Camera- ConnectionFragment Bust your head Build with Bazel This smooths object detection, improves tracking on recognized entities Build More Add AR code Hit test the bounding box and draw the 3D model relative to that point Finish Profit! Or, fix problems and build your own TFLite model
  • 8. Start Modifying Code Code root: tensorflow/tensorflow/lite/examples/android/app ● Consider copying to a different folder ● Add Sceneform dependencies to Gradle build ● Update Gradle build to latest Tools, API >= 26 ● Add AR permissions to Android Manifest ● Make new Layout incorporating ArFragment ● Use this Layout in your CameraActivity ○ Or make it a separate class ○ Update Manifest with new Activity ○ Ensure DetectorActivity extends it Gradle downloads ML model assets
  • 9. Establish your Android app Preparation Install prereqs Install latest versions of APIs, SDKs, IDEs, and build tools Preparation Clone repo Get Tensorflow source from Docker, Github, etc. Understand & Build Open app code Edit app code to use Sceneform fragment rather than Camera- ConnectionFragment Bust your head Build with Bazel This smooths object detection, improves tracking on recognized entities Build More Add AR code Hit test the bounding box and draw the 3D model relative to that point Finish Profit! Or, fix problems and build your own TFLite model
  • 10. Build with Bazel ● Define androidsdk and androidndk path in WORKSPACE ● Omit API level & build tools version ● cd to tensorflow/ ● Run bazel build //tensorflow/lite/examples/android:tflite_demo ● Funky Windows business in “Windows Kits” directory ● Pray hard!
  • 12. Establish your Android app Preparation Install prereqs Install latest versions of APIs, SDKs, IDEs, and build tools Preparation Clone repo Get Tensorflow source from Docker, Github, etc. Understand & Build Open app code Edit app code to use Sceneform fragment rather than Camera- ConnectionFragment Bust your head Build with Bazel This smooths object detection, improves tracking on recognized entities Build More Add AR code Hit test the bounding box and draw the 3D model relative to that point Finish Profit! Or, fix problems and build your own TFLite model
  • 13. Add Augmented Reality Code ● Can’t use Bazel anymore ○ Incorporate object detection model into src/main/jniLibs ○ Set parameter for CPU architecture in Gradle ● Sceneform Plugin or Gradle Instruction ○ Sceneform codelab calls for 1.4; Android Studio plugin is 1.6 ○ Best to just use Gradle instructions to create SFB assets ● Add augmented reality code to MultiBoxTracker
  • 14. Establish your Android app Preparation Install prereqs Install latest versions of APIs, SDKs, IDEs, and build tools Preparation Clone repo Get Tensorflow source from Docker, Github, etc. Understand & Build Open app code Edit app code to use Sceneform fragment rather than Camera- ConnectionFragment Bust your head Build with Bazel This smooths object detection, improves tracking on recognized entities Build More Add AR code Hit test the bounding box and draw the 3D model relative to that point Finish Profit! Or, fix problems and build your own TFLite model
  • 15. Pitfalls of AI + AR: Battery life “Turn your phone into an incendiary device! Run AI & AR at the same time.” Throttling AI is key.
  • 16. Pitfalls of AI + AR: Depth & size of object Projecting 3D object in AR requires good understanding of 3D space: ● Size of object, in pixels, proportional to the camera ● Size of object, in real life, to position 3D object correctly ● Positioning 3D object visible to user without maneuvering ● Improvement: Correlate bounding box with hit detection
  • 17. Pitfalls of AI + AR: Sensor drift Object out of the viewport? ● AR relies on point clouds, hardware sensors ● Hardware sensors likely to drift with lots of motion ● Objects anchored to world space likely to wander off Solution? ● Ensure scene has good contrast, enough corners to see every frame ● Attach objects to anchors ● Scan enough of the scene ahead of time before drawing AR
  • 18. Pitfalls of AI + AR: Tracking multiple objects ● Object detections could be missed, false, or switch IDs ● Discover correlations between objects moving on camera ○ Pairwise dependencies ○ Uniform or non-uniform hypergraph ● Multiple object tracking is easier with the tensorflowlite_demo library ● No library? Gotta code it yourself! Mitigating This ● Consumption issues? Minimize anchors as you instantiate objects ● Take the time to set up NDK and/or libraries

Notas del editor

  1. Imagine recognizing a chair with your app. A normal-sized chair might be detected and you might understand it’s about 3 feet tall and 2 feet wide. This is useful to know when you’re sizing the billboard But then how far away from the camera is the chair? You’ll need to know that in order to find out where to place the billboard in space. Now imagine if your camera picks up on a tiny chair in a dollhouse. Your original billboard would be far too big to display with the chair if it were correctly placed above the chair. But, more likely, it would be placed way beyond the chair, and then the billboard would only appear correctly if you hold your phone at a specific angle. To capture the tiny dollhouse chair correctly, we need to consider our options: