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.txt
file to set up the environment.
conda create --name river_abnormal_detect --file requirements.txt
conda activate river_abnormal_detect
- Run the
video_detect.py
script:python video_detect.py
- Modify the
video_path
variable invideo_detect.py
to the path of the video file you want to test.
- Run the
streaming_detect.py
script:python streaming_detect.py
- Modify the
youtube_url
variable instreaming_detect.py
to 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_id
field inutils/config_detect.py
with your Telegram bot's API key. - When running detection, you must also execute the
utils/telegram_bot.py
script:python utils/telegram_bot.py
- Update the
LineBotApi("")
&user_id
field inutils/config_detect.py
with your LINE bot's API key.