This program will help you not to forget to remove cups and glasses from the table. The mug detector was written using a pre-trained model from Pytorch. If there are more than a certain number of glasses, you will receive a notification in Telegram
- Linux, macOS or Windows
- Python 3.6+
Clone repo
git clone https://github.com/LongaBonga/CupsCapture.git
Install requirements
cd CupsCapture
pip install -r requirements.txt
there are also arguments for starting this project:
--start_time
The hour when program will start searching cups--finish_time
The hour when program will finish searching cups--video_path
The path to the video. or digit, if it is web camera--time_freq
The frequency with which the program will search for cups and send notifications if they are found. Default 15 minutes--frame_amount
The number of frames that must be processed at a time to predict the number of cups--show
If it is True, the image from the camera will be displayed on the screen--trashhold
Images with a probability below this threshold will not be considered
Note: You also need your own telegram bot more precisely, you need his token. You can get it by writing a message to @BotFather in Telegram
Run example
python3 main.py --start_time=10 --finish_time=23 --video_path=0 --frame_amount=5