Skip to content

Anurag-M1/FaceGuard-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FaceGuard‑AI

Flask‑based web app for detecting facial/skin anomalies and returning a matched condition label with supplement info. Upload an image, run the model, and get a result page with the predicted condition.

FaceGuard AI

Features

  • Image upload + instant inference
  • Condition label mapped from model output
  • Result page with supplement info from CSV
  • Simple Flask frontend

Project structure

FaceGuard-AI/
├─ app.py
├─ predict.py
├─ data_files/
│  └─ supplement_info.csv
├─ trained_model/        # expected at runtime (see below)
│  ├─ best_model.h5
│  └─ datafile.json
├─ static/
├─ templates/
└─ model/                # training notebook

Model files (required)

predict.py expects a folder named trained_model/ with:

  • best_model.h5
  • datafile.json (label mapping)

If your model files are stored elsewhere, update this line in predict.py:

baseDir = os.path.join(os.getcwd(), 'trained_model')

Setup

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

If requirements.txt is missing, install the basics:

python -m pip install flask keras tensorflow pillow numpy pandas

Run

python app.py

Open http://localhost:5000 live https://faceguard-ai-qaw3.onrender.com

API

POST /analyze

Form‑data field: file

Example:

curl -X POST http://localhost:5000/analyze   -F "file=@/path/to/image.jpg"

Response:

{ "product_id": 12 }

Then open:

/result?id=12

Notes

  • Uploaded images are saved temporarily to images/ and deleted after inference.
  • supplement_info.csv drives the label + supplement metadata used by the result page.

Author

Anurag Kumar Singh

About

Flask‑based web app for detecting facial/skin anomalies and returning a matched condition label with supplement info. Upload an image, run the model, and get a result page with the predicted condition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors