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

Client-Side Machine Learning - Bringing AI to t...

Markus Ingvarsson
November 12, 2024
10

Client-Side Machine Learning - Bringing AI to the Frontend

Markus Ingvarsson

November 12, 2024
Tweet

Transcript

  1. C L I E N T- S I D E

    M A C H I N E L E A R N I N G B R I N G I N G A I T O T H E F R O N T E N D @markusingvarssn
  2. B R I N G I N G A I

    TO T H E F R O N T E N D After this talk, we will know about:
  3. B R I N G I N G A I

    TO T H E F R O N T E N D After this talk, we will know about: • Recent innovation that enables client-side machine learning
  4. B R I N G I N G A I

    TO T H E F R O N T E N D After this talk, we will know about: • Recent innovation that enables client-side machine learning • What client-side machine learning can do for us
  5. B R I N G I N G A I

    TO T H E F R O N T E N D After this talk, we will know about: • Recent innovation that enables client-side machine learning • What client-side machine learning can do for us • How we can start leveraging it today
  6. M A C H I N E L E A

    R N I N G I N 1 0 0 S E C O N D S https://www.linkedin.com/pulse/machine-learning-image-detectioncats-vs-dogs-amrith-kumar/
  7. M A C H I N E L E A

    R N I N G I N 1 0 0 S E C O N D S https://www.linkedin.com/pulse/machine-learning-image-detectioncats-vs-dogs-amrith-kumar/
  8. ” R E C E N T ” M AC

    H I N E L E A R N I N G I N N OVAT I O N S
  9. ” R E C E N T ” M AC

    H I N E L E A R N I N G I N N OVAT I O N S • Hardware improvements – The GPU (and the NPU, and the TPU etc)
  10. ” R E C E N T ” M AC

    H I N E L E A R N I N G I N N OVAT I O N S • Hardware improvements – The GPU (and the NPU, and the TPU etc) • Software improvements • TensorFlow (and TensorFlow.js), PyTorch
  11. P R E V I O U S TA L

    K S O N M L @ J S - P O L A N D
  12. ” R E C E N T ” M AC

    H I N E L E A R N I N G I N N OVAT I O N S • Hardware improvements – The GPU (and the NPU, and the TPU etc) • Software improvements • TensorFlow (and TensorFlow.js), PyTorch • WebGPU
  13. W E B G P U B R O W

    S E R S U P P O RT
  14. ” R E C E N T ” M AC

    H I N E L E A R N I N G I N N OVAT I O N S • Hardware improvements – The GPU (and the NPU, and the TPU etc) • Software improvements • TensorFlow (and TensorFlow.js), PyTorch • WebGPU • Technique improvements https://arxiv.org/pdf/1706.03762
  15. W H Y B R I N G I N

    G A I TO T H E C L I E N T ?
  16. W H Y B R I N G I N

    G A I TO T H E C L I E N T ? • No more network delay!
  17. W H Y B R I N G I N

    G A I TO T H E C L I E N T ? • No more network delay! https://www.keycdn.com/support/network-latency
  18. B O N U S – O F F L

    I N E S U P P O RT https://developer.chrome.com/blog/improved-pwa-offline-detection
  19. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E https://github.com/tensorflow/tfjs- models/tree/master/hand-pose-detection
  20. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E • We will use TensorFlow.js and MediaPipe
  21. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E • We will use TensorFlow.js and MediaPipe • Developed by Google
  22. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E • We will use TensorFlow.js and MediaPipe • Developed by Google • MediaPipe Models gives us tons of light-weight ML models for free
  23. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E • We will use TensorFlow.js and MediaPipe • Developed by Google • MediaPipe Models gives us tons of light-weight ML models for free • Can be customizable through MediaPipe Model Maker
  24. F A S T O N - D E V

    I C E M L W I T H T FJ S A N D M E D I A P I P E • We will use TensorFlow.js and MediaPipe • Developed by Google • MediaPipe Models gives us tons of light-weight ML models for free • Can be customizable through MediaPipe Model Maker • We will use the @mediapipe/hands library in this demo.
  25. W H Y B R I N G I N

    G A I TO T H E C L I E N T ?
  26. W H Y B R I N G I N

    G A I TO T H E F R O N T E N D ? • No more network delay! • Privacy https://pub.towardsai.net/43-memorag-rag-agent-rag-fusion-and-more-7b8463590747
  27. P R I V A T E A I W

    I T H A S K - M Y- P D F https://github.com/nico-martin/ask-my-pdf
  28. S C E N A R I O – P

    E R S O N W I T H C H R O N I C B A C K P A I N
  29. S C E N A R I O – P

    E R S O N W I T H C H R O N I C B A C K P A I N
  30. W H Y B R I N G I N

    G A I TO T H E F R O N T E N D ? • No more network delay! • Privacy • Cost
  31. M A C H I N E L E A

    R N I N G A N D C O S T https://ux- news.com/google- announces-new-virtual- try-on-tools/
  32. M A C H I N E L E A

    R N I N G A N D C O S T https://www.reddit.com/r/Programm erHumor/comments/1cxfjws/tenouto ftendentistsrecommend/?rdt=61385
  33. ng-pet-cam • Heavily inspired by Jason Mayes pet-cam app •

    Uses @tensorflow- models/coco-ssd for object- detection • An app to monitor your pet 🐶 • Is live on https://ngpetcam.web.app and code can be accessed on https://github.com/markusingv arsson/aiayn-ng-pet-cam
  34. S U M M A RY • Dedicated hardware is

    required for client-side machine learning
  35. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense:
  36. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense: • Smooth on-device performance
  37. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense: • Smooth on-device performance • Offline Support
  38. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense: • Smooth on-device performance • Offline Support • Privacy
  39. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense: • Smooth on-device performance • Offline Support • Privacy • Enable ML when Server-Side ML is impractical (e.g. cost)
  40. S U M M A RY • Dedicated hardware is

    required for client-side machine learning • When client-side machine learning makes sense: • Smooth on-device performance • Offline Support • Privacy • Enable ML when Server-Side ML is impractical (e.g. cost) • Optimistic future
  41. C L I E N T- S I D E

    M A C H I N E L E A R N I N G B R I N G I N G A I T O T H E F R O N T E N D Connect with me!