This project processes RTSP video streams using OpenCV and the YOLO Real-Time Object Detection Model.
Frames containing a "subject of interest" are posted to a slack channel.
Create Slack Bot Account
Follow Slack documentation for Bot-Users.
Installing Dependencies
src/yolov3-coco/get_model.sh && pip install -r requirements.txt
Running Unit Tests
python -m unittest discover -s test -p "*Test.py"
Simply pass a suitable RTSP stream URL as an argument when running the application:
python src/main.py -loc http://82.215.168.242:8083/mjpg/video.mjpg
For a full list of arguments run:
python src/main.py -h
usage: main.py [-h] [-m MODEL_PATH] [-w WEIGHTS] [-cfg CONFIG] [-i IMAGE_PATH]
[-v VIDEO_PATH] [-l LABELS] [-c CONFIDENCE] [-th THRESHOLD]
[-t SHOW_TIME] [-d DEBUG] [-sc SHOW_CAM] [-ri REFRESH_INTERVAL]
[-loc STREAM_LOCATION] [-stok SLACK_TOKEN]
[-stit SLACK_ALERT_TITLE] [-schan SLACK_CHANNEL]
[-tdir TMP_FILE_LOCATION] [-subj SUBJECT_OF_INTEREST]