This program detects vehicles parked for extended periods and sends push notifications.
By changing the detection object from cars to people, you can also use it to send notifications when someone stands in front of a store for a certain period of time.
This program runs with the same configuration as the built-in AI detection program, so you only need to replace the Python program file (extmod.py) to switch detection programs.
Log in to your AIBOX and run the following command to download and overwrite the program published on GitHub.
$ wget -O /home/cap/aicap/extmod/extmod.py https://raw.githubusercontent.com/daddyYukio/AICAPTURE/refs/heads/main/programs/stay_counter/extmod.py
After overwriting, restart the AIBOX to activate this detection program.
To restore the original built-in AI detection program, run the following command and restart the AIBOX.
$ wget -O /home/cap/aicap/extmod/extmod.py https://raw.githubusercontent.com/daddyYukio/AICAPTURE/refs/heads/main/programs/built-in-object-detection/extmod.py
Also, enabling the result preview display makes it easier to check the stationary time in real-time.
The detection program explanation is posted as an article on Zenn, so please refer to it there.
The methods for changing detection objects and adjusting detection accuracy are the same as for the built-in AI detection program.
The variables specific to this program are warning parking time and alert parking time.
These two variables are defined as global variables, so you can modify them directly.
By default, the warning parking time is set to 30 seconds and the alert parking time is set to 60 seconds.
#
# Warning stationary time (seconds)
# Drawn in yellow frame on result image
WARNING_SEC = 30
#
# Alert stationary time (seconds)
# Drawn in red frame on result image
ALERT_SEC = 60