A simple napari plugin to use CoTracker for tracking !
![]() |
![]() |
We make use of CoTracker, which can be obviously shorten to cot, and it's the version 3, therefore cotcotcot!
Plus, look at this cute chicken above !
After installing napari-cotcotcot.
- Type in your terminal :
naparicot
... to start napari with the plugin already open
(CoTracker3 model should be downlaod the first time, it might take some time, please check your terminal to see progress)
-
Go to
File > Open Sample > CoTracker sample (cotcotcot)
...to get and an example image to test

-
Click on the
Track Selected Seed Layerbutton to start processing and get new layers!
-
Add one more seed layer
...and add seed points (at least 2 , definig start and end of the tracking)

-
Change tracked shape specifications (reactangle/disk , size, number of points inside)

-
Use the
Track All Seed Layersbutton. (or select the layer to track in the drop-down menu and use theTrack Selected Seed Layerbutton to avoid recomputing the first track)
Finally, one can use :
- the
Export Animated GIFbutton - Select a layer of interest and use
File > Save Selected Layers...to export coordinates of the center of the tracked-shape.
We recommend using pixi ( but similar python environment should be buildable using conda)
pixi init cotcotcot
cd cotcotcot
Using a text editor replace the content of the pixi.toml file with
[workspace]
authors = ["romainGuiet <[email protected]>"]
channels = ["conda-forge"]
name = "cotcotcot"
platforms = ["win-64"]
version = "0.1.0"
[system-requirements]
cuda = "12.0"
[dependencies]
pytorch-gpu = "*"
napari = "*"
pyqt = "*"
tifffile = "*"
[pypi-dependencies]
cotracker = { git = "https://github.com/facebookresearch/co-tracker.git"}
napari-cotcotcot = { git = "https://github.com/BIOP/napari-cotcotcot.git"}
then proceed with the installation using
pixi install
You're done!
You can install napari-cotcotcot via pip:
pip install napari-cotcotcot
If napari is not already installed, you can install napari-cotcotcot with napari and Qt via:
pip install "napari-cotcotcot[all]"
If you're using Windows, you can use (or modify to fit your insatallation) the cotcotcot.bat and the official cotcotcot icon.
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "napari-cotcotcot" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.
This napari plugin was generated with copier using the napari-plugin-template


