Code Monkey home page Code Monkey logo

qengineering / face-recognition-with-mask-jetson-nano Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 6.0 29.53 MB

Recognize 2000+ faces on your Jetson Nano with additional mask detection, auto-fill and anti-spoofing

Home Page: https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html

License: BSD 3-Clause "New" or "Revised" License

C++ 100.00%
deep-learning face-recognition mask-detection face-detection face-mask-detection ncnn paddle-lite arcface retinaface mtcnn

face-recognition-with-mask-jetson-nano's People

Contributors

qengineering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

face-recognition-with-mask-jetson-nano's Issues

Video is slow on some cameras

Hi,
I tested it on two cameras :-

QHM495B supports 480P high-definition images and true colour images. Anti-flicker 50Hz, 60Hz or outdoor : 480P
&
Lapcam web camera HD 720P High resolution Video LWC-042  : 720P

On the first one which is 480p, the accuracy is low as the default exposure is low and video is coming dark. Hence its saying 'fake' most of the time.
While on the second one which is 720p, accuracy is really good, video is well lit but the video is slow compared to first camera.

Any reasons as to why this is happening ? And how to solve it.
Id definitely like to use second camera, but how to solve the slow video issue ? Is the video slow because the camera is 720p ?

Playing a welcome audio whenever someone comes infront of camera (either person/stranger or recognized person)

Hi Sir,

Ive got a .wav file which Im playing whenever any person's Face is detected in camera. Please have a look at the playsound section of this snippet (main.cpp). The sound is playing but I think its slowing down the FaceRecognition also. Is system command slowing down the recognition/detection process ? Is there a faster /better way to play audio without slowing down the recognition/detection ?

#ifdef RECOGNIZE_FACE
        cv::String Str;
        cv::Scalar color;
        int  baseLine = 0;

        switch(obj.Color){
            case 0 : color = cv::Scalar(255, 255, 255); break;  //default white -> face ok
            case 1 : color = cv::Scalar( 80, 255, 255); break;  //yellow ->stranger
            case 2 : color = cv::Scalar(255, 237, 178); break;  //blue -> too tiny
            case 3 : color = cv::Scalar(127, 127, 255); break;  //red -> fake
            case 4 : color = cv::Scalar( 32,  32, 255); break;  //pure red -> mask
            default: color = cv::Scalar(255, 255, 255);
        }

        switch(obj.NameIndex){
            case -1: Str="Stranger"; break;
            case -2: Str="too tiny"; break;
            case -3: Str="Fake !";   break;
            case -4: Str="Mask !";   break;
            default: Str=NameFaces[obj.NameIndex];
        }
        cv::Size label_size = cv::getTextSize(Str, cv::FONT_HERSHEY_SIMPLEX, 0.6, 1, &baseLine);

        /////// ======== PLAY SOUND ============================ ///////////////
        // DETECT NAME & OUTPUT ON CONSOLE LOG
        cout << "NAME DETECTED AS \n\n " << Str << std::endl;

      //PLAY WELCOME SOUND   
          string str1 = "aplay ";
          str1 = str1 + "-Dhw:0,3 Welcome.wav" + " & ";
          const char *command = str1.c_str();
          system(command);
        } 

On the FaceMaskRecognition console im getting this error. I think whenever a face is detected audio is being called to play while the previous audio file hasnt finished playing. Is there a way to solve this ?
aplay : audio open error: device or resource busy

Sometimes it doesnt recognize a person at all.

Keeps throwing "Fake"/"Stranger" even for a person with 3 photographs.
While sometimes it works. This happened when we took the photo in the same room, we tested this application for.
I cant understand why this erratic behavior, is it due to lightening of room or anything else

How to deal with 3800 face records

Sir my college has approx 3800 students and some 500 in staff. Will nano be able to handle this much load or shall we test on Jetson Xavier. Or if you can then please suggest an alternative hardware as we are not in college premise right now, but after two months we would like to demo this at our college by being well prepared in advance.

How to Disable auto database fill ?

How can I disable the auto database fill feature.
If the face isnt found in the DB, I dont want to add it automatically.
How to do this ?

Face Recognition that wearing mask

Hi,

I really appreciate your work and great responsiveness of the issues.

Did you make any test that can we recognize people with mask ? I mean I have both phot in the DB bot maske and normal.

Can system recognize me with mask ? is there any tested accuracy ? Or we need a new model to recognize people wearing mask

How to run with GPU

Thanks for great repo, I wonder if we can run with GPU or both? Thanks again

How run run multiple models on a single video

Hi Sir,

You have 4 models ( RetinaFace, Mask, Arcface & AntiSpoofing ) running over single video.

1.] What exactly is this method of running multiple models known as?

2.] Is there any documentation/book on how to run multiple models at once ?

3.] Why Im asking is because I have a model for License Plate detection and another model for License Plate Recognition, and I want to combine both the models in same way as you have done. (First model tries to locate license plate in video -> If found -> Second Model reads the number plate)

Installation on x86_64 linux

Hi Sir,

Is it possible to install this on normal linux desktop ? Since both paddle and ncnn can be installed on desktop also, hence I suppose it might work on desktop also , right ?

Cannot build with Code::Blocks in Jetson Nano

Tried to build in Jetson Nano on Ubuntu 18.04 and this error showed up:

g++: error: /usr/local/lib/paddle-lite/libpaddle_api_light_bundled.a: No such file or directory

I have paddle-lite for Armv8 installed, but there's only a single file inside the lib directory which is libpaddle_light_api_shared.so. As i know, the one with libpaddle_api_light_bundled.a is the x86 version

How to compile and run programs?

Hi!
I have successfully installed the environment needed to run the program on Jetson Nano, but I don't know how to compile this project to make it run successfully.

Disabling face recognition until a condition is met

Sir,
Let's say I want to disable face detection and recognition until a certain condition is true( decided by another external code).
How can I achieve this.
At exactly what line do I need to put a boolean condition :
if true : execute Face detection and recognition ,else: do nothing.

Mask detection isnt working

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.

Issue with someone standing behind

Theres one small issue. When the algorithm detects a tiny face (personA) at a distance, and then suddenly if someone comes near the camera (personB), then personB is also recognized as "too tiny".
But when the personA from behind goes away, then personB is aptly recognized.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.