MouseLand / cellpose

a generalist algorithm for cellular segmentation with human-in-the-loop capabilities
https://www.cellpose.org/
BSD 3-Clause "New" or "Revised" License
1.31k stars 377 forks source link

[BUG]The pre-trained model of cellpose3 cannot be downloaded #980

Closed xiaotaiyangcmm closed 1 day ago

xiaotaiyangcmm commented 1 month ago

The pre-trained file of https://www.cellpose.org/models/cyto3torch_0 does not exist.

when I use the code model = models.Cellpose(gpu=use_GPU, model_type='cyto3'), an error is reported:

2024-07-25 02:45:16,707 [INFO] Downloading: "https://www.cellpose.org/models/cyto3torch_0" to /h3cstore_nt/mm/cellpose/models/cyto3torch_0

Traceback (most recent call last): File "/h3cstore_nt/mm/cellpose/BBBC/123.py", line 62, in model = models.Cellpose(gpu=True, model_type="cyto3") File "/opt/conda/lib/python3.8/site-packages/cellpose/models.py", line 105, in init self.pretrained_model = [model_path(model_type, j, torch) for j in model_range] File "/opt/conda/lib/python3.8/site-packages/cellpose/models.py", line 105, in self.pretrained_model = [model_path(model_type, j, torch) for j in model_range] File "/opt/conda/lib/python3.8/site-packages/cellpose/models.py", line 28, in model_path return cache_model_path(basename) File "/opt/conda/lib/python3.8/site-packages/cellpose/models.py", line 41, in cache_model_path utils.download_url_to_file(url, cached_file, progress=True) File "/opt/conda/lib/python3.8/site-packages/cellpose/utils.py", line 69, in download_url_to_file u = urlopen(url) File "/opt/conda/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/opt/conda/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/opt/conda/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/opt/conda/lib/python3.8/urllib/request.py", line 569, in error return self._call_chain(args) File "/opt/conda/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(args) File "/opt/conda/lib/python3.8/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 500: INTERNAL SERVER ERROR

xiaotaiyangcmm commented 1 month ago

And I can't download it when I open the website online: https://www.cellpose.org/models/cyto3torch_0

carsen-stringer commented 1 day ago

I think you might be using an old version of cellpose? I'd upgrade to 3.9 or greater python and pip install cellpose --upgrade, please let us know if that doesn't fix the problem and I'll reopen the issue