Skip to content
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

Fix the bug that multi webcam detection failed with OpenVINO #11935

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

XevenQC
Copy link
Contributor

@XevenQC XevenQC commented Aug 2, 2023

It would failed with the following error when detect multi webcam.
"Input blob size is not equal network input size (2457600!=1228800)"

๐Ÿค– Generated by Copilot at f03d467

Summary

๐Ÿ“„๐Ÿ–ผ๏ธ๐Ÿ”ฎ

Add support for XML models in detect.py. Split and merge input images if needed for single-image inference.

run can handle XML
split and infer single-image
autumn leaves fall fast

Walkthrough

  • Add support for XML models that require single-image inference (link)

๐Ÿ› ๏ธ PR Summary

Made with โค๏ธ by Ultralytics Actions

๐ŸŒŸ Summary

Enhanced support for batch processing in YOLOv5 inference when using specific model formats.

๐Ÿ“Š Key Changes

  • Added condition to check if the input model format is .xml and the input image batch size is greater than 1.
  • Implemented chunking of the input image tensor into individual images for sequential processing.
  • Changed the model prediction step to handle each image separately for .xml model formats when batch size is greater than 1.
  • Assembled individual predictions into a single batch after processing.

๐ŸŽฏ Purpose & Impact

  • ๐ŸŽจ Improves compatibility with .xml model formats that may not support batch inference.
  • ๐Ÿš€ Enables correct inference by processing each image in a sequence rather than as a batch for specific models.
  • ๐Ÿ” Ensures users can still leverage batch-processing benefits for other formats, while providing a workaround for .xml formatted models.
  • ๐Ÿ›  Potentially increases inference time for .xml models with batches but ensures functional and accurate predictions.

XevenQC and others added 2 commits August 2, 2023 23:58
It would failed with the following error when detect multi webcam.
"Input blob size is not equal network input size (2457600!=1228800)"

Signed-off-by: Chao Qin <chaoqin_cmkj@163.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

๐Ÿ‘‹ Hello @XevenQC, thank you for submitting a YOLOv5 ๐Ÿš€ PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • โœ… Verify your PR is up-to-date with ultralytics/yolov5 master branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge master locally.
  • โœ… Verify all YOLOv5 Continuous Integration (CI) checks are passing.
  • โœ… Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." โ€” Bruce Lee

Copy link
Contributor

github-actions bot commented Nov 2, 2023

๐Ÿ‘‹ Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap.

We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved.

For additional resources and information, please see the links below:

Thank you for your contributions to YOLO ๐Ÿš€ and Vision AI โญ

@github-actions github-actions bot added the Stale label Nov 2, 2023
@glenn-jocher
Copy link
Member

@XevenQC thanks for reporting the issue. It seems like the error you've encountered might be related to the input size mismatch. We'll investigate and resolve this issue as soon as possible.

If there's anything else you'd like to add or share about this problem, please feel free to let us know.

Your patience and understanding are greatly appreciated!

@github-actions github-actions bot removed the Stale label Nov 15, 2023
@glenn-jocher glenn-jocher merged commit c0b0729 into ultralytics:master Jan 3, 2024
8 checks passed
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 6, 2024
โ€ฆtics#11935)

* Fix the bug that multi webcam detection failed with OpenVINO

It would failed with the following error when detect multi webcam.
"Input blob size is not equal network input size (2457600!=1228800)"

Signed-off-by: Chao Qin <chaoqin_cmkj@163.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chao Qin <chaoqin_cmkj@163.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

None yet

2 participants