Experiment module
Experiments are the main building blocks of the toolkit.
They are used to evaluate trackers on sequences in various ways.
- class vot.experiment.Experiment(_identifier: str, _storage: Storage, **kwargs)
Experiment abstract base class.
Each experiment is responsible for running a tracker on a sequence and storing results into dedicated storage.
- abstract execute(tracker: Tracker, sequence: Sequence, force: bool = False, callback: Callable = None)
Execute the experiment for a given tracker and sequence.
- property identifier: str
Identifier of the experiment.
- Returns
Identifier of the experiment
- Return type
str
- log(identifier: str)
Get a log file for the experiment.
- Parameters
identifier (str) – Identifier of the log
- Returns
Path to the log file
- Return type
str
- results(tracker: Tracker, sequence: Sequence) Results
Get results for a given tracker and sequence.
- property storage: Storage
Storage to use for storing results. Can be None if the experiment is not supposed to store results.
- Returns
Storage to use for storing results
- Return type
Storage
- transform(sequences)
Transform a list of sequences using the experiment transformers.
- class vot.experiment.InjectConfig(*args, **kwargs)
Config proxy for parameter injection in experiments.
- class vot.experiment.NoiseConfig(*args, **kwargs)
Config proxy for noise modifiers in experiments.
- class vot.experiment.RealtimeConfig(*args, **kwargs)
Config proxy for real-time experiment.
- vot.experiment.analysis_resolver(typename, context, **kwargs)
Resolve an analysis from a string. If the analysis is not registered, it is imported as a class and instantiated with the provided arguments.
- Parameters
typename (str) – Name of the analysis
context (Attributee) – Context of the resolver
- Returns
Resolved analysis
- Return type
- vot.experiment.run_experiment(experiment: Experiment, tracker: Tracker, sequences: List[Sequence], force: bool = False, persist: bool = False)
A helper function that performs a given experiment with a given tracker on a list of sequences.
- Parameters
experiment (Experiment) – The experiment object
tracker (Tracker) – The tracker object
sequences (List[Sequence]) – List of sequences.
force (bool, optional) – Ignore the cached results, rerun all the experiments. Defaults to False.
persist (bool, optional) – Continue runing even if exceptions were raised. Defaults to False.
- Raises
TrackerException – If the experiment is interrupted
- vot.experiment.transformer_resolver(typename, context, **kwargs)
Resolve a transformer from a string. If the transformer is not registered, it is imported as a class and instantiated with the provided arguments.
- Parameters
typename (str) – Name of the transformer
context (Attributee) – Context of the resolver
- Returns
Resolved transformer
- Return type
Transformer