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

Who's afraid of ML? V2 : First steps with MlKit

Who's afraid of ML? V2 : First steps with MlKit

Although it is buzzing nowadays, machine learning is still a mystery to many of us.
However, worry not! Making your app smarter has just become possible with the new Firebase ML-Kit.
On this talk, we’ll get to know some basic ML concepts to clear the air around the topic: what Machine Learning even means? how does it work? what does it have to do with our actual brain? Then, we'll explore how to create our first machine learning Android app with ML-Kit and TensorFlow Lite!

Blog post series: http://bit.ly/brittML-P1

Britt Barak

August 20, 2018
Tweet

More Decks by Britt Barak

Other Decks in Technology

Transcript

  1. Who is afraid of
    Machine Learning?
    Britt Barak
    & First Steps With ML-Kit
    V.2
    @Britt Barak

    View full-size slide

  2. Britt Barak
    DevRel - Nexmo
    Google Developer Expert
    Women Techmakers Israel
    Britt Barak @brittBarak

    View full-size slide

  3. =
    @BrittBarak

    View full-size slide

  4. .
    @BrittBarak

    View full-size slide

  5. Strawberry
    Not
    Strawberry
    @BrittBarak

    View full-size slide

  6. This is a strawberry
    @BrittBarak

    View full-size slide

  7. This is a strawberry
    Red
    Seeds
    pattern
    Top
    leaves
    @BrittBarak

    View full-size slide

  8. Input
    Red
    Seeds
    pattern
    Top
    leaves
    @BrittBarak

    View full-size slide

  9. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    @BrittBarak

    View full-size slide

  10. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    @BrittBarak

    View full-size slide

  11. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    @BrittBarak

    View full-size slide

  12. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    0.5
    0.8
    0.3
    @BrittBarak

    View full-size slide

  13. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    0.5
    0.8
    0.3
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    @BrittBarak

    View full-size slide

  14. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    0.5
    0.8
    0.3
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    1.04
    @BrittBarak

    View full-size slide

  15. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    0.5
    0.8
    0.3
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    1.04
    + 0.7
    @BrittBarak

    View full-size slide

  16. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    0.5
    0.8
    0.3
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    1.04
    + 0.7
    1.74
    @BrittBarak

    View full-size slide

  17. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    1.74
    0.5
    0.8
    0.3
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    1.04
    + 0.7
    1.74
    @BrittBarak

    View full-size slide

  18. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    1.74
    0.5
    0.8
    0.3
    @BrittBarak

    View full-size slide

  19. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.74
    Top
    leaves
    @BrittBarak

    View full-size slide

  20. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    @BrittBarak

    View full-size slide

  21. 0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    Output
    Not
    Strawberry
    Strawberry
    @BrittBarak

    View full-size slide

  22. Not
    Strawberry
    Strawberry
    0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  23. Not
    Strawberry
    Strawberry
    0.87
    0.13
    0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  24. Not
    Strawberry
    Strawberry
    0.87
    0.13
    0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  25. Not
    Strawberry
    Strawberry
    0.7
    0.03
    0.01
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  26. Not
    Strawberry
    Strawberry
    0.7
    0.03
    0.01
    Input
    Red
    Seeds
    pattern
    3.72
    0.89
    1.92
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  27. Not
    Strawberry
    Strawberry
    0.2
    0.8
    0.7
    0.03
    0.01
    Input
    Red
    Seeds
    pattern
    3.72
    0.89
    1.92
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  28. Strawberry Not
    Not
    Not
    Strawberry
    Strawberry
    Not
    Not
    Not
    0.5 * 0.64
    + 0.8 * 0.75
    + 0.3 * 0.4
    1.04
    + 0.7
    1.74
    @BrittBarak

    View full-size slide

  29. Training
    @BrittBarak

    View full-size slide

  30. Not
    Strawberry
    Strawberry
    0.87
    0.13
    0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    1.02
    1.74
    0.97
    Top
    leaves
    Output
    @BrittBarak

    View full-size slide

  31. Not
    Strawberry
    Strawberry
    0.87
    0.13
    0.64
    0.75
    0.4
    Input
    Red
    Seeds
    pattern
    Top
    leaves
    Output
    Hidden
    @BrittBarak

    View full-size slide

  32. Data science

    View full-size slide

  33. Pre Trained Model

    View full-size slide

  34. Strawberry
    @BrittBarak

    View full-size slide

  35. Strawberry
    @BrittBarak

    View full-size slide

  36. Why a local model?
    •Security
    •Privacy
    •Latency
    •Bandwith
    •Performance
    •Offline support
    •…
    @BrittBarak

    View full-size slide

  37. •Out-of-the-box use cases
    •On-device / cloud management
    •Deploy custom models
    beta
    @BrittBarak

    View full-size slide

  38. Text Recognition
    @BrittBarak

    View full-size slide

  39. Face Detection
    @BrittBarak

    View full-size slide

  40. Barcode Scanning
    @BrittBarak

    View full-size slide

  41. Landmark Recognition
    @BrittBarak

    View full-size slide

  42. Image Labeling
    @BrittBarak

    View full-size slide

  43. Custom Models
    @BrittBarak

    View full-size slide

  44. Image
    Classifier
    classifier
    .classify(bitmap)
    label
    @BrittBarak

    View full-size slide

  45. •Run on device model
    •Run on cloud model
    •Run a custom model
    Image Classifier
    Device Model
    Cloud Model
    Custom Model
    @BrittBarak

    View full-size slide

  46. Image Classifier
    Device Model
    Cloud Model
    Custom Model
    @BrittBarak

    View full-size slide

  47. 1. Setup Firebase Detector
    @BrittBarak

    View full-size slide

  48. FirebaseVision.getInstance()
    @BrittBarak

    View full-size slide

  49. Image Classifier
    FirebaseVisionLabelDetector localDetector =
    FirebaseVision.getInstance()
    .getVisionLabelDetector()
    @BrittBarak

    View full-size slide

  50. 2. Process input
    @BrittBarak

    View full-size slide

  51. FirebaseVisionImage
    •Bitmap
    •byteArray
    •byteBuffer
    •image Uri
    •Media Image
    @BrittBarak

    View full-size slide

  52. Image Classifier
    image = FirebaseVisionImage.fromBitmap(bitmap)
    @BrittBarak

    View full-size slide

  53. 3. Execute the model
    @BrittBarak

    View full-size slide

  54. Image Classifier
    localDetector.detectInImage(image)
    .addOnSuccessListener(
    new OnSuccessListener>(){
    void onSuccess(List labels){
    processResult(labels, callback);
    }
    })
    }
    @BrittBarak

    View full-size slide

  55. Image Classifier
    localDetector.detectInImage(image)
    .addOnSuccessListener(
    new OnSuccessListener>(){
    void onSuccess(List labels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  56. Image Classifier
    localDetector.detectInImage(image)
    .addOnSuccessListener(
    new OnSuccessListener>(){
    void onSuccess(List labels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  57. 4. Process result
    @BrittBarak

    View full-size slide

  58. Image Classifier
    localDetector.detectInImage(image)
    .addOnSuccessListener(
    new OnSuccessListener>(){
    void onSuccess(List labels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  59. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  60. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  61. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  62. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  63. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  64. Image Classifier
    void processResult(List labels,
    ClassifierCallback callback) {
    resultLabels.clear();
    labels.sort(localLabelComparator);
    for (int i = 0;
    i < Math.min(RESULTS_TO_SHOW,labels.size()); ++i) {
    FirebaseVisionLabel label = labels.get(i);
    resultLabels.add(
    label.getLabel() + ":" + label.getConfidence());
    }
    callback.onClassified(resultLabels);
    }
    @BrittBarak

    View full-size slide

  65. Result :
    @BrittBarak

    View full-size slide

  66. Result :
    @BrittBarak

    View full-size slide

  67. Result :
    @BrittBarak

    View full-size slide

  68. Image Classifier
    Device Model
    Cloud Model
    Custom Model
    @BrittBarak

    View full-size slide

  69. 1. Setup Firebase Detector
    @BrittBarak

    View full-size slide

  70. Image Classifier
    cloudDetector =
    FirebaseVision.getInstance()
    .getVisionCloudLabelDetector()
    @BrittBarak

    View full-size slide

  71. 2. Process input
    [the same]
    @BrittBarak

    View full-size slide

  72. Image Classifier
    image = FirebaseVisionImage.fromBitmap(bitmap)
    @BrittBarak

    View full-size slide

  73. 3. Execute the model
    [same - almost!]
    @BrittBarak

    View full-size slide

  74. Image Classifier
    cloudDetector.detectInImage(image)
    .addOnSuccessListener(
    new
    OnSuccessListener>(){
    void
    onSuccess(Listlabels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  75. Image Classifier
    cloudDetector.detectInImage(image)
    .addOnSuccessListener(
    new
    OnSuccessListener>(){
    void
    onSuccess(Listlabels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  76. Image Classifier
    cloudDetector.detectInImage(image)
    .addOnSuccessListener(
    new
    OnSuccessListener>(){
    void
    onSuccess(Listlabels){
    processResult(labels, callback);
    }
    })
    @BrittBarak

    View full-size slide

  77. 4. Process result
    [same - almost!]
    @BrittBarak

    View full-size slide

  78. Result :
    @BrittBarak

    View full-size slide

  79. Result :
    @BrittBarak

    View full-size slide

  80. Result :
    @BrittBarak

    View full-size slide

  81. Result :
    @BrittBarak

    View full-size slide

  82. Result :
    @BrittBarak

    View full-size slide

  83. Result :
    @BrittBarak

    View full-size slide

  84. Result :
    @BrittBarak

    View full-size slide

  85. Result :
    @BrittBarak

    View full-size slide

  86. Image Classifier
    Device Model
    Cloud Model
    Custom Model
    @BrittBarak

    View full-size slide

  87. TensorFlow
    - Open source
    - Widely used
    - Flexible for scale:
    - 1 or more CPUs / GPUs
    - desktop, server, mobile device
    @BrittBarak

    View full-size slide

  88. TensorFlow Mobile
    - Speech Recognition
    - Image Recognition
    - Object Localization
    - Gesture Recognition
    - Translation
    - Text Classification
    - Voice Synthesis
    @BrittBarak

    View full-size slide

  89. Lightweight Fast Cross platform
    @BrittBarak

    View full-size slide

  90. MobileNet
    Inception
    -V3
    SmartReply
    Models
    @BrittBarak

    View full-size slide

  91. beta
    @BrittBarak

    View full-size slide

  92. Image
    Classifier
    classifier
    .classify(bitmap)
    label
    @BrittBarak

    View full-size slide

  93. 0. Host the model
    @BrittBarak

    View full-size slide

  94. Where to host?
    •Remotely
    •On device
    @BrittBarak

    View full-size slide

  95. 0.1. Host on Firebase
    @BrittBarak

    View full-size slide

  96. 0.2 Save on device
    @BrittBarak

    View full-size slide

  97. 0.2 Save on device
    build.gradle
    android {

    aaptOptions {

    noCompress "tflite"

    }

    }
    @BrittBarak

    View full-size slide

  98. 0.1. Load the model
    @BrittBarak

    View full-size slide

  99. Image Classifier
    void configureModelDownloadManager() {
    FirebaseModelManager modelManager =
    FirebaseModelManager.getInstance();
    }
    @BrittBarak

    View full-size slide

  100. 0.1.1 config local model
    @BrittBarak

    View full-size slide

  101. Image Classifier
    void configureModelDownloadManager() {
    //…
    localModelSource =
    new FirebaseLocalModelSource
    .Builder("asset")
    .setAssetFilePath(LOCAL_MODEL_ASSET)
    .build();
    modelManager.
    registerLocalModelSource(localModelSource);
    }
    @BrittBarak

    View full-size slide

  102. Image Classifier
    void configureModelDownloadManager() {
    //…
    localModelSource =
    new FirebaseLocalModelSource
    .Builder("asset")
    .setAssetFilePath(LOCAL_MODEL_ASSET)
    .build();
    modelManager.
    registerLocalModelSource(localModelSource);
    }
    @BrittBarak

    View full-size slide

  103. 0.1.2 config hosted model
    @BrittBarak

    View full-size slide

  104. Image Classifier
    void configureModelDownloadManager() {
    //…
    cloudSource = new
    FirebaseCloudModelSource.Builder(HOSTED_MODEL_NAME)
    .enableModelUpdates(true)
    .setInitialDownloadConditions(conditions)
    .setUpdatesDownloadConditions(conditions)
    .build();
    modelManager.registerCloudModelSource(cloudSource);
    }
    @BrittBarak

    View full-size slide

  105. Image Classifier
    void configureModelDownloadManager() {
    //…
    cloudSource = new
    FirebaseCloudModelSource.Builder(HOSTED_MODEL_NAME)
    .enableModelUpdates(true)
    .setInitialDownloadConditions(conditions)
    .setUpdatesDownloadConditions(conditions)
    .build();
    modelManager.registerCloudModelSource(cloudSource);
    }
    @BrittBarak

    View full-size slide

  106. Image Classifier
    void configureModelDownloadManager() {
    //…
    cloudSource = new
    FirebaseCloudModelSource.Builder(HOSTED_MODEL_NAME)
    .enableModelUpdates(true)
    .setInitialDownloadConditions(conditions)
    .setUpdatesDownloadConditions(conditions)
    .build();
    modelManager.registerCloudModelSource(cloudSource);
    }
    @BrittBarak

    View full-size slide

  107. Image Classifier
    void configureModelDownloadManager() {
    //…
    cloudSource = new
    FirebaseCloudModelSource.Builder(HOSTED_MODEL_NAME)
    .enableModelUpdates(true)
    .setInitialDownloadConditions(conditions)
    .setUpdatesDownloadConditions(conditions)
    .build();
    modelManager.registerCloudModelSource(cloudSource);
    }
    @BrittBarak

    View full-size slide

  108. Image Classifier
    void configureModelDownloadManager() {
    //…
    cloudSource = new
    FirebaseCloudModelSource.Builder(HOSTED_MODEL_NAME)
    .enableModelUpdates(true)
    .setInitialDownloadConditions(conditions)
    .setUpdatesDownloadConditions(conditions)
    .build();
    modelManager.registerCloudModelSource(cloudSource);
    }
    @BrittBarak

    View full-size slide

  109. Image Classifier
    void configureModelDownloadManager() {
    //…
    conditions =
    new FirebaseModelDownloadConditions
    .Builder()
    .requireWifi()
    .build();
    }
    @BrittBarak

    View full-size slide

  110. Image Classifier
    void configureModelDownloadManager() {
    //…
    conditions =
    new FirebaseModelDownloadConditions
    .Builder()
    .requireWifi()
    .build();
    }
    @BrittBarak

    View full-size slide

  111. 1. Setup the interpreter
    @BrittBarak

    View full-size slide

  112. classifier
    .classify(bitmap
    Image Classifier
    Labels
    label
    Input ByteBuffer
    Output
    ProbArray
    Model

    View full-size slide

  113. Image Classifier
    int[] inputDims = {DIM_BATCH_SIZE, DIM_IMG_SIZE_X,
    DIM_IMG_SIZE_Y, DIM_PIXEL_SIZE};
    int[] outputDims = {DIM_BATCH_SIZE,
    mLabelList.size()};
    mDataOptions = new
    FirebaseModelInputOutputOptions.Builder()
    .setInputFormat(0,
    FirebaseModelDataType.BYTE, inputDims)
    .setOutputFormat(0,
    FirebaseModelDataType.BYTE, outputDims)
    .build();
    @BrittBarak

    View full-size slide

  114. Image Classifier
    int[] inputDims = {DIM_BATCH_SIZE, DIM_IMG_SIZE_X,
    DIM_IMG_SIZE_Y, DIM_PIXEL_SIZE};
    int[] outputDims = {DIM_BATCH_SIZE,
    mLabelList.size()};
    mDataOptions = new
    FirebaseModelInputOutputOptions.Builder()
    .setInputFormat(0,
    FirebaseModelDataType.BYTE, inputDims)
    .setOutputFormat(0,
    FirebaseModelDataType.BYTE, outputDims)
    .build();
    @BrittBarak

    View full-size slide

  115. 0.2 Save on device
    @BrittBarak

    View full-size slide

  116. Image Classifier
    //…
    mDataOptions = new
    FirebaseModelInputOutputOptions.Builder()
    .setInputFormat(0,
    FirebaseModelDataType.BYTE, inputDims)
    .setOutputFormat(0,
    FirebaseModelDataType.BYTE, outputDims)
    .build();
    @BrittBarak

    View full-size slide

  117. Image Classifier
    //…
    modelOptions = new
    FirebaseModelOptions.Builder()
    .setCloudModelName(HOSTED_MODEL_NAME)
    .setLocalModelName("asset")
    .build();
    interpreter = FirebaseModelInterpreter
    .getInstance(modelOptions);
    @BrittBarak

    View full-size slide

  118. Image Classifier
    //…
    modelOptions = new
    FirebaseModelOptions.Builder()
    .setCloudModelName(HOSTED_MODEL_NAME)
    .setLocalModelName("asset")
    .build();
    interpreter = FirebaseModelInterpreter
    .getInstance(modelOptions);
    @BrittBarak

    View full-size slide

  119. 1. Process Input
    @BrittBarak

    View full-size slide

  120. Image Classifier
    void executeCustom(Bitmap selectedImage) {
    //…
    imgData = convertBitmapToByteBuffer(selectedImage);
    inputs = new FirebaseModelInputs
    .Builder()
    .add(imgData)
    .build();
    runCustomModel(inputs, start);
    }
    @BrittBarak

    View full-size slide

  121. Image Classifier
    void executeCustom(Bitmap selectedImage) {
    //…
    imgData = convertBitmapToByteBuffer(selectedImage);
    inputs = new FirebaseModelInputs
    .Builder()
    .add(imgData)
    .build();
    runCustomModel(inputs,);
    }
    @BrittBarak

    View full-size slide

  122. Image Classifier
    void executeCustom(Bitmap selectedImage) {
    //…
    imgData = convertBitmapToByteBuffer(selectedImage);
    inputs = new FirebaseModelInputs
    .Builder()
    .add(imgData)
    .build();
    runCustomModel(inputs);
    }
    @BrittBarak

    View full-size slide

  123. Image Classifier
    void executeCustom(Bitmap selectedImage) {
    //…
    imgData = convertBitmapToByteBuffer(selectedImage);
    inputs = new FirebaseModelInputs
    .Builder()
    .add(imgData)
    .build();
    runCustomModel(inputs);
    }
    @BrittBarak

    View full-size slide

  124. 2. Execute Model
    @BrittBarak

    View full-size slide

  125. Image Classifier
    void runCustomModel(…){
    interpreter
    .run(inputs, mDataOptions)
    .continueWith(new
    ContinuationList>(){
    @Override Listthen
    (Task task){
    return processResult(task);
    }
    });
    }
    @BrittBarak

    View full-size slide

  126. Image Classifier
    void runCustomModel(…){
    interpreter
    .run(inputs, mDataOptions)
    .continueWith(new
    ContinuationList>(){
    @Override Listthen
    (Task task){
    return processResult(task);
    }
    });
    }
    @BrittBarak

    View full-size slide

  127. Image Classifier
    void runCustomModel(…){
    interpreter
    .run(inputs, mDataOptions)
    .continueWith(new
    ContinuationList>(){
    @Override Listthen
    (Task task){
    return processResult(task);
    }
    });
    }
    @BrittBarak

    View full-size slide

  128. 3. Process output
    @BrittBarak

    View full-size slide

  129. probArray = {
    [0.7],
    [0.3],
    [0],
    [0],
    }
    0.3
    labelList = {
    apple,
    strawberry,
    banana,
    pineapple,
    }
    @BrittBarak

    View full-size slide

  130. Result :
    @BrittBarak

    View full-size slide

  131. Result :
    @BrittBarak

    View full-size slide

  132. Result :
    @BrittBarak

    View full-size slide

  133. Result :
    @BrittBarak

    View full-size slide

  134. Result :
    @BrittBarak

    View full-size slide

  135. A new dawn of
    Machine Learning
    @BrittBarak

    View full-size slide

  136. Links
    - Tensorflow
    - https://www.tensorflow.org/
    - Tensorflow lite
    - https://www.tensorflow.org/mobile/tflite/
    - Codes labs
    - codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/
    - Google’s Machine Learning Crash Course
    - developers.google.com/machine-learning/crash-course/
    - [Dr. Joe Dispenza]
    @BrittBarak

    View full-size slide

  137. Thank you!
    Keep in touch!
    Britt Barak
    @brittBarak

    View full-size slide