This project is designed to detect abnormalities in river environments by analyzing video streams. It uses advanced techniques such as adaptive background subtraction, flow analysis, and object detection to classify detected objects and events.
- Install conda.
- Use the
requirements.txtfile to set up the environment.
conda create --name river_abnormal_detect --file requirements.txt
conda activate river_abnormal_detect- Run the
video_detect.pyscript:python video_detect.py
- Modify the
video_pathvariable invideo_detect.pyto the path of the video file you want to test.
- Run the
streaming_detect.pyscript:python streaming_detect.py
- Modify the
youtube_urlvariable instreaming_detect.pyto include the URL of the video stream.
There are two options for uploading predictions and captured videos in real time:
- Update the
tg_token,tg_chat_idfield inutils/config_detect.pywith your Telegram bot's API key. - When running detection, you must also execute the
utils/telegram_bot.pyscript:python utils/telegram_bot.py
- Update the
LineBotApi("")&user_idfield inutils/config_detect.pywith your LINE bot's API key.