Other

项目介绍

arnaublanco/Fluospotter 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Other 许可证,目前获得 3 个 Star、0 次 Fork。

仓库全名
arnaublanco/Fluospotter
开源许可证
Other
Star 数
3

README 摘要

Fluospotter Fluospotter is an end-to-end pipeline designed for nuclei segmentation and puncta detection in fluorescence microscopy images. In short, it offers: Nuclei segmentation: Leveraging a U-Net model, Fluospotter performs 3D segmentation of nuclei, ensuring accurate delineation of their spatial boundaries. Puncta detection: Fluospotter effectively identifies puncta, even in scenarios where puncta may overlap…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Fluospotter 用什么语言开发?

主要使用 Python 编写,采用 Other 许可证,目前有 3 个 Star。

Fluospotter 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 Fluospotter 的源码?

可以直接克隆仓库:git clone https://github.com/arnaublanco/Fluospotter.git,默认分支为 main;安装与运行步骤见仓库 README。

Fluospotter 最近还在维护吗?

仓库最近一次更新为 2024年10月2日,当前没有未关闭的 Issue;Star 数为 3,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Fluospotter is an end-to-end pipeline designed for nuclei segmentation and puncta detection in fluorescence microscopy images.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Python

贡献者

README

Fluospotter

Logo of Fluospotter

Fluospotter is an end-to-end pipeline designed for nuclei segmentation and puncta detection in fluorescence microscopy images. In short, it offers:

  • Nuclei segmentation: Leveraging a U-Net model, Fluospotter performs 3D segmentation of nuclei, ensuring accurate delineation of their spatial boundaries.
  • Puncta detection: Fluospotter effectively identifies puncta, even in scenarios where puncta may overlap.

As a result, Fluospotter offers researchers a powerful tool for in-depth analysis of cellular structures and dynamics in fluorescence microscopy data.

Contents

Overview

In fluorescent microscopy data, detecting diffraction-limited puncta is a common task. Traditionally, these puncta are detected using mathematical operators that rely on manually set parameters from the end-user, making the process complex and tedious. Additionally, for nuclei segmentation, methods like Cellpose or other similar neural networks are commonly employed. However, these approaches can be slow and computationally expensive due to their complexity.

Fluospotter addresses these challenges by automatically finding puncta without the need for human intervention. It achieves precise and efficient puncta detection in fluorescent microscopy images by leveraging a neural network. Moreover, it utilizes a trained U-Net optimized for fast segmentation of cell nuclei.

Segmentation model

Fluospotter uses an nnU-Net architecture, a semantic segmentation method that automatically adapts a U-Net to a given dataset. Traditionally, when faced with a new problem, a tailored solution needs to be manually designed and optimized based on several factors such as volume sizes, class ratio, voxel sizes, among others. However, this is not the case with nnU-Net, as it analyzes the provided training cases and automatically configures a matching U-Net-based segmentation pipeline. The model has been trained on data containing three distinct classes:

  • Class 0 (background): Represents areas outside the nuclei.
  • Class 1 (border): Captures the boundaries of the nuclei, helping to separate touching cells.
  • Class 2 (interior): Represents the inside region of the cell nuclei.

This multi-class segmentation approach allows Fluospotter to accurately delineate the spatial structure of cell nuclei, even in challenging scenarios where cells are closely packed or overlapping. It also enables segmentation with an unknown number of cells, which can later be utilized for instance segmentation.

Annotation example

Annotation example 1

Data example

Data example 1

Annotation example 2

Annotation example 2

Data example 2

Data example 2

For instance segmentation, connected component labels are assigned to the interior regions (class 2) that are fully enclosed by surrounding borders (class 1), ensuring the identification and distinction of individual cells.

Segmentation is performed using a moving window approach to handle the data in smaller chunks, as processing the entire volume at once would be computationally expensive in terms of memory.

Installation

This package is built for Python versions newer than 3.6 and can easily be installed with pip:

pip install fluospotter

Or using:

pip install https://github.com/arnaublanco/Fluospotter.git

Additionally for GPU support, install torch-gpu through pip and with the appropriate CUDA and cuDNN versions matching your GPU setup.

Usage

from fluospotter.models import SegmentationModel
from fluospotter.datasets import Dataset

data = Dataset(data_dir="testing_data")

cfg = {
    "patch_size": "48/256/256",
    "im_size": "105/2014/1024",
    "instance_seg": "True"
}

model = SegmentationModel(configuration=cfg, pretrained="model.pth")
prediction = model.predict(data)

Use your own data

To annotate the data, WebKnossos was employed. It uses AI to automatically detect cells within a bounding box specified by you across each slice, simplifying the annotation process. If the automatic detection is not accurate, the annotations can be easily corrected. While there is an online platform for uploading your data, you can also run WebKnossos locally if you prefer not to share your data.

To use WebKnossos locally, first download docker-compose.yml using the PowerShell on Windows:

Invoke-WebRequest -Uri "https://github.com/scalableminds/webknossos/raw/master/tools/hosting/docker-compose.yml" -OutFile "docker-compose.yml"

On Linux:

curl -o docker-compose.yml https://github.com/scalableminds/webknossos/raw/master/tools/hosting/docker-compose.yml

Next, run Docker and open the command line with administrator privileges and run WebKnossos:

docker-compose up -d

Now you should be able to access WebKnossos in your web browser at http://localhost:9000 to load and annotate your files. To stop the Docker, just type docker-compose down.

Annotation with WebKnossos

The repository contains a detailed README.md and additional documentation for more specific configurations and troubleshooting.

Acknowledgements

This Python library is the result of my Master’s thesis titled “Fluospotter: an end-to-end pipeline for nuclei segmentation and puncta detection in fluorescence microscopy”, from the Computational Biomedical Engineering master’s degree at Universitat Pompeu Fabra in Barcelona, Spain. I would like to thank my supervisors David Castillo and Adrián Galdrán (@agaldran), and the Acuity Spatial Genomics team to make this possible.

License

This project is licensed under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. See the LICENSE file for details.

评论

暂无评论