Closed psobolewskiPhD closed 2 years ago
Thanks @psobolewskiPhD. Since you’re already digging in to it, did you happen to see how hard it would be to just fix the import? (It’s just a logger and I kinda imagine it could be a 1-2 line fix?). Maybe not
i think it might be more than just the logger, because in 0.7.2 (the newest version that works), I also get a warning:
19:17:07 WARNING cellprob_threshold and dist_threshold are being deprecated in a future release, use mask_threshold instead
I'll try and find some time to take a closer look, but this week is looking rather brutal.
@tlambert03
I guess I have a hard time letting things go 🤣
If you replace every from cellpose import logger
(and similar)
with
import logging
logger = logging.getLogger(__name__)
Then the plugin works for the 2D sample. Edit: but it no longer prints to console the messages. I guess they are just logged?
The 3D doesn't work due to
IndexError: index 2 is out of bounds for axis 1 with size 2
I think it may be because of the data shape:
viewer.layers[0].data.shape
Out[1]: (75, 2, 75, 75)
So that is ZCYX.
Edit: Derp...I should try checking the box for stack as 3D
—spoiled by Stardist-napari!
It works, but the broadcasting is strange.
I will see if swapping the dims helps? Bingo!
OK, I got the logger thing fixed so it prints. Will make a PR for that.
Then will make a PR for the sample images if I can figure that out.
Edit: i think I have the issue with the sample image sorted out too. Made a separate PR. That one works
only if cellpose <= 0.7.2.
Merging #28 (3dccda7) into main (70a3581) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #28 +/- ##
=======================================
Coverage 29.81% 29.81%
=======================================
Files 3 3
Lines 218 218
=======================================
Hits 65 65
Misses 153 153
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 70a3581...3dccda7. Read the comment docs.
The windows test fails are due to the OpenGL install. I've made a new PR to try to fix that: https://github.com/MouseLand/cellpose-napari/pull/32 Eitherway, this PR hopefully can be closed, because https://github.com/MouseLand/cellpose-napari/pull/29 is a better solution.
closing in favor of #29
This is a fix for https://github.com/MouseLand/cellpose-napari/issues/21 It's a bummer that cellpose-napari installs fine from the napari plugin GUI, but then doesn't run because the current cellpose version isn't compatible. By setting an upper bound, the plugin will work until a new version of the plugin can be developed to account for the breaking changes in current cellpose versions.