From eccc0838d6ab9c959b080d5137236bfe404f7285 Mon Sep 17 00:00:00 2001 From: Anthony Bilodeau Date: Tue, 17 Dec 2024 11:06:12 -0500 Subject: [PATCH 1/2] fix(cellpose2d) updated handling of cellpose default models; --- .../Cellpose_2D_ZeroCostDL4Mic.ipynb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb b/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb index 831929c9..6f10a05f 100644 --- a/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb +++ b/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb @@ -1239,31 +1239,37 @@ "\n", " print('The model \"Cytoplasm2\" will be evaluated')\n", "\n", - " if model_choice == \"Cytoplasm3\":\n", - " channels=[segment_channel,nuclear_channel]\n", + " if QC_model == \"Cytoplasm3\":\n", " model = models.Cellpose(gpu=True, model_type=\"cyto3\")\n", + " QC_model_folder = Saving_path\n", + " QC_model_name = \"Cytoplasm3\" \n", + "\n", " print(\"Cytoplasm 3 model enabled\")\n", "\n", " if QC_model == \"Cytoplasm2_Omnipose\":\n", " model = models.Cellpose(gpu=True, model_type=\"cyto2_omni\")\n", " QC_model_folder = Saving_path\n", " QC_model_name = \"Cytoplasm2_Omnipose\"\n", + "\n", " print(\"The model Cytoplasm2_Omnipose will be evaluated\")\n", "\n", " if QC_model == \"LiveCell\":\n", - " channels=[segment_channel,0]\n", " model = models.CellposeModel(gpu=True, model_type=\"livecell\")\n", + " QC_model_folder = Saving_path\n", + " QC_model_name = \"LiveCell\" \n", " print(\"LiveCell model enabled\")\n", "\n", " if QC_model == \"Bacteria_Omnipose\":\n", - " channels=[segment_channel,nuclear_channel]\n", " model = models.Cellpose(gpu=True, model_type=\"bact_omni\")\n", " Object_diameter = 0\n", + " QC_model_folder = Saving_path\n", + " QC_model_name = \"Bacteria_Omnipose\" \n", " print(\"Bacteria_omnipose model enabled\")\n", "\n", " if QC_model == \"TissueNet\":\n", - " channels=[segment_channel,nuclear_channel]\n", " model = models.CellposeModel(gpu=True, model_type='tissuenet')\n", + " QC_model_folder = Saving_path\n", + " QC_model_name = \"TissueNet\" \n", " print(\"TissueNet model enabled\")\n", "\n", " if QC_model == \"Nuclei\":\n", @@ -2578,4 +2584,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} From f4bfb8368fd8d065ae88267473ef5c3d13f1e0b8 Mon Sep 17 00:00:00 2001 From: Anthony Bilodeau Date: Tue, 17 Dec 2024 11:26:47 -0500 Subject: [PATCH 2/2] fix(cellpose2d) added missing channels variable --- Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb b/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb index 6f10a05f..8c67c3ec 100644 --- a/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb +++ b/Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb @@ -1830,6 +1830,9 @@ "if QC_model == \"Cytoplasm2\":\n", " channels=[segment_channel,nuclear_channel]\n", "\n", + "if QC_model == \"Cytoplasm3\":\n", + " channels=[segment_channel,nuclear_channel] \n", + "\n", "if QC_model == \"Nuclei\":\n", " channels=[segment_channel,0]\n", "\n",