ToolJoltTools

Image Classification (binary) — Confusion Matrix & Metrics Calculator

Compute accuracy, precision, recall, F1, specificity, MCC and more for image classification (binary) from TP/FP/FN/TN counts.

Accuracy (%)
Precision (%)
Recall (sensitivity) (%)
F1 score
Specificity (%)
Matthews corr. (MCC)

For a one-vs-rest image classifier, precision and recall describe how cleanly the model isolates the target class from everything else. This calculator gives the per-class metrics you'd average into the top-1 and mean-AP figures vision papers report.

Formula

precision = TP/(TP+FP) · recall = TP/(TP+FN) · F1 = 2PR/(P+R) · specificity = TN/(TN+FP) · MCC = (TP·TN−FP·FN)/√((TP+FP)(TP+FN)(TN+FP)(TN+FN))
References: Matthews (1975), Comparison of predicted and observed secondary structure (MCC); Powers (2011), Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness & Correlation

Disclaimer: This tool is for general informational and estimation purposes only and is not professional financial, tax, accounting or legal advice. All figures are estimates — verify with a qualified professional before making decisions. Read the full disclaimer.

About Image Classification (binary) — Confusion Matrix & Metrics Calculator

For a one-vs-rest image classifier, precision and recall describe how cleanly the model isolates the target class from everything else. This calculator gives the per-class metrics you'd average into the top-1 and mean-AP figures vision papers report. Enter the four confusion-matrix counts and this calculator returns every standard metric — accuracy, precision, recall (sensitivity), F1, specificity and the Matthews correlation coefficient — recomputed live. MCC is highlighted because it is the most honest single number for imbalanced problems: it only scores high when the model does well across all four quadrants, unlike accuracy or F1 which can be gamed.

How to use Image Classification (binary) — Confusion Matrix & Metrics Calculator

  1. 1Enter your values into Image Classification (binary) — Confusion Matrix & Metrics Calculator — sensible, domain-typical defaults are pre-filled so you see a real result immediately.
  2. 2The result recomputes live using the formula shown on the page; there is no button to press.
  3. 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.

Why use Image Classification (binary) — Confusion Matrix & Metrics Calculator?

  • Computes Image Classification (binary) instantly in your browser — no sign-up, no upload, no server round-trip.
  • 100% free and unlimited, with the exact formula shown: precision = TP/(TP+FP).
  • Runs entirely client-side, so every value you enter stays private on your device.
  • Live recompute as you type, with a worked example and authoritative references for trust.

Frequently asked questions

How do binary metrics relate to top-1 accuracy?+

Multi-class top-1 accuracy is the fraction of images whose argmax is correct. Per-class precision/recall (this tool, one-vs-rest) diagnose WHICH classes drag accuracy down — a 90% top-1 model often has a few classes with 50% recall hiding in the average.

What is mean Average Precision (mAP)?+

mAP averages the area under each class's precision-recall curve. It's the standard for detection and retrieval because it summarizes performance across all thresholds per class, then across classes — far more informative than accuracy at one operating point.

Why is MCC considered the most reliable single metric?+

MCC uses all four confusion-matrix cells and behaves like a correlation coefficient (−1 to +1): it is high only when predictions track reality across both classes. On imbalanced data where accuracy and even F1 can mislead, MCC stays informative — which is why it's increasingly the recommended summary statistic.

What's the difference between recall and specificity?+

Recall (sensitivity) is the fraction of actual target class cases the model catches — TP/(TP+FN). Specificity is the fraction of actual other cases it correctly clears — TN/(TN+FP). A model can have high recall and low specificity (flags everything) or vice versa; you need both to judge it.

Related tools

Related ML & AI tools

Sponsored