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

OcvYoloDetection component deadlocks with strange frame sizes when using Triton #1697

Closed
jrobble opened this issue Jun 27, 2023 · 0 comments
Closed

Comments

@jrobble
Copy link
Member

jrobble commented Jun 27, 2023

The OcvYoloDetection component acquires a Triton client lock before attempting to resize an input frame to the YOLO model input dimension size (608 x 608). The resize attempt can throw an exception if the frame dimensions are skewed heavily towards width or height - for example, an image that is 2000 px wide by 1 px tall.

Specifically, the issue will occur when max(w, h) / min(w, h) >= 608 * 2. The OpenCV resize function rounds up fractional parts of a pixel that are more than 0.5.

Throwing the exception results in a deadlock since the top-most exception handler waits until add client locks are freed before terminating the job. Normally, the locks are not freed until after the Triton server sends a response.

@jrobble jrobble added this to the Milestone 3 milestone Jun 27, 2023
@jrobble jrobble added this to To do in OpenMPF: Development via automation Jun 27, 2023
@jrobble jrobble self-assigned this Jun 27, 2023
@jrobble jrobble moved this from To do to In Progress in OpenMPF: Development Jun 27, 2023
@jrobble jrobble changed the title OcvYoloDetection component deadlocks with odd frame sizes when using Triton OcvYoloDetection component deadlocks with strange frame sizes when using Triton Jun 28, 2023
@jrobble jrobble moved this from In Progress to Testing in OpenMPF: Development Jun 28, 2023
@jrobble jrobble closed this as completed Nov 29, 2023
OpenMPF: Development automation moved this from Testing to Closed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant