- Clone the repo
git clone https://github.com/lannguyen0910/face-mask-yolov5/
cd face-mask-yolov5/deployment/
- Install dependencies
pip install -r requirements.txt
- Download yolov5 weights (About 1.3Gb)
python download_weights.py
- Start the app. Options: [yolov5s.pt | yolov5m.pt | yolov5l.pt | yolov5x.pt]
python app.py --host localhost:3000 --weights './models/weights/yolov5s.pt'
🚨 There is a high chance that you'll face some errors when run the app on local machine. Feel free to make a pull request!
I personally train [yolov5s, yolov5m] models for 50 epochs, [yolov5l] model for 30 epochs [yolov5x] model for 10 epochs due to high computational expenses.
- Inspire from: https://github.com/waittim/mask-detector