base mixin class for prediction

tefla.core.prediction.PredictSession (weights_from, gpu_memory_fraction=None)

Args

  • weights_from: path to the weights file
  • gpu_memory_fraction: fraction of gpu memory to use, if not cpu prediction

One crop Predictor, it predict network out put from a single crop of an input image

tefla.core.prediction.OneCropPredictor (model, cnf, weights_from, prediction_iterator)

Args

  • model: model definition file
  • cnf: prediction configs
  • weights_from: location of the model weights file
  • prediction_iterator: iterator to access and augment the data for prediction
  • gpu_memory_fraction: fraction of gpu memory to use, if not cpu prediction

Quasi transform predictor

tefla.core.prediction.QuasiPredictor (model, cnf, weights_from, prediction_iterator, number_of_transforms)

Args

  • model: model definition file
  • cnf: prediction configs
  • weights_from: location of the model weights file
  • prediction_iterator: iterator to access and augment the data for prediction
  • number_of_transform: number of determinastic augmentaions to be performed on the input data resulted predictions are averaged over the augmentated transformation prediction outputs
  • gpu_memory_fraction: fraction of gpu memory to use, if not cpu prediction

Multiples non Data augmented crops predictor

tefla.core.prediction.CropPredictor (model, cnf, weights_from, prediction_iterator, im_size, crop_size)

Args

  • model: model definition file
  • cnf: prediction configs
  • weights_from: location of the model weights file
  • prediction_iterator: iterator to access and augment the data for prediction
  • crop_size: crop size for network input
  • im_size: original image size
  • number_of_crops: total number of crops to extract from the input image
  • gpu_memory_fraction: fraction of gpu memory to use, if not cpu prediction

Returns predcitions from multiples models

tefla.core.prediction.EnsemblePredictor (predictors)

Ensembled predictions from multiples models using ensemble type

Args

  • predictors: predictor instances

Methods

predict (X, ensemble_type='mean')

Args
  • X: 4D tensor, inputs
  • ensemble_type: operation to combine models probabilitiesavailable type: ['mean', 'gmean', 'log_mean']