diff --git a/README.md b/README.md index 04feda08..b2b922f8 100644 --- a/README.md +++ b/README.md @@ -59,26 +59,20 @@ Previous additions : -### Install note for M1/M2 Mac users +### Install note for ARM64 (Silicon) Mac users To avoid issues when installing on the ARM64 architecture, please follow these steps. -1) Create a new conda env using the provided conda/napari_cellseg3d_m1.yml file : +1) Create a new conda env using the provided conda/napari_CellSeg3D_ARM64.yml file : git clone https://github.com/AdaptiveMotorControlLab/CellSeg3d.git cd CellSeg3d - conda env create -f conda/napari_cellseg3d_m1.yml - conda activate napari_cellseg3d_m1 + conda env create -f conda/CellSeg3D_ARM64.yml + conda activate napari_CellSeg3D_ARM64 -2) Install the plugin. - From repository root folder, run : +2) Install a Qt backend (PySide or PyQt5) +3) Launch napari, the plugin should be available in the plugins menu. - pip install -e . - OR directly via PyPi : - - pip install napari-cellseg3d - - OR directly via [napari-hub] (see Installation section above) ## Requirements diff --git a/conda/napari_cellseg3d_m1.yml b/conda/napari_CellSeg3D_ARM64.yml similarity index 73% rename from conda/napari_cellseg3d_m1.yml rename to conda/napari_CellSeg3D_ARM64.yml index aba35269..49de0f12 100644 --- a/conda/napari_cellseg3d_m1.yml +++ b/conda/napari_CellSeg3D_ARM64.yml @@ -1,4 +1,4 @@ -name: napari_cellseg3d_m1 +name: napari_CellSeg3D_ARM64 channels: - anaconda - conda-forge @@ -11,18 +11,14 @@ dependencies: - pip: - numpy - napari>=0.4.14 - # - opencv-python>=4.5.5 - scikit-image>=0.19.2 - matplotlib>=3.4.1 - tifffile>=2022.2.9 - # - imageio-ffmpeg>=0.4.5 - torch>=1.11 - monai[nibabel, einops]>=0.9.0 - tqdm - # - nibabel - scikit-image - # - pillow - pyclesperanto-prototype - tqdm - matplotlib - # - vispy>=0.9.6 + - napari_cellseg3d diff --git a/docs/source/guides/detailed_walkthrough.rst b/docs/source/guides/detailed_walkthrough.rst index b4571872..b458ab28 100644 --- a/docs/source/guides/detailed_walkthrough.rst +++ b/docs/source/guides/detailed_walkthrough.rst @@ -32,6 +32,11 @@ For quick model checks, check the "Inference" sections in our docs. If you need to start labeling volumes from scratch or correct initial labels, we recommend consulting the sections on :ref:`Review` section right after :ref:`Cropping `. +Launching the plugin +************************ + +See `Usage section `_ for instructions on launching the plugin. + Cropping ********* .. _walkthrough_cropping: diff --git a/docs/source/guides/inference_module_guide.rst b/docs/source/guides/inference_module_guide.rst index d0bfd4d2..e209486f 100644 --- a/docs/source/guides/inference_module_guide.rst +++ b/docs/source/guides/inference_module_guide.rst @@ -11,6 +11,9 @@ Inference📊 **Inference** allows you to use pre-trained segmentation algorithms, written in Pytorch, to automatically label cells in 3D volumes. +See `Usage section `_ for instructions on launching the plugin. +See :ref:`training_module_guide` for instructions on training your own models before inference. + .. important:: Currently, the module supports inference on **3D volumes**. When running on folders, make sure that your image folder only contains a set of **3D image files** saved with the **`.tif`** extension. diff --git a/docs/source/guides/installation_guide.rst b/docs/source/guides/installation_guide.rst index c5b54853..ad2fffe6 100644 --- a/docs/source/guides/installation_guide.rst +++ b/docs/source/guides/installation_guide.rst @@ -2,8 +2,8 @@ Installation guide ⚙ ====================== This guide outlines the steps for installing CellSeg3D and its dependencies. The plugin is compatible with Windows, Linux, and MacOS. -**Note for M1/M2 (ARM64) Mac Users:** -Please refer to the :ref:`section below ` for specific instructions. +**Note for ARM64 Mac Users:** +Please refer to the :ref:`section below ` for specific instructions. .. warning:: If you encounter any issues during installation, feel free to open an issue on our `GitHub repository`_. @@ -46,7 +46,7 @@ Installing CellSeg3D -------------------------------------------- .. warning:: - For M1 Mac users, please see the :ref:`section below ` + For ARM64 Mac users, please see the :ref:`section below ` **Via pip**: @@ -69,14 +69,17 @@ Navigate to the cloned CellSeg3D folder and run: Successful installation will add the napari-cellseg3D plugin to napari’s Plugins section. -M1/M2 (ARM64) Mac installation +ARM64 Mac installation -------------------------------------------- .. _ARM64_Mac_installation: -For ARM64 Macs, we recommend using our custom CONDA environment. This is particularly important for M1 or M2 MacBooks. +For ARM64 Macs, we recommend using our custom CONDA environment. This is particularly important for ARM64 (Silicon chips) MacBooks. Start by installing `miniconda3`_. +Creating the environment +______________________________ + .. _miniconda3: https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html 1. **Clone the repository** (`link `_): @@ -91,25 +94,47 @@ In the terminal, navigate to the CellSeg3D folder: .. code-block:: cd CellSeg3D - conda env create -f conda/napari_cellseg3d_m1.yml + conda env create -f conda/napari_cellseg3d_ARM64.yml + +This will also install the necessary dependencies as well as the plugin. 3. **Activate the environment** : .. code-block:: - conda activate napari_cellseg3d_m1 + conda activate napari_cellseg3d_ARM64 -4. **Install the plugin** : +4. **Install a Qt backend** : +Important : you only need to install one of the following backends. +PyQt5: .. code-block:: - pip install napari-cellseg3d + pip install PyQt5 + +OR +PySide2: + +.. code-block:: + + pip install PySide2 + +5. **Install PyTorch** : +Refer to `PyTorch's website`_ for installation instructions. + +6. **Launch napari** : +You should now see the CellSeg3D plugin in the Plugins section of napari. +See `Usage section `_ for a guide on how to use the plugin. + +Updating the environment +______________________________ -OR to install from source: +In order to update the environment, navigate to the CellSeg3D folder and run: .. code-block:: - pip install -e . + conda deactivate + conda env update -f conda/napari_cellseg3d_ARM64.yml Optional requirements ------------------------------ diff --git a/docs/source/guides/review_module_guide.rst b/docs/source/guides/review_module_guide.rst index 7eb8977d..1f40a3d0 100644 --- a/docs/source/guides/review_module_guide.rst +++ b/docs/source/guides/review_module_guide.rst @@ -12,6 +12,8 @@ Labeling🔍 The system will save the updated status of each file in a csv file. Additionally, the time taken per slice review is logged, enabling efficient monitoring. +See `Usage section `_ for instructions on launching the plugin. + Launching the review process --------------------------------- .. figure:: ../images/Review_Parameters.png diff --git a/docs/source/guides/training_module_guide.rst b/docs/source/guides/training_module_guide.rst index 1ca178bf..61410e20 100644 --- a/docs/source/guides/training_module_guide.rst +++ b/docs/source/guides/training_module_guide.rst @@ -12,6 +12,8 @@ Training📉 **Training** allows you to train models for cell segmentation. Whenever necessary, pre-trained weights will be automatically downloaded and integrated. +See `Usage section `_ for instructions on launching the plugin. + .. important:: At present, only inference on **3D volumes is supported**. Ensure that both your image and label folders contain a set of **3D image files**, in either **`.tif`** or **`.tiff`** format. Loading a folder of 2D images as a stack is supported only if diff --git a/docs/source/guides/utils_module_guide.rst b/docs/source/guides/utils_module_guide.rst index ed158344..0dc0fbf0 100644 --- a/docs/source/guides/utils_module_guide.rst +++ b/docs/source/guides/utils_module_guide.rst @@ -4,6 +4,7 @@ Utilities 🛠 ============ Here you will find a range of tools for image processing and analysis. +See `Usage section `_ for instructions on launching the plugin. .. note:: The utility selection menu is found at the bottom of the plugin window. diff --git a/docs/welcome.rst b/docs/welcome.rst index b5a11d68..ac825f16 100644 --- a/docs/welcome.rst +++ b/docs/welcome.rst @@ -58,7 +58,7 @@ For detailed installation instructions, including installing pre-requisites, please see :ref:`source/guides/installation_guide:Installation guide ⚙` .. warning:: - **M1/M2 MacOS users**, please refer to the :ref:`dedicated section ` + **ARM64 MacOS users**, please refer to the :ref:`dedicated section ` You can install ``napari-cellseg3d`` via pip: @@ -74,9 +74,11 @@ For local installation after cloning from GitHub, please run the following in th If the installation was successful, you will find the napari-cellseg3D plugin in the Plugins section of napari. + Usage -------------------------------------------- + To use the plugin, please run: .. code-block:: diff --git a/pyproject.toml b/pyproject.toml index 42a52f37..e76cb4b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,6 +126,15 @@ line_length = 79 #crf = [ # "pydensecrf@git+https://github.com/lucasb-eyer/pydensecrf.git#egg=master", #] +pyqt5 = [ + "pyqt5", +] +pyside2 = [ + "pyside2", +] +pyside6 = [ + "pyside6", +] onnx-cpu = [ "onnx", "onnxruntime"