making your app see with mobile vision api

43
RAMON RABELLO CEO @ VISYO MAKING YOUR APP SEE WITH MOBILE VISION API

Upload: ramon-ribeiro-rabello

Post on 06-Jan-2017

77 views

Category:

Mobile


1 download

TRANSCRIPT

Page 1: Making your app see with Mobile Vision API

RAMON RABELLO CEO @ VISYO

MAKING YOUR APP SEE WITH MOBILE VISION API

Page 2: Making your app see with Mobile Vision API

RAMON RABELLOabout.me/ramonrabello

Agile Community Active Member

GDG Brasília Organizer

Senior Developer ~10 years

Page 3: Making your app see with Mobile Vision API

HOW DO WE SEE?

Page 4: Making your app see with Mobile Vision API
Page 5: Making your app see with Mobile Vision API

HOW DO MACHINES SEE?

Page 6: Making your app see with Mobile Vision API
Page 7: Making your app see with Mobile Vision API

WHAT IS COMPUTER VISION?

Page 8: Making your app see with Mobile Vision API

HOW MACHINES UNDERSTAND THE WORLD

Page 9: Making your app see with Mobile Vision API
Page 10: Making your app see with Mobile Vision API

COMPUTER VISION IS EVERYWHERE!

Page 11: Making your app see with Mobile Vision API

ON ROBOTICS.

Page 12: Making your app see with Mobile Vision API

ON SECURITY.

http://www.eecs.qmul.ac.uk/assets/img/uploads/page-image/behaviour.png

Page 13: Making your app see with Mobile Vision API

ON SOCIAL NETWORKS.

Page 14: Making your app see with Mobile Vision API

ON MEDICINE.

Page 15: Making your app see with Mobile Vision API

ON GAMING.

Page 16: Making your app see with Mobile Vision API

ON CARS.

Page 17: Making your app see with Mobile Vision API

AND ALSO ON MOBILE.

Page 18: Making your app see with Mobile Vision API

MOBILE VISION API OVERVIEW

Page 19: Making your app see with Mobile Vision API

OVERVIEW COMMON FUNCTIONALITY FACE API BARCODE API TEXT API (OCR)

Page 20: Making your app see with Mobile Vision API

COMMON FUNCTIONALITY EVENT-DRIVEN PIPELINE FACE DETECTOR BARCODE DETECTOR TEXT DETECTOR

Page 21: Making your app see with Mobile Vision API

FACE API WHAT CAN WE DO WITH FACES?

Page 22: Making your app see with Mobile Vision API

FACE TRACKING

Page 23: Making your app see with Mobile Vision API

LANDMARKS DETECTION

Page 24: Making your app see with Mobile Vision API

FACE CLASSIFICATIONS EYES OPENED

0.0 1.0

Page 25: Making your app see with Mobile Vision API

FACE CLASSIFICATIONS SMILLING

0.0 1.0

Page 26: Making your app see with Mobile Vision API

FACE ORIENTATION POSE ANGLE ESTIMATION

Y

ZX

Page 27: Making your app see with Mobile Vision API

BARCODE API WHAT TO DO WITH BARCODES?

Page 28: Making your app see with Mobile Vision API

BARCODE TRACKING

FORMATS SUPPORTED

Page 29: Making your app see with Mobile Vision API

TEXT API READING TEXT FROM IMAGES

Page 30: Making your app see with Mobile Vision API

READING TEXT FROM IMAGES

18+ LANGUAGES SUPPORTED

Page 31: Making your app see with Mobile Vision API

TEXT STRUCTURE

Page 32: Making your app see with Mobile Vision API

MOBILE VISION API USAGE 1. ADD DEPENDENCIES 2. ADD META-DATA ON MANIFEST 3. CREATE DETECTOR 4. CHECK IF DETECTOR IS OPERATIONAL 5. CREATE FRAME 6. DETECT FACES

Page 33: Making your app see with Mobile Vision API

ADD DEPENDENCIES build.gradle

dependencies {

compile 'com.google.android.gms:play-services-vision:{version}'

}

Page 34: Making your app see with Mobile Vision API

ADD META-DATA ON MANIFEST

AndroidManifest.xml

<application…> <meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="face" />

</application>

Page 35: Making your app see with Mobile Vision API

CREATE DETECTOR onCreate()

FaceDetector faceDetector = new FaceDetector.Builder(context) .setTrackingEnabled(false) .setProminentFaceOnly(false) .setMode(FaceDetector.FAST_MODE) .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS) .setLandmarkType(FaceDetector.NO_LANDMARKS) .build();

Page 36: Making your app see with Mobile Vision API

CHECK IF DETECTOR IS OPERATIONAL

onCreate()

faceDetector.isOperational(){

// code to detect faces here

}

downloads a native library, when run for the first time.

Page 37: Making your app see with Mobile Vision API

CREATE FRAME

Bitmap bitmap = …; // read Bitmap

Frame frame = new Frame.Builder() .setBitmap(bitmap) .build();

onCreate()

Page 38: Making your app see with Mobile Vision API

DETECT FACES

SparseArray<Face> faces = detector.detect(frame);

// face(s) detected if (faces.size() > 0){

}

onCreate()

Page 39: Making your app see with Mobile Vision API

DEMO THE FACEMINATOR

/visyo/faceminator/

Page 40: Making your app see with Mobile Vision API

WHAT’S NEXT? MOBILE VISION GUIDE https://developers.google.com/vision/

Page 41: Making your app see with Mobile Vision API

WHAT’S NEXT? VISION SAMPLES https://github.com/googlesamples/android-vision

Page 42: Making your app see with Mobile Vision API

WHAT’S NEXT? DEVBYTES https://www.youtube.com/androiddevelopers