add TwelveLabs Pegasus video analyser node (opt-in, VP_WITH_LLM) - #76
Open
mohit-twelvelabs wants to merge 1 commit into
Open
add TwelveLabs Pegasus video analyser node (opt-in, VP_WITH_LLM)#76mohit-twelvelabs wants to merge 1 commit into
mohit-twelvelabs wants to merge 1 commit into
Conversation
|
邮件已收到,谢谢!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I'm Mohit, I work at TwelveLabs (@mohit-twelvelabs).
What this adds
A new opt-in inference node,
vp_pegasus_analyser_node, that integrates TwelveLabs Pegasus for whole-video semantic understanding / structuring.Unlike the existing
vp_mllm_analyser_node(which sends a single frame per request to a multimodal LLM), Pegasus reasons over the entire video on the TwelveLabs cloud and returns a structured semantic description (summary / chapters / highlights / open-ended Q&A). Because Pegasus analyses the whole video rather than per-frame, the node calls the API once, caches the result, and writes it intoframe_meta->descriptionfor frames flowing through — so it drops straight into existing pipelines and renders with the existingvp_mllm_osd_node.Files:
nodes/infers/vp_pegasus_analyser_node.{h,cpp}— the node (HTTP via the bundledcpp_httplib+nlohmann/json, no new third-party dependency).samples/pegasus_analyse_sample.cpp+samples/CMakeLists.txtwiring.Why it helps VideoPipe
VideoPipe already markets video structuring as a core use case and recently added mLLM support. Pegasus extends that from per-frame image description to true whole-video understanding, giving users cloud-grade semantic structuring without running a local model or GPU.
Opt-in / non-breaking
The node and sample are guarded by the existing
VP_WITH_LLMflag (the same gate as the mLLM node), so a defaultcmake ..build is completely unaffected. No defaults change and no existing behavior is touched. It reuses already-bundled dependencies (cpp_httplib,nlohmann/json, OpenSSL — already required whenVP_WITH_LLM=ON).How it was tested
clang++ -std=c++17 -DVP_WITH_LLM -fsyntax-onlyon both the node and the sample TU against the real OpenCV4 + OpenSSL + bundled httplib/json include graph — compiles clean (only the repo's pre-existingexperimental/filesystemportability quirk on non-Ubuntu libc++).POST /v1.3/analyze,x-api-keyheader,{model_name, video|video_id, prompt, max_tokens, stream:false}) against the live TwelveLabs API and confirmed it returns the analysis in thedatafield.You can grab a free API key at https://twelvelabs.io — there's a generous free tier.