Skip to content

Instantly share code, notes, and snippets.

@jacobmarks
Last active November 9, 2022 22:56
Show Gist options
  • Save jacobmarks/92428fa4ecf7a35bb01def3c44a89c52 to your computer and use it in GitHub Desktop.
Save jacobmarks/92428fa4ecf7a35bb01def3c44a89c52 to your computer and use it in GitHub Desktop.
multi-class detection task evaluation
results = dataset.evaluate_detections(
"predictions",
gt_field="ground_truth",
eval_key="eval",
compute_mAP=True,
)
# Get the 10 most common classes in the dataset
counts = dataset.count_values("ground_truth.detections.label")
classes_top10 = sorted(counts, key=counts.get, reverse=True)[:10]
# Print a classification report for the top-10 classes
results.print_report(classes=classes_top10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment