# Interactive Cell Tracking with Napari Track Edit *September 2026 - Napari Track Edit v1.\* - Caroline Malin-Mayor - Teun Huijben - Anniek Stokkermans* [`Napari Track Edit`](https://www.Napari-hub.org/plugins/motile-tracker) is a Napari plugin for interactive visualization, navigation, and editing of object tracking results. You can open and edit existing tracking data, manually create new tracking results, or run automatic tracking via the Napari Track Edit integration, which offers object tracking using the [`motile`](https://funkelab.github.io/motile/) library. This tutorial will walk you through the main functionalities. You can find the full documentation [`here`](https://liveimagetrackingtools.org/napari-track-edit/). ## Preparations ### Installation You can install the plugin via `pypi` in the environment of you choice (e.g. `venv`, `conda`) with the command `pip install napari-track-edit`. Currently, this requires python >=3.11. For example, to create a new environment with conda: ``` conda create -n napari_track_edit python=3.12 conda activate napari_track_edit pip install "napari-track-edit[all]" ``` ### Verify installation of the plugin If your installation was successful, you should be able to start `napari` from the terminal and find 'Napari Track Edit' under `Plugins`. Please go to `Plugins > Napari Track Edit > Open all widgets` to check if the start up screen looks like this:
1. Go to the Getting Started widget and open one of the two examples. Also open the Lineage View and Table widgets.
2. Inspect the tracks in the Napari Viewer, the Lineage View, and in the Table widget. You can click in any of these views to select and center nodes and use scroll to zoom in to specific regions. Use right-mouse click to reset the Lineage View.
3. Try selecting multiple nodes with SHIFT+CLICK or SHIFT+DRAG (in the Lineage View and Points layer, with the 'select points'-tool active).
4. Open the Editing & Selection widget and look at the 'Selection' section. Test the buttons and keyboard shortcuts to clear, restore, and cycle through selections.
5. Hover over nodes in the Lineage View and inspect the information you can read there. What is the difference between a Track and a Lineage?
6. Open the Visualization tab and switch the Display Mode to 'Lineage'. What happens to the labels? Try the different sliders for 'highlight', 'foreground', and 'background' opacity, do you understand what they each refer to? What happens if you set the 'contour' value to 1 in the layer controls (top left menu)?
7. Open the Lineage View controls and set the display mode to 'Current lineage(s)', and change your selection by clicking on different nodes in the Viewer. Try out the arrow buttons or arrow keys to move up or down the tree or to jump to neighboring nodes.
8. If you had loaded the 3D example, go back to the Visualization widget, and activate the orthogonal views. Try out the settings in the OrthoView control widget. Press T to center all views on your mouse cursor. You can also do this for the 2D example, but you will see the time axis in the ortho views instead.
Labels layer or object detections on a Points layer. Tracking parameters should be specified in the Tracking > Track with Motile tab and are subdivided in hyperparameters, constant costs and attribute weights.
Hovering over each of the parameters will display a tooltip, and more extensive information can be found in the documentation.
Once the parameters are set, you can start the solver by clicking Run Tracking.
After the solve is complete, you can find the Tracking Result in the Tracks List tab.
Tracking Results will accumulate here for each set of parameters that you tried.
1. Go to the Tracks List tab first, and clear the example tracks by clicking on the trash can icon.
2. Go to File > Open Sample > Napari Track Edit > Fluo-N2DL-HeLa crop (2D) to open the 2D HeLa cell test dataset
3. Hide the segmentation '01_ST' and 'centroids' layers for now, but select 01_raw and go to the Tracking > Track from Scratch. Select 01_raw from the dropdown menu, and click Track with Points. A new Points layer is generated, and you should see a new element in the Results list: 01_raw_manual_tracks. Select the Add points tool in the top left corner of the layer controls, and click on one of the nuclei in the viewer. Go to the next time point, and click again. You should see a growing lineage tree at the bottom of your screen. What happens if you add multiple points in the same time point? Try to build three small lineages.
4. To compute tracks automatically, go to the Tracking tab, and choose parameters for tracking. Use '01_ST' as input layer. You can consult the
documentation to help you decide on the different values. Click Run Tracking to start the computation. After the solver has finished, you should see that the Lineage View is now populated with tracks and that the cells are relabeled.
5. Click Back to editing and test multiple combinations of parameters. Note that you can also use the Points layer 'centroids' as input. Compare the different tracking results by clicking on the different entries in the Tracks List widget.
Lineage View. The Feature widget displays a list of size, shape, and intensity features that you can activate. All activated features will appear as columns in the Table widget and in the 'Feature' dropdown menu in the Lineage View controls. To display a feature, activate the 'Feature' radio button and select a feature from the list.
Groups tab you can create groups of nodes that you want to store to review later, for example because these are of particular interest, need to be corrected, or belong to a specific object/cell type. You can add or remove individual nodes, entire tracks, or entire lineages. You can also select all nodes in a group or export them.
1. Open the Features widget and activate one or multiple features. Note that this is only possible if you are currently viewing a tracking result that has an associated Labels layer, because most features, like size, cannot be computed for Points. Switch to 'Feature' in the Lineage View controls and display a feature of your choice. You may want to switch to viewing selected lineages to make the plot less crowded.
2. Verify that you can also find these measurements back in the Table widget. Try deactivating and activating different features and check the measurements in the table.
3. Open the Groups widget and make a new group. Sort the Table widget by Area (or Volume) by clicking on the header and select the top 10 rows and add these nodes to a group. Verify that you can always go back to select the nodes in this group by clicking on the mouse pointer button.
4. Create another group and test the 'edit group' buttons. Verify that you can restrict the display to the nodes in the group by changing the display mode to 'group' in the Visualization widget.
Editing & Selection tab or their corresponding keyboard shortcuts, or by editing the Napari Points and Segmentation layers directly. To undo/redo an action, click Undo/Redo in the menu or press Z/ R. Find out more in documentation.
1. Open the Editing & Selection widget.
2. Select one or multiple nodes, and use the Delete button or press D to delete them. What happens if you:
You can undo your actions by pressing Z or with the Undo button.
3. Go to the Segmentation layer ('_seg') and activate the paint brush. Press M to select a new label. Paint a new node and observe the Lineage View. Then move to the next time point and paint with the same color again. Observe that a new track is created as you are painting.
4. Select a new node and display the object size in the Lineage View. Then paint or erase part of it in the Segmentation layer. Observe how this affects the object size and the centroid location.
5. Select two connected nodes and use the Break button or press B to break the connection. What happens to the two fragments?
6. Select two nodes and try to create an edge between them with the Connect button or by pressing C. Try to answer these questions:
7. Select two nodes in the same time point in the Napari Viewer, and press S to swap the predecessors of those nodes, assigning them to each other's tracklet IDs. Does the tree view change?
8. Select two nodes in the same time point, and press H to merge them into one node with the Tracklet ID of your choice.
9. Select a trio of nodes: two at the same time point and one at the time point before, and press Y to set a division here. Press Y again to break the division.
Tracks List tab. This will save the parameters and the tracking data to the displayed destination. You can load your results back in at the bottom of the Tracks List tab by loading a Motile Run and selecting the folder. In addition, Napari Track Edit allows you to import and export the results from/to csv and geff via the dropdown menu at the bottom and the export (middle) button in the Results List.
1. Go to the Tracks List tab.
2. Select a save directory on your computer via the Browse button, and click the save button to save the tracks.
3. Click the trash can icon to delete the tracks from the list.
4. At the bottom of the Tracks List tab, choose Motile Run from the dropdown menu to load your saved tracks back into the plugin.
5. Export your tracking results to csv with the export button in the Results List (next to the save and trash buttons). You will be asked whether to include saving the segmentation (as-is or relabeled by tracklet ID).
7. At the bottom of the Tracks List tab, choose External Tracks from CSV from the dropdown menu to load the results back from the csv file. If you have a segmentation image, you must provide a segmentation id, which corresponds to the label value for each node in the segmentation image (if you exported with 'Relabel segmentation by Track ID', this value should be set to Tracklet ID).
8. Export your tracking result to geff. Note that the segmentation data is included in the geff, so you do not need to save it separately.
9. Load the geff via External Tracks from geff.
10. Go to the Groups widget, and export a group to csv and inspect the file. Which nodes are included when you load it back in?
Thank you for participating in the workshop!