Skip to content

Commit

Permalink
Update Cellpose model URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed Mar 8, 2024
1 parent 4eb1150 commit 20381fc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
43 changes: 30 additions & 13 deletions src/cellmap_models/pytorch/cellpose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ This directory contains finetuned scripts for downloading Cellpose models, parti
## Models

### Trained on p7 mouse tissues
- __CP_jrc_mus-thymus-1-nuc-2__: trained on thymus nuclei
- __CP_jrc_mus-skin-1-nuc__:
- __CP_jrc_mus-pancreas-4_nuc__:
- __CP_jrc_mus-heart-1-nuc-2__:
- __CP_jrc_mus-heart-1-ecs__:
- __CP_jrc_mus-epididymis-1-nuc__:
- __CP_jrc_mus-epididymis-2-nuc__:
- __CP_jrc_mus-kidney-3-nuc-2__:
- __CP_jrc_mus-liver-3-nuc-2__:
- __CP_jrc_mus-hippocampus-1-nuc-2__:
**jrc_mus-epididymis-1_nuc_cp:**

**jrc_mus-epididymis-2_nuc_cp:**

**jrc_mus-heart-1_ecs_cp:**

**jrc_mus-heart-1_nuc_cp:**

**jrc_mus-hippocampus-1_nuc_cp:**

**jrc_mus-kidney-3_nuc_cp:**

**jrc_mus-liver-3_nuc_cp:**

**jrc_mus-pancreas-4_nuc_cp:** Cellpose was trained on nuclei from 17 2D slices from jrc_mus-pancreas-4.

**jrc_mus-skin-1_nuc_cp:**

**jrc_mus-thymus-1_nuc_cp:**

## Usage

Expand All @@ -28,19 +37,27 @@ from cellmap_models.cellpose import load_model
model = load_model('<model_name>')
```

Where `<model_name>` is the name of the model you would like to download.

```python

__If you would like to download and use a Cellpose model with the `cellpose` package or its GUI, do so by following the instructions below.__

First install the `cellpose` package:

```bash
conda activate cellmap
pip install cellpose[gui]
pip install "cellpose[gui]"
```

Then you can also download model weights from the `cellmap-models` repository and add them to your local `cellpose` model directory. For example, you can run the following commands:
Then you can also download model weights from the `cellmap-models` repository and add them to your local Cellpose model directory. For example, you can run the following commands:

```bash
cellmap.add_cellpose <model_name>
```

where `<model_name>` is the name of the model you would like to download, based on the descriptions above. For example, to download the `...
where `<model_name>` is the name of the model you would like to download, based on the descriptions above. For example, to download the `jrc_mus-pancreas-4_nuc_cp` model and add it to Cellpose, you would run:

```bash
cellmap.add_cellpose jrc_mus-pancreas-4_nuc_cp
```
20 changes: 10 additions & 10 deletions src/cellmap_models/pytorch/cellpose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from .load_model import load_model

models_dict = {
"CP_jrc_mus-thymus-1-nuc-2": "...",
"CP_jrc_mus-skin-1-nuc": "...",
"CP_jrc_mus-pancreas-4_nuc": "...",
"CP_jrc_mus-heart-1-nuc-2": "...",
"CP_jrc_mus-heart-1-ecs": "...",
"CP_jrc_mus-epididymis-1-nuc": "...",
"CP_jrc_mus-epididymis-2-nuc": "...",
"CP_jrc_mus-kidney-3-nuc-2": "...",
"CP_jrc_mus-liver-3-nuc-2": "...",
"CP_jrc_mus-hippocampus-1-nuc-2": "...",
"jrc_mus-epididymis-1_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-epididymis-1_nuc_cp",
"jrc_mus-epididymis-2_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-epididymis-2_nuc_cp",
"jrc_mus-heart-1_ecs_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-heart-1_ecs_cp",
"jrc_mus-heart-1_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-heart-1_nuc_cp",
"jrc_mus-hippocampus-1_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-hippocampus-1_nuc_cp",
"jrc_mus-kidney-3_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-kidney-3_nuc_cp",
"jrc_mus-liver-3_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-liver-3_nuc_cp",
"jrc_mus-pancreas-4_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-pancreas-4_nuc_cp",
"jrc_mus-skin-1_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-skin-1_nuc_cp",
"jrc_mus-thymus-1_nuc_cp": "https://github.com/janelia-cellmap/cellmap-models/releases/download/2024.03.08/jrc_mus-thymus-1_nuc_cp",
}

models_list = list(models_dict.keys())

0 comments on commit 20381fc

Please sign in to comment.