Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool to compute tracking metrics #11

Merged
merged 10 commits into from
Apr 4, 2024
Merged

Tool to compute tracking metrics #11

merged 10 commits into from
Apr 4, 2024

Conversation

tinevez
Copy link
Member

@tinevez tinevez commented Apr 4, 2024

Right now the Helper computes the tracking metrics, but only within an optimization loop, sweeping over many tracking parameters. But I received two requests for a UI that simply computes the metrics, given a ground-truth and a test file.

This PR introduces a new plugin that does that:
Screenshot 2024-04-04 at 15 29 36

The UI resembles the Helper's:
Screenshot 2024-04-04 at 15 29 58

The user needs to specific a ground-truth (GT) path, and the path to a TrackMate file or a folder containing TrackMate files.
(Note: you can drag-and-drop files and folders onto the text field if you do not want to click the 'Browse' buttons.)

The GT path must be a folder for the CTC metrics.
For the SPT metrics, it can be a XML following the ISBI SPT challenge format, or directly a TrackMate file (which is handy).
The input can be a path to a TrackMate file, or to a folder in which all the TrackMate files will be tested against the GT.

The plugin shows results in the IJ log:
Screenshot 2024-04-04 at 15 34 02

And saves them to a CSV file with possible one line per file in the folder.
Screenshot 2024-04-04 at 15 35 30

Could be improved. A default string could be used instead of the empty
string because this will be used to generated the CSV results file.
A bit clumsy and the retrofit really shows.
When used in the Helper:

- An abstract method does the computation and return the metrics.
- A method in the mother class calls this method and takes care of
saving the results to a CSV file.

This diminishes slightly duplicated code, allows lowering visibility
of some methods in MetricsRunner,  but will also allow using the
runners just to compute metrics oustide of the helper.

Also for SPT runner: the units is specified at construction. Nevermind
if we cannot get it right, it is just for display.
@tinevez tinevez merged commit 80dbf07 into master Apr 4, 2024
1 check passed
@tinevez tinevez deleted the compute-metrics-plugin branch April 4, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant