From 3939d6a889debd1a6c73e5e2e2088a0ab7bb26eb Mon Sep 17 00:00:00 2001 From: oburri Date: Fri, 24 May 2024 09:05:07 +0200 Subject: [PATCH 1/3] allows --all channels to work in CLI --- cellpose/__main__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cellpose/__main__.py b/cellpose/__main__.py index 342b2497..e83ff066 100644 --- a/cellpose/__main__.py +++ b/cellpose/__main__.py @@ -155,16 +155,26 @@ def main(): builtin_size = False if args.all_channels: channels = None + img = io.imread(image_names[0]) + if img.ndim == 3: + nchan = min(img.shape) + elif img.ndim == 2: + nchan = 1 + channels = None + else: + nchan = 2 + pretrained_model = None if model_type is not None else pretrained_model if restore_type is None: model = models.CellposeModel(gpu=gpu, device=device, pretrained_model=pretrained_model, model_type=model_type, + nchan=nchan, backbone=backbone) else: model = denoise.CellposeDenoiseModel( gpu=gpu, device=device, pretrained_model=pretrained_model, - model_type=model_type, restore_type=restore_type, + model_type=model_type, restore_type=restore_type, nchan=nchan, chan2_restore=args.chan2_restore) # handle diameters From 04eecf68a94876902ce7b6f654149a19fb1eb079 Mon Sep 17 00:00:00 2001 From: Martin Weigert Date: Wed, 10 Jul 2024 11:57:59 +0200 Subject: [PATCH 2/3] Fix link in doc --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 68d422bd..d553dc54 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -31,7 +31,7 @@ this code at the beginning of your notebook before you import cellpose: M1 Mac installation ~~~~~~~~~~~~~~~~~~~~~~~ -Please use the instructions provided on `image.sc ` +Please use the instructions provided on `image.sc `_ by Peter Sobolewski. From the command line you can choose the Mac device with :: From 7d9361d6cfb6dcb069302a5b8fef492908372b7d Mon Sep 17 00:00:00 2001 From: Ajinkya Kulkarni Date: Wed, 24 Jul 2024 22:01:07 +0200 Subject: [PATCH 3/3] `imagecodecs` no longer compiles with `python 3.8` Changed minimum python requirement to 3.9 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d980f89..fd9f79b4 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ If you are using a GPU, make sure its drivers and the cuda libraries are correct 1. Install an [Anaconda](https://www.anaconda.com/products/distribution) distribution of Python. Note you might need to use an anaconda prompt if you did not add anaconda to the path. 2. Open an anaconda prompt / command prompt which has `conda` for **python 3** in the path -3. Create a new environment with `conda create --name cellpose python=3.8`. We recommend python 3.8, but python 3.9 and 3.10 will likely work as well. +3. Create a new environment with `conda create --name cellpose python=3.9`. We recommend python 3.9, but python 3.10 will likely work as well. 4. To activate this new environment, run `conda activate cellpose` 5. To install the minimal version of cellpose, run `python -m pip install cellpose`. 6. To install cellpose and the GUI, run `python -m pip install cellpose[gui]`. If you're on a zsh server, you may need to use ' ' around the cellpose[gui] call: `python -m pip install 'cellpose[gui]'`.