Let's build Face Mask Recognition without coding and in under 8 minutes !!!
Hello guys and geeks , we are here with an very exciting project on
face mask recognition without coding , Yes without coding !!
Step-1:
First things first , head over to your browser and search for an extension called download all image ... You can use this one , but i perfer an extension by MeryDev !!
Once You Install the extension you will be able to access it within the puzzle icon at the top right corner of your !!
And also make sure you enable hardware acceleration in the settings tab.
Step - 2:
Now it's time for us to hunt some images online ... Search for real
people .....
and before you download an image make sure you do this
, tap on tools and then usage rights to commercial and other licenses so
now you are free to download this and moreover we will not be posting
this anywhere else we are using this to train our Machine Learning
Model.
Open the extension that you installed and i will leave the default settings and just change the image selection to jpeg and png and now wait for few minutes it will start recognizing the loaded images which you can see above and once you are satisfied with the number hit save button and now it will download all the images as a zip file !!
And I will do the same for real people with glasses and people with masks !!
Once all the images are downloaded just unzip it and keep it in a folder !!
Step - 3:
Back in Chrome , we will search for teachable machine , and click on
https://teachablemachines.withgoogle.com !!Once the site is loaded , tap
in Get Started Button and under New Project choose Image Project !!
And
this is where we will work !!!
You can also add several other classes but for our project two classes are sufficient!!
So now let's rename class 1 to Without mask by clicking on the pencil icon !! And this is our first class and do make sure to label them correctly!!
Similarly Class 2 is renamed to With Mask and now we are ready to upload the images , you could also use your web cam , but I prefer uploading the images !!
Choose the images that we downloaded earlier and upload them !! Do note
that we may need to refine the images so that they match with the label
!!
And I will do the same for With Mask Class !!
I will provide a link to all this files if you don't wanna download
them and also there will be a written article on the same topic !!
Once
you are done with uploading the images , you can now start to train the
model !!
And make sure that you don't switch the tabs so you
may encounter an error !
This is how it looks when you're training is finished !! You can choose
webcam or files as an input !!
You can also save the trained model
to your google drive, for which you need to sign-in !!
Step - 4:
Exporting the model is really simple , when you click the button you will
see several things , 1st is your java script code ... !! Which you can
implement in your website if you want ...but there is also an option for
Python developers too..
which you can see the code in tensorflow
section which makes use of kreas to get the job done !! And next you can
also deploy the model in android or Ios using the tensorflow lite !!
But
what we are interested to do is , we need to upload the model on the web
so anyone with the link can test our model and that's possible !!
Just
click upload in tensorflow.js and magic happens there !!
Copy the
link and share it with your friends and they will be able to see your
magic AI !!
By default the input is chosen to be webcam , which
you can change it to files and test your model also i will leave a link
for you guys to test my model in live !!
It works on mobile browsers too....!!
So the next slides you will
see my test models and ya they are pretty accurate .. I did a test in Soft
Toys and they work for them too....
So that's it for today and I hope you love this project and if you
are stuck don't worry let me know in the comments below and all the files
will be provided in the description , so do check that out !!
Thank You All !!
Comments
Post a Comment