From e176a23ea881f8429cea1cea9d2d55044e18ad68 Mon Sep 17 00:00:00 2001 From: Fernando Cervantes Sanchez Date: Thu, 21 Nov 2024 17:47:52 -0500 Subject: [PATCH] Improved integration of cellpose --- src/napari_activelearning/_models.py | 3 +++ src/napari_activelearning/_models_interface.py | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/napari_activelearning/_models.py b/src/napari_activelearning/_models.py index c6c9f73..0db3087 100644 --- a/src/napari_activelearning/_models.py +++ b/src/napari_activelearning/_models.py @@ -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 diff --git a/src/napari_activelearning/_models_interface.py b/src/napari_activelearning/_models_interface.py index 645ca69..43ac774 100644 --- a/src/napari_activelearning/_models_interface.py +++ b/src/napari_activelearning/_models_interface.py @@ -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(