×

Srdjan Susnic's video: Javascript Machine Learning Game Tutorial: How to make AI drawing guessing game using CNN

@Javascript Machine Learning Game Tutorial: How to make AI drawing guessing game using CNN
This video shows a Javascript Machine Learning Game Tutorial, in which I explain how to make AI drawing guessing game based on image recognition using cnn. To run the game, visit my official website: https://www.askforgametask.com/tutorial/machine-learning/quick-draw/ ★ Outline ★ 00:00 - Introduction 00:32 - Project description 00:54 - Exploring game 01:42 - Getting data 02:57 - Creating convolutional neural network model 03:41 - Explaining training algorithm 04:58 - Training CNN model and predicting samples 05:41 - Implementing drawing interface 06:23 - Drawing art paintings 06:38 - Scaling images down to the input size 07:06 - Predicting doodles 07:25 - Enlarging dataset to recognize more doodles ★ Project Description★ This video explains the main concepts for implementing a game like Quick Draw. It's a well known, ai drawing guessing game that challenges players to draw a doodle, and then, artificial intelligence guesses, what the drawings represent. To make it, I used Javascript with Phaser 2 Framework, so you can run it directly in your browser. To recognize doodles, I implemented a convolutional neural network image clasification using Tensorflow JS Library. To train the convolutional neural network, I used the free Quick Draw Dataset. The complete source code is available on Github: https://github.com/ssusnic/Machine-Learning-Doodle-Recognition ★ Dataset ★ As I said, to train the model, I used the Google Quick Draw dataset. Specially for this tensorflow js project, I needed grayscale bitmap images, size of 28x28, in numpy file format. To keep things simple, I started with only 3 categories: car, fish and snowman. Moreover, I reduced these datasets, by extracting only 500 images from each category. Finally, I split them into the traning data (80%) and the test data (20%). The last step in data preparation was shuffling. ★ Convolutional Neural Network ★ The next step was to add an artificial neural network in machine learning. To guess what your drawing represents, a convolutional neural network image clasification is built. Here I used a sequential model type, where outputs of one layer are the inputs to the next layer. The entire architecture of this convolutional neural network explained in the video! ★ Training ★ The model is trained through a number of iterations by fetching batches of samples from the Training Data. Similarly, the validation of the model is performed by fetching batches of samples from the Testing Data. During training, we can monitor how the model improves over time by watching the graphs of the model loss and accuracy. ★ Drawing Doodles ★ The players draw doodles and their art masterpieces by using mouse. The entire algorithm of generating smooth lines between points is explained in the video. ★ Recognizing Doodles ★ Once the training is completed, the model is ready for making predictions. This is performed by image recognition using cnn. Besides recognizing our own doodles, this Quick Draw AI game has a feature to also make predictions for a batch of samples. Here, the correct predictions are colored green, and the incorrect ones are shown in red color. This way we can test the model to see how good it is before using it to recognize our own doodles. ★ Adding More Doodles ★ Finally, I experimented with the implemented tensorflow image recognition algorithm, to see if it can be easily adapted to recognize more different doodles. So, I retrained the model with a larger dataset using 10 categories. To see the results, make sure to watch the entire video! ★ Conclusion ★ So, I hope you found this tensorflow js project interesting. In that case, please like this video, and consider subscribing to my youtube channel. I would greatly appreciate it! And that way, you don't miss out on more actionable videos like this one. Now, let me know what you think about this javascript machine learning game tutorial by leaving a comment! Do you wanna make your own quick draw ai after watching this video? Or, if there is anything that you don't like, please tell me! See you in my next video! ★ Contact Info ★ Official Website: https://www.askforgametask.com Github: https://github.com/ssusnic/ Facebook: https://www.facebook.com/askforgametask Twitter: https://twitter.com/ssusnic ★ Credits ★ Wagon Wheel by Kevin MacLeod Link: incompetech.filmmusic.io/song/4601-wagon-wheel License: https://creativecommons.org/licenses/by/4.0/ 'House Of Style' Jay Man - OurMusicBox https://www.youtube.com/c/ourmusicbox

75

5
Srdjan Susnic
Subscribers
3.3K
Total Post
22
Total Views
878.1K
Avg. Views
39.9K
View Profile
This video was published on 2020-11-29 20:11:14 GMT by @Srdjan-Susnic on Youtube. Srdjan Susnic has total 3.3K subscribers on Youtube and has a total of 22 video.This video has received 75 Likes which are lower than the average likes that Srdjan Susnic gets . @Srdjan-Susnic receives an average views of 39.9K per video on Youtube.This video has received 5 comments which are lower than the average comments that Srdjan Susnic gets . Overall the views for this video was lower than the average for the profile.Srdjan Susnic #MachineLearning #ArtificialIntelligence #NeuralNetwork #MachineLearningAlgorithms #ai #cnn #Tensorflow #TensorFlowJS #JavaScript #gamedev #MadeWithTFJS #tfjs #ml has been used frequently in this Post.

Other post by @Srdjan Susnic