Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: napari_cellseg3d_m1
name: napari_CellSeg3D_ARM64
channels:
- anaconda
- conda-forge
Expand All @@ -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
5 changes: 5 additions & 0 deletions docs/source/guides/detailed_walkthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<walkthrough_reviewing>` section right after :ref:`Cropping <walkthrough_cropping>`.


Launching the plugin
************************

See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3D/welcome.html#usage>`_ for instructions on launching the plugin.

Cropping
*********
.. _walkthrough_cropping:
Expand Down
3 changes: 3 additions & 0 deletions docs/source/guides/inference_module_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ 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.
Expand Down
47 changes: 36 additions & 11 deletions docs/source/guides/installation_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <source/guides/installation_guide:M1/M2 (ARM64) Mac installation>` for specific instructions.
**Note for ARM64 Mac Users:**
Please refer to the :ref:`section below <source/guides/installation_guide:ARM64 Mac installation>` for specific instructions.

.. warning::
If you encounter any issues during installation, feel free to open an issue on our `GitHub repository`_.
Expand Down Expand Up @@ -46,7 +46,7 @@ Installing CellSeg3D
--------------------------------------------

.. warning::
For M1 Mac users, please see the :ref:`section below <source/guides/installation_guide:M1/M2 (ARM64) Mac installation>`
For ARM64 Mac users, please see the :ref:`section below <source/guides/installation_guide:ARM64 Mac installation>`

**Via pip**:

Expand All @@ -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 <https://github.com/AdaptiveMotorControlLab/CellSeg3d>`_):
Expand All @@ -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 <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ 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
------------------------------
Expand Down
2 changes: 2 additions & 0 deletions docs/source/guides/review_module_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for instructions on launching the plugin.

Launching the review process
---------------------------------
.. figure:: ../images/Review_Parameters.png
Expand Down
2 changes: 2 additions & 0 deletions docs/source/guides/training_module_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ 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
Expand Down
1 change: 1 addition & 0 deletions docs/source/guides/utils_module_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Utilities 🛠
============

Here you will find a range of tools for image processing and analysis.
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for instructions on launching the plugin.

.. note::
The utility selection menu is found at the bottom of the plugin window.
Expand Down
4 changes: 3 additions & 1 deletion docs/welcome.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <source/guides/installation_guide:M1/M2 (ARM64) Mac installation>`
**ARM64 MacOS users**, please refer to the :ref:`dedicated section <source/guides/installation_guide:ARM64 Mac installation>`

You can install ``napari-cellseg3d`` via pip:

Expand All @@ -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::
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down