Skip to content

Commit

Permalink
Merge branch 'main' into cy/v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Achard authored May 13, 2024
2 parents 9b35ded + 31db751 commit d86c908
Show file tree
Hide file tree
Showing 42 changed files with 1,229 additions and 1,646 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
push:
branches:
- main
- cy/training
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ wandb/
!napari_cellseg3d/_tests/res/wnet_test/*.tif
!napari_cellseg3d/_tests/res/wnet_test/lab/*.tif
!napari_cellseg3d/_tests/res/wnet_test/vol/*.tif
!examples/*

#include docs images
!docs/source/logo/*
Expand Down
2 changes: 1 addition & 1 deletion .napari/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ this information here.
## Getting Help

If you would like to report an issue with the plugin,
please open an [issue on Github](https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues)
please open an [issue on Github](https://github.com/AdaptiveMotorControlLab/CellSeg3D/issues)
<!--
This section should point users to your preferred support tools, whether this be raising
an issue on GitHub, asking a question on image.sc, or using some other method of contact.
Expand Down
10 changes: 5 additions & 5 deletions .napari/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ visibility: public
# note : remember to add napari-hub preview app to repo

project_urls:
Bug Tracker: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
Documentation: https://adaptivemotorcontrollab.github.io/CellSeg3d/res/welcome.html
Source Code: https://github.com/AdaptiveMotorControlLab/CellSeg3d
Project Site: https://github.com/AdaptiveMotorControlLab/CellSeg3d
User Support: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
Bug Tracker: https://github.com/AdaptiveMotorControlLab/CellSeg3D/issues
Documentation: https://adaptivemotorcontrollab.github.io/CellSeg3D/res/welcome.html
Source Code: https://github.com/AdaptiveMotorControlLab/CellSeg3D
Project Site: https://github.com/AdaptiveMotorControlLab/CellSeg3D
User Support: https://github.com/AdaptiveMotorControlLab/CellSeg3D/issues

# Add labels from the EDAM Bioimaging ontology
labels:
Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg3d.svg?color=green)](https://pypi.org/project/napari-cellseg3d)
[![Downloads](https://static.pepy.tech/badge/napari-cellseg3d)](https://pepy.tech/project/napari-cellseg3d)
[![Downloads](https://static.pepy.tech/badge/napari-cellseg3d/month)](https://pepy.tech/project/napari-cellseg3d)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/AdaptiveMotorControlLab/CellSeg3d/raw/main/LICENSE)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/AdaptiveMotorControlLab/CellSeg3D/raw/main/LICENSE)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-cellseg-annotator.svg?color=green)](https://python.org)
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d/branch/main/graph/badge.svg?token=hzUcn3XN8F)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d)
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3D/branch/main/graph/badge.svg?token=hzUcn3XN8F)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3D)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg3d)](https://www.napari-hub.org/plugins/napari-cellseg3d)

- A napari plugin for 3D cell segmentation: training, inference, and data review. In particular, this project was developed for analysis of mesoSPIM-acquired (cleared tissue + lightsheet) datasets.
Expand All @@ -20,7 +20,7 @@

## Documentation

📚 A lot of documentation is available at https://AdaptiveMotorControlLab.github.io/CellSeg3d
📚 A lot of documentation is available at https://AdaptiveMotorControlLab.github.io/CellSeg3D

You can also generate docs by running ``make html`` in the docs/ folder.

Expand Down Expand Up @@ -62,39 +62,48 @@ 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 :

pip install -e .
OR directly via PyPi :
2) Install a Qt backend (PySide or PyQt5)
3) Launch napari, the plugin should be available in the plugins menu.

pip install napari-cellseg3d

OR directly via [napari-hub] (see Installation section above)


## Requirements

**Python 3.8 or 3.9 required.**
Requires **[napari]**, **[PyTorch]** and **[MONAI]**.
Compatible with Windows, MacOS and Linux.
Installation should not take more than 30 minutes, depending on your internet connection.

For PyTorch, please see [the PyTorch website for installation instructions].

A CUDA-capable GPU is not needed but very strongly recommended, especially for training.

If you get errors from MONAI regarding missing readers, please see [MONAI's optional dependencies] page for instructions on getting the readers required by your images.

## Quick demo

After installation, you can run the plugin by running:

napari

and launching the plugin from the Plugins menu.
You may use the test volume in the `examples` folder to test the inference and review tools.
This should run in far less than five minutes on a modern computer.

You may also find a demo Colab notebook in the `notebooks` folder.

## Issues

**Help us make the code better by reporting issues and adding your feature requests!**
Expand Down Expand Up @@ -134,7 +143,7 @@ Distributed under the terms of the [MIT] license.

[napari-hub]: https://www.napari-hub.org/plugins/napari-cellseg3d

[file an issue]: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
[file an issue]: https://github.com/AdaptiveMotorControlLab/CellSeg3D/issues
[napari]: https://github.com/napari/napari
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[@napari]: https://github.com/napari
Expand All @@ -143,7 +152,7 @@ Distributed under the terms of the [MIT] license.
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
[PyPI]: https://pypi.org/
[Installation page]: https://adaptivemotorcontrollab.github.io/CellSeg3d/source/guides/installation_guide.html
[Installation page]: https://adaptivemotorcontrollab.github.io/CellSeg3D/source/guides/installation_guide.html
[the PyTorch website for installation instructions]: https://pytorch.org/get-started/locally/
[PyTorch]: https://pytorch.org/get-started/locally/
[MONAI's optional dependencies]: https://docs.monai.io/en/stable/installation.html#installing-the-recommended-dependencies
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
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bibtex_bibfiles:

# Information about where the book exists on the web
repository:
url: https://github.com/AdaptiveMotorControlLab/CellSeg3d # Online location of your book
url: https://github.com/AdaptiveMotorControlLab/CellSeg3D # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/guides/custom_model_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ To add a custom model, you will need a **.py** file with the following structure
.. note::
**WIP** : Currently you must modify :doc:`model_framework.py <../code/_autosummary/napari_cellseg3d.code_models.model_framework>` as well : import your model class and add it to the ``model_dict`` attribute

.. _file an issue: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
.. _file an issue: https://github.com/AdaptiveMotorControlLab/CellSeg3D/issues
9 changes: 7 additions & 2 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 Expand Up @@ -202,7 +207,7 @@ To visualise some of the results when running on a folder, you can leave the **V
.. note::
Too plot your results, check out the `provided notebooks`_

.. _provided notebooks: https://github.com/AdaptiveMotorControlLab/CellSeg3d/tree/main/notebooks
.. _provided notebooks: https://github.com/AdaptiveMotorControlLab/CellSeg3D/tree/main/notebooks


You can then launch inference and the results will be saved in your specified folder.
Expand Down Expand Up @@ -266,6 +271,6 @@ for the plots to work.
Example of the plot present in the notebooks.
Coordinates are based on centroids, the size represents the volume, the color, and the sphericity.

.. _notebooks folder of the repository: https://github.com/AdaptiveMotorControlLab/CellSeg3d/tree/main/notebooks
.. _notebooks folder of the repository: https://github.com/AdaptiveMotorControlLab/CellSeg3D/tree/main/notebooks

With this complete, you can repeat the workflow as needed.
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
Loading

0 comments on commit d86c908

Please sign in to comment.