AI JavaScript Rocks

AI JavaScript Rocks

Content level: Beginner
Many exciting things are happening with AI, from which, until recently, JavaScript developers were mostly shut out.

However, things are changing. If you can do npm install @tensorflow/tfjs or make an API call, you can now do AI.

In this fast-paced talk, I'll open your mind to what's possible by demoing several AI-powered JavaScript apps and show you how I built them using either TensorFlow.js or easy to use AI-powered APIs.

You don't need a PhD in Maths. You don't need years of experience. You just need imagination and the willingness to try.

3a6de6bc902de7f75c0e753b3202ed52?s=128

Google Developers Group Lviv

October 12, 2018
Tweet

Transcript

  1. None
  2. How to AI in JS? Asim Hussain Developer Advocate Microsoft

    AI JavaScript Rocks
  3. Asim Hussain @jawache codecraft.tv microsoft.com

  4. https://aka.ms/jawache-cda @jawache

  5. @jawache

  6. Asim Web Development Machine Learning This is @EleanorHaproff's slide

  7. None
  8. Opinion @jawache

  9. TheMojifier™ @jawache

  10. None
  11. @jawache

  12. Calculate Emotion @jawache

  13. https://towardsdatascience.com/facial-keypoints-detection-deep-learning-737547f73515

  14. Use an Artificial Neural Network @jawache

  15. Artificial Neural Networks Axon Dendrites Axons Body @jawache

  16. Artificial Neural Networks 1 23 8.6 -0.5 2.1 Activation Function

    @jawache
  17. Artificial Neural Networks 1 23 8.6 -0.5 2.1 x x

    activation(...) = -11.5 = 18.06 7.01 !-> !-> } @jawache
  18. Output 0 0 1 Input Artificial Neural Networks @jawache

  19. Output 0 -1 1 Input Artificial Neural Networks TanH @jawache

  20. Output 0 0 1 Input Artificial Neural Networks Relu @jawache

  21. Artificial Neural Networks 1.1 4.2 0.3 4 12 93 3

    @jawache
  22. Artificial Neural Networks 1.1 4.2 0.3 4 12 93 3

    - 8 = -5 @jawache
  23. Artificial Neural Networks 1.1 4.2 0.3 4 12 93 3

    - 8 = -5 @jawache
  24. Artificial Neural Networks 0.1 9.2 0.2 4 12 93 8

    @jawache
  25. @jawache https://azure.microsoft.com/services/cognitive-services/face/

  26. https:!//<region>.api.cognitive.microsoft.com/face/v1.0/detect { "url": "<path-to-image>" } @jawache

  27. @jawache

  28. Summary @jawache

  29. • Neural Networks are incredibly powerful • Conceptually, they are

    simple to understand @jawache Summary
  30. TensorFlow, MobileNet & I'm fine @jawache

  31. @jawache

  32. @jawache

  33. @jawache

  34. TensorFlow.js @jawache

  35. TensorFlow.js Train models Load pre-trained models @jawache

  36. https://github.com/tensorflow/tfjs-models @jawache MobileNet

  37. https://azure.microsoft.com/services/cognitive-services/computer-vision/ @jawache

  38. https://codepen.io/sdras/full/jawPGa/ @jawache

  39. @jawache https://twitter.com/ollee/status/930303340516216832

  40. @jawache https://twitter.com/FrontendNE/status/930120267992616960

  41. @jawache https://twitter.com/chrispiecom/status/930407801402347520

  42. Summary @jawache

  43. • TensorFlow.js doesn't have any dependancies • MobileNet is a

    simple way to analyse images • Azure Computer Vision API ❤ @jawache Summary
  44. Image2Image @jawache

  45. DEMO @jawache https://zaidalyafeai.github.io/pix2pix/cats.html

  46. @jawache Generator Discriminator ✅ ❌

  47. @jawache Generator Discriminator ✅ ❌

  48. @jawache Generator Discriminator ✅ ✅

  49. @jawache

  50. @jawache

  51. @jawache

  52. @jawache https://github.com/NVIDIA/vid2vid

  53. @jawache https://github.com/NVIDIA/vid2vid

  54. @jawache https://github.com/NVIDIA/vid2vid

  55. https://github.com/NVIDIA/vid2vid @jawache

  56. @jawache https://github.com/hanzhanggit/StackGAN

  57. Summary @jawache

  58. • GANs learn to generate new images • They take

    a lot of compute to train • But the generator model can be run in the browser @jawache Summary
  59. @jawache aka.ms/mojifier

  60. @jawache themojifer.com

  61. Tero Parviainen creative.ai Music and AI in the Browser with

    TensorFlow.js and Magenta.js
  62. Thoughts @jawache

  63. Asim Hussain @jawache codecraft.tv microsoft.com