Giter Site home page Giter Site logo

fd_widerface_yolov8's Introduction

Face Detection and Age Classification Demonstration

Sivakorn (Oak) Chongfeungprinya

Purpose

In this scenario, we assume there is an application from health promotion board that would propose different health exercises to different age groups. Hence, a face detection and an age classification algorithm would be very helpful for determining the user's age.

Age range definition based on Health Promotion Board of Singapore

  • (A0) Young Children: 0-6 years
  • (A1) Children and Youth: 7-17 years
  • (A2) Youth Adults: 18-25 years
  • (A3) Adults: 26-49 years
  • (A4) Older adults: 50 years

Disclaimer: This is a model training demonstration for educational purposes only.

Algorithm and Training Data

Face Detection Model:

  • YOLOV8 base architecture
  • Finetuned based on publicly available WiderFace dataset
  • Eventual MAP(50) on test dataset is: 64% just after 20 epochs.
  • Below is a sample of testing results

sample_results

Age Classification Model:

  • RESNET34 base architecture
  • Finetuned based on publicly available UTKFace dataset. The dataset is crtopped using the engine from face detection model.
  • Model is trained up to epoch 4, which is selected to prevent overfitting on training data
  • Weighted average accuracy is 74% on the test dataset.
  • Below is an example of training dataset.

training_data

Deployment

  • A simple .py script is developed to deploy both models in a sample demo.
    • The face detection model is used to detect a face. That face is cropped as an image for further processing.
    • The classification model is used for each cropped image.
    • The results are then demonstrated on screen.
  • Demo

demo_gif

Potential Improvement

  • Improve variability within the dataset used for training both models.
    • For classification model specifically, data preprocessing could be done to rotate the faces around and improve the accuracy upon deployment.
    • Train with more epochs for detection model.
  • Model quantization to reduce model sizes for deployment on smaller devices (phones).
  • Data for application (webcam images) could slightly be different from the faces from internet used for classification model training. It would be good to expand the training dataset into the actual application sets.

References

fd_widerface_yolov8's People

Contributors

sivakornchong avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.