-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: use tinybrain for image downsampling #894
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #894 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 142 142
Lines 6102 6104 +2
=========================================
+ Hits 6102 6104 +2 ☔ View full report in Codecov by Sentry. |
zetta_utils/tensor_ops/common.py
Outdated
@@ -388,7 +388,7 @@ def interpolate( # pylint: disable=too-many-locals | |||
allow_slice_rounding=allow_slice_rounding, | |||
) | |||
|
|||
if mode == "segmentation" and ( | |||
if mode in ("segmentation", "img", "bilinear") and ( |
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.
It's not going to break things, but tinybrain
has no C implementation for signed integer type averaging (e.g. our image encodings). Normally don't need to downsample these - only for misalignment detection.
If I read it correctly, tinybrain will convert such cases to fp32 and use numpy based interpolation, which is probably slower than torch+CUDA
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.
Addressed via seung-lab/tinybrain#22
fb57c5a
to
14ab282
Compare
14ab282
to
9cbdff5
Compare
fixes #737