Skip to content

Commit

Permalink
Merge pull request #31 from volume-em/v1.1
Browse files Browse the repository at this point in the history
V1.1 release
  • Loading branch information
abhishek-bhardwaj-IN authored Mar 13, 2024
2 parents a0571b4 + 0c4bf88 commit 6b3e7bf
Show file tree
Hide file tree
Showing 17 changed files with 1,275 additions and 117 deletions.
160 changes: 160 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
71 changes: 56 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# empanada-napari

**The preprint describing this work is now available [on bioRxiv](https://www.biorxiv.org/content/10.1101/2022.03.17.484806v1).**
> [!IMPORTANT]
> **New Version Announcement!**
> * New modules
> * Morph labels - applies morphological operations to labels
> * Count labels - counts and lists the label IDs within the dataset
> * Filter labels - removes small pixel/voxel area labels or labels touching the image boundaries
> * Export and import a model - export or import locally saved model files to use within empanada-napari
> * Updated modules
> * Export segmentations - now allows 3D segmentations to be exported as a single .tiff image
> * Pick and save finetune/training patches - now allows paired grayscale and label mask images to create training patches
> * Split label - now allows users to specify new label IDs
> * Updated documentation
> * Check out the updated documentation [here](https://empanada.readthedocs.io/en/latest/index.html)!
**The paper describing this work is now available [on Cell Systems](https://www.cell.com/cell-systems/fulltext/S2405-4712(22)00494-X).**

**Documentation for the plugin, including more detailed installation instructions, can be found [here](https://empanada.readthedocs.io/en/latest/empanada-napari.html).**

[empanada](https://github.com/volume-em/empanada) is a tool for deep learning-based panoptic segmentation of 2D and 3D electron microscopy images of cells.
empanada is a tool for deep learning-based panoptic segmentation of 2D and 3D electron microscopy images of cells.
This plugin allows the running of panoptic segmentation models trained in empanada within [napari](https://napari.org).
For help with this plugin please open an [issue](https://github.com/volume-em/empanada-napari/issues), for issues with napari specifically
raise an [issue here instead](https://github.com/napari/napari/issues).
Expand All @@ -20,11 +34,17 @@ Volume EM datasets for benchmarking mitochondrial instance segmentation are avai

## Installation

It's recommended to have installed napari through [conda](https://docs.conda.io/en/latest/miniconda.html).
Then to install this plugin:
### New Users

If you've previously installed and used conda, it's recommended (but optional) to create a new virtual
environment in order to avoid dependency conflicts.

empanada-napari works with python=3.9 or lower

It's recommended to have installed napari through [conda](https://docs.conda.io/en/latest/miniconda.html). Then to install this plugin:

```shell
pip install empanada-napari
pip install empanada-napari==1.1.0
```

Launch napari:
Expand All @@ -35,6 +55,23 @@ napari

Look for empanada-napari under the "Plugins" menu.


### Returning Users

If you installed napari into a virtual environment as suggested in the original release documentation,
be sure to activate it and uninstall the old empanada-napari.

```shell
pip uninstall empanada-napari
```

Then install the newest version:

```shell
pip install empanada-napari==1.1.0
```


![empanada](images/demo.gif)

## GPU Support
Expand Down Expand Up @@ -75,15 +112,19 @@ conda install pytorch cudatoolkit=11.3 -c pytorch
If you use results generated by this plugin in a publication, please cite:

```bibtex
@article {Conrad2022.03.17.484806,
author = {Conrad, Ryan and Narayan, Kedar},
title = {Instance segmentation of mitochondria in electron microscopy images with a generalist deep learning model},
elocation-id = {2022.03.17.484806},
year = {2022},
doi = {10.1101/2022.03.17.484806},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2022/03/18/2022.03.17.484806},
eprint = {https://www.biorxiv.org/content/early/2022/03/18/2022.03.17.484806.full.pdf},
journal = {bioRxiv}
@article { Conrad2023,
author = {Conrad, Ryan and Narayan, Kedar},
title = {Instance segmentation of mitochondria in electron microscopy images with a generalist deep learning model trained on a diverse dataset},
journal = {Cell Systems},
year = {2023},
month = {Jan},
day = {18},
publisher = {Elsevier},
volume = {14},
number = {1},
pages = {58-71.e5},
issn = {2405-4712},
doi = {10.1016/j.cels.2022.12.006},
url = {https://doi.org/10.1016/j.cels.2022.12.006}
}
```
4 changes: 3 additions & 1 deletion empanada_napari/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
find_next_available_label_widget
)
from ._export_batch_segs import export_batch_segs_widget
from ._label_counter_widget import label_counter_widget

__all__ = [
'slice_dock_widget',
Expand All @@ -31,5 +32,6 @@
'morph_labels_widget',
'jump_to_label_widget',
'find_next_available_label_widget',
'export_batch_segs_widget'
'export_batch_segs_widget',
'label_counter_widget'
]
Loading

0 comments on commit 6b3e7bf

Please sign in to comment.