Merged
Conversation
- remove tables from pip!
- removing tables; pip failing
MMathisLab
approved these changes
Jun 23, 2025
maximpavliv
reviewed
Jun 23, 2025
Comment on lines
-427
to
+585
| outputs = self.model(inputs.to(self.device), **kwargs) | ||
|
|
||
|
|
||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
This introduces a bug, outputs becomes undefined in the next line
Member
There was a problem hiding this comment.
okay, lets write a test then @maximpavliv , as tests should not pass otherwise
Collaborator
Author
There was a problem hiding this comment.
I believe the variables are still alive after leaving the with scope. Is that what you have in mind?
Merged
This was referenced Sep 18, 2025
This file contains hidden or 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
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.
Async mode by default True and num_prefetch_batches by default 4.
Empirically, batch size 16 for detector and batch size 32 work well. Therefore, I ran speed testing with changes introduced in this PR, using superanimal_video_inference and a 800x600 video :
resnet50_fasterrcnn + hrnet32
12.7 FPS -> 18 FPS
mobilenet_fasterrcnn + resnet50
25.4 FPS -> 31 FPS
ssdlite + rtmpose
25.7 FPS -> 33FPS
gpu memory usage is reduced with amp inference.