-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve SIT to compose a batch tensor as a model input make up from a packet of different images #27341
Merged
Maxim-Doronin
merged 8 commits into
openvinotoolkit:master
from
sivanov-work:multiple_image_input_per_batched_input_in_single_image_test
Nov 7, 2024
Merged
Conversation
This file contains 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
sivanov-work
force-pushed
the
multiple_image_input_per_batched_input_in_single_image_test
branch
2 times, most recently
from
October 31, 2024 12:45
f447887
to
955f132
Compare
sivanov-work
force-pushed
the
multiple_image_input_per_batched_input_in_single_image_test
branch
from
November 4, 2024 15:57
02a12ff
to
5bd9042
Compare
ArtemySkrebkov
approved these changes
Nov 5, 2024
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.
I am not familiar with batching, but the changes look reasonable.
DariaMityagina
approved these changes
Nov 5, 2024
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 👍
Maxim-Doronin
approved these changes
Nov 6, 2024
…single_image_test
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Nov 6, 2024
…single_image_test
NishantPrabhuFujitsu
pushed a commit
to NishantPrabhuFujitsu/openvino
that referenced
this pull request
Nov 26, 2024
… packet of different images (openvinotoolkit#27341) ### Details: - A new parameter `override_model_batch_size` was added several PRs ago. The purpose of this parameter was is to take a picture/binary and "stretch" it to fit a batched tensor as an input of a batched model providing that we could run and validate batched models - The current PR enhance this idea and allows us to set distinguished images/binaries in a batched tensor input so that we could validate correctness of processing of different lines of batch during our inference invocations. SIT now uses "|" separator to discern different images inside input images array as an command line argument. The batched images filing algorithm is the following: 1) If passed images amount is not enough to fill up an entire batch, a last image will be propagated and copied to remnant lines of N-batch. 2) If passed images array is larger than an batched tensor, then only N images will be used up and the rest of images will be thrown away Example: ``` single-image-test --device CPU --network resnet50.xml --mode classification --top_k 5 --il NCHW --ol NC --iml NCHW --oml NC --ip FP16 --op FP16 --override_model_batch_size 3 --input "dog.bmp|00000001.JPEG|00000002.JPEG" ``` gives us ``` ... Load input #0 from [dog.bmp,00000001.JPEG,00000002.JPEG] as f16 [N,C,H,W] [3,3,224,224] Fill up all input batch slices planes up to 3 with image data from the array: [0/3] Fill input batch slices planes starting from index 1 up to 3 with image data from the array: [1/3] Fill input batch slices planes starting from index 2 up to 3 with image data from the array: [2/3] ``` ### Tickets: - E####145303 --------- Co-authored-by: Maksim Doronin <[email protected]>
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.
Details:
override_model_batch_size
was added several PRs ago. The purpose of this parameter was is to take a picture/binary and "stretch" it to fit a batched tensor as an input of a batched model providing that we could run and validate batched modelsThe batched images filing algorithm is the following:
Example:
gives us
Tickets: