Automatic captions can repeat another camera’s description or save the example tag “lowercase” as event text
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- ollama, python
- Domain
- ai, computer-vision
Research direction
Start with parse_vision_output in src/keystone/vlm.py at the linked commit, then find the callers that build and persist VisionResult.description. Exercise the parser directly with {"description":"","tags":["lowercase"]} to reproduce the placeholder fallback, and inspect the related-sightings hint path for the copied-description case. Done means placeholder output is not accepted as a successful caption, conflicting cross-camera context cannot be copied as the current description, and regression cases preserve valid descriptions.
Written by the indexing model from the issue text.
Description
An automatic event caption repeated an unrelated camera's description verbatim. This was a successful inference and callback, separate from the on-demand timeout in #151.
Environment
Keystone 0.1.6, Docker Compose on Linux, Intel i5-6400T with 16 GB RAM, local Ollama with qwen3.5:2b-q4_K_M, three frames in strip layout, Protect 7.3.74. The deployment has a local patch that skips automatic captions on two cameras. The affected camera had captions enabled. The controlled tests below call the vision client directly and bypass the patched worker queue.
Same-frame reproduction
- Take three chronological frames from one recording. Keep the frames, offsets, model and prompt settings fixed. Run
VisionClient.describewith no cross-camera hint. - Repeat with a hint reconstructed from the cross-camera matches logged during the event, using Keystone's own related-sightings formatter. The hint describes a visibly different scene.
- With no hint, the resulting description was the literal string
lowercase. With the hint, it returned the other scene's entire sentence word for word. On the live system, substantially the same sentence appeared in seven caption records across three camera IDs within about four minutes.
I expected a caption supported by the current frames, or an explicit result indicating that the model couldn't describe them. Keystone accepted both the placeholder and the copied sentence as captions. The word lowercase appears as an example tag in the default prompt.
This replay isolates the effect of passing the hint. It uses frames from the recorded interval and reconstructed hint text, rather than a saved copy of the original model request. The timing fix in #129 is relevant to choosing frames, but this test held the image bytes fixed between calls.
Check against current main
I also tested the upstream vlm.py at 0ea0a097b645a41af03f4a2f1756464c72d62875 against the same local Ollama model, with the default English behavior. This was a vision-client comparison, not a full Protect deployment of main. I compared the stock prompt with a shorter custom prompt, omitted cross-camera hints in both arms, and kept the three frames identical within each pair.
- On an indoor clip, three motion-centered, upright crops clearly showed a person walking. Stock returned
lowercaseagain. The shorter prompt described the visible clothing and movement correctly. - On two outdoor clips from different cameras, both prompts recognized the person and reflective clothing, but both gave the wrong direction of travel. A shorter global prompt isn't a proven fix.
I traced the raw model output on the reproduced indoor case: the description field was an empty string and tags was ["lowercase"]. The final VisionResult.description was "lowercase". This narrows one failure to the empty-description tag fallback in parse_vision_output. Maintainers can exercise this part without a model or video by passing {"description":"","tags":["lowercase"]} as JSON text to that parser.
The custom prompt was: “Write one short factual event caption. Describe the visible subject, clothing and movement across the frames. Omit details you cannot see. Return JSON with description and tags.”
Could the caption pipeline detect placeholder output and avoid saving it as a successful description? For the cross-camera case, it would also help to test a clip with a deliberately conflicting previous description, while retaining cases where cross-camera context correctly clarifies a subject.
- 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 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
-
Difficulty 5/5 Over a week Newbie friendliness 35/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