VladKha / face_detector

Website for face detection from image (using HOG + SVM framework)

Home Page:https://face-detector-app.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face detector

Website for face detection from image.

Built using mine object_detector project (see more on it's Github page), trained on faces datasets. Tools for detection are inside object_detector package located in project root.

Note 1: site may need some spin up time if nobody has accessed it for a certain period.

Note 2: detection can take some time (few seconds) depending on image size because of the slow algorithm (HOG + SVM framework).

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development purposes. There are 2 ways of running the project for development of deployment: usual (not dockerized) and dockerized.

Usual Dockerized
1. Install RabbitMQ 1. Install Docker and Docker-Compose
2. Copy environment file env.example and rename it to .env 2. Copy environment file env.example and rename it to .env
3. In .env file set DJANGO_SECRET_KEY and CELERY_BROKER_URL 3. In .env file set DJANGO_SECRET_KEY
4. Execute in command line pip install -r requirements.txt 4. Start docker engine
5. Start RabbitMQ 5. Execute in command line sh up.sh which will start-up all the containers (first time can take some time to boot up because of the Docker images downloading and building)
6. Start Celery worker celery -A config worker -l 6. Access website on http://0.0.0.0:8000/
7. Start Django server python manage.py runserver 0.0.0.0:8000 To shutdown dockerized application - execute in command line sh down.sh
8. Access website on http://0.0.0.0:8000/

Deployment into Heroku

    heroku login

    heroku create <app_name>

    # config environment vars
    heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
    heroku config:set DJANGO_SECRET_KEY=<YOURS_DJANGO_SECRET_KEY>
    heroku config:set CELERY_BROKER_URL=<YOURS_CELERY_BROKER_URL>

    git push heroku master

    heroku ps:scale web=1 worker=1

    heroku open

Built With

  • Python 3.6
  • Django 2 - back-end web framework
  • Bootstrap 4 - front-end framework for site design
  • a little of jQuery and Ajax
  • Celery - asynchronous task queue/job queue based on distributed message passing
  • RabbitMQ 3.7 - message broker
  • Docker - containerization
  • docker-compose - tool for defining and running multi-container Docker applications

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Website for face detection from image (using HOG + SVM framework)

https://face-detector-app.herokuapp.com/

License:MIT License


Languages

Language:Python 70.3%Language:JavaScript 15.8%Language:HTML 11.5%Language:Shell 2.4%