CoolFace
Modelpublic

fedeceri/cochlea-hair-cell-binary-segmentation-unet2d

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes
Model Card

Cochlear Inner Hair Cell Binary Segmentation

![GitHub](https://github.com/fedeceri85/cochlea-hair-cell-binary-segmentation-unet2d)

MONAI/PyTorch implementation of a 2D U-Net for binary semantic segmentation of fluorescent cochlear hair cells in single-channel two-photon microscopy TIFF images. This model segments 2-photon fluorescence microscopy images containing fluorescently-labelled hair cells in the cochlea. The model is trained to segment fluorescently-labelled inner hair cells (mostly GCaMP6) in the neonatal cochlea from in-vivo 2-photon imaging experiments (Paper). The original segmentation was performed with Cellpose and manually revised in napari.

As a result, the algorithm performs better than Cellpose in ignoring cells different from inner hair cells, such as outer hair cells or supporting cells, and in "blurry" in-vivo experiments. [image] [image]

Model

  • Input: single-channel 2D TIFF image
  • Output: binary mask (0 = background, 1 = hair cell), with optional watershed instance labels (0 = background, 1..N = individual cells)
  • Architecture: MONAI model defined in config.yml
  • Config: config.yml
  • Weights: best_model_binary_v1.pth

Use

Run inference on a TIFF image:

bash
python infer_binary.py input_Avg.tif --output prediction_mask.tif

The script loads config.yml and the model path configured in model.best_model_path.

To output watershed-separated instance labels instead of a binary mask:

bash
python infer_binary.py input_Avg.tif --output-type labels --output prediction_labels.tif

To save both outputs:

bash
python infer_binary.py input_Avg.tif --output-type both --output prediction_mask.tif --labels-output prediction_labels.tif

Training Data

The model was trained on a microscopy dataset acquired as part of the paper In vivo spontaneous Ca2+ activity in the pre-hearing mammalian cochlea by De Faveri F., Ceriani F. and Marcotti W. The training dataset consisted of two-photon fluorescence images of GCaMP-labelled cochlear hair cells together with manually curated binary segmentation masks.

Evaluation

text
Validation Dice:0.787

Limitations

  • Trained on mouse cochlear two-photon microscopy.
  • Expected to perform best on images acquired under similar imaging conditions.
  • Not evaluated on other microscopy modalities or species.
  • Research use only.

Code

Training and inference code: https://github.com/fedeceri85/cochlea-hair-cell-binary-segmentation-unet2d