farasatkhan / EyeTry-FaceShapeDetection

Flask Server to detect user face shape.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EyeTry-FaceShapeDetection

EyeTry-FaceShapeDetection is part of the EyeTry which detect user face shape based on an image. User upload an image and server returns the face shape of a person.

Requirements

Install the required packages using:

pip install torch torchvision pillow matplotlib numpy scikit-learn

or

pip install -r requirements.txt

Running the App

  1. Activating Python Virtual Environment
Scripts\activate
  1. Setting the Environment Variables
  set FLASK_APP=main.py
  set FLASK_ENV=development
  1. Running the App
    flask run -p port

Endpoints:

method: POST
route: /upload
parameters: file

returns:
{
    "prediction": <face shape>,
    "status": "success"
}

method: GET
route: /test

returns:
{
    "status": "success"
}

About

Flask Server to detect user face shape.


Languages

Language:PowerShell 59.6%Language:Roff 27.9%Language:Python 8.8%Language:Batchfile 3.2%Language:Dockerfile 0.5%