-
Notifications
You must be signed in to change notification settings - Fork 302
Kcz/master/support for video in benchmark #3019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kcz/master/support for video in benchmark #3019
Conversation
23248ee to
f9b317c
Compare
b913954 to
475d3ee
Compare
5767112 to
efdaa7c
Compare
efdaa7c to
b709f0c
Compare
b709f0c to
0281d1b
Compare
There was a problem hiding this comment.
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 adds support for video input processing in the benchmark tool for visual language generation tasks. The main enhancement allows the tool to process video files in addition to existing image support, with configurable frame decimation/reduction capabilities.
Key changes:
- Added video processing functionality with OpenCV integration
- Implemented frame decimation logic to control the number of frames processed
- Extended prompt parsing to handle both image and video inputs
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/llm_bench/task/visual_language_generation.py | Updated to support video inputs by integrating new prompt extraction utilities and video tensor processing |
| tools/llm_bench/requirements.txt | Added opencv-python dependency for video processing |
| tools/llm_bench/llm_bench_utils/prompt_utils.py | Implemented video loading, frame decimation, and unified prompt extraction for images and videos |
| tools/llm_bench/llm_bench_utils/parse_json_data.py | Refactored JSON parsing with a shared base function and added video field support |
| tools/llm_bench/llm_bench_utils/model_utils.py | Extended parameter handling to support video inputs alongside media/images |
| tools/llm_bench/benchmark.py | Added command-line arguments for video input and frame control |
| tests/python_tests/samples/test_tools_llm_benchmark.py | Added tests for video prompt processing with various frame decimation scenarios |
| tests/python_tests/samples/conftest.py | Added fixture to download test video from GitHub repository |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
79f3690 to
3be850c
Compare
9580816 to
4621da6
Compare
|
build_jenkins |
| import sys | ||
| from pathlib import Path | ||
|
|
||
| import requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you don't need these imports now, please, remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's remove commented text and PR will be ready to merge for me
@as-suvorov please, take a look
but, I face problem on generate() with qwen2-vl-7b-instruct, with master of GenAI and openvino dev build 11.24 . It's not a problem of that PR, I got it with another code too(also llava-next video works well), I just want to ask if it is known problem ?
generation_result = model.generate(prompts[0], generation_config=gen_config, **kwargs)
RuntimeError: Exception from src/inference/src/cpp/infer_request.cpp:75:
Exception from src/inference/src/cpp/infer_request.cpp:67:
Exception from src/inference/src/dev/isync_infer_request.cpp:228:
Failed to set tensor. Exception from src/inference/src/dev/make_tensor.cpp:161:
Can not access non-const pointer use e.g. 'static_cast<const ov::Tensor&>.data()'
Probable fix: #3026. @krzyczar I'm not sure if your branch have this fix, could you please update to latest master |
Double checked @sbalandi message. It's not reproduced in this PR, so master update is not strongly required. |
e550888 to
ea1c2a7
Compare
There was a problem hiding this comment.
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 8 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d887e4 to
947d105
Compare
947d105 to
904cea3
Compare
|
build_jenkins |
df1c52d
Description
CVS-173846
Checklist: