Skip to content

Commit 993d4be

Browse files
Update documentation WIP
1 parent def8f55 commit 993d4be

File tree

4 files changed

+84
-9
lines changed

4 files changed

+84
-9
lines changed

doc/documentation.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CochleaNet
2+
3+
CochleaNet is a software tool for the analysis of cochleae imaged in light-sheet microscopy.
4+
Its main components are:
5+
- A deep neural network for segmenting spiral ganglion neurons (SGNs) from parvalbumin (PV) staining.
6+
- A deep neural network for segmenting inner hair cells (IHCs) from VGlut3 staining.
7+
- A deep neural network for detecting ribbon synapses from CtBP2 staining.
8+
9+
In addition, it contains functionality for different kinds of measurements based on network predictions, including:
10+
- Analyzing the tonotopic mapping of SGNs and IHCs in the cochlea.
11+
- Validating gene therapies and optogentic therapies (based on additional fluorescent stainings).
12+
- Analyzing SGN subtypes (based on additional fluorescent staining).
13+
- Visualizing segmentation results and derived analysis in [MoBIE](https://mobie.github.io/).
14+
15+
The networks and analysis methods were primarily developed for high-resolution isotropic data from a [custom light-sheet microscope](https://www.biorxiv.org/content/10.1101/2025.02.21.639411v2.abstract).
16+
The networks will work best on the respective fluorescent stains they were trained on, but will work on similar stains. For example, we have successfully applied the network for SGN segmentation on a calretinin (CR) stain and the network for IHC segmentation on a myosin7a stain.
17+
In addition, CochleaNet provides networks for the segmentation of SGNs and IHCs in anisotropic data from a [commercial light-sheet microscope](https://www.miltenyibiotec.com/DE-en/products/macs-imaging-and-spatial-biology/ultramicroscope-platform.html).
18+
19+
For more information on CochleaNet, check out our [preprint](TODO).
20+
21+
## Installation
22+
23+
CochleaNet can be installed via `conda` (or [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html)).
24+
To install it:
25+
- Download the CochleaNet github repository:
26+
```
27+
git clone https://github.com/computational-cell-analytics/cochlea-net
28+
```
29+
- Go to the directory:
30+
```
31+
cd cochlea-net
32+
```
33+
- Create an environment with the required dependencies:
34+
```
35+
conda env create -f environment.yaml
36+
```
37+
- Activate the environment:
38+
```
39+
conda activate cochlea-net
40+
```
41+
- Install the cochlea-net package:
42+
```
43+
pip install .
44+
```
45+
- (Optional): if you want to use the napari plugin you have to install napari:
46+
```
47+
conda install -c conda-forge napari pyqt
48+
```
49+
50+
## Usage
51+
52+
### Napari Plugin
53+
54+
### Command Line Interface
55+
56+
### Available Models
57+
58+
### Python Library

environment.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
name: flamingo
1+
name: cochlea-net
22

33
channels:
44
- conda-forge
55

66
dependencies:
77
- cluster_tools
88
- scikit-image
9+
- pip
910
- pooch
1011
- pybdv
1112
- pytorch
1213
- s3fs
1314
- torch_em
1415
- trimesh
1516
- z5py
16-
# Don't install zarr v3, as we are not sure that it is compatible with MoBIE etc. yet
17+
# Don't install zarr v3, which is not yet compatible with all dependencies.
1718
- zarr <3

flamingo_tools/model_utils.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,15 @@ def get_model_registry() -> None:
6060
"SGN": "3058690b49015d6210a8e8414eb341c34189fee660b8fac438f1fdc41bdfff98",
6161
"IHC": "89afbcca08ed302aa6dfbaba5bf2530fc13339c05a604b6f2551d97cf5f12774",
6262
"Synapses": "2a42712b056f082b4794f15cf41b15678aab0bec1acc922ff9f0dc76abe6747e",
63-
# TODO
64-
# "SGN-lowres": "",
65-
# "IHC-lowres": "",
63+
"SGN-lowres": "6accba4b4c65158fccf25623dcd0fb3b14203305d033a0d443a307114ec5dd8c",
64+
"IHC-lowres": "537f1d4afc5a582771b87adeccadfa5635e1defd13636702363992188ef5bdbd",
6665
}
6766
urls = {
6867
"SGN": "https://owncloud.gwdg.de/index.php/s/NZ2vv7hxX1imITG/download",
6968
"IHC": "https://owncloud.gwdg.de/index.php/s/GBBJkPQFraz1ZzU/download",
7069
"Synapses": "https://owncloud.gwdg.de/index.php/s/A9W5NmOeBxiyZgY/download",
71-
# TODO
72-
# "SGN-lowres": "",
73-
# "IHC-lowres": "",
70+
"SGN-lowres": "https://owncloud.gwdg.de/index.php/s/8hwZjBVzkuYhHLm/download",
71+
"IHC-lowres": "https://owncloud.gwdg.de/index.php/s/EhnV4brhpvFbSsy/download",
7472
}
7573
cache_dir = get_cache_dir()
7674
models = pooch.create(

flamingo_tools/test_data.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def create_image_data_and_segmentation(folder: str, size: int = 256) -> Tuple[st
7474
return image_path, segmentation_path, table_path
7575

7676

77-
# TODO add metadata
77+
# TODO add flamingo metadata
7878
def create_test_data(root: str, size: int = 256, n_channels: int = 2, n_tiles: int = 4) -> None:
7979
"""Create test data in the flamingo data format.
8080
@@ -100,11 +100,15 @@ def _sample_registry():
100100
"PV": "https://owncloud.gwdg.de/index.php/s/JVZCOpkILT70sdv/download",
101101
"VGlut3": "https://owncloud.gwdg.de/index.php/s/LvGXh0xQR9IKvNk/download",
102102
"CTBP2": "https://owncloud.gwdg.de/index.php/s/qaffCaF1sGpqlT3/download",
103+
"PV-lowres": "",
104+
"IHC-lowres": "",
103105
}
104106
registry = {
105107
"PV": "fbf50cc9119f2dd2bd4dac7d76b746b7d42cab33b94b21f8df304478dd51e632",
106108
"VGlut3": "6a3af6ffce3d06588ffdc73df356ac64b83b53aaf6aabeabd49ef6d11d927e20",
107109
"CTBP2": "8dcd5f1ebb35194f328788594e275f2452de0e28c85073578dac7100d83c45fc",
110+
"PV-lowres": "",
111+
"IHC-lowres": "",
108112
}
109113
cache_dir = get_cache_dir()
110114
data_registry = pooch.create(
@@ -135,3 +139,17 @@ def sample_data_ctbp2():
135139
data = imageio.imread(data_path, extension=".tif")
136140
add_image_kwargs = {"name": "CTBP2", "colormap": "gray"}
137141
return [(data, add_image_kwargs)]
142+
143+
144+
def sample_data_pv_lowres():
145+
data_path = _sample_registry().fetch("PV-lowres")
146+
data = imageio.imread(data_path, extension=".tif")
147+
add_image_kwargs = {"name": "PV-lowres", "colormap": "gray"}
148+
return [(data, add_image_kwargs)]
149+
150+
151+
def sample_data_ihc_lowres():
152+
data_path = _sample_registry().fetch("IHC-lowres")
153+
data = imageio.imread(data_path, extension=".tif")
154+
add_image_kwargs = {"name": "IHC-lowres", "colormap": "gray"}
155+
return [(data, add_image_kwargs)]

0 commit comments

Comments
 (0)