Closed bpavie closed 8 months ago
sorry about that can you please pip install git+https://github.com/mouseland/cellpose.git
and let us know if it's still not working
I also get an error attempting to segment 3d tif stacks using the new 3.0.5 git branch that you posted earlier. It seems to always crash at the end at the resize_image interpolation step when using the GUI. Seems to work in headless runs but without the gui it is hard to evaluate and train a new 3d model. Here is the traceback. 2024-02-19 15:49:09,151 [INFO] network run in 105.47s
2024-02-19 15:50:10,917 [INFO] masks created in 61.77s
2024-02-19 15:50:28,334 [INFO] >>>> TOTAL TIME 185.30 sec
Traceback (most recent call last):
File "C:\Users\derekt.conda\envs\cellpose3dev\Lib\site-packages\cellpose\gui\guiparts.py", line 147, in
pip install git+https://github.com/mouseland/cellpose.git
Thanks, using the git repository fixed the problem.
I also tried the other image restoration deblur
, run cyto3
segmentation and everything for fine!
Congrats for this new release, it looks really great !
sorry about that can you please
pip install git+https://github.com/mouseland/cellpose.git
and let us know if it's still not working
I had the same original issue as bpavie. Using a fresh install of pip install git+https://github.com/mouseland/cellpose.git
solved the problem when using the images bpavie provided, but fails when I try to 3d segment my own images. Image restoration works fine on my data after installing via git. Here is the traceback for 3D segmentation on my images:
Traceback (most recent call last):
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/guiparts.py", line 147, in <lambda>
self.clicked.connect(lambda: self.press(parent))
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/guiparts.py", line 151, in press
parent.compute_segmentation(model_name=self.model_name)
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/gui.py", line 2445, in compute_segmentation
resize_image(flows_new[j], Ly=self.Ly, Lx=self.Lx,
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/transforms.py", line 838, in resize_image
imgs = cv2.resize(img0, (Lx, Ly), interpolation=interpolation)
cv2.error: OpenCV(4.9.0) /io/opencv/modules/imgproc/src/resize.cpp:3789: error: (-215:Assertion failed) !dsize.empty() in function 'resize'
what is the size of your 3D stack? sorry I can't reproduce this
That is the same error I get when trying to segment H2B 3D nuclei in the GUI. The image dimensions are 2048x2048x41. I could upload a stack if you want to use it for debugging.
Thanks for replying so quickly! The size of my 3D stack is 1024x1024x271. This stack is quite large, so I'm uploading a cropped substack which also gives the same error (size 544x566x26) test_crop_substack_drosophila_neuron_nuclei.zip. To reproduce the error, I open the cellpose GUI from terminal with python -m cellpose --Zstack
, drag in my stack, and click run cyto3
(no adjustments or image restoration). It runs YX, ZY, and ZX. Here is the traceback again after that point:
2024-02-22 12:21:03,031 [INFO] network run in 10.62s
2024-02-22 12:21:06,785 [INFO] masks created in 3.75s
2024-02-22 12:21:07,274 [INFO] >>>> TOTAL TIME 14.88 sec
Traceback (most recent call last):
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/guiparts.py", line 147, in <lambda>
self.clicked.connect(lambda: self.press(parent))
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/guiparts.py", line 151, in press
parent.compute_segmentation(model_name=self.model_name)
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/gui/gui.py", line 2445, in compute_segmentation
resize_image(flows_new[j], Ly=self.Ly, Lx=self.Lx,
File "/home/olivia/miniconda3/envs/cellpose-git/lib/python3.9/site-packages/cellpose/transforms.py", line 838, in resize_image
imgs = cv2.resize(img0, (Lx, Ly), interpolation=interpolation)
cv2.error: OpenCV(4.9.0) /io/opencv/modules/imgproc/src/resize.cpp:3789: error: (-215:Assertion failed) !dsize.empty() in function 'resize'
also seen in #870
thanks @oliviajmcg for sharing your stack! I downloaded it but I am not getting the error. Can you please try updating again to the latest git release?
thanks @oliviajmcg for sharing your stack! I downloaded it but I am not getting the error. Can you please try updating again to the latest git release?
I tried updating again and it's working now. Apologies, must have missed an update somewhere along the thread. Thanks for your help!
no worries, thanks so much for your helpful feedback!
Describe the bug The 3D segmentationis failing using the last version of cellpose (3.0.4) using the GUI
To Reproduce Steps to reproduce the behavior:
Patch076.tif
Run log
before running any Cellpose functions.
Screenshots