Skip to contents

yolo_error_analysis() decomposes object detection errors into six mutually exclusive canonical categories following the TIDE framework (Bolya et al., ECCV 2020). Comparing predictions against ground-truth annotations across validation or test splits, it pinpoints the exact bottlenecks of a model:

  1. Classification Error (Cls): The object was localized accurately (\(\text{IoU} \ge 0.50\)), but classified into the wrong category.

  2. Localization Error (Loc): The object class was predicted correctly, but bounding box alignment was inaccurate (\(0.10 \le \text{IoU} < 0.50\)).

  3. Both Classification & Localization Error (Both): Both class was wrong and localization was inaccurate (\(0.10 \le \text{IoU} < 0.50\)).

  4. Duplicate Detection Error (Dup): Non-Maximum Suppression (NMS) failed to suppress a redundant candidate detection on an already matched ground-truth object (\(\text{IoU} \ge 0.50\)).

  5. Background Error (Bkg): The model hallucinated an object on pure background with no nearby ground-truth entity (\(\text{IoU} < 0.10\)).

  6. Missed Ground Truth (Miss): A true object in the field was completely overlooked by the detector (pure false negative, \(\text{IoU} < 0.10\) against all predictions of the same class).

Usage

yolo_error_analysis(
  test_res = NULL,
  model = NULL,
  data = NULL,
  split = "test",
  iou_thresh = 0.5,
  bg_thresh = 0.1,
  plot = TRUE,
  verbose = TRUE,
  ...
)

yolo_tide_analysis(
  test_res = NULL,
  model = NULL,
  data = NULL,
  split = "test",
  iou_thresh = 0.5,
  bg_thresh = 0.1,
  plot = TRUE,
  verbose = TRUE,
  ...
)

Arguments

test_res

An object of class yolo_test (returned by yolo_test()), or NULL if evaluating directly with model and data.

model

A trained model identifier or path (.onnx or .pt). Used if test_res is NULL.

data

Path to the YOLO dataset root directory. Used if test_res is NULL.

split

Character string. Dataset split to evaluate: "test" (default), "val", or "train".

iou_thresh

Numeric. IoU threshold for correct object localization. Defaults to 0.50.

bg_thresh

Numeric. Background IoU threshold. Detections with \(\text{IoU} < \text{bg\_thresh}\) against all ground-truth objects are considered pure background hallucinations. Defaults to 0.10.

plot

Logical. Whether to automatically render the error decomposition bar chart. Defaults to TRUE.

verbose

Logical. Whether to display formatted progress and summary tables. Defaults to TRUE.

...

Additional arguments forwarded to yolo_test() if test_res is NULL.

Value

An S3 object of class c("yolo_error_analysis", "list") containing:

  • summary: A data.frame with the 6 error categories, count of occurrences, percentage of all errors, and descriptions.

  • by_class: A data.frame of error counts and percentages broken down by object class.

  • errors: A detailed data.frame listing every individual error with image name, bounding box coordinates, error type, and score.

  • metrics: A list of summary benchmark numbers (Total GT, Total Pred, TP, FP, FN, Precision, Recall).

References

Bolya, D., Foley, S., Hays, J., & Hoffman, J. (2020). TIDE: A general toolbox for identifying object detection errors. European Conference on Computer Vision (ECCV), pp. 558-573.