4 ms·
Show HN: I’m not a data scientist but made a Covid mask detector – Doctor Masky
- will-wow 6y agoI used Google's AutoML Vision service (https://cloud.google.com/vision https://cloud.google.com/vision) to train the model off of pictures of masked and unmasked faces from coworkers and creative commons images from Flickr, and am running the model in-brower in a React app. It was pretty cool to see how easy it was to set up an object detection model without having to figure out how to set it up with Keras or something.
- fox_hedgehog 6y agoDr. Masky FTW :)
- RAB1138 6y agoCan you provide more details about how you're running them model in-browser?
- will-wow 6y agoYeah! AutoML lets you export a TensorFlow.js version of the model to Google cloud storage, and there's a frontend library, tfjs-automl (https://github.com/tensorflow/tfjs/tree/master/tfjs-automl https://github.com/tensorflow/tfjs/tree/master/tfjs-automl), that downloads the model and sets it up for detections. Then I'm connecting to the device's webcam with navigator.mediaDevices.getUserMedia, and twice a second send a reference to the video stream object to the detector, which runs inferences locally and returns the coordinates of any detected objects. There's some glue code to do the whole dance to connect to the camera and model, but after that it works pretty seamlessly, on my desktop and mobile browsers
- MH15 6y agoI recently built a similar system for HackOHI/O, my college's hackathon. Was a great challenge! We used a slightly different approach, as we didn't have the time or expertise to train our own models.
- will-wow 6y agoOh cool! Was it also a mask detector, and if so did you find a pre-trained model for it?