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] No masks found during training #1017

Open
nicolehmr opened this issue Sep 24, 2024 · 1 comment
Open

[BUG] No masks found during training #1017

nicolehmr opened this issue Sep 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nicolehmr
Copy link

nicolehmr commented Sep 24, 2024

Description
I am trying to train a model for immunofluorescently labelled cells in a whole mouse brain slice. However, every time I do the training in the first image, it never recognizes any cells in the second image or any other.
Below I am showing some screenshots of the images I am using. Any help is highly appreciated, thank you!

What I already tried out
I already tried out different things:

  • using pre-installed models or starting from scratch
  • cellpose 2.3.2 and the newest version
  • normalizing images beforehand
  • with and without GPU
  • playing around with the flow threshold and the cellprob threshold
  • 24 bit and 16 bit pixel depth
  • cropping the image to only the area of interest (substantia nigra/ventral tegmental area)

Details on images

  • .png files
  • around 10 MB
  • around 6482x4564 pixels
  • 24 bit
  • normalized to values between 0 and 255
  • taken with widefield microscope, maximum-intensity projected z-stacks

Screenshots
Example 1: image
Example 2: image
Example 2 zoomed in: image
Output: image

@nicolehmr nicolehmr added the bug Something isn't working label Sep 24, 2024
@carsen-stringer
Copy link
Member

could you perhaps try decreasing the cell probability after retraining and see if the network is still uncertain about the cells? also these cells are pretty small, you may want to start with the "nuclei" model even if it is worse because the mean diameter is 17, so the network will not make your images quite so large during inference (right now cellpose will resize them to diam_mean of 30 so a factor of 3x)

@ian-coccimiglio also recommended trying the Adam training, which is now an option if you pip install git+https://github.com/mouseland/cellpose.git. you will want to reduce the learning rate to around 0.001.

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