Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
guijacquemet authored Apr 25, 2024
1 parent c7f0eec commit 87f77f7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Colab_notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2071,24 +2071,24 @@
"\n",
"#@markdown ###What model do you want to use?\n",
"\n",
"model_choice = \"Cytoplasm\" #@param [\"Cytoplasm\",\"Cytoplasm2\",\"LiveCell\", \"TissueNet\", \"Cytoplasm2_Omnipose\", \"Bacteria_Omnipose\", \"Nuclei\", \"Own_model\"]\n",
"model_choice = \"Cytoplasm3\" #@param [\"Cytoplasm\",\"Cytoplasm2\",\"Cytoplasm3\",\"LiveCell\", \"TissueNet\", \"Cytoplasm2_Omnipose\", \"Bacteria_Omnipose\", \"Nuclei\", \"Own_model\"]\n",
"\n",
"#@markdown ####If using your own model, please provide the path to the model (not the folder):\n",
"\n",
"Prediction_model = \"\" #@param {type:\"string\"}\n",
"\n",
"#@markdown ### What channel do you want to segment?\n",
"\n",
"Channel_to_segment= \"Grayscale\" #@param [\"Grayscale\", \"Blue\", \"Green\", \"Red\"]\n",
"Channel_to_segment= \"Red\" #@param [\"Grayscale\", \"Blue\", \"Green\", \"Red\"]\n",
"\n",
"# @markdown ###If you chose the model \"cytoplasm\" indicate if you also have a nuclear channel that can be used to aid the segmentation.\n",
"\n",
"Nuclear_channel= \"None\" #@param [\"None\", \"Blue\", \"Green\", \"Red\"]\n",
"Nuclear_channel= \"Blue\" #@param [\"None\", \"Blue\", \"Green\", \"Red\"]\n",
"\n",
"#@markdown ### Segmentation parameters:\n",
"Object_diameter = 0#@param {type:\"number\"}\n",
"Object_diameter = 500#@param {type:\"number\"}\n",
"\n",
"Flow_threshold = 0.1 #@param {type:\"slider\", min:0.0, max:3, step:0.1}\n",
"Flow_threshold = 1.5 #@param {type:\"slider\", min:0.0, max:3, step:0.1}\n",
"\n",
"mask_threshold=0 #@param {type:\"slider\", min:-6, max:6, step:1}\n",
"\n",
Expand Down Expand Up @@ -2131,6 +2131,11 @@
" model = models.Cellpose(gpu=True, model_type=\"cyto\")\n",
" print(\"Cytoplasm model enabled\")\n",
"\n",
"if model_choice == \"Cytoplasm3\":\n",
" channels=[segment_channel,nuclear_channel]\n",
" model = models.Cellpose(gpu=True, model_type=\"cyto3\")\n",
" print(\"Cytoplasm 3 model enabled\")\n",
"\n",
"if model_choice == \"Cytoplasm2\":\n",
" channels=[segment_channel,nuclear_channel]\n",
" model = models.Cellpose(gpu=True, model_type=\"cyto2\")\n",
Expand Down Expand Up @@ -2564,8 +2569,7 @@
"accelerator": "GPU",
"colab": {
"machine_shape": "hm",
"provenance": [],
"toc_visible": true
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
Expand All @@ -2586,4 +2590,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 87f77f7

Please sign in to comment.