Skip to content

Commit

Permalink
Introduce version 0.3.0
Browse files Browse the repository at this point in the history
- Add YOLOv10 and YOLOv9 config files
- Add frame rate to example 02 using `sfps`
- Update requirements
- Update and improve documentation
  • Loading branch information
rathaROG committed Jun 27, 2024
1 parent 82b7fad commit 49d12fc
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GETSTARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ All requirements are not strictly limited. However, some specific modules might
```
* ***ATTENTION ⚠️⚠️⚠️***
- Default configurations of `VSenseBox` are set to use GPU, and to switch to CPU, you need to set `cpu` as string for the parameter `device` in the YAML config file; for example, line #8 in [`yolo_ultralytics_v9c.yaml`](https://github.com/numediart/vsensebox/blob/main/vsensebox/config/detectors/yolo_ultralytics_v9c.yaml).
- Default configurations of `VSenseBox` are set to use GPU, and to switch to CPU, you need to set `cpu` as string for the parameter `device` in the YAML config file; for example, line #8 in [`yolo_ultralytics_v8s.yaml`](https://github.com/numediart/vsensebox/blob/main/vsensebox/config/detectors/yolo_ultralytics_v8s.yaml).
## 💽 Setup
Expand Down
8 changes: 8 additions & 0 deletions examples/example_02.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Example 02: Detect and track objects with custom configs

import cv2
from sfps import SFPS
from vsensebox import VSense
from vsensebox.utils.visualizetools import draw_boxes

Expand All @@ -12,6 +13,9 @@
# Create a VSense object
vs = VSense()

# Frame rate
sfps = SFPS(nframes=7, interval=1)

# Loop each frame
while cap.isOpened():

Expand All @@ -37,6 +41,10 @@
boxes_conf=vs.assets.boxes_conf
)

# Add framerate & info
cv2.putText(frame, sfps.fps(format_spec='.0f'), (15, 30),
cv2.FONT_HERSHEY_COMPLEX_SMALL, 1, (255, 255, 255), 1, cv2.LINE_AA)

# Display
cv2.imshow("VSenseBox: Example 02", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
Expand Down
4 changes: 3 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ lapx>=0.5.9
### GUI
PyQt6
### Customized vsensebox-ultralytics
vsensebox-ultralytics>=8.1.48
vsensebox-ultralytics>=8.2.45
### Frame rate calculator in examples
sfps
2 changes: 1 addition & 1 deletion vsensebox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from vsensebox.gui import config, reset
from vsensebox.utils.about import docs, github

__version__ = "0.2.0"
__version__ = "0.3.0"
__author__ = "Ratha SIV"
__description__ = "VSenseBox - Python toolbox for visual sensing."
__homepage__ = "https://numediart.github.io/vsensebox"
Expand Down
Binary file modified vsensebox/config/detectors/detectors.zip
Binary file not shown.
11 changes: 11 additions & 0 deletions vsensebox/config/detectors/yolo_ultralytics_v10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
detector: YOLO_Ultralytics
conf: 0.5
iou: 0.7
imgsz: 640
half: False
min_width: 35
classes: null # NULL=Null=null is None in Python
device: 0
max_det: 100
line_width: 500
model_file: data/detectors/yolov10n.pt
11 changes: 11 additions & 0 deletions vsensebox/config/detectors/yolo_ultralytics_v10s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
detector: YOLO_Ultralytics
conf: 0.5
iou: 0.7
imgsz: 640
half: False
min_width: 35
classes: null # NULL=Null=null is None in Python
device: 0
max_det: 100
line_width: 500
model_file: data/detectors/yolov10s.pt
11 changes: 11 additions & 0 deletions vsensebox/config/detectors/yolo_ultralytics_v9s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
detector: YOLO_Ultralytics
conf: 0.5
iou: 0.7
imgsz: 640
half: False
min_width: 35
classes: null # NULL=Null=null is None in Python
device: 0
max_det: 100
line_width: 500
model_file: data/detectors/yolov9s.pt
11 changes: 11 additions & 0 deletions vsensebox/config/detectors/yolo_ultralytics_v9t.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
detector: YOLO_Ultralytics
conf: 0.5
iou: 0.7
imgsz: 640
half: False
min_width: 35
classes: null # NULL=Null=null is None in Python
device: 0
max_det: 100
line_width: 500
model_file: data/detectors/yolov9t.pt

0 comments on commit 49d12fc

Please sign in to comment.