Skip to content

Latest commit

 

History

History
99 lines (47 loc) · 3.39 KB

README.md

File metadata and controls

99 lines (47 loc) · 3.39 KB

Auto-Attendance

Auto-Attendance, an attempt to automate the process of taking attendance through facial recognition.

Teachers and Students can register through the Android Application.

The Students are then asked to provide images of themselves uh.... Sigh. Selfies. You can upload Selfies (or any other image). You can upload it through the android app.

The faces are detected using TInyFace.

Kairos Services are used for recognizing the person.

The attendance is then posted. This feature is still a bit rusty. I've used MondoDB making use of MLabs services to keep track of attendance. The application makes an api call to MLabs to post attendance.

Why MongoDB ? Why not Postgres or some DB that is supported by Django ?

Cause, I'm a lazy person. AND I didn't know how to model the attendance system and didn't want to brick anything else in the process. Yeah! No Unit Tests. Eff-me. And I was running on a deadline. This was just a quick fix. JK, it actually had nothing to do with deadlines. My university teachers are so cool that they'd find millions ways to screw you only to leave you screeching on the ground until a train, or the effing shuttle cab(VIT things) runs you over.

Face detection using an ML model ?? And also an API call for every image uploaded? BLASPHEMY !! You expect users to wait ? Eff-You!!

Not exactly. I've got a secret weapon up my sleeve.

...Drumrolls….

And I've also used Celery. But mostly thanks to Chuck. He thought me to live with my pretty coughs coughs face. And I'd like to thank every one who made this moment possible, my dad, my mom, my neighbour's daughter, my …………No ? Okay.

Celery basically makes your application asynchronous.

To all the Noobs (future self)

  1. Install the dependencies in the requirements.txt file.
pip install -r requirements.txt
  1. Install OpenCV. (This one is effing tought. Exiting vim is easier.)

  2. Download the model here

  3. After downloading

    python matconvnet_hr101_to_pickle.py 
            --matlab_model_path /path/to/pretrained_model 
            --weight_file_path  /path/to/pickle_file

    I shamelessly copied this from here. If you prefer to follow the original source go here. Do whatever but make sure that the pickle file is in the same folder as tiny_face_eval (Tiny_Faces_in_Tensorflow directory) and also name it as pickle.pickle

  4. Install Redis

  5. Run redis

redis-server
  1. Type in the following commands
python manage.py migrate
python manage.py runserver
  1. Again in a separate terminal type this shit
celery -A auto_attendance worker -l DEBUG

Credits

  • The API's are heavily influenced by this talk
  • The friendly coughs community over at StackoverFlow.
  • And also this guy. He made the android application. He's pretty cool though. Don't forget to checkout his profile