Want To Learn Some AI With JavaScript? Let's Do Facial Recognition!

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Feeling left out of the AI/Machine Learning frenzy because you are a web developer? In just 30 minutes, go from some simple starter code to doing AI, with JavaScript, in the browser! We use face-api.js to detect faces in a live video feed, and then we can draw the points, a box around the face, check age, gender, and expression, and then try and match the face(s) to another face. With a few changes, you can do facial tracking, or advanced recognition!
    This isn't building AI models, it is implementing a library and is a great way to get some exposure to machine learning before moving on to TensorFlow and the more intense work.
    FaceAPI video (images only) - • Facial Recognition wit...
    WebRTC Video - • Want to make a video c...
    Code Links:
    Starter code - github.com/robertbunch/face-a...
    Final Code - github.com/robertbunch/face-a...
    face-api.js - github.com/justadudewhohacks/...
    Tensorflow - we don't use it, but here it is -github.com/tensorflow/tfjs
    0:00 - Introduction
    0:22 - FaceAPI & Starter Code
    5:14 - Video stream
    8:22 - Setting up https (if stream fails)
    12:33 - Load models & set canvas
    16:02 - Facial Detection (finally!)
    23:01 - Expressions and age/gender
    27:13 - Facial Recognition
  • Věda a technologie

Komentáře • 15

  • @user-hp2tj3nw5z
    @user-hp2tj3nw5z Před 9 dny +1

    truly an underrated channel this is an awesome content the explanations are truly simple and cheerful to watch thanks for the video little experiments on code makes the video truly amazing

    • @robertbunch-dev
      @robertbunch-dev  Před 8 dny

      Thank you so much for such a kind compliment! It is really hard to get any notice on YT, but hearing these types of comments certainly makes it worth while. Let me know if there's content you'd like to see.

  • @sawyersoucie9462
    @sawyersoucie9462 Před 23 dny +1

    This is awesome

  • @mahim_masrafi
    @mahim_masrafi Před 23 dny +1

    good tutorial i was about to follow through and make it myself...thanks

    • @robertbunch-dev
      @robertbunch-dev  Před 21 dnem

      Glad it helped. And make one... always better to have more good content available!

  • @rahuldas6109
    @rahuldas6109 Před 25 dny +1

    Wow! It's so simple to understand and I tried that, it's actually worked. New subscriber here 😁
    Sir is it possible to enhance face recognition by making it recognise only real person face?

    • @rahuldas6109
      @rahuldas6109 Před 24 dny

      And is it possible to do multiple face recognition instead of 1?

    • @robertbunch-dev
      @robertbunch-dev  Před 21 dnem +1

      Do you mean "real" face vs. a generated one, or vs. a poster?

    • @robertbunch-dev
      @robertbunch-dev  Před 21 dnem +1

      For this one, do you mean match all the faces in a given picture, with multiple reference images?

    • @rahuldas6109
      @rahuldas6109 Před 21 dnem

      @@robertbunch-dev yes sir, I mean the real people faces and not detectel the fake faces like in posters

  • @user-fm7df4dl7w
    @user-fm7df4dl7w Před 26 dny +2

    Please could you make video about mediasoup 🙏

  • @rahuldas6109
    @rahuldas6109 Před 23 dny +1

    Sir could you please create a video on how to do face recognition in react using offline face api instead of using npm package cause it's too slow. Way too slow. Along with that it's better to create it like mult face recognition, for instance create a labelled_image folder and under that folder there will be multiple folders according to the person name like Tony Stark, Clark Kent, etc and each folders has several images with different angels & lighting & others for better face predictions

    • @robertbunch-dev
      @robertbunch-dev  Před 21 dnem +2

      I will do a little research. I was working on a celebrity look-alike app, but I'll see what I can find for a more efficient library!

    • @rahuldas6109
      @rahuldas6109 Před 21 dnem

      @@robertbunch-dev thank you so much sir 😁, I was confused about what I was saying. I mean to say that when I downloaded faceapi.js using npm then the modules loading & face recognition was very slow while without using the npm package of faceapi.js, when I used face-api.min.js which was downloaded, the module loading & face recognition was faster without using React but in react it was difficult to use face-api.min.js cause it's showing faceapi not defined even when I added script for face-api.min.js in index.html in public folder and modules folder along with face-api.min.js is in public folder.