topaz.protocols.protocol_topaz_training module

class topaz.protocols.protocol_topaz_training.TopazProtTraining(**args)[source]

Bases: pwem.protocols.protocol_particles_picking.ProtParticlePicking, topaz.protocols.protocol_base.ProtTopazBase

Train and save a Topaz model

ADD_MODEL_TRAIN_MODEL = 1
ADD_MODEL_TRAIN_NEW = 0
ADD_MODEL_TRAIN_TYPES = ['New', 'TopazModel']
convertInputStep(inputCoordinates, scale, kfold)[source]

Converts a set of coordinates to box files and binaries to mrc if needed. It generates 2 folders 1 for the box files and another for the mrc files.

createOutputStep()[source]

Register the output model.

denoiseStep()[source]
getNNModelFn()[source]

Returns the model fn (or type) as expected from topaz software

getPickingFileName(micList, key)[source]
preprocessStep()[source]

Downsamples the micrographs with a factor determined by the scale parameter and normalize them with the per-micrograph scaled Gaussian mixture model

trainingStep(radius, enc, numEpochs, modelFit, method, numParts, extra)[source]

Train the model with the provided parameters and the previously preprocessed micrograph images and the provided input coordinates.