Skip to content

docs: document frame metadata access in output converters - #1178

Merged
bwsw merged 3 commits into
developfrom
claude/blog-post-pr-1168-fiog9l
Jul 21, 2026
Merged

docs: document frame metadata access in output converters#1178
bwsw merged 3 commits into
developfrom
claude/blog-post-pr-1168-fiog9l

Conversation

@bwsw

@bwsw bwsw commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Documents the optional metadata argument for model output converters, added in #1172 ("Support metadata passing to converters").

Change

docs/source/savant_101/30_dm.rst — adds an "Accessing Frame Metadata In A Converter" subsection to the detector-model chapter's Converter section, covering:

  • How to opt in — declare a metadata: Optional[NvDsFrameMeta] = None parameter on the converter's __call__ (with a code snippet).
  • What it exposes — source_id, pts, the underlying video_frame, the frame's objects, and tags.
  • That it is opt-in and backward compatible: Savant inspects the converter's __call__ signature once (cached per converter class, no per-frame overhead) and passes metadata only when declared, so existing/built-in converters keep working unchanged. Also notes the nested convert-output telemetry span.
  • A pointer to the output_converter_metadata sample and a cross-link to the Etcd dynamic-reconfiguration page.

Notes

  • The API reference (reference/api/converter.rst) is auto-generated from docstrings, which Support metadata passing to converters #1172 already updated, so no manual change is needed there — the metadata parameter flows through automatically.
  • RST validated: section underlines are well-formed, the :doc: Etcd target resolves, and the NvDsFrameMeta cross-reference uses the fully-qualified savant.deepstream.meta.frame path.

🤖 Generated with Claude Code


Generated by Claude Code


Note

Low Risk
Documentation-only change with no runtime or API behavior modifications.

Overview
Adds "Accessing Frame Metadata In A Converter" under the detector-model Converter section in 30_dm.rst, documenting the optional metadata argument on converter __call__ (from #1172).

The new text explains how to opt in with metadata: Optional[NvDsFrameMeta] = None, what fields are available (source_id, pts, video_frame, objects, tags), and that callers must handle None. It also notes opt-in / backward compatibility (signature inspected once per class, cached), nested convert-output telemetry when metadata is used, and links to the output_converter_metadata sample plus the Etcd dynamic-reconfiguration doc for per-source thresholds.

Reviewed by Cursor Bugbot for commit b9cf7b0. Bugbot is set up for automated code reviews on this repo. Configure here.

Document the optional, opt-in `metadata` argument for model output
converters (#1172), which passes the frame's NvDsFrameMeta (source_id,
pts, video_frame, objects, tags) to a converter's __call__ when it
declares the parameter. Added to the detector-model chapter's Converter
section: usage, backward-compatibility/signature-inspection note, the
convert-output telemetry span, and a pointer to the
output_converter_metadata sample and Etcd reconfiguration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbsaV4NhYriTyUqxuzKd8Q
Copilot AI review requested due to automatic review settings July 21, 2026 06:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Savant 101 detector-model documentation to explain how output converters can optionally receive per-frame context via the new metadata argument, enabling context-aware post-processing while staying backward compatible.

Changes:

  • Adds an “Accessing Frame Metadata In A Converter” subsection under the detector-model “Converter” docs.
  • Documents how to opt in via a metadata: Optional[NvDsFrameMeta] = None parameter on __call__.
  • Links to the output_converter_metadata sample and cross-references the Etcd dynamic-reconfiguration page.

Comment thread docs/source/savant_101/30_dm.rst Outdated
Comment thread docs/source/savant_101/30_dm.rst Outdated
Address review feedback on the output-converter metadata docs:
- Note that `metadata` can be None at call time even when the converter
  declares the parameter (the framework passes None when the frame's
  VideoFrame context is unavailable), so converters should guard for None.
- Correct the performance wording: signature inspection is cached per
  converter class and not repeated per frame, but a cached lookup still
  happens per frame (not "no per-frame overhead").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbsaV4NhYriTyUqxuzKd8Q

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread docs/source/savant_101/30_dm.rst Outdated
Minor grammar fix per review, matching the style used elsewhere in the
docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbsaV4NhYriTyUqxuzKd8Q
@bwsw
bwsw merged commit fe78b91 into develop Jul 21, 2026
1 check passed
@bwsw
bwsw deleted the claude/blog-post-pr-1168-fiog9l branch July 21, 2026 07:52
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

Successfully merging this pull request may close these issues.

3 participants