LEIP Run

leip.run(model: Model, options: RunOptions) RunResults

Run an inference through the specified model.

Parameters
  • model (Model) – Model object.

  • options (RunOptions) – Options that configure the inference run.

Returns

Top classes with their associated confidence score, plus the time it took to run the inference.

Return type

RunResults

class leip.RunOptions(*, test_path: Path, class_names: Path, items: int = 5)

Options for model inference run.

Parameters
  • test_path (Path) –

  • class_names (Path) –

  • items (int) –

Return type

None

class_names: pathlib.Path

The path to the text file specifying the class names.

items: int

The number of top confidence classes to show.

test_path: pathlib.Path

The path to the file to use as input to the inference.

class leip.RunResults(*, inference: list, time: float)

Results of an inference run.

Parameters
  • inference (list) –

  • time (float) –

Return type

None

inference: list

List of top classes and their confidence scores.

time: float

The time it took to run the inference.