diff --git a/README.md b/README.md index 87ac22a..48b2406 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,18 @@ ## Description -`dvr-yolov8-detection` is designed for real-time detection of humans, animals, or objects using the YOLOv8 model and OpenCV. +`dvr-yolov8-detection` is designed for real-time detection of humans, animals, or objects using the YOLOv8 model and OpenCV. Contrary to its name, we're now supporting models up to [**YOLOv11**](https://github.com/ultralytics/ultralytics?tab=readme-ov-file)! The program supports real-time video streams via RTMP or USB webcams, includes CUDA GPU acceleration for enhanced performance, and provides options for saving detections, triggering alerts and logging events. The video preview can be run both in a GUI window and headless on a local web server using the included Flask web server setup. -**(New)** 🐳 A Dockerfile for Dockerized installs is also included. - ## Features - **Real-time human/animal/object detection and alert system** -- Runs on **Python + YOLOv8 + OpenCV2** +- **(New!)** Now runs on the newest [YOLOv11](https://github.com/ultralytics/ultralytics?tab=readme-ov-file) model by default +- 🐳 A Dockerfile for Dockerized installs is also included. +- Runs on **Python + YOLOv8-11 + OpenCV2** - Both GUI and headless web server versions (`Flask`), 2-in-1 - Set up separate minimum confidence zones with the included masking tool - **Supports CUDA GPU acceleration**, CPU-only mode is also supported @@ -282,6 +282,11 @@ Use `utils/batch_humdet_yolo8_opencv2.py` to run YOLOv8 batch detection on direc - Add hooks for sending detections to web servers or APIs ## Changelog +- **v0.1616** + - **Now using YOLOv11 by default** + - YOLOv11 is (as of writing this) the latest YOLO version from [ultralytics](https://github.com/ultralytics/ultralytics?tab=readme-ov-file) + - Update your `ultralytics` packages with i.e. `pip install -U ultralytics` + - Switch to any version you like from `config.ini` - **v0.1615** - **New feature: Mask detection areas** -- this is highly useful where detections need to be above certain threshold to be saved and registered with separate alerts. You can use the method to i.e. increase thresholds on the input image's detection areas to avoid false positives. - The masking can be done with a GUI rectangle painter util under `./utils/region_masker.py`, i.e. like so: diff --git a/config.ini b/config.ini index a038725..85f2c6b 100644 --- a/config.ini +++ b/config.ini @@ -6,7 +6,10 @@ headless = False # Default confidence threshold (above which to alert) default_conf_threshold = 0.7 # Default model variant to use -default_model_variant = yolov8m +# for yolov8 +# default_model_variant = yolov8m +# we're using YOLOv11 atm; you can roll back to v8 if needed +default_model_variant = yolo11m [hardware] # Preferred CUDA device ID diff --git a/requirements.txt b/requirements.txt index a34d14c..e25d2d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ av>=13.1.0 matplotlib>=3.8.4 cycler>=0.12.1 torch>=2.0.0 -ultralytics>=8.0.3 +ultralytics>=8.3.68 # opencv-python-headless>=4.5.5.64 opencv-python numpy>=1.22.0 diff --git a/version.py b/version.py index 2035362..0ccd5fe 100644 --- a/version.py +++ b/version.py @@ -1,3 +1,3 @@ # version.py -version_number = "0.1615 (Jan 04 2025)" \ No newline at end of file +version_number = "0.1616 (Jan 28 2025)" \ No newline at end of file diff --git a/yolov8_live_rtmp_stream_detection.py b/yolov8_live_rtmp_stream_detection.py index 024b463..c87be86 100755 --- a/yolov8_live_rtmp_stream_detection.py +++ b/yolov8_live_rtmp_stream_detection.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # yolov8_live_rtmp_stream_detection.py # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # https://github.com/FlyingFathead/dvr-yolov8-detection