Aankh

SETUP :

STEP 1 : Create a virtual environment in model folder

cd model
pip install virtualenv
virtualenv venv

STEP 2 : Activate virtual environment :

venv\Scripts\activate

This command need administrative permissions. Use command prompt to execute this Will not work in powershell

STEP 3 : Install required libraries

pip install -r requirements.txt

STEP 4 : Run flask app

python app.py

After this the api will be up and running on : localhost:8080 You can now give api calls from react frontend.

API ROUTES :

  1. β€˜/predict_pose’ : To predict head pose
  2. β€˜/predict_people’ : To predict number of people in input image

NOTE :


Results of face pose estimation model :

LEFT POSE :

left_pose

RIGHT POSE :

right_pose

FORWARD :

straight_pose

NOTE :

if angles[1] < -15:
    GAZE = "Looking: Left"
elif angles[1] > 15:
    GAZE = "Looking: Right"
else:
    GAZE = "Forward"

Results of crowd couting model :

SAMPLE1 :

first_image

SAMPLE2 :

seccond_image

NOTE :

The number of people detected can be changed via lowering the threshold To do that go to predict funtion in app.py and change the variable threshold Our default value is 0.5

threshold = 0.5