5.6: Doodle Classifier: Classifying User Data - Intelligence and Learning

  Рет қаралды 30,678

The Coding Train

The Coding Train

Күн бұрын

In this video, I use the p5.js library to create a drawing canvas for the user and attempt to classify doodles using the trained neural network model.
🔗 Toy-Neural-Network-JS: github.com/Cod...
🔗 Google Quick Draw: quickdraw.with...
🎥 My Neural Networks series: • 10: Neural Networks - ...
🎥 ES6 Arrow Function: • 16.3: ES6 Arrow Functi...
🚂 The Coding Train website: thecodingtrain....
💖 Support this channel on Patreon: / codingtrain
🛒 To buy Coding Train merchandise: www.designbyhu...
📚 Book recommendations: www.amazon.com...
💻 github.com/Cod...
🎥 For More Intelligence and Learning videos: • Intelligence and Learning
🎥 For More Coding Challenges: • Coding Challenges
🔗 p5js.org/
🔗 processing.org
📄 Code of Conduct: github.com/Cod...

Пікірлер
@thomassynths
@thomassynths 6 жыл бұрын
I'm glad I found your channel. You are very easy to follow and have a nice energy.
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Thank you!!
@nagesh007
@nagesh007 Жыл бұрын
Awesome , thanks a lot for the Chapter 10 series (Nature of Code)
@UnitedIngvar
@UnitedIngvar Жыл бұрын
Dan, you are one of the most energetic persons I've ever met! That's what makes you a perfect teacher :) Thank you for sharing these beautiful series with us!
@jeantimex
@jeantimex 5 жыл бұрын
I guess when the console says “train”, it’s a verb, it asks you to train more :)
@amalswalih95
@amalswalih95 2 жыл бұрын
😂..lol
@DarrenDignam
@DarrenDignam 6 жыл бұрын
Great ending Dan!
@KanalMcLP
@KanalMcLP 6 жыл бұрын
Yes, that Dan is ending really great :D (thats why nlp is so complex lol)
@kustomweb
@kustomweb 6 жыл бұрын
Thank you for a great series
@FirstLast-ue9oc
@FirstLast-ue9oc 6 жыл бұрын
I found that your videos are very interesting and encouraging to people, please keep doing what you're doing!
@Chrls5
@Chrls5 2 жыл бұрын
i Love these series of neural networks videos!
@nagesh007
@nagesh007 Жыл бұрын
Awesome thanks a lot for the Chapter 10 (Nature of Code)
@SlimeMage32
@SlimeMage32 6 жыл бұрын
Great ending, thanks for this series!
@codingplayer2159
@codingplayer2159 5 жыл бұрын
the best coding youtuber ever! Keep it up Dan.
@lucaxtal
@lucaxtal Жыл бұрын
I did this exercise with Processing, and it worked with a multilayer network (i splitted the toy network with multiple hidden layers and different activation functions) with 3 layers (2 hiddens and one output). I made it train until it reached 90% accuracy. After that the sketch enables the drawing to guess your drawing. In my exercise it worked well. Maybe only one hidden layer is not enough. If you are interested let me know, I can share my code.
@kalyansreekar3384
@kalyansreekar3384 6 жыл бұрын
The best channel in youtube and the first channel i subscribed to.love ur videos bro.
@justideas413
@justideas413 2 жыл бұрын
I watched the whole playlist !!
@wouter11234
@wouter11234 6 жыл бұрын
Wouldn't the neural network be much more accurate if you're not only preparing and normalizing the values of the image for the neural network, but also normalizing the position? For example, crop the image down so your whole drawing fits inside a square of pixels, then scale it to 28x28. I'm guessing a cat drawn in the top left is going to be different to the neural network than a cat drawn in the center, or top right, because they all correspond to different input nodes (I might be wrong on this though) EDIT: Confirmed this by inserting this function into your nmist example: function move(dx, dy) { var temp = user_digit; user_digit = createGraphics(temp.width, temp.height); user_digit.image(temp, dx, dy); } and calling it with offsets like (10, 10). The neural network thinks the same drawing is a different digit at certain locations
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Yes, this is a great idea! If you research "convolutional neural network" you'll find that this kind of architecture solves the scaling/position problem in a very clever way! I hope to get to this in a future tutorial.
@lauriejmusic
@lauriejmusic 6 жыл бұрын
maybe do a miniseries training this non-convolutional NN on a diff kind of data that it would be more suited for, then get to convolutional nets and refer back to this series ie why it didn't do so well ? just rambling :) love your stuff
@CodeEmporium
@CodeEmporium 6 жыл бұрын
Yeah 1000 samples per class is quite low. I'm surprised the test accuracy is even that high. If you want image (not doodles though) the COCO dataset is a good resource.
@ioniniela
@ioniniela 6 жыл бұрын
I just love this videos so much. They make me happy
@ThatOneAgarAgarioThePro
@ThatOneAgarAgarioThePro 6 жыл бұрын
I hope i can be a smart programmer like u one day bro
@2512redrose
@2512redrose 2 жыл бұрын
My God, you are amazing!! Thank you and I love your energy and passion! Subscribed. :)
@gk1O1
@gk1O1 6 жыл бұрын
man its over. nice series!
@andreasntr
@andreasntr 6 жыл бұрын
I think you can add a simple cross-validation function, just to make it a little bit more precise. After all, it just needs to randomly populate testing and training sets
@soyitiel
@soyitiel 6 жыл бұрын
Dude, you're funny. Thanks for this video 😂😂😂
@smanfly
@smanfly 6 жыл бұрын
it's much funnier when watching 2x speed :)
@ProgramWithErik
@ProgramWithErik 6 жыл бұрын
Really nice work! I laughed out loud!
@didicayu
@didicayu 3 жыл бұрын
You are most likely not processing the drawing data correctly, I've recreated both the neural network library and this doodle classifier project in unity with c# and ran into the same problem using the exact same training data, once I solved the drawing processing issue it worked better than expected for just 800 training data images for each class. In my case, I drew on a texture that unity retrieved from the bottom, left to right when I was getting the training data from the top, left to right, so I had to create multidimensional matrices and invert them horizontally. Hope that helps people wanting to recreate this project.
@janglaser6130
@janglaser6130 5 жыл бұрын
Do you think you might make a video where you would add multiple hidden layers into the customly written neural network, is it would not be much trouble, please? I am having issues making the backpropagation work for multiple layers... Thanks for response :)
@8eck
@8eck 4 жыл бұрын
Thank you for all of these series! I wish there would be more of AI videos. :)
@Alessandro-nq3tm
@Alessandro-nq3tm 6 жыл бұрын
Amazing!!! You know what? I think that 28x28 images are really small for predict purpose. I want to try with 256x256 or 512x512 . What do you think Dan?
@brotherlui5956
@brotherlui5956 6 жыл бұрын
Alessandro yeah do that but you'll be disappointed. With this code training 2400 images 512x512 would take approx 1 hour per epoch but the percentage wouldn't be better. Raising the amount of hidden layer nodes and hidden layers would do better.
@seddikibelgacem2393
@seddikibelgacem2393 6 жыл бұрын
i like this course espashely with the miao 6:41
@adamsmith2054
@adamsmith2054 6 жыл бұрын
Loving the neural network series! Are you gonna continue expanding on the nn library to allow for different types e.g. recurrent neural networks? Either way, loving the tutorials, they're great, learning a lot and you're keeping me well entertained haha.
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
I'm definitely going to expand the tutorials but I hope to switch to using deeplearn.js and ml5.js as the underlying libraries for more sophisticated architectures.
@adamsmith2054
@adamsmith2054 6 жыл бұрын
The Coding Train Ah ok, that seems like a great idea, thanks for the reply 😁
@arameskchannel
@arameskchannel 6 жыл бұрын
You should add other 2-3 types of doodles to be sure your guessing are not just guessed right by fortune, anyway it’s a really nice work 👍
@葉孟韋-u1c
@葉孟韋-u1c 4 жыл бұрын
I have a question about hidden layer ,which do not have clear explanation here, Dan just set it as 64 in previous video. Is hidden layer work automatic ?By the Way , good series Dan,I learn alots
@vadsavin
@vadsavin 6 жыл бұрын
I have written the same thing in Processing but for n-layer perceptron. And, u know what? It works correctly if there is the only one node in the output layer. Otherwise the output array seems like {0.5,0.5,0.5} with any kind of inputs(wtf?!). So, weights could increase up to 15-19 with LR = 0.001. Well, i had tried to imort your ToyNN to Processing and i've got the same result.
@Dhakshith1189
@Dhakshith1189 6 жыл бұрын
It is not guessing correctly because first when you drew very small in the middle it guessed it as a train but after you drew a big cat and rainbow it guessed correctly. So you must take the image of the canvas where the pixels are painted and then resize it to 28x28.
@ThatOneAgarAgarioThePro
@ThatOneAgarAgarioThePro 6 жыл бұрын
I have a question,i am a beginner C# programmer i am now learning object oriented programming (classes,objects etc),and can you give me a Challage ? Thank you
@AleksanderFimreite
@AleksanderFimreite 6 жыл бұрын
Btw, in your case, it means it had a percentage of the TOTAL images reccognized. There is a good chance only one of the images was very well reccognized or it chose "train" very often by random chance. Say it figured out how to see trains very well. It would score AT LEAST 200/600 and possibly get some more by random chance still. One epoch of training data sounds like very little for it to actually do a 80% reccognition. Separating statistics data might be a good idea. =)
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Thanks for this feedback!
@thebeardedskateboarder
@thebeardedskateboarder 6 жыл бұрын
Great video! I couldn't stop laughing with you.
@sponzor94
@sponzor94 6 жыл бұрын
how do i change the font in a to a custom font?
@joshuacleverley3929
@joshuacleverley3929 6 жыл бұрын
Nice one!
@xLoxLoLex
@xLoxLoLex 6 жыл бұрын
what an ending
@MohitSingh-nm5jy
@MohitSingh-nm5jy 5 жыл бұрын
How do I train model download and load using this nn.js.
@ParanoidMarvin
@ParanoidMarvin 5 жыл бұрын
6:43
@georgecoghlan4663
@georgecoghlan4663 6 жыл бұрын
Sure you don't have time, but my course work deadline is coming up, and I think my network, although it works, is done really badly (especially after seeing how structured this one is) :P. If someone could take a minute to tell me all the ways I have messed it up I'd be super grateful.
@FlamingoVlogs
@FlamingoVlogs 6 жыл бұрын
when do you do live videos ?
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
I try to live stream every Friday. You can check codingtra.in -- a note will appear when I schedule the next live stream.
@ianhuang4464
@ianhuang4464 6 жыл бұрын
Hello! Nice tutorial! Question, where can I find the source code of this series? I've looked through github.com/CodingTrain/website but I can't seem to find it...
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Apologies I need to do a much better job of linking and tracking all this stuff. I just checked and it's not there, I'll try to add it in session 5. You can, however, find the example here: github.com/CodingTrain/Toy-Neural-Network-JS/tree/master/examples/doodle_classification Let me know if this doesn't match the video.
@ianhuang4464
@ianhuang4464 6 жыл бұрын
Thanks!
@Hendiadyoin1
@Hendiadyoin1 6 жыл бұрын
Which code editor are you using?
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
I use atom.
@yingmai2553
@yingmai2553 4 жыл бұрын
What language are you using?
@ccoodduu
@ccoodduu 3 жыл бұрын
JavaScript
@jeanneymar373
@jeanneymar373 6 жыл бұрын
Did he use the whole quick draw date base ?
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
No I used just a tiny subset. I hope to make a version that uses a much larger dataset sometime soon.
@jeanneymar373
@jeanneymar373 6 жыл бұрын
The Coding Train okay great job by the way even tho i dont understand much xD
@brotherlui5956
@brotherlui5956 6 жыл бұрын
Jean Neymar he used only 0,5% of the base for training which took 6sec per epoch, using total datasets would take 20min per epoch
@AabhashKaurav
@AabhashKaurav 6 жыл бұрын
hello sir, your videos are very useful for programmers. actually sir i am from India and because of your English language many people are unable to understand your videos. so i want to dub your videos in Hindi language so people of india can also take benefits of your videos of coding. if you please give me a permission of this. ihope you can understand.
@brotherlui5956
@brotherlui5956 6 жыл бұрын
Aabhash Kaurav better teach english to your audience
@zach4216
@zach4216 2 жыл бұрын
king
@d_vibe-swe
@d_vibe-swe 6 жыл бұрын
More dancing please 😂
@mohsenalaji4813
@mohsenalaji4813 6 жыл бұрын
Danial your loadbinary didnt work with me why ???? plz help
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Check the code here: github.com/CodingTrain/Toy-Neural-Network-JS/blob/master/examples/doodle_classification/loadbinary.js (I renamed it to "loadBytes")
@mohsenalaji4813
@mohsenalaji4813 6 жыл бұрын
thanx 💜
@simoneicardi3967
@simoneicardi3967 6 жыл бұрын
ahahahah I just love you! :-)
@krccmsitp2884
@krccmsitp2884 2 жыл бұрын
24:15 😸🤣😸🤣
@fahimsanghariyat162
@fahimsanghariyat162 6 жыл бұрын
sir, which software use java script?
@Zakiyfarhanfuad
@Zakiyfarhanfuad 6 жыл бұрын
Fahim Sanghariyat it's atom with p5 library
@WildAnimalChannel
@WildAnimalChannel 6 жыл бұрын
that was a funny video. Let's face it. It didn't really work with your drawings. (I saw the live stream of all the ones that didn't work! haha) It would be interesting to see what an average of all the cats or rainbows pictures looks like. Or you could try and run the network backwards to see what input is produce by a given output!
@sansin-dev
@sansin-dev 5 жыл бұрын
How can I learn if I am LOL'ing and rolling on the floor
@keshavlakhotia1432
@keshavlakhotia1432 6 жыл бұрын
After learning this for which post i can apply in a company???
@keshavlakhotia1432
@keshavlakhotia1432 6 жыл бұрын
Is learning all this on processing n p5 useful?? I haven't seen this yet in job requirements of any company till now... Please guide!!!
@js_models
@js_models 5 жыл бұрын
You get train because you are pressing the train button.
@Dr_chukss
@Dr_chukss 6 жыл бұрын
1 😒
Coding Challenge #99: Neural Network Color Predictor
37:45
The Coding Train
Рет қаралды 97 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 29 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
I Made an Electronic Chessboard Without Turns
14:32
From Scratch
Рет қаралды 1 МЛН
Coding Challenge 183: Paper Marbling Algorithm
32:10
The Coding Train
Рет қаралды 80 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 1,4 МЛН
How to Create a Neural Network (and Train it to Identify Doodles)
54:51
Sebastian Lague
Рет қаралды 1,9 МЛН
5.4: Doodle Classifier: Training - Intelligence and Learning
21:08
The Coding Train
Рет қаралды 21 М.
Coding Challenge 182: Apollonian Gasket Fractal
56:48
The Coding Train
Рет қаралды 88 М.
5.1: Doodle Classifier: Introduction - Intelligence and Learning
15:34
The Coding Train
Рет қаралды 62 М.
Coding Challenge 181: Weighted Voronoi Stippling
28:59
The Coding Train
Рет қаралды 179 М.
Coding Challenge 185: Unfolding Fractals
31:04
The Coding Train
Рет қаралды 45 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 29 МЛН