Face Mask Detection with ARC


Skip to comments

I had this in my head for some time now, and finally found some nice datasets to turn this into a project...
Just follow me on the video if you would like to build the training data yourself, or just use this code here, for the prebuild model!

Have fun!!:)

By — Last update
#1   — Edited
Just use the index.html that you can download over here...
And run it locally!!

It will be sending the label results to the Super EZ ARC REST Server, so make sure you got it running...

In ARC you can use that data to build something...eg drive a servo, like this!


from System.Net import HttpWebRequest
uri = ""
webRequest = HttpWebRequest.Create(uri)
response = webRequest.GetResponse()

from System.IO import StreamReader
import clr
from System.Web.Script.Serialization import JavaScriptSerializer
streamReader = StreamReader(response.GetResponseStream())

def readData():
jsonData = streamReader.ReadToEnd()
js = JavaScriptSerializer()
dataDict = js.DeserializeObject(jsonData)
return dataDict

dataDict = readData()

checkMask =(dataDict)
for evaluation in checkMask:

if evaluation == "WithoutMask":
print("Please wear a mask!")
Servo.SetPosition(D0, 150, 0);

if evaluation == "WithMask":
print("Thanks for wearing a mask!")
Servo.SetPosition(D0, 50, 0);

So help us all to stay safe and build something cool into your ARC project!!:)
Your super ez rest server is really stretching it’s legs! Nice work. The datasets are interesting. Hmmm I wonder if I can import those into my yolo engine because it uses onyx that allows it. So the documentation says
I never really checked into this, I only used some transfer learning on Teachable Machine and on ml5.js... But it should be possible I guess!! 

It kinda cool... gives the robot a purpose, by telling people, that its nice to wear a mask!!:)
Nomad is sending Me his 3d printed Dalek, 23 cm not that big but still could be fun to have it check people for masks and scream at them ," By order of The Dalek high command, you will wear a mask ,you must comply...or be Exxxxxterminated!"xD
That would definitely be a good use case for that project!!
Make a clip, and keep me posted!!:D