Distributed system to track objects or faces from images.
-
Cockroach DB: https://www.cockroachlabs.com
-
Open CV: https://opencv.org/
- 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;
> cd raspy/src && python ./Apiserver.py <local-ip> <port>
- Also exposes an API server in api-port
> cd raspy/src && python ./cmc.py <local-ip> <port> <api-port>
- Also exposes an API server in api-port
> cd raspy/src && python ./cmb.py <local-ip> <port> <api-port> <cmc-ip> <cmc-port>
> cd webapp/hawk-eye && npm start
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
> ./docker-build.sh
> ./docker-start.sh
This will start the cmb.py script in background, and will let open a terminal.