Qengineering / Face-Recognition-with-Mask-Jetson-Nano

Recognize 2000+ faces on your Jetson Nano with additional mask detection, auto-fill and anti-spoofing
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
35 stars 6 forks source link

Mask detection isnt working #1

Closed rsingh2083 closed 3 years ago

rsingh2083 commented 3 years ago

Hi buddy,

Awesome work, but I think mask detection isnt working at all. I tried with lots of different masks with 4 students in front of the cam but its always showing "OFF". I think you might have forgotten to update/enable something in the github code.

Qengineering commented 3 years ago

I've wrongfully used cv::Mat frame as input for the mask detection. It should be of course cv::Mat result_cnn because the Face[i].rect refers to this input. See main.cpp line 372 cv::Mat roi = result_cnn(RecClip);

I've updated the Paddle-Lite deep learning model. Now it's up to date with the latest Paddle-Lite version, and you don't get any warnings any more.

I've modified the example movie Norton_M.mp4. Now there are three fragments with face masks.

Please note, PaddlePaddle has trained its face mask detection network only with white (or light blue) masks. Nowadays you see a lot of black masks or masks with fancy printing. Unfortunately, those will not be recognized by this network.