Rebalance 2D classes sometimes assigns zero particles to each class


In using the Rebalance 2D classes job in the 2.16 beta, initially it worked fine and as expected. however in other similar runs, it just assigns zero particles to each class for no reason I can figure out. I have 300k particles, and matching templates from the same Select 2D job, and I have selected 10 superclasses with the default rebalancing factor of 0.1. Thoughts? I notice that it says the “maximum superclass size is set at zero particles”, this seems like a problem…


Hi @olibclarke,

Thanks for reporting this, we will look into it! A question:

  • Were the templates and particles generated from the same 2D classification job, followed immediately by a Select 2D job?

The job relies on all particles in the particle stack being assigned to one of the templates present in the templates dataset, through a correspondence between the particles alignments2D/class field and the template idx. It looks like the templates are getting recognized correctly, since each of the 47 templates are properly assigned to a superclass.

But, the corresponding particles don’t all seem to be recognized. The 300k particles are loaded in at the start, but the sum of the particles assigned to each superclass is only around 136k – initially this should add up to the total number of loaded particles. The expected behaviour is that first all particles corresponding to a given superclass will be counted (in the “There are x templates in superclass y; Adding z particles to superclass y” lines in the stream log), and removal happens only after the maximum superclass size is set.

Yes, they were all from the same Select 2D job (Job 51), which was from a single 2D classification job, Job 36.

It would also be good if there was an option to manually select (or edit) the superclasses… the spectral clustering mostly works very well, but occasionally makes visually obvious errors that I don’t have a way to correct.

Thanks for the suggestion – we will also add this to the list of improvements to rebalance 2D classes!

Best regards,

i have the same issue here. template are nicely recognised but there are no particle selected at the end.