Skip to content
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

CellposeGUI Stuck on Draw Masks [BUG] #930

Open
mayishazn opened this issue May 2, 2024 · 7 comments
Open

CellposeGUI Stuck on Draw Masks [BUG] #930

mayishazn opened this issue May 2, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@mayishazn
Copy link

mayishazn commented May 2, 2024

Describe the bug
I have reinstalled cellpose 2. When I try to draw masks I right click and I see the red circle. I draw the mask and finish at the circle. The circle then disappears but no new mask appears. Instead the purple dots that indicate you are actively drawing an outline still appear. I noticed after returning to the red circle and the circle disappears, any additional movement of the cursor prints "QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)"

To Reproduce
Steps to reproduce the behavior:

  1. right click to start drawing a mask
  2. move mouse around a cell and return to red circle

Run log
(cellpose2) C:\Users\mayis>cellpose --verbose
2024-05-02 02:17:15,805 [INFO] WRITING LOG OUTPUT TO C:\Users\mayis.cellpose\run.log
2024-05-02 02:17:16,473 [INFO] TORCH CUDA version not installed/working.
(2048, 2048, 4)
GUI_INFO: auto-adjust enabled, computing saturation levels
GUI_INFO: loaded in previous changes
GUI_INFO: 402 masks found in C:/Users/mayis/Downloads/C3-20x_MII_-_dapi_betacat-488_p120-568_ph633-02-0001_seg.npy
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)
QGraphicsScene::removeItem: item 0x1d8259b8340's scene (0x0) is different from this scene (0x1d827c093d0)

For the environment info:
env2.txt

@mayishazn mayishazn added the bug Something isn't working label May 2, 2024
@laurend
Copy link

laurend commented May 6, 2024

I also have this bug!

@carsen-stringer
Copy link
Member

Sorry, please upgrade, this is fixed in cellpose3

@mayishazn
Copy link
Author

Well part of the reason I wanted to fix masks in cellpose2 is because cellpose3 takes up all my RAM. (See suspected memory leak issue: #921

@mayishazn
Copy link
Author

mayishazn commented May 7, 2024

Also it seems this still sometimes but thankfully not always happens on cellpose3. Or like I'll draw the mask and it doesnt show up. -Particularly when editing a single frame of a zstack.

@mayishazn
Copy link
Author

mayishazn commented May 27, 2024

Ya this still happens on cellpose3 (even after upgrading)

image

@mayishazn
Copy link
Author

image

@mayishazn
Copy link
Author

So what seems to work but isn't great is I reinstalled cellpose 1, went in the source code and swapped all the instances of np.bool to bool and np.float to float, and now I can finally draw masks. The workflow is now segment things with the python notebook with cellpose 3, fix the masks in cellpose 1, export them in cellpose 3...

For what its worth I can sometimes get cellpose3 to draw exactly one mask before it gets stuck in draw mode, save, close cellpose, reopen cellpose3 and draw another mask but thats tedious as heck. I suppose one could compare the gui parts of both source codes and see where cellpose 3 gets stuck on draw mode but I'm not too confident if I'll be able to fix it that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants