Use yolo26 for notify object detection

This commit is contained in:
dwrz
2026-10-22 12:53:52 +00:00
parent 89bcb598b3
commit 39d1f4d2eb
+10 -10
View File
@@ -10,8 +10,8 @@ readonly LABEL_CAT=15
# Lockfile to ensure that only one instance of the script is running. # Lockfile to ensure that only one instance of the script is running.
readonly LOCKFILE="/tmp/motion-notify.lock.d" readonly LOCKFILE="/tmp/motion-notify.lock.d"
# yolov7 working directory. # yolo26 working directory.
readonly PROJECT="/tmp/yolov7" readonly PROJECT="/tmp/yolo26"
# Notification recipient. # Notification recipient.
readonly RECIPIENT="${NOTIFICATION_RECIPIENT}" readonly RECIPIENT="${NOTIFICATION_RECIPIENT}"
@@ -42,14 +42,14 @@ check_devices() {
detect_objects() { detect_objects() {
local filepath="$1" local filepath="$1"
python "${HOME}/yolov7/detect.py" \ "${HOME}/.venv/bin/yolo" predict \
--exist-ok \ classes=0 \
--no-trace \ conf=0.5 \
--save-txt \ model="${HOME}/yolo26n.pt" \
--project "${PROJECT}" \ name="motion" \
--name "motion" \ project="${PROJECT}" \
--weights "${HOME}/yolov7/yolov7-tiny.pt" \ save_txt=true \
--source "${filepath}" source="$1"
} }
notify() { notify() {