GithubHelp home page GithubHelp logo

mse_checking_person_in_db's Introduction

mse_checking_person_in_db

Welcome to our project!

Enjoy the full power of CNN and computer vision finding faces on video and checking their presence in database with mse_checking_person_in_db. We tried to use best libraries, namely face_recognition and OpenCV, to create this application.

res

Table of contents

Features

Use this application to find faces from video and check their presence in database. The project supports .mp4 and .avi video formats.

Installation

Requirements

System Python Distributions
Ubuntu 18.04 3.6+, pip3 MongoDB

Installation options

If you don't have MongoDB, visit https://docs.mongodb.com/manual/administration/install-community/.
Make sure you have virtualenv and cmake. Install them using:

pip3 install virtualenv
sudo apt-get install cmake

Open terminal and follow these steps:

  1. Clone this repo:
    git clone https://github.com/moevm/mse_checking_person_in_db.git
  2. Change directory to mse_checking_person_in_db:
    cd mse_checking_person_in_db/
  3. Set up the environment:
    ./setup.sh

If dlib library has not been installed correctly by pip, install it manually using following set of commands.
In this case, dlib would be installed in ~/.dlib folder.

git clone https://github.com/davisking/dlib.git ~/.dlib  
cd ~/.dlib  
mkdir build; cd build; cmake ..; cmake --build .  
cd ..  
python3 setup.py install  

Usage

Mandatory actions

Remember to launch MongoDB before using project:

 sudo service mongod start

Further it's assumed that you launched MongoDB.

Database administration

Open terminal in checking_person_in_db directory and execute db_interface.py:

   python3 ./db_interface.py [--add-group, -ag][--path=directory]

More options:

     --list, -l, show                list of persons in db
     --delete, -d                    delete person from db
     --add-group, -ag                add group of persons to db
     --add-person, -ap               add single person to db
     --name                          name of person to add/remove
     --path,                         path to image data
     --help, -h                      print command line options

Checking faces presence in database

Open terminal and follow these steps:

  1. Log in as root to use keyboard interrupts.

    sudo su
  2. Activate virtual environment:

    source .venv/bin/activate
  3. Change directory to checking_person_in_db:

    cd checking_person_in_db/
  4. Execute person_checker.py:

    python3 ./person_checker.py [options] [-s video source|--source=video source]
    
    Options:
       --source, -s                    file path or cam id
       --skip-frames                   number of skipped frames
       --tolerance                     comparison accuracy (from 0 to 1)
       --upsample-times                processing quality
       --report, --no-report           generate report
       --video, --no-video             generate processed video
       --help, -h                      print command line options

    If video is processed successfully, the message:

    video_<timestamp>.mp4 created
    report.txt created
    

    will be displayed in terminal. The output video (if you set --video flag) and the report will be created in checking_person_in_db/out/ directory.

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. Report bugs at https://github.com/moevm/mse_checking_person_in_db/issues. If you are reporting a bug, please apply label "bug" and include:

  • Any details about your local setup that might be helpful in troubleshooting;
  • Detailed steps to reproduce the bug.

Authors

Example

It's assumed that you launched MongoDB. Let's create database and check faces presence on video.
Suppose you have video file "video.avi" and persons directory tree as below:

 .
 +-- _persons
 |   +-- _person1
 |       +-- img1.png
 |       +-- img2.png
 |       ...
 |       +-- img<n>.png
 |   +-- _person2
 |       +-- ...
 |   ...
 |   +-- _person<n>
 |       +-- ...

Follow these steps:

  1. Open terminal in checking_person_in_db and activate virtualenv:

      source .venv/bin/activate
  2. Execute db_interface.py:

     python3 db_interface.py -ag persons
  3. As db_interface.py completes run person_checker.py:

     python3 ./person_checker.py -s video.avi 

If video file is processed succesfully, the output video with found faces and the report will be created in checking_person_in_db/out/ directory.

mse_checking_person_in_db's People

Contributors

derzhavin avatar supersolik avatar tatyanaberlenko avatar veselabaya avatar

Watchers

 avatar

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.