Skip to content

Commit

Permalink
Improved integration of cellpose
Browse files Browse the repository at this point in the history
  • Loading branch information
fercer committed Nov 21, 2024
1 parent 8a99343 commit e176a23
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/napari_activelearning/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ def _fine_tune(self, train_data, train_labels, test_data, test_labels):
model_name=self._model_name
)

if isinstance(self._pretrained_model, tuple):
self._pretrained_model = self._pretrained_model[0]

self.refresh_model = True

USING_CELLPOSE = True
Expand Down
18 changes: 17 additions & 1 deletion src/napari_activelearning/_models_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,23 @@ def cellpose_segmentation_parameters(
"cyto2",
"cyto3",
"nuclei",
"tissuenet_cp3"] = "cyto3",
"tissuenet_cp3",
"livecell_cp3",
"yeast_PhC_cp3",
"yeast_BF_cp3",
"bact_phase_cp3",
"bact_fluor_cp3",
"deepbacs_cp3",
"cyto2_cp3",
"CP",
"CPx",
"TN1",
"TN2",
"TN3",
"LC1",
"LC2",
"LC3",
"LC"] = "cyto3",
gpu: bool = True
):
return dict(
Expand Down

0 comments on commit e176a23

Please sign in to comment.