HenriquesLab / HenriquesLab/ZeroCostDL4Mic

Cellpose - two models not found

Open
#321 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
652
Forks
144
PR merge metrics
No merged PRs in 30d

Description

Hi there,

I am trying to use pre-trained Cellpose for the segmentation of bacteria in transmitted light images in the Cellpose 2D colab notebook. All is well until using the models in step 6.

Selecting the model "Cytoplasm2_Omnipose", I get the following error message:
`WARNING:cellpose.models:model_type does not exist, using default model

HTTPError Traceback (most recent call last)
in <cell line: 82>()
82 if model_choice == "Cytoplasm2_Omnipose":
83 channels=[segment_channel,nuclear_channel]
---> 84 model = models.Cellpose(gpu=True, model_type="cyto2_omni")
85 print("Cytoplasm2_Omnipose model enabled")
86

9 frames
/usr/lib/python3.10/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
641 class HTTPDefaultErrorHandler(BaseHandler):
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)
644
645 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 500: INTERNAL SERVER ERROR`

Selecting the model "Bacteria_Omnipose", I get the following error message:

`WARNING:cellpose.models:model_type does not exist, using default model

HTTPError Traceback (most recent call last)
in <cell line: 97>()
97 if model_choice == "Bacteria_Omnipose":
98 channels=[segment_channel,nuclear_channel]
---> 99 model = models.Cellpose(gpu=True, model_type="bact_omni")
100 Object_diameter = 0
101 print("Bacteria_omnipose model enabled")

9 frames
/usr/lib/python3.10/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
641 class HTTPDefaultErrorHandler(BaseHandler):
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)
644
645 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 500: INTERNAL SERVER ERROR`

Other models, e.g. Nuclei or Cytoplasm2 are fine and generate segmentations. The images are single focal plane grey scale, single channel tif images.

Any help would be much appreciated. Thanks!

Marie

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with step 6 of the Cellpose 2D Colab notebook and reproduce the failures for model_type values "cyto2_omni" and "bact_omni". Compare their loading path with the working Nuclei and Cytoplasm2 models, focusing on the reported missing model_type warning and HTTP 500 response. Done means both Omnipose models load and produce segmentations for the stated images.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.