Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

past detections should be checked inside media loop? #35

Open
hqhoang opened this issue Jan 6, 2022 · 1 comment
Open

past detections should be checked inside media loop? #35

hqhoang opened this issue Jan 6, 2022 · 1 comment

Comments

@hqhoang
Copy link

hqhoang commented Jan 6, 2022

Scenario: I have a car parked most of the time on my driveway, thus I have the setting match_past_detections enabled. At night, before my wife's car turns into the driveway, its headlight triggers a motion, the car is not in the frame until later (e.g. frame 220).

To be efficient, I set frame_strategy=first. But the parked car got detected first, breaking out of the media loop. The parked car is then compared against past detections, and the whole event is dropped. It would be better to have the parked car compared against past detections inside the media loop, then proceed to other frames until it finds the first frame with object not matching past detections (the coming car).

I can work around by setting frame_strategy=most, but that would defeat the efficiency: it could stop processing the remaining frames once it found an object that doesn't match past detections.

Maybe we can add another frame_strategy option, e.g. "first_new"? That would check the detected objects against past detections inside the media loop, while still allow breaking out of the loop at the first frame that doesn't match past detections. The later call to _process_past_detections can then be skipped for this option.

(for reference, I'm talking about the codes near the bottom of detect_sequence.py)

@baudneo
Copy link
Contributor

baudneo commented Jan 7, 2022

I am working on a solution to these problems that you are describing, this is an idea I will explore. I have reworked the logic to evaluate inside of the media loop via the filter function that is called every sequence. I need to test some more but there is work being actively done to make this a better experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants