Template matching

From Dynamo
Jump to navigation Jump to search

Template consist in using an object of interest by systematically comparing it against a tomogram to identify the positions and orientations of copies of that object in the tomogram. This procedure can be seen either as an approach for particle picking or even segmentation. In Dynamo this is done either with the dynamo_match function or directly through the dtmslice GUI.

Basic concepts

In this technique, a template representing an object of interest is systematically cross-correlated against a tomogram, producing a cross-correlation map of the tomogram. Each pixel in this map represents a score assigned the corresponding pixel in the tomogram map. This score measures the similarity of the neighbourhood of the tomogram pixel to the used template. This similarity is measured exclusively inside a mask.

Once this cross-correlation map has been computed, local maxima can be identified to select the positions and orientations of the found particles in the tomogram.

In summary, Dynamo allows users to compute these cross-correlation map in multiple ways:

  • Basic template matching: this is the simplest way to use template matching in Dynamo
  • Template matching by GUI: Dynamo provides a GUI to use template matching in a interactive way.
  • Model-aware template matching: this mode allows users to improve the speed and quality of the procedure by including additional prior informations on the geometry (i.e. model) of the sample to guide template matching.
  • On-the-fly modus: in this modus, a tilt series is given as input instead of a tomogram and sections are reconstructed on-the-fly.
  • Single chunk modus: this modus allow for the parallel inspection of single specific region of the tomogram (the so-called single chunk). Ideal for fine and exhaustive angular searches in a restricted region of the sample.

In all cases, the output will be a Dynamo object that can be used for result inspection, particle extraction and other common output manipulations.

Basic template matching

Basic (non-model-aware) template matching is the simplest way to use template match in Dynamo. In this mode, the template will be cross-correlated against a tomogram with the same set of rotation everywhere. The tomogram may be split into chunks, but this is done only so as not to crowd the memory during computation.

A full walkthrough of template matching in this mode is available.


GUI-based template matching

Template matching can be done in Dynamo directly from the dtmslice GUI with a tomogram as input. It has a tab called Template Matching in the top bar of the GUI. It is through this tab that general attributes, parameters and region of interest for template matching processes can be manipulated. More information on how to use the GUI can be found in the GUI walkthrough. It is also possible to add custom functionalities to the GUI as described in the corresponding tutorial.

Model-aware template matching

Model-aware template matching is meant as an extension of the normal template matching algorithm in Dynamo. As such, all basic commands described in the previous sections are valid in this mode as well.

The main change introduced in model-aware template matching is that the partition of the tomogram in regions of interest (chunks) is meant to be meaningful from the point of view of the tomogram models. This allows for the reduction of needed computation by restricting the angular combinations of the template to be scanned. The description of which chunks are created and their corresponding restricted angular combinations will be called a tessellation policy.

A walkthrough on model-aware template matching is available. Additionally, here template mathcing using on-the-fly reconstructions and single-chunk modus are also described.