Skip to content


class Predictor

The predictor class handles prediction, given an input model.

Loads the images in the input directory, executes training given a model and saves the results in the output directory. Can receive a path for the weights or can let the user browse through the weights directory for the desired weights.

  • input_dir: string, path to the input directory.

  • output_dir: string, path to the output directory.

  • verbose: bool.

  • extensions: list of accepted image extensions.

  • img_ls: list of image files in input_dir.

  • get_predictions: given a model and a string containing the weights' path, runs the predictions on the images contained in the input directory and stores the results in the output directory.


def __init__(input_dir, output_dir, verbose)


def get_predictions(model, weights_path)

Runs the prediction.