Reduce openvino InferenceNumThreads to 1 #1824
Open
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.
Why? What?
Most of the VisionTop cycles taking too long were apparently due to ObjectDetectionTop simply maxing out the CPU and leading to contention. This PR adds a property to the openvino core, which suggests the engine to only use 1 thread during inference: InferenceNumThreads. This does not completely eliminate the DONKs but dramatically reduces them. This however also increases the inference time of the pose detection model to over 450ms. Reducing the number of inference threads only to 2 did not significantly increase the inference time (~230ms -> ~255ms), but also did reduce the DONKing nearly as much.
Fixes #1822
ToDo / Known Issues
Ideas for Next Iterations (Not This PR)
If there are some improvements that could be done in a next iteration, describe them here.
How to Test