-
Notifications
You must be signed in to change notification settings - Fork 216
Use a generator for instance segmentation masks #1604
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,11 +272,11 @@ def make_response( | |
""" | ||
responses = [ | ||
InstanceSegmentationInferenceResponse( | ||
predictions=[ | ||
predictions=( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't it converted to list before rendering? Not sure if it help with memory usage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, there are a handful of enterprise users who import I'm closing this PR because it indeed does not solve the problem - the memory usage is much higher on instance segmentation execution, and reducing the memory used by these masks is a very small fraction of it (would require a much larger change to actually reduce the memory pressure on the Jetson). |
||
InstanceSegmentationPrediction(**p) | ||
for p in batch_pred | ||
if not class_filter or p["class_name"] in class_filter | ||
], | ||
), | ||
image=InferenceResponseImage( | ||
width=img_dims[i][1], height=img_dims[i][0] | ||
), | ||
|
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.
Would a debug log be necessary? This PR deletes this
TODO
since it didn't seem especially helpful, but I can also add logs if needed to the generator.