Skip to content

Conversation

@antho214
Copy link

I am creating a pull request that solves some issues that I have been experiencing when using the Cellpose 2D notebook with the pretrained models.

Reproducibility

To reproduce the errors, run sections 1-2 and then move to section 5 to assess the quality of the pretrained models. I am using the pretrained model Cytoplasm3 with my own data.


Problem
Some variables were not defined when jumping from sections 1-2 to section 5 to use the more recent pretrained models (e.g. Cytoplasm3). Without these modifications, this raised the following error when loading the Cytoplasm3 model.

NameError: name 'model_choice' is not defined

Solution
I have changed the variable name model_choice to QC_model as for the other models.


Problem
Similarly, in section 5, some of the models (e.g. TissueNet) defined the variable channels which required segment_channel and nuclear_channel to be defined.
Solution
Since channels is not required in this cell and would be overwritten in section 5.2, I have removed the definition of channels.


Problem
Lastly, some of the models (e.g. Cytoplasm3) did not include the default QC_model_folder and QC_model_name which raised an error when creating the output folder.

FileNotFoundError: [Errno 2] No such file or directory: ''

Solution
I have added the default QC_model_folder and QC_model_name to every model. This solves the issue.

Hopefully this helps!
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant