Predict
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.
Args
-
input_dir: string, path to the input directory.
-
output_dir: string, path to the output directory.
-
verbose: bool.
Attributes
-
extensions: list of accepted image extensions.
-
img_ls: list of image files in input_dir.
Methods
- 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.
__init__
def __init__(input_dir, output_dir, verbose)
get_predictions
def get_predictions(model, weights_path)
Runs the prediction.