Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 2.32 KB

README.md

File metadata and controls

99 lines (66 loc) · 2.32 KB

hawk-eye

Distributed system to track objects or faces from images.

Requirements:

To start cockroach node:

  • In the first node:
  > cockroach start --insecure --host=<first-node-ip>
  • In other nodes (the join node ip must be some node already running):
  > cockroach start --insecure --host=<this-node-ip> --join=<first-node-ip>:26257
  • Create databases
  > cockroach sql --insecure
  root@:26257/> CREATE DATABASE tracking;
  root@:26257/> CREATE TABLE tracking.faceBank  (id SERIAL PRIMARY KEY, created_at TIMESTAMPTZ, name TEXT, imagePath TEXT, type INTEGER);
  root@:26257/> CREATE TABLE  tracking.locationHistory (id SERIAL PRIMARY KEY, face_id INTEGER, created_at TIMESTAMPTZ, latitude DECIMAL(9,6), longitude DECIMAL(9,6), FOREIGN KEY (face_id) REFERENCES tracking.faceBank(id));
  root@:26257/> GRANT SELECT, INSERT, UPDATE ON tracking.faceBank TO maxroach;
  root@:26257/> GRANT SELECT, INSERT, UPDATE ON tracking.locationhistory TO maxroach;

To run the API Server:

  > cd raspy/src && python ./Apiserver.py <local-ip> <port>

To run the City Monitor Center (CMC):

  • Also exposes an API server in api-port
  > cd raspy/src && python ./cmc.py <local-ip> <port> <api-port>

To run the Neighborhood Monitor Center (CMB):

  • Also exposes an API server in api-port
  > cd raspy/src && python ./cmb.py <local-ip> <port> <api-port> <cmc-ip> <cmc-port>

To run the Web Server:

  > cd webapp/hawk-eye && npm start

Before build the fedora env:

You should:

  • Add the opencv-3.2.0 and opencv_contrib-3.2.0 folders to the raspy directory. To download the needed folders:
  > wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.2.0.zip
  > unzip opencv.zip
  > wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.2.0.zip
  > unzip opencv_contrib.zip
  • Install docker.io:
  > apt-get install docker.io

To build the fedora env:

  > ./docker-build.sh

To run the env:

  > ./docker-start.sh

This will start the cmb.py script in background, and will let open a terminal.