Skip to contents

yolo_results() loads, inspects, and plots diagnostics, training metrics, loss curves, confusion matrices, and precision-recall graphs for a trained YOLO model.

It supports models trained locally with yolo_train() or yolo_train_workflow(), as well as training runs downloaded from Google Colab, cloud VMs, or external directories.

You can pass:

  • A model name (e.g. "capsulas_det", "model_capsulas").

  • A direct path to an external results folder (e.g. "runs/detect/train", "capsulas_small_results", or downloaded from Colab).

  • A direct path to a .zip archive containing the downloaded training results (automatically extracted).

Usage

yolo_results(model = NULL, results_dir = NULL, output_dir = NULL)

Arguments

model

A model name, a direct path to a results directory, or path to a results .zip archive. Can be omitted if results_dir is explicitly supplied.

results_dir

Optional direct path to the training results folder. If model is already a directory or .zip path, this is inferred automatically.

output_dir

Base directory to search for trained models. Defaults to pliman_model_dir().

Value

An object of class c("yolo_train", "list").

Examples

if (FALSE) { # interactive()
library(pliman)

# 1. Inspect a model by name
res <- yolo_results("capsulas_det")

# 2. Inspect a folder downloaded from Google Colab
res_colab <- yolo_results("capsulas_small_results")

# 3. Inspect a .zip archive directly
res_zip <- yolo_results("capsulas_small_results.zip")

# Plot diagnostic dashboard
plot(res)
plot(res, which = "confusion_matrix")
plot(res, which = "pr_curve")
}