Use yolo26 for notify object detection
This commit is contained in:
+10
-10
@@ -10,8 +10,8 @@ readonly LABEL_CAT=15
|
||||
# Lockfile to ensure that only one instance of the script is running.
|
||||
readonly LOCKFILE="/tmp/motion-notify.lock.d"
|
||||
|
||||
# yolov7 working directory.
|
||||
readonly PROJECT="/tmp/yolov7"
|
||||
# yolo26 working directory.
|
||||
readonly PROJECT="/tmp/yolo26"
|
||||
|
||||
# Notification recipient.
|
||||
readonly RECIPIENT="${NOTIFICATION_RECIPIENT}"
|
||||
@@ -42,14 +42,14 @@ check_devices() {
|
||||
detect_objects() {
|
||||
local filepath="$1"
|
||||
|
||||
python "${HOME}/yolov7/detect.py" \
|
||||
--exist-ok \
|
||||
--no-trace \
|
||||
--save-txt \
|
||||
--project "${PROJECT}" \
|
||||
--name "motion" \
|
||||
--weights "${HOME}/yolov7/yolov7-tiny.pt" \
|
||||
--source "${filepath}"
|
||||
"${HOME}/.venv/bin/yolo" predict \
|
||||
classes=0 \
|
||||
conf=0.5 \
|
||||
model="${HOME}/yolo26n.pt" \
|
||||
name="motion" \
|
||||
project="${PROJECT}" \
|
||||
save_txt=true \
|
||||
source="$1"
|
||||
}
|
||||
|
||||
notify() {
|
||||
|
||||
Reference in New Issue
Block a user