Skip to content

Code implementation of the detection network capable of dealing with many overlapping spline bodies.

License

Notifications You must be signed in to change notification settings

kirkegaardlab/deeptangle

Repository files navigation

de(ep)tangle

Communications Biology arXiv

This repository contains the implementation of Fast detection of slender bodies in high density microscopy data paper.

Installation

To run the code one must first install the dependencies. You can do this in a virtual environment:

python3 -m venv venv
source venv/bin/activate

Start by installing jax following instructions at their repository. Install the remaining dependencies afterwards:

pip install -r requirements.txt

If you need to use the model and the auxiliary functions outside this repository, you can install it from the root folder by

pip install -e .

Train

To train the model, there is a train script used for the model presented in the paper. The possible arguments can be seen by using the help flag.

python3 train.py --help

An example of a training run would be

python3 train.py --batch_size=32 --eval_interval=10 --nworms=100,200 --save

Usage

Example scripts such as detection and tracking can be found in the examples folder

We include a Dockerfile (cpu only). For linux we provide a script to run the relevant commands:

(sudo) sh docker_run.sh

Weights

The weights used in the paper can be downloaded from here or by using the following commmand

wget https://sid.erda.dk/share_redirect/cEjIpG1yQl -O weights.zip