Long-term Parking Detection Program

Contents

1

Introduction

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.

GitHub Available on GitHub
2

How to Replace the Program

This program runs with the same configuration as the pre-installed AI detection program. Therefore, simply replacing the Python program file (extmod.py) will switch the detection program.

A script is provided to update these files automatically.

Log in to the AIBOX and run the following command to download update.zip published on GitHub. After extracting the archive, execute update.sh to update all required files at once.

$ wget https://github.com/daddyYukio/AICAPTURE/raw/refs/heads/main/programs/stay_counter/update.zip

After the update, reboot the AIBOX to start running this detection program.

3

Real-Time Preview of Detection Results

To view detection results in real time, please enable the detection result preview feature.

You will then be able to check the detection results in real time via a web browser.

4

Program Explanation

The detection program explanation is posted as an article on Zenn, so please refer to it there.

Zenn 【AI CAPTURE】Long-term Parking Detection Program
5

Changing Detection Objects and Accuracy

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