For more details about this project, please visit the main repo.
facemask-detection/
├── docs/ # Frontend files for GitHub Pages deployment
│ ├── index.html # Main application page
│ ├── static/ # Static assets
│ │ ├── css/ # Stylesheets
│ │ ├── js/ # JavaScript files
│ │ ├── images/ # Image assets
│ │ └── model/ # WebAssembly model files
│ ├── privacy/ # Privacy statement page
│ └── i18n/ # Internationalization files
├── src/ # C++ source code
│ ├── yolo.cpp # Main C++ implementation
│ ├── CMakeLists.txt # Build configuration
│ ├── ncnn/ # ncnn library
│ └── ios/ # iOS-specific build files
└── scripts/ # Utility scripts
└── server.py # Local development server
- Configure GitHub Pages to serve from the
docs/directory:- Go to repository Settings → Pages
- Set Source to
/docsdirectory
- Visit https://facemask-detection.com (or your GitHub Pages URL)
-
Start the local development server:
python3 scripts/server.py
The server will automatically serve from the
docs/directory. -
Open your browser and navigate to:
Note: For best performance, use Chrome with WebAssembly features enabled:
- Open
chrome://flags - Enable experimental WebAssembly features
- Restart Chrome
If you prefer to use Python's built-in server:
cd docs
python3 -m http.server 8888Then open http://localhost:8888 in your browser.
To rebuild the WebAssembly files from C++ source:
- Install Emscripten SDK
- Navigate to
src/directory - Run CMake build:
cd src emcmake cmake . emmake make
- Copy generated
.wasm,.js, and.datafiles todocs/static/model/
- Real-time face mask detection using WebAssembly
- Multi-language support (English, Spanish, Chinese)
- Fully client-side processing (privacy-first)
- Responsive design for desktop and mobile