Giter Club home page Giter Club logo

face_recognition's Introduction

face_recognition

real time face recognition with MTCNN and FaceNet

Before run code

you need to do things below:

  • I have already uploaded det1.npy det2.npy det3.npy which for MTCNN,but you still need to download facenet's pb file from davidsandberg's github like 20170511-185253,extract to pb file and put in models directory.
  • tensorflow-gpu 1.1.0 , later version may also work.
  • python 3.X

Inspiration

Something note

Remember to change some codes where you need to put your own name and your friends' name instead of mine.

Run code

Do as follows step by step:

  • To make you easy to get your photo and put in right structure as I said in intput and output directorys' readme.md file,I already privide getphoto.py which can take photos by openCV and autoly put it in input directory as format.
  • Next,you need to run Make_aligndata.py to align your photos which only croped your face part and autoly put in output directory as format.This photos will be used to train our own classifier.
  • Run Make_classifier.py to train our own classifier with SVM.Of course you can use your own classifier if you want.Then you may see myclassifier.pkl file in myclassifier directory.
  • Finally,run realtime_facenet.py or real_time.py. realtime_facenet.py is MTCNN version.real_time.py is another choice which use haar detector in openCV instead of MTCNN.

Result

If everything is ok ,you will see result below:

More

I used Chinese to do some Introduction about MTCNN and FaceNet.See my blog for details

face_recognition's People

Contributors

cryer 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's Issues

Can't run realtime_facenet.py

他會顯示出'NoneType' object has no attribute 'ndim'

有查過可能是路徑上的問題,但應該不是

請問您是那版本的opencv呢?

您好,请问这个报错怎么解决呢?

UnicodeError: Unpickling a python object failed: UnicodeDecodeError('ascii', b'IW\xc0\xbbX\x1d\x7f<\x7f\xf0\xa3;5:\x81\xbb\x9b\x06>;L\x8d\x0c=j$%\xbb\xf4[\x9a\xbcq\xa7k\xbc\xe2#&\xbc\xa8W\x04;O\xa6\xd7;\xa1\x9c\xc8\xbb\xd1+\x17\xbc\xa1Y\x00\xba\x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*H\xbd\x83\x91\xd0<Wa\xef\xbb\xc9\x8d\x08<\x11\x12\xb2;\xa9~\xc3\xbbY\x8d1<\xd9X\xb3<&R\x06\xbe\xb7\xbc >xZT;\x89\xa8\xed\xbbEL\x88\xbb4k\x97<', 2, 3, 'ordinal not in range(128)')
You may need to pass the encoding= option to numpy.load

face is not recognized

when I train my face and run "realtime_facenet.py" file it shows only one person name , even if the person is unknown it will prompt the user with some name .

please let me knows how can i solve this issue .

Recognition problem.

不好意思

我已經照您給的方法去建立input and output
也順利跑出我的pkl檔

但是為何在執行realtime_face.py時會把我標記成您的姓名呢?

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.