This project performs live beer detection using a YOLO model through your webcam.
detect_beer.py- Live webcam detection script with bufferingyolo_beer_detection_tutorial.ipynb- Educational notebook for training and understanding YOLOpyproject.toml- Project dependenciesbest.pt- Your trained YOLO model (place here)
- Place your YOLO model file (
best.pt) in the project root directory. - Install dependencies:
uv sync - Run the detection:
python detect_beer.py
For a complete learning experience, open yolo_beer_detection_tutorial.ipynb which covers:
- YOLO fundamentals
- Data preparation
- Model training
- Evaluation
- Inference and deployment
- Python 3.8+
- Webcam
- YOLO model trained on alcohol-related objects
Run the script and point your webcam at beer bottles, glasses, etc. The model will detect and highlight:
- alcohol-bottle
- beer-bottle
- beer-glass
- shot
- wine-glass
Press 'q' to quit the detection window.
Make sure your best.pt model is compatible with Ultralytics YOLO26 format.