Skip to content

past detections should be checked inside media loop? #35

@hqhoang

Description

@hqhoang

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions