{"id":51468640,"url":"https://github.com/gperdrizet/face-mask-detection","last_synced_at":"2026-07-06T14:30:31.677Z","repository":{"id":337123227,"uuid":"1151038586","full_name":"gperdrizet/face-mask-detection","owner":"gperdrizet","description":"Demo face mask detection web app with PyTorch CNN","archived":false,"fork":false,"pushed_at":"2026-03-04T17:09:45.000Z","size":7949,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T23:52:56.221Z","etag":null,"topics":["cnn","computer-vision","deeplearning","image-classification","machine-learning","pytorch","streamlit"],"latest_commit_sha":null,"homepage":"https://mask-detector-puv1.onrender.com/","language":"Jupyter Notebook","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/gperdrizet.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-06T01:27:07.000Z","updated_at":"2026-03-04T17:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gperdrizet/face-mask-detection","commit_stats":null,"previous_names":["gperdrizet/face-mask-detection"],"tags_count":0,"template":false,"template_full_name":"gperdrizet/deeplearning-GPU","purl":"pkg:github/gperdrizet/face-mask-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Fface-mask-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Fface-mask-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Fface-mask-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Fface-mask-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gperdrizet","download_url":"https://codeload.github.com/gperdrizet/face-mask-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Fface-mask-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35195590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","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":["cnn","computer-vision","deeplearning","image-classification","machine-learning","pytorch","streamlit"],"created_at":"2026-07-06T14:30:30.884Z","updated_at":"2026-07-06T14:30:31.636Z","avatar_url":"https://github.com/gperdrizet.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face mask detection\n\nTry live deployment of app [here](https://mask-detector-puv1.onrender.com)\n\nA deep learning project for detecting face masks in images using a PyTorch CNN model, with a simple Streamlit web application for deployment.\n\n## Web application\n\nA simple Streamlit app for real-time face mask detection with:\n\n- **Image upload**: Upload JPG, JPEG, or PNG images\n- **Webcam capture**: Take photos directly with your camera\n- **Real-time inference**: Get instant mask detection results\n- **Probability display**: Shows mask detection probability (0.0 - 1.0)\n- **CPU-only**: Runs on CPU, no GPU required\n\n## Model\n\n- **Architecture**: 4-layer CNN with batch normalization and dropout (~500K parameters)\n- **Input size**: 128x128 pixels RGB\n- **Output**: Binary classification (with_mask / without_mask)\n- **Training**: PyTorch 2.0+ with data augmentation\n\n## Model performance\n\nSee the notebook [face_mask_detection.ipynb](https://github.com/gperdrizet/face-mask-detection/blob/main/notebooks/face_mask_detection.ipynb) for full model architecture, training and evaluation details.\n\n## Running the project yourself\n\n### Using the dev container (recommended)\n\nThis project includes a dev container configuration with all dependencies pre-installed.\n\n1. **Open in VS Code**: Make sure you have Docker and the Dev Containers extension installed\n2. **Reopen in Container**: VS Code will prompt you to reopen in the container, or use Command Palette → \"Dev Containers: Reopen in Container\"\n3. **Train the Model**: Open and run all cells in `notebooks/face_mask_detection.ipynb` to train the model and save it to `models/face_mask_detector_production.pth`\n4. **Run the App**: From the `app/` directory, run:\n\n```bash\nstreamlit run streamlit_app.py\n```\n\nThe dev container has everything configured, so you don't need to install any dependencies manually!\n\n### Manual installation (without dev container)\n\nIf you prefer not to use the dev container:\n\n1. Install the required dependencies:\n```bash\npip install -r requirements.txt\n```\n\n2. Train the model by running the notebook at `notebooks/face_mask_detection.ipynb`\n\n3. Run the app from the `app/` directory:\n```bash\nstreamlit run streamlit_app.py\n```\n\n### Usage\n\nThe app will open in your default browser at `http://localhost:8501`.\n\n1. **Upload an image**: Click \"Browse files\" to select an image from your computer\n2. **Or use your camera**: Click \"Take a photo\" to capture an image with your webcam\n\n## License\n\nSee LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperdrizet%2Fface-mask-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgperdrizet%2Fface-mask-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperdrizet%2Fface-mask-detection/lists"}