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

Fix - Cellpose2D notebook - Variables not defined #338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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