Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MLKit DevFest18 ATL

bolot
September 22, 2018

MLKit DevFest18 ATL

MLKit: AI Commoditized

Incorporating computer vision or artificial intelligence in mobile applications used to involve a number of challenges: specialized expertise, limited computing power, limited budgets. Nowadays, thanks to widespread availability of open source machine learning libraries and models, immense power is within reach of many. MLKit aims to further break down barriers for Android and iOS developers and offers several ready-to-deploy models out of the box.

References
https://www.bignerdranch.com/blog/google-io-2018-ai-commoditized/
https://firebase.google.com/products/ml-kit/
https://medium.com/google-developer-experts/exploring-firebase-mlkit-on-android-introducing-mlkit-part-one-98fcfedbeee0
https://www.youtube.com/watch?v=FwFduRA_L6Q – Convolutional Neural Network Demo 1993
https://en.wikipedia.org/wiki/Artificial_neural_network
https://en.wikipedia.org/wiki/Convolutional_neural_network
https://github.com/zalandoresearch/fashion-mnist
https://code.oursky.com/tensorflow-svm-image-classifications-engine/
http://www.visualcapitalist.com/debunking-8-myths-ai-workplace/
https://research.googleblog.com/2018/03/semantic-image-segmentation-with.html – pixel-level segmentation
https://research.googleblog.com/2017/06/supercharge-your-computer-vision-models.html – bounding boxes
https://www.youtube.com/watch?v=xVJwwWQlQ1o – Neural Style Transfer
https://research.googleblog.com/2016/10/supercharging-style-transfer.html
http://karpathy.github.io/2015/05/21/rnn-effectiveness/

Education
https://www.deeplearning.ai
https://www.deeplearningbook.org
https://ai.google/education
https://developers.google.com/machine-learning/crash-course/
http://cs231n.stanford.edu CNNs for Visual Recognition

bolot

September 22, 2018
Tweet

More Decks by bolot

Other Decks in Programming

Transcript

  1. Supervised Unsupervised Classification Regression Clustering Dimensionality reduction Reinforcement Regularization Bayesian

    Neural networks Deep learning Support vector machines Decision tree k-Nearest neighbors k-Means Hidden Markov models
  2. Machine Learning • Supervised • Classification • Regression • Unsupervised

    • Clustering • Dimensionality reduction • Reinforcement • Q-Learning
  3. Why ML? • Task match • State of the art

    techniques • New products • Automation • Better performance • Move into new business • Competitive advantage • Cost reduction • Consumer demand • Je ne sais quoi
  4. Applications • Speech recognition • Face recognition • Machine translation

    • Image classification • News article generation • Employee access control • Protecting animals • Predicting ER wait times • Identifying heart failure • Predicting strokes and seizures • Predicting hospital readmissions • Recommendation systems
  5. Software • Caffe - Berkeley • CNTK - Microsoft •

    DL4J - Skymind • DSSTNE - Amazon • TensorFlow - Google • Theano - Université de Montréal • Torch - Google DeepMind, Facebook AI, etc. • PyTorch • Keras • Numpy, SciKit • Pandas • Matlab • Octave • R
  6. MLKit features • Face detection • Image labeling • Landmark

    recognition • Barcode scanning • Text recognition
  7. Dependencies // ML Kit dependencies implementation 'com.google.firebase:firebase-core:16.0.3' implementation 'com.google.firebase:firebase-ml-common:16.1.2' implementation

    'com.google.firebase:firebase-ml-vision:17.0.0' implementation 'com.google.firebase:firebase-ml-vision-image-label-model:15.0.0' implementation 'com.google.firebase:firebase-ml-model-interpreter:16.2.0'
  8. Face detection val options = FirebaseVisionFaceDetectorOptions.Builder() .setClassificationType(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS) .setLandmarkType(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS) .setTrackingEnabled(true) .build()

    detector = FirebaseVision.getInstance().getVisionFaceDetector(options) detector.detectInImage(image) .addOnSuccessListener { results -> for (i in faces.indices) { val face = faces[i] val faceGraphic = FaceGraphic(graphicOverlay) graphicOverlay.add(faceGraphic) faceGraphic.updateFace(face, metadata.cameraFacing) } } .addOnFailureListener { e -> }
  9. Text recognition detector = FirebaseVision.getInstance().onDeviceTextRecognizer detector.processImage(image) .addOnSuccessListener { results ->

    val blocks = results.textBlocks for (i in blocks.indices) { val lines = blocks[i].lines for (j in lines.indices) { val elements = lines[j].elements for (k in elements.indices) { val textGraphic = TextGraphic(graphicOverlay, elements[k]) graphicOverlay.add(textGraphic) } } } .addOnFailureListener { e -> }
  10. Text recognition detector = FirebaseVision.getInstance().onDeviceTextRecognizer detector.processImage(image) .addOnSuccessListener { results ->

    val blocks = results.textBlocks for (i in blocks.indices) { val lines = blocks[i].lines for (j in lines.indices) { val elements = lines[j].elements for (k in elements.indices) { val textGraphic = TextGraphic(graphicOverlay, elements[k]) graphicOverlay.add(textGraphic) } } } .addOnFailureListener { e -> }
  11. Text recognition detector = FirebaseVision.getInstance().cloudTextRecognizer detector.processImage(image) .addOnSuccessListener { results ->

    val blocks = results.textBlocks for (i in blocks.indices) { val lines = blocks[i].lines for (j in lines.indices) { val elements = lines[j].elements for (k in elements.indices) { val textGraphic = TextGraphic(graphicOverlay, elements[k]) graphicOverlay.add(textGraphic) } } } .addOnFailureListener { e -> }
  12. Text recognition detector = FirebaseVision.getInstance().cloudTextRecognizer detector.processImage(image) .addOnSuccessListener { results ->

    val blocks = results.textBlocks for (i in blocks.indices) { val lines = blocks[i].lines for (j in lines.indices) { val elements = lines[j].elements for (k in elements.indices) { val textGraphic = TextGraphic(graphicOverlay, elements[k]) graphicOverlay.add(textGraphic) } } } .addOnFailureListener { e -> }