Skip to main content

napari plugin for annotating tracks to estimate error rates

Project description

annotrack

Annotrack is a napari plugin for annotating errors in object trajectories. The plugin will help you take a sample of track segments along with a small section of corresponding image and segmentation. Annotrack allows you to annotate three types of errors: (1) ID swap errors (track jumps between objects), (2) false starts (track starts on a pre-existing object) and false terminations (track ends but object still exists). By looking at the combined rates of false starts and false terminations you can assess track discontinutation errors.

Please note: Images and segmentations must be in zarr format. Tracks should be in parquet format.

Installation

There are three main ways to install annotrack:

Install Using pip

Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

pip install napari annotrack

Install

Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

pip install napari
napari

Once napari has opened (this may take a second the first time you open it), go to the pannel at the top of the screen and select the 'plugins' dropdown. Then select install/uninstall plugins. A new window will open showing available plugins. Either scroll down to or search 'annotrack' and click 'install'.

Install from Source Code

please use this for now

Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

git clone <repository https or ssh>
cd annotrack
pip install .

Opening Annotrack

Once annotrack is properly installed you will be able to open annotrack by opening napari. You can open napari through the command line (terminal (MacOS or Ubuntu) or annaconda prompt (windows)) as follows:

napari

You can find the annotrack widgets by selecting the dropdown 'plugins' at the pannel at the top of the screen and hovering over 'annotrack'.

Sample from CSV

To sample your tracks you will need to supply the file paths for the images, segmentations, and tracks.

csv_structure widget

sample_from_csv widget

Annotate Now?

In the case that we are annotating multiple conditions to compare, we want to show them in the one session in randomised order with the annotator blinded to where the sample has originated from. We want to be able to annotated unannotated data from the sample without having the burden of having to do this all at once. The annotations are therefore saved into the saved sample. A selected number of samples saved from the various tracking experiments can be annotated using the following code. If you re-execute this code, you will only be shown not yet annotated data, unless you request otherwise.

Keys to navagate and annotate samples

  • '2' - move to next sample
  • '1' - move to previous sample
  • 'y' - annotate as correct (will move to the next sample automatically)
  • 'n' - annotate as containing an error (will move to the next sample automatically)
  • 'i' - annotate the frame following a ID swap error
  • 't' - annotate the fame following an incorrect termination
  • 'Shift-t' - annotate the frame containing a false start error
  • 's' - annotate an error ('i', 't', or 'Shift-t') as being associated with a segmentation error (merge or split of objects)

When an error is associated the specific frame ('i', 't', 'Shift-t', or 's'), the frame number (within the original image) will be added to a list of errors for the sample within the sample's (.smpl) info data frame. E.g., you may have a list of ID swaps for your sampled track segment ([108, 111, 112]) and a corresponding list of segmentation error associations ([108, 112]).

Annotate Existing Sample

If you have already saved a sample and want to annotate it, you can load the sample data using the annotate_existing_sample widget. This might be useful if you want to have several annotators annotate the same sample. To access this widget, open napari

annotate_existing_sample widget

Contributing and User Support

User support: If you have an issue with annotrack please add an issue (go to the Issues tab at the top of the GitHub page). If your issue is a bug, please include as much information as possible to help debug the problem. Examples of information include: details about the image and segmentation data (dimensions), number of images, number of samples you are trying to take. If you are requesting an improvement, try to be as clear as possible about what you need.

Contributing: If you want to contribute to annotrack, please fork the repo and if you want to make changes make a pull request with as much detail about the change as possible. Please ensure any changes you want to make don't break the existing functions.

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

annotrack-0.0.2.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

annotrack-0.0.2-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file annotrack-0.0.2.tar.gz.

File metadata

  • Download URL: annotrack-0.0.2.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for annotrack-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7fac424926624e46e716c14942e0aa5bfaeb89145dcffded43a4c664c49cb836
MD5 28f494bbe162ac6d591b51fef5e470c0
BLAKE2b-256 8b2ee358a12a9f43ddcd33feefe839dea55b65e69a443d1d5ee3bd7c3a18107e

See more details on using hashes here.

File details

Details for the file annotrack-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: annotrack-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for annotrack-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 243b1122cfe7747300d3665469a8dc80f476cefc3842534c43e4b9045abb5e5f
MD5 b5b3c38ec15bd9cbe54db5d37c97d45a
BLAKE2b-256 b4f6fb4af2d27583c11f26b12c3a22519201d76d943330ea9804ddaa9a5c3243

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