Use ONVIF camera motion events to drive AI Port analysis and preserve a whole motion episode
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- machine-learning, python
- Domain
- computer-vision
Research direction
The implementation is already prepared in pull request #127, so review that pull request before starting work. Trace discovery of the ONVIF motion property and camera video input, then verify motion-state subscription, idle fallback to frame motion, and reconnect behavior. The expected result is one preserved motion episode with appropriate object classifications and recording boundaries.
Written by the indexing model from the issue text.
Description
I’m running Keystone’s virtual AI Port with UniFi Protect 7.3.74. Some of my cameras are exposed through an ONVIF bridge that already sends tns1:VideoSource/MotionAlarm when motion starts and stops.
I compared the bridge and Keystone logs for the same footage. In one 35-second motion interval, Keystone opened a vehicle event, closed it, then opened a person event. On a bird-feeder camera, the bridge reported motion while YOLOX-tiny stayed below the detection threshold on the full frame. In both cases, I’d like to be able to review the whole period of activity.
Proposed behavior and field results
The implementation is ready for review in #127. With aiport.camera_motion_events: auto, the AI Port checks each paired third-party camera for a supported motion property and a single identifiable video input. Once the camera reports its state, Keystone analyzes the existing stream during motion. During confirmed idle it continues recording and servicing the tracker without running object or face inference. Cameras with no verified source use frame motion. Once a camera has supplied a valid state, Keystone remembers that choice for the pairing. After a disconnect it retries the subscription and waits for a fresh camera state before resuming inference. Setting the option to off or YAML false selects frame motion for every camera.
On Protect 7.3.74, a classified interval can produce one smart card containing several observed object classes. A completed interval with no classified object can produce one ordinary motion card if Protect enables a full-frame motion zone. Protect applies its own padding. During the pilot I observed a person and a vehicle in one smart card. After enabling automatic discovery on all eight bridge cameras, a 10.46-second interval produced one ordinary card with the configured two seconds of recording on either side. Its boundaries were within 66 ms of the requested window. A subsequent motion-only card also served the square scene thumbnail and the full-view JPEG to Protect while keeping the recording boundaries.
These field observations used an ONVIF bridge and a real Protect console. Reports from physical ONVIF cameras would help establish interoperability.
Related issue
In #146, one person received multiple tracker IDs and thumbnails, and the walk was split into several events. Camera motion boundaries can help with event splitting when the source reports one continuous interval. Matching a person to the same track across frames and reducing duplicate thumbnails within one event are separate tracker work covered by #146.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 114
- Avg merge
- 1h
- Merged PRs (30d)
- 115
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seeARMS/keystone
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in seeARMS/keystone
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day