Skip to content

Commit

Permalink
v0.1616 - YOLOv11 support added as a default
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingFathead committed Jan 28, 2025
1 parent bac1f82 commit f8f33e6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# version.py

version_number = "0.1615 (Jan 04 2025)"
version_number = "0.1616 (Jan 28 2025)"
2 changes: 2 additions & 0 deletions yolov8_live_rtmp_stream_detection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3
#
# yolov8_live_rtmp_stream_detection.py
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# https://github.com/FlyingFathead/dvr-yolov8-detection
Expand Down

0 comments on commit f8f33e6

Please sign in to comment.