Skip to content

Commit ba0ee67

Browse files
MMathisLabC-Achard
andauthored
Update macbook conda (#72)
* Update napari_cellseg3d_m1.yml * Update napari_cellseg3d_m1.yml * Rename conda install file to more general name * Update references to M1 chips and conda env file * Update install instructions re:backend * Update install instructions w/ Qt backend * Add links to usage section in docs * Update napari_cellseg3d_ARM64.yml * Rename napari_cellseg3d_ARM64.yml to napari_CellSeg3D_ARM64.yml - keep standard naming * Update napari_CellSeg3D_ARM64.yml * Add conda env update instructions * Update detailed_walkthrough.rst * Add backends as optional reqs * Update README.md * Update napari_CellSeg3D_ARM64.yml --------- Co-authored-by: C-Achard <[email protected]>
1 parent bf849ed commit ba0ee67

File tree

10 files changed

+69
-30
lines changed

10 files changed

+69
-30
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,20 @@ Previous additions :
5959

6060

6161

62-
### Install note for M1/M2 Mac users
62+
### Install note for ARM64 (Silicon) Mac users
6363

6464
To avoid issues when installing on the ARM64 architecture, please follow these steps.
6565

66-
1) Create a new conda env using the provided conda/napari_cellseg3d_m1.yml file :
66+
1) Create a new conda env using the provided conda/napari_CellSeg3D_ARM64.yml file :
6767

6868
git clone https://github.com/AdaptiveMotorControlLab/CellSeg3d.git
6969
cd CellSeg3d
70-
conda env create -f conda/napari_cellseg3d_m1.yml
71-
conda activate napari_cellseg3d_m1
70+
conda env create -f conda/CellSeg3D_ARM64.yml
71+
conda activate napari_CellSeg3D_ARM64
7272

73-
2) Install the plugin.
74-
From repository root folder, run :
73+
2) Install a Qt backend (PySide or PyQt5)
74+
3) Launch napari, the plugin should be available in the plugins menu.
7575

76-
pip install -e .
77-
OR directly via PyPi :
78-
79-
pip install napari-cellseg3d
80-
81-
OR directly via [napari-hub] (see Installation section above)
8276

8377

8478
## Requirements
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: napari_cellseg3d_m1
1+
name: napari_CellSeg3D_ARM64
22
channels:
33
- anaconda
44
- conda-forge
@@ -11,18 +11,14 @@ dependencies:
1111
- pip:
1212
- numpy
1313
- napari>=0.4.14
14-
# - opencv-python>=4.5.5
1514
- scikit-image>=0.19.2
1615
- matplotlib>=3.4.1
1716
- tifffile>=2022.2.9
18-
# - imageio-ffmpeg>=0.4.5
1917
- torch>=1.11
2018
- monai[nibabel, einops]>=0.9.0
2119
- tqdm
22-
# - nibabel
2320
- scikit-image
24-
# - pillow
2521
- pyclesperanto-prototype
2622
- tqdm
2723
- matplotlib
28-
# - vispy>=0.9.6
24+
- napari_cellseg3d

docs/source/guides/detailed_walkthrough.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ For quick model checks, check the "Inference" sections in our docs.
3232
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>`.
3333

3434

35+
Launching the plugin
36+
************************
37+
38+
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3D/welcome.html#usage>`_ for instructions on launching the plugin.
39+
3540
Cropping
3641
*********
3742
.. _walkthrough_cropping:

docs/source/guides/inference_module_guide.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Inference📊
1111
**Inference** allows you to use pre-trained segmentation algorithms, written in Pytorch,
1212
to automatically label cells in 3D volumes.
1313

14+
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for instructions on launching the plugin.
15+
See :ref:`training_module_guide` for instructions on training your own models before inference.
16+
1417
.. important::
1518
Currently, the module supports inference on **3D volumes**. When running on folders, make sure that your image folder
1619
only contains a set of **3D image files** saved with the **`.tif`** extension.

docs/source/guides/installation_guide.rst

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Installation guide ⚙
22
======================
33
This guide outlines the steps for installing CellSeg3D and its dependencies. The plugin is compatible with Windows, Linux, and MacOS.
44

5-
**Note for M1/M2 (ARM64) Mac Users:**
6-
Please refer to the :ref:`section below <source/guides/installation_guide:M1/M2 (ARM64) Mac installation>` for specific instructions.
5+
**Note for ARM64 Mac Users:**
6+
Please refer to the :ref:`section below <source/guides/installation_guide:ARM64 Mac installation>` for specific instructions.
77

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

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

5151
**Via pip**:
5252

@@ -69,14 +69,17 @@ Navigate to the cloned CellSeg3D folder and run:
6969
Successful installation will add the napari-cellseg3D plugin to napari’s Plugins section.
7070

7171

72-
M1/M2 (ARM64) Mac installation
72+
ARM64 Mac installation
7373
--------------------------------------------
7474
.. _ARM64_Mac_installation:
7575

76-
For ARM64 Macs, we recommend using our custom CONDA environment. This is particularly important for M1 or M2 MacBooks.
76+
For ARM64 Macs, we recommend using our custom CONDA environment. This is particularly important for ARM64 (Silicon chips) MacBooks.
7777

7878
Start by installing `miniconda3`_.
7979

80+
Creating the environment
81+
______________________________
82+
8083
.. _miniconda3: https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html
8184

8285
1. **Clone the repository** (`link <https://github.com/AdaptiveMotorControlLab/CellSeg3d>`_):
@@ -91,25 +94,47 @@ In the terminal, navigate to the CellSeg3D folder:
9194
.. code-block::
9295
9396
cd CellSeg3D
94-
conda env create -f conda/napari_cellseg3d_m1.yml
97+
conda env create -f conda/napari_cellseg3d_ARM64.yml
98+
99+
This will also install the necessary dependencies as well as the plugin.
95100

96101
3. **Activate the environment** :
97102

98103
.. code-block::
99104
100-
conda activate napari_cellseg3d_m1
105+
conda activate napari_cellseg3d_ARM64
101106
102-
4. **Install the plugin** :
107+
4. **Install a Qt backend** :
108+
Important : you only need to install one of the following backends.
109+
PyQt5:
103110

104111
.. code-block::
105112
106-
pip install napari-cellseg3d
113+
pip install PyQt5
114+
115+
OR
116+
PySide2:
117+
118+
.. code-block::
119+
120+
pip install PySide2
121+
122+
5. **Install PyTorch** :
123+
Refer to `PyTorch's website`_ for installation instructions.
124+
125+
6. **Launch napari** :
126+
You should now see the CellSeg3D plugin in the Plugins section of napari.
127+
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for a guide on how to use the plugin.
128+
129+
Updating the environment
130+
______________________________
107131

108-
OR to install from source:
132+
In order to update the environment, navigate to the CellSeg3D folder and run:
109133

110134
.. code-block::
111135
112-
pip install -e .
136+
conda deactivate
137+
conda env update -f conda/napari_cellseg3d_ARM64.yml
113138
114139
Optional requirements
115140
------------------------------

docs/source/guides/review_module_guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Labeling🔍
1212
The system will save the updated status of each file in a csv file.
1313
Additionally, the time taken per slice review is logged, enabling efficient monitoring.
1414

15+
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for instructions on launching the plugin.
16+
1517
Launching the review process
1618
---------------------------------
1719
.. figure:: ../images/Review_Parameters.png

docs/source/guides/training_module_guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Training📉
1212
**Training** allows you to train models for cell segmentation.
1313
Whenever necessary, pre-trained weights will be automatically downloaded and integrated.
1414

15+
See `Usage section <https://adaptivemotorcontrollab.github.io/CellSeg3d/welcome.html#usage>`_ for instructions on launching the plugin.
16+
1517
.. important::
1618
At present, only inference on **3D volumes is supported**. Ensure that both your image and label folders contain a set of
1719
**3D image files**, in either **`.tif`** or **`.tiff`** format. Loading a folder of 2D images as a stack is supported only if

docs/source/guides/utils_module_guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Utilities 🛠
44
============
55

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

89
.. note::
910
The utility selection menu is found at the bottom of the plugin window.

docs/welcome.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ For detailed installation instructions, including installing pre-requisites,
5858
please see :ref:`source/guides/installation_guide:Installation guide ⚙`
5959

6060
.. warning::
61-
**M1/M2 MacOS users**, please refer to the :ref:`dedicated section <source/guides/installation_guide:M1/M2 (ARM64) Mac installation>`
61+
**ARM64 MacOS users**, please refer to the :ref:`dedicated section <source/guides/installation_guide:ARM64 Mac installation>`
6262

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

@@ -74,9 +74,11 @@ For local installation after cloning from GitHub, please run the following in th
7474
7575
If the installation was successful, you will find the napari-cellseg3D plugin in the Plugins section of napari.
7676

77+
7778
Usage
7879
--------------------------------------------
7980

81+
8082
To use the plugin, please run:
8183

8284
.. code-block::

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ line_length = 79
126126
#crf = [
127127
# "pydensecrf@git+https://github.com/lucasb-eyer/pydensecrf.git#egg=master",
128128
#]
129+
pyqt5 = [
130+
"pyqt5",
131+
]
132+
pyside2 = [
133+
"pyside2",
134+
]
135+
pyside6 = [
136+
"pyside6",
137+
]
129138
onnx-cpu = [
130139
"onnx",
131140
"onnxruntime"

0 commit comments

Comments
 (0)