In this video, I use the “pre-trained” MobileNet model to classify the content of an image. #machinelearning #mobilenet #imageclassification #ml5 #p5js

💻Course:
🎥Previous Video:
🎥Next Video:
🎥Full Playlist:

Links discussed in this course:
🔗 ml5.js:
🔗 Image-Net: image-net.org/index
🔗 MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications:
🎥 p5.js Workflow:
🎥 ES6 Promises:

🚂Website:
💡Github:
💖Membership:
🛒Store:
📚Books:
🖋️Twitter:
Video editing by Mathieu Blanchette.

🎥Coding Challenges:
🎥Intro to Programming using p5.js:

📄 Code of Conduct:
🌐Help us caption and translate:
🚩Suggest Topics:
👾Share your contribution:

🔗 p5.js:
🔗 Processing:

Nguồn:https://madisonrep.org/

44 Comments

Petr G.

February 19, 2020

This guy is teaching Machine Learning to kindergarden kiddies?

Reply

rıfat cakır

February 19, 2020

if you need an example on how to train your own model and dataset, check this https://medium.com/analytics-vidhya/create-tensorflow-image-classification-model-with-your-own-dataset-in-google-colab-63e9d7853a3e

Reply

Ananta Kr. Roy

February 19, 2020

@4:33 This was the doubt I too was facing. In fact, with the limited trained data in MobileNet here, I found that the confidence scores did not add upto 1(contrary to what I felt like) for imaes like that of a valley of flowers maybe due to limited pre trained data. A total beginner here. Would like to be corrected.

Reply

Mike_Vahe Moubayed

February 19, 2020

Can we draw a rectangle around the puffin and get the x, y

Reply

Trevor de Jongh

February 19, 2020

I am really enjoying this ml5.js project. I'm not very good at all of this yet, so i was wondering if you would be able to point me out to a tutorial on how to load multiple models for image classification rather than one at a time. Thanks for the great tutorials

Reply

Andrew Frame

February 19, 2020

Hello 2020 guests

Reply

LawfulNeutral

February 19, 2020

Anyone trying to use this now? I can't even seem to load an image of the puffin onto my web browser with identical code (I'm using Mozilla Firefox)

Reply

Joe Reynolds

February 19, 2020

Thanks so much for the videos, these are all amazing! I was wondering if you/ someone would be able to help me alter the code for this so that it always accesses the rear camera instead of the front facing camera? Thanks again

Reply

agata0214

February 19, 2020

This is amazing… so cool!

Reply

Jeff Guess

February 19, 2020

I can't seem to get this to work with version 0.4.3… (with 0.1.1 yes)

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/classification/2/model.json?tfjs-format=file 2. (Reason: CORS request did not succeed).

or

GET https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/classification/2/model.json?tfjs-format=file net::ERR_NAME_NOT_RESOLVED

if i try to go to

https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/classification/2/model.json?tfjs-format=file

i get “We’re having trouble finding that site.”

does this mean the mobilenet server is down ?
is anyone else having the same problem ?

Reply

Davide Barranca

February 19, 2020

In case anyone wants to use MobileNet locally (offline), it is possible to download a local copy of the model json file and reference its path, see on GitHub a repository named "ml5-data-and-models-server"

Reply

Muhammad Owais

February 19, 2020

ml5.imageClassifer() is not a function

Reply

Srinivas Mangipudi

February 19, 2020

Dan you're so much fun! Thank you!

Reply

Krishiv Agarwal

February 19, 2020

It isn't working on brackets.

Reply

Doing Something Different

February 19, 2020

1 year anniversary! For this anniversary, I'm going to actually learn this xD

Reply

sakthi sethu

February 19, 2020

When I run the above code, I get the error "sketch.js:18 Error: Failed to link vertex and fragment shaders.". When I googled it and got a solution as "Same here, solved by disable gpu backend _tfengine.ENV.set('WEBGL_PACK', false) before you do anything with tensorflow. An other option would be upgrade your graphic card driver~" . But I do not know how to apply it. Anyone got this error and resolved it ?

Reply

Schmeekeer

February 19, 2020

21:06 Maybe because you resized the image so it fits the canvas.

Reply

Bhupinder

February 19, 2020

Hi there,

I want to know, is there a way to use object or image recognition on internet or website like on Amazon or Walmart to product images recognition, etc, rather than using real-time object detection via webcam. please reply

Reply

enivaldo bonelli

February 19, 2020

let label = results[0].label;
let conf = results[0].confidence;

Reply

enivaldo bonelli

February 19, 2020

May, 2019. In the p5js editor image is being loaded automatically, only with the image() command.

Reply

tanjeri Purushotham

February 19, 2020

how to run the code in server mode..???
bcz while I'm opening with index.html in browser its not opening with classification work??>

Reply

Harsha Vardhan

February 19, 2020

How do i intergate P5.js within a React js project?

Reply

Johan Verm

February 19, 2020

Maybe js is the future for ML/classification cause it's closests to the internet than any other language..The database to handle with is enormous..maybe it's more a matter of copyright and privacy that's is not booming?.I was playing with google colab ,kaggle and tensorflow but the inputdata is always limited..So…Or i'm I wrong…I!m more an artist than a programmer so i don't see it that clearly..Keep up the good work ..It's great !!(and fun)

Reply

Suhyun Park

February 19, 2020

Thank you so much!!

Reply

Fitz

February 19, 2020

That puffin really does look like Drake.

Reply

Yas var

February 19, 2020

Could you also explain how to retrain a preexisting model using newer images ? Also, I know you love pure javascript but maybe a couple video using tensorflow and ml5 on a framework like React or Angular would be really appreciated ! Thanks!

Reply

Texplanations

February 19, 2020

Its all cool and stuff.. but I wanna learn how it got trained… how do I learn that?

Reply

John Smith

February 19, 2020

Hey Dan, trying out your code of this class in p5.js and kept getting the error "Uncaught ReferenceError: ml5 is not defined ". I checked the code and it looked right so I went to your git hub page with the code, copied it and pasted it in the p5 editor and still got the same error. What should I add to make the code work? P.S. love your videos.

Reply

Filippo Coppola

February 19, 2020

I got this error "DOMException: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded."

Reply

T.J. Cody

February 19, 2020

whenever i try to run the code i get an error in the console that says failed to execute 'texImage2D' on 'WebGL2RenderContext': The image element contains cross-origin dad , and may not be loaded.

The issue is that i used the same code and i used the same picture so i dont know what is wrong

Reply

Hector Lino Mauvecin Junior

February 19, 2020

How does i to run the program ?

Reply

nee tizen

February 19, 2020

why you do deep breathing with only say,
so cute 😀

Reply

Haris Ghauri

February 19, 2020

Hi, I know this is not a callback/asynchronous programming video. I still want to clarify one thing. Since your image reading code is asynchronous and modelReady code is also asynchronous, what if your image took longer to be read i.e. lets say you were reading it over the network or something. And your model got ready before your imageReady, would there be any errors? I am asking this is because if you tried predicting puffin before it was even ready, would Javascript be smart enough to handle it?

Reply

Koidja Web Development

February 19, 2020

If you want to implement ml5.js MobileNet model with React.js, check this article:
https://medium.com/@julienrioux/in-browser-ml-with-react-js-and-ml5-js-f3eeb5149404

Reply

abidur rahman

February 19, 2020

<3

Reply

AKASH MANDAL

February 19, 2020

I tried your code from github…but my browser showing webgl not supporting… Please help

Reply

Bảo Linh Đỗ

February 19, 2020

This is the first video i watched and it's so cool. i'm newbie so can you tell me how do you build this in 127.0.0.1 server??

Reply

Joshua Pack

February 19, 2020

Your videos are great!

Reply

Carsend

February 19, 2020

I like that shirt, where you get it haha?

Reply

Juan Cuadra

February 19, 2020

I have great respect for the time and energy you put into sharing so many "chucks of knowledge" in such a wide range of domains. Thank you.

Reply

youness fathi

February 19, 2020

merci <3

Reply

nanupelu

February 19, 2020

my console says:
Use of the orientation sensor is deprecated. p5.js:48187:6
Use of the motion sensor is deprecated. p5.js:48187:6

Reply

Mr. J

February 19, 2020

hotdog, not hotdog

Reply

EAX

February 19, 2020

Awesome video. thank you.

Reply

Leave a Reply