{"id":13400034,"url":"https://github.com/oarriaga/face_classification","last_synced_at":"2025-05-14T09:08:13.654Z","repository":{"id":17625506,"uuid":"81460066","full_name":"oarriaga/face_classification","owner":"oarriaga","description":"Real-time face detection and emotion/gender classification using fer2013/imdb datasets with a keras CNN model and openCV.","archived":false,"fork":false,"pushed_at":"2024-03-08T20:04:21.000Z","size":124216,"stargazers_count":5653,"open_issues_count":56,"forks_count":1600,"subscribers_count":228,"default_branch":"master","last_synced_at":"2025-04-03T20:37:40.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oarriaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-09T14:44:32.000Z","updated_at":"2025-04-02T13:48:48.000Z","dependencies_parsed_at":"2024-10-15T00:31:23.262Z","dependency_job_id":null,"html_url":"https://github.com/oarriaga/face_classification","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oarriaga%2Fface_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oarriaga%2Fface_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oarriaga%2Fface_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oarriaga%2Fface_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oarriaga","download_url":"https://codeload.github.com/oarriaga/face_classification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248330687,"owners_count":21085761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:46.981Z","updated_at":"2025-04-11T02:38:26.306Z","avatar_url":"https://github.com/oarriaga.png","language":"Python","readme":"# This repository is deprecated for at TF-2.0 rewrite visit:\n# https://github.com/oarriaga/paz\n------------------------------------------------\n# Face classification and detection.\nReal-time face detection and emotion/gender classification using fer2013/IMDB datasets with a keras CNN model and openCV.\n* IMDB gender classification test accuracy: 96%.\n* fer2013 emotion classification test accuracy: 66%.\n\nFor more information please consult the [publication](https://github.com/oarriaga/face_classification/blob/master/report.pdf)\n\n# Emotion/gender examples:\n\n![alt tag](images/demo_results.png)\n\nGuided back-prop\n![alt tag](images/gradcam_results.png)\n\nReal-time demo:\n\u003cdiv align='center'\u003e\n  \u003cimg src='images/color_demo.gif' width='400px'\u003e\n\u003c/div\u003e\n\n[B-IT-BOTS](https://mas-group.inf.h-brs.de/?page_id=622) robotics team :)\n![alt tag](images/robocup_team.png)\n\n## Instructions\n\n### Run real-time emotion demo:\n\u003e python3 video_emotion_color_demo.py\n\n### Run real-time guided back-prop demo:\n\u003e python3 image_gradcam_demo.py\n\n### Make inference on single images:\n\u003e python3 image_emotion_gender_demo.py \u003cimage_path\u003e\n\ne.g.\n\n\u003e python3 image_emotion_gender_demo.py ../images/test_image.jpg\n\n### Running with Docker\n\nWith a few steps one can get its own face classification and detection running. Follow the commands below:\n\n* ```docker pull ekholabs/face-classifier```\n* ```docker run -d -p 8084:8084 --name=face-classifier ekholabs/face-classifier```\n* ```curl -v -F image=@[path_to_image]  http://localhost:8084/classifyImage \u003e image.png```\n\n### To train previous/new models for emotion classification:\n\n\n* Download the fer2013.tar.gz file from [here](https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data)\n\n* Move the downloaded file to the datasets directory inside this repository.\n\n* Untar the file:\n\u003e tar -xzf fer2013.tar\n\n* Run the train_emotion_classification.py file\n\u003e python3 train_emotion_classifier.py\n\n### To train previous/new models for gender classification:\n\n* Download the imdb_crop.tar file from [here](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) (It's the 7GB button with the tittle Download faces only).\n\n* Move the downloaded file to the datasets directory inside this repository.\n\n* Untar the file:\n\u003e tar -xfv imdb_crop.tar\n\n* Run the train_gender_classification.py file\n\u003e python3 train_gender_classifier.py\n\n","funding_links":[],"categories":["Face detection and alignment","Computer Vision","Python","Behavioral","Repos","Related"],"sub_categories":["Classification \u0026 Detection \u0026 Tracking","Video-games"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foarriaga%2Fface_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foarriaga%2Fface_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foarriaga%2Fface_classification/lists"}