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

[BUG] CellPose 3 Training Not Detecting ROI on M1 Mac #1117

Open
david-an-work opened this issue Feb 22, 2025 · 2 comments
Open

[BUG] CellPose 3 Training Not Detecting ROI on M1 Mac #1117

david-an-work opened this issue Feb 22, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@david-an-work
Copy link

Describe the bug
I installed CellPose 3 on my computer and have been trying to get it to work. The cyto3 model works well for my images, though not perfect, so I was trying to train my own. However, when I train, it doesn't identify any reasonable ROIs (instead, it finds these seemingly random spots, as pictured below). I'm not sure if this is important, but the training file is saved as a document, not as an executable. Not sure if that makes a difference or not. Also, I installed most things (such as numpy and pyqt) through conda, not pip, since I'm using an environment through anaconda navigator.

To Reproduce
I follow the recommended instructions for training a model: inputting a .tif photo, then running cyto3 with a set diameter, then clicking "train new model." It's after this step, when it moves onto the next image, that there are no relevant ROIs.

Run log
Info:
cellpose version: 3.1.1.1
platform: darwin
python version: 3.10.10
torch version: 2.6.0

What the terminal says when training: 2025-02-22 17:41:48,462 [INFO] 160, train_loss=0.9803, test_loss=0.0000, LR=0.100000, time 67.14s

Screenshots
Image

Image

Would greatly appreciate any advice!

@david-an-work david-an-work added the bug Something isn't working label Feb 22, 2025
@Aaardaaalaaan
Copy link

Aaardaaalaaan commented Feb 23, 2025

There has been a similar biviour for Windows user as well, which is documented at the following link: https://github.com/MouseLand/cellpose/issues/1071.
Nevertheless, I believe it might be worthwhile to try running a script (instead of using the GUI) and adjusting the values for the parameters n_epoch and nimg_per_epoch, as discussed in this thread:
https://forum.image.sc/t/cellpose-v2-2-3-constantly-zero-0-roi-after-training/101801/32.
I also found these comparisons of performance using different parameters' values extremely useful:
https://github.com/True-North-Intelligent-Algorithms/tnia-python/blob/main/notebooks/imagesc/2024_09_29_training_cellpose/37_cellpose_training_trials.ipynb

@david-an-work
Copy link
Author

Thanks for sharing this! I did increase n_epoch to 1000 once and saw that it was taking a very long time (I aborted at 20 mins+), would it work better if I wasn't working through the GUI?

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

2 participants