OrFrederick / FaceFinder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting started

First, you need to install Ruby and Rails. You also need a RaspberryPi connected to a camera module.

Install Postgres

  • sudo apt update
  • sudo apt install postgresql postgresql-contrib libpq-dev
  • Create a Postgres user
    • sudo -u postgres createuser -s <username> -P

Set environment variables

  • echo 'export FaceFinder_DATABASE_USERNAME="<username>"' >> ~/.bashrc
  • echo 'export FaceFinder_DATABASE_PASSWORD="<PostgreSQL_Role_Password>"' >> ~/.bashrc
  • Create recognition\.env and fill it with STREAM_URL="tcp://<YOUR_IP>:3333"

Database setup

  • Inside /facefinder_api/
    • rails db:create && rails db:migrate

Run the Project

  • Inside /facefinder_api/ run rails server
  • Inside /recognition/ run python3 main.py
  • On your RaspberryPi run raspivid -t 0 -n -b 1000000 -g 30 -ih -pf baseline -w 640 -h 480 -fps 30 -l -o <STREAM_URL>

About


Languages

Language:Ruby 42.8%Language:TypeScript 32.8%Language:Python 19.1%Language:HTML 2.9%Language:CSS 1.5%Language:JavaScript 0.9%Language:Shell 0.1%