{"id":18860218,"url":"https://github.com/modelzoo/facescoring","last_synced_at":"2026-03-10T04:33:27.249Z","repository":{"id":86738424,"uuid":"156010414","full_name":"ModelZoo/FaceScoring","owner":"ModelZoo","description":"Face Scoring Model to Get the Beauty Score of Face","archived":false,"fork":false,"pushed_at":"2018-12-18T18:15:19.000Z","size":565,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T12:53:01.708Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ModelZoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-11-03T18:09:09.000Z","updated_at":"2022-12-08T13:59:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"632cb994-07d7-4cba-968b-b64ebf1a353b","html_url":"https://github.com/ModelZoo/FaceScoring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ModelZoo/FaceScoring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelZoo%2FFaceScoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelZoo%2FFaceScoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelZoo%2FFaceScoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelZoo%2FFaceScoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ModelZoo","download_url":"https://codeload.github.com/ModelZoo/FaceScoring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelZoo%2FFaceScoring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30324440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-08T04:22:40.031Z","updated_at":"2026-03-10T04:33:27.228Z","avatar_url":"https://github.com/ModelZoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emotion Recognition\n\nEmotion Recognition Implemented by [ModelZoo](https://github.com/ModelZoo/ModelZoo).\n\n## Usage\n\nFirstly, you need to clone this repository and download training data:\n\n```\ngit clone https://github.com/ModelZoo/EmotionRecognition.git\ncd EmotionRecognition\ngit lfs pull\n```\n\nNext, install the dependencies using pip:\n\n```\npip3 install -r requirements.txt\n```\n\nFinally, just run training:\n\n```\npython3 train.py\n```\n\nIf you want to continue training your model, you need to define `checkpoint_restore` flag in `train.py`:\n\n```python\ntf.flags.DEFINE_bool('checkpoint_restore', True, help='Model restore')\n```\n\nAnd you can define the specific model with `checkpoint_name` which you want to continue training with:\n\n```python\ntf.flags.DEFINE_string('checkpoint_name', 'model-178.ckpt', help='Model name')\n```\n\n\n## TensorBoard\n\nAfter training, you can see the transition of loss in TensorBoard.\n\n```\ncd events\ntensorboard --logdir=.\n```\n\n![](https://ws3.sinaimg.cn/large/006tNbRwgy1fw37u664tzj319d0mumym.jpg)\n\nThe best accuracy is 65.64% from step 178.\n\n## Predict\n\nNext, we can use our model to recognize the emotion.\n\nHere are the test pictures we picked from the website:\n\n![](https://ws4.sinaimg.cn/large/006tNbRwgy1fw3f6am6jpj310405cwf8.jpg)\n\nThen put them to the folder named `tests` and define the\n model path and test folder in `infer.py`:\n\n```python\ntf.flags.DEFINE_string('checkpoint_name', 'model.ckpt-178', help='Model name')\ntf.flags.DEFINE_string('test_dir', 'tests/', help='Dir of test data')\n```\n\nThen just run inference using this cmd:\n\n```\npython3 infer.py\n```\n\nWe can get the result of emotion recognition and probabilities of each emotion:\n\n```\nImage Path: test1.png\nPredict Result: Happy\nEmotion Distribution: {'Angry': 0.0, 'Disgust': 0.0, 'Fear': 0.0, 'Happy': 1.0, 'Sad': 0.0, 'Surprise': 0.0, 'Neutral': 0.0}\n====================\nImage Path: test2.png\nPredict Result: Happy\nEmotion Distribution: {'Angry': 0.0, 'Disgust': 0.0, 'Fear': 0.0, 'Happy': 0.998, 'Sad': 0.0, 'Surprise': 0.0, 'Neutral': 0.002}\n====================\nImage Path: test3.png\nPredict Result: Surprise\nEmotion Distribution: {'Angry': 0.0, 'Disgust': 0.0, 'Fear': 0.0, 'Happy': 0.0, 'Sad': 0.0, 'Surprise': 1.0, 'Neutral': 0.0}\n====================\nImage Path: test4.png\nPredict Result: Angry\nEmotion Distribution: {'Angry': 1.0, 'Disgust': 0.0, 'Fear': 0.0, 'Happy': 0.0, 'Sad': 0.0, 'Surprise': 0.0, 'Neutral': 0.0}\n====================\nImage Path: test5.png\nPredict Result: Fear\nEmotion Distribution: {'Angry': 0.04, 'Disgust': 0.002, 'Fear': 0.544, 'Happy': 0.03, 'Sad': 0.036, 'Surprise': 0.31, 'Neutral': 0.039}\n====================\nImage Path: test6.png\nPredict Result: Sad\nEmotion Distribution: {'Angry': 0.005, 'Disgust': 0.0, 'Fear': 0.027, 'Happy': 0.002, 'Sad': 0.956, 'Surprise': 0.0, 'Neutral': 0.009}\n```\n\nEmmm, looks good!\n\n## Pretrained Model\n\nLooking for pretrained model?\n\njust go to `checkpoints` folder, here is the model with best performance at step 178.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelzoo%2Ffacescoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelzoo%2Ffacescoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelzoo%2Ffacescoring/lists"}