Show binarized classes when recenter_mask_binary is true [feature request]

Hi,

The recenter_mask_binary parameter in 2D classification, when combined with the recenter_mask_threshold parameter, are useful for obtaining well-centered 2D classes, which is important for template picking.

As I understand it, what these parameters do is binarize the 2D class at a certain fraction of the maximum density, and use that for recentering, rather than using a grayscale-weighted average.

At present, the default threshold is 0.2, but it’s difficult to see what this means, as there is no way to visualize this threshold on the 2D classes.

Would it be possible, if this parameter is set to true, to output the binarized classes which are used for recentering? This would be useful to judge what threshold to use.

Alternatively/additionally, it would be useful to have an option to recenter classes when they are used for template picking (perhaps recentering after low-pass filtering and binarizing).

Cheers
Oli

1 Like

Bumping this as I run into it a bit - would it be possible just to show thresholded versions of say the top 5 or 10 classes in the log file if “recenter mask binary” is set to true? It would help to gauge what parameter to use for the threshold, to assist recentering.

This has now been implemented in 4.1 and is very handy, thank you @team!! :grinning_face_with_smiling_eyes:

Inspecting the output, it’s clear that in some cases, a couple of modifications could help improve recentering:

  1. Dust removal (just take largest single thresholded area), to remove e.g. overfitting streaks, adjacent contaminant/micelle particles from the mask used for recentering;
  2. Hole filling. Similiar as for 3D masks - fill holes. Useful for particles that have hollow areas that may be asymmetrically distributed.

Maybe these might be worth considering for a future version? :pray:

Cheers
Oli

1 Like