A distributed system that detects faces in a video and draws Delaunay triangles over it.
- Easy Setup - Seamless installation process through Docker images.
- Highly Scalable - Easily scale the number of worker nodes to match your desired workload with minimal configuration changes.
- Handles Multiple Tasks - Capable of efficiently handling multiple video requests simultaneously.
- Robust Logging - Incorporates comprehensive logging functionalities to track and monitor activities effectively.
- Python
- IDE of your choice
- Docker
- PostgreSQL
-
Pull the repo and open the terminal in the project directory
-
Change directory to Kafka folder
cd kafka
-
Run the docker compose file with the command
docker compose up -d
-
Run the file
initialKafkaConfig.py
with the commandpython initialKafkaConfig.py
-
Change the directory to workerNode folder using the command
cd ../workerNode
-
Change the IP address in the .env file to the IP address of the machine running Kafka.
-
Build a Docker image with the command:
docker build -t node:1.0 .
-
Change the machine ID as required in the .env file and build another docker image with the command:
docker build -t node:1.1 .
-
Create a container using the command
docker run --name worker1 -d -p 9090:9093 node:1.0
anddocker run --name worker2 -d -p 9099:9093 node:1.1
Now the message queue (Kafka) and two workers are ready. -
Change to the machineNode folder using the command
cd ../machineNode
, and change the IP address in .env to the IP address of the machine running Kafka. -
Run the
server.py
to host the website inlocalhost:5000
, upload the video and click send. -
The resulting video will be displayed after a few seconds with complete statistics.