Optimization - jeanollion/bacmman GitHub Wiki

The optimization framework is designed to test several sets of object class configuration at once.

Define Runs

A run is a set of configuration for one or several object class. To create a run, from the Configuration Test tab, set the parameter for an object class, right-click on the processing pipeline parameter and choose Optimization: save to > new run...

This can be done with several object classes. For the following object classes choose the name of the run in the Optimization menu. One configuration block will be saved for each object class for a given run.

Run optimization

Set measurements that will allow to compare different runs. Right-click in the Tasks to execute panel in the Home tab and choose Optimization > Select Runs > Items and select the runs to execute. Right-click again and choose Optimization > Add Optimization task. This will append a task in the task list. Right-click again and choose Run all tasks. For each selected run, this will execute processing (segment and track) for all the object classes that have a configuration in the run, then execute measurements and export them in the folder of the run. This folder is located in the Optimization sub-folder of the dataset.

Analyze the data

The pyBacmman library allows to directly import data from all the executed runs using the following commands (change /data/DatasetName for the path of the dataset):

from pybacmman.dataset import DatasetList, Dataset
dsl  = DatasetList(path = "/data/DatasetName/Optimization", config_path="/data/DatasetName/")
print(dsl)

Reload the run

After deciding which configuration block is the best, one can reload it in the configuration. From the Configuration Test tab, right-click on the processing pipeline parameter and choose Optimization: load from and select the name of the run. This has to be done for each object class.