Skip to main content

YoloV8 model for the detection of Tau fibrils in EM images.

Project description

EPFL Center for Imaging logo

🧬 Tau Fibrils Yolo - Object detection in EM images

screenshot

We provide a YoloV8 model for the detection of oriented bounding boxes (OBBs) of Tau fibrils in EM images.

[Installation] [Model] [Usage] [Training]

This project is part of a collaboration between the EPFL Center for Imaging and the Laboratory of Biological Electron Microscopy.

Installation

As a standalone app

Download and run the latest installer from the Releases page.

As a Python package

We recommend performing the installation in a clean Python environment. Install our package from PyPi:

pip install tau-fibrils-yolo

or from the repository:

pip install git+https://gitlab.com/center-for-imaging/tau-fibrils-object-detection.git

or clone the repository and install with:

git clone https://github.com/EPFL-Center-for-Imaging/tau-fibrils-yolo.git
cd tau-fibrils-yolo
pip install -e .

Model

The model weights (6.5 Mb) are automatically downloaded from this repository on Zenodo the first time you run inference. The model files are saved in the user home folder in the .yolo directory.

Usage

In Napari

To use our model in Napari, start the viewer with

napari -w tau-fibrils-yolo

or open the Napari menu bar and select Plugins > Tau fibrils detection.

Open an image using File > Open files or drag-and-drop an image into the viewer window.

Sample data: To test the model, you can run it on our provided sample image. In Napari, open the image from File > Open Sample > [TODO - add a sample image].

As a library

You can run the model to detect fibrils in an image (represented as a numpy array).

from tau_fibrils_yolo import FibrilsDetector

detector = FibrilsDetector()

boxes, probabilities = detector.predict(your_image)

As a CLI

Run inference on an image from the command-line. For example:

tau_fibrils_predict_image -i /path/to/folder/image_001.tif

The command will save the segmentation next to the image:

folder/
    ├── image_001.tif
    ├── image_001_results.csv

Optionally, you can use the -r flag to also rescale the image by a given factor.

To run inference in batch on all images in a folder, use:

tau_fibrils_predict_folder -i /path/to/folder/

This will produce:

folder/
    ├── image_001.tif
    ├── image_001_results.csv
    ├── image_002.tif
    ├── image_002_results.csv

Training

The instructions for training the model can be found here.

Issues

If you encounter any problems, please file an issue along with a detailed description.

License

This project is licensed under the AGPL-3 license.

This project depends on the ultralytics package which is licensed under AGPL-3.

Acknowledgements

We would particularly like to thank Valentin Vuillon for annotating the images on which this model was trained, and for developing the preliminary code that laid the foundation for this image analysis project. The repository containing his original version of the project can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tau_fibrils_yolo-0.0.6.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

tau_fibrils_yolo-0.0.6-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file tau_fibrils_yolo-0.0.6.tar.gz.

File metadata

  • Download URL: tau_fibrils_yolo-0.0.6.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for tau_fibrils_yolo-0.0.6.tar.gz
Algorithm Hash digest
SHA256 04d30ecb1a53d1fbf54b569c6b29df0b7e2808dd8ef765784f77d86f0863ce31
MD5 454777c0c2228e3cc1e59523f77d4cd0
BLAKE2b-256 60e49648e7486b3f3ee8684303b8125e743a874cb35f4551a14309592dd1dbea

See more details on using hashes here.

File details

Details for the file tau_fibrils_yolo-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for tau_fibrils_yolo-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e89cac65165d616aa0abc1fccab8aa102b79713faf15bc4cc354d08ac2bf1b37
MD5 0feddbadb2835317da8675dd614398bf
BLAKE2b-256 5b9caee1d0d6e55befacce9ca6934987a64265582e4f55f43a2c438a6557942d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page