{"id":17317060,"url":"https://github.com/aome510/mask-classifier","last_synced_at":"2025-04-14T14:22:04.800Z","repository":{"id":104202171,"uuid":"200170455","full_name":"aome510/Mask-Classifier","owner":"aome510","description":"Detecting/classifying masked faces in real-time","archived":false,"fork":false,"pushed_at":"2019-08-24T14:54:16.000Z","size":86431,"stargazers_count":36,"open_issues_count":1,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T14:21:50.785Z","etag":null,"topics":["deep-learning","keras","machine-learing","python"],"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/aome510.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":"2019-08-02T05:24:04.000Z","updated_at":"2025-01-01T13:23:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"68cb3890-80e3-4122-9e98-6d28bab0ef52","html_url":"https://github.com/aome510/Mask-Classifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aome510%2FMask-Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aome510%2FMask-Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aome510%2FMask-Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aome510%2FMask-Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aome510","download_url":"https://codeload.github.com/aome510/Mask-Classifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894949,"owners_count":21179154,"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":["deep-learning","keras","machine-learing","python"],"created_at":"2024-10-15T13:15:24.182Z","updated_at":"2025-04-14T14:22:04.791Z","avatar_url":"https://github.com/aome510.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mask Classifier\n\n## Introduction\n\nThis repository contains codes for training and evaluating the Mask Classifier model, which is mostly implemented in ***Python 3*** and ***Keras*** framework.\n\nWhen training and testing the model, we mostly use [SSH](https://github.com/mahyarnajibi/SSH) to detect and crop face images.\n\nPlease read our paper at [here](./paper/paper.pdf) for further details on preparing the datasets as well as training and testing the model.\n\nThis project was supported by [VinAI research](https://www.vinai.io).\n## People\n\nOur team consists of four members including me (***Thang Pham***), ***Bao Tran***, ***Duy Pham***, and ***Long Nguyen***.\n\nThis project was performed while the authors interned at [VinAI research](https://www.vinai.io/).\n\n## Model Performance\n\nOur team has tried different network architectures and trained on different frameworks such as ***PyTorch***, ***Keras***, and ***Caffe***.\n\nWe observed that deploying ***ResNet50*** pretrained network brought us high accuracy model as well as fast training time.\n\nDuring the experiment, the Mask Classifer model can achieve about ***96.5%*** accuracy and a performance of ***10-15 FPS*** on a Nvidia's GeForce GTX Titan X machine.\n\n### Some of the results\n![](./data/demo/output/00001.jpg)\n![](./data/demo/output/00002.jpg)\n![](./data/demo/output/00003.jpg)\n![](./data/demo/output/00004.jpg)\n\n## Contents\n\n1. [Installation](#install)\n2. [Running the demo](#demo)\n3. [Training a model](#train)\n\n\u003ca name=\"install\"\u003e\u003c/a\u003e\n## Installation\n1. Clone the repository:\n```\ngit clone https://github.com/aome510/Mask-Classifier.git\n```\n2. Setup SSH:\n* [Install and setup SSH requirements](./lib/SSH/README.md#installation)\n* [Install SSH caffemodel](./lib/SSH/README.md#demo)\n3. Install python requirements:\n```\npip install -r requirements.txt\n```\n\n\u003ca name=\"demo\"\u003e\u003c/a\u003e\n## Running the demo\nTo run the demo, first you need to download the pre-trained mask classifier model from [here](https://drive.google.com/file/d/1Ogew-mbiMqznzO3ok_T-IiqQGpq4OHw5) and then save it into a folder named ```model/```.\n\nAfter downloading the model, you can run demo on webcam:\n```\npython demo.py\n```\nIf you want to demo on videos, you can download our demo videos from [here](https://drive.google.com/drive/folders/1PSw1eDErcjLaOkIUxYXbLEacBNdaMjHQ) and then save it into a folder named ```data/videos/```. After that, you can modify ```demo.py``` to run demo on videos.\n\n\u003ca name=\"train\"\u003e\u003c/a\u003e\n## Training the model\n\n### Preparing the datasets\n\n1. ***CelebA*** dataset:\n\n    You can download ***CelebA*** dataset from [here](https://www.kaggle.com/jessicali9530/celeba-dataset) and then save it into a folder named ```data/celebA/```\n\n2. ***WiderFace*** dataset:\n\n    You can download ***WiderFace*** dataset from [here](https://drive.google.com/open?id=16a0TSvPI_3up7tbblxTHxXj5hZ9N7RyH) and then save it into a folder named ```data/WiderFace/```\n3. ***MAFA*** dataset:\n\n    You can download ***MAFA*** dataset from [here](https://drive.google.com/drive/folders/1nbtM1n0--iZ3VVbNGhocxbnBGhMau_OG) and then save it into a folder named ```data/MAFA/```\n4. ***Mask Classifier*** dataset (our dataset):\n\n    You can download ***Mask Classifier*** dataset from [here](https://drive.google.com/open?id=1WLKCLvR_nXSsOUywqKixoetz03WoJ8cL) and then save it into a folder name ```data/mask_classifier/```\n\n### Combining the datasets\nAfter downloading all the datasets listed above you can run:\n```\npython gen_data.py\n```\nto combine the datasets and split them for training and cross-validating the model.\n\n### Training the model\n\nAfter preparing the combined dataset, you can start training the model:\n```\npython train.py\n```\n\nBy default, we use ***resnet50*** network to train the model. You can change to ***reception_resnet_v2*** network by modifying ```train.py```.\n\nPlease read [this](https://keras.io/applications/) if you want to train with diffrent network architectures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faome510%2Fmask-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faome510%2Fmask-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faome510%2Fmask-classifier/lists"}