Checking image quality and reading AI metrics
Separate images that cannot yet be judged, practise precision and recall with hypothetical data, and explain the limits of the evaluation results
G05 · Core lesson, 60 minutes · Computer-based practice
Separate images that cannot yet be judged, practise precision and recall with hypothetical data, and explain the limits of the evaluation results
Goals and preparation
Core lesson G05 takes 60 minutes: reading 15, checking images by case 15, calculating 20 and summarising 10 minutes. Use a spreadsheet or Python 3.10 or later. The goal is to explain false positives/false negatives and to choose metrics that reflect the consequences of errors.
An unclear image is not the same as no object
Before evaluating, look at sharpness, occlusion, lighting, object size and viewing angle. If the quality is not sufficient for a reviewer to decide, the image should be separated as “cannot be evaluated” with a reason, not forced into “no object”, because that would change the reference answer without evidence.
In the worksheet G05-image-review.csv there are descriptions of three image cases; decide whether each can be used to answer the question “Is there an orange equipment box in the image?”. These cases are synthetic descriptions, not a real test image set. The realistic image at the top of the lesson is only a conceptual illustration.
Count in the unit being evaluated
This round uses one answer per image on whether there is a box; it is not a measure of object-detection bounding-box accuracy. Once reviewed reference answers are available:
- TP: actually present and the system says present
- FP: actually absent but the system says present; this may lead to sending people to check unnecessarily
- FN: actually present but the system says absent; this may cause something that needs checking to be missed
- TN: actually absent and the system says absent
precision = TP / (TP + FP) answers how many of the reported detections are correct, while recall = TP / (TP + FN) answers how many of the objects actually present are found. If the denominator is zero, report that there is no basis for calculation in that set; do not make it up as 100%.
Evaluating real bounding boxes additionally requires defining box matching, object classes and overlap criteria such as IoU, so the score from this worksheet is not called the mAP of a detector.
Try two settings
Open G05-predictions.csv ; it contains 10 hypothetical images with truth and the results of two settings pred_low, pred_high . A value of 1 means an object is present and 0 means absent. Count TP, FP, FN and TN separately for each column before looking at the answers.
If using Python, open a terminal in the extracted ZIP folder; on Windows run py -3 metrics.py or on Linux run python3 metrics.py . The program reads the CSV next to the script file and prints JSON. It does not install packages, train a model or send data externally.
Discussion question: a setting that misses less may raise more false alarms. How many items can the team review, and how do the consequences of misses and false alarms differ? Choose with reasons based on the task, not simply the higher score. The numbers in the two columns are constructed examples and do not guarantee that every model will behave the same when the threshold is adjusted.
Submit a metric brief and check the results
Submit the two count tables, formulas/results, your choice with reasons, and at least three limitations, such as only 10 hypothetical images, no timing measurements and no testing in a new area.
Criteria: counting/formulas 35, consequence analysis 30, quality and evaluation unit 20, limitations 15. The target is 75/100, and this score must not be claimed as the result of a detector ready to be mounted on a drone. If latency must be measured in later work, clearly define the start–end time, machine, model version, warm-up and whether preprocessing is included.
Further reading and bibliography
- Tools for practising confidence and metrics
- Computer Vision and Edge AI
- scikit-learn developers. (n.d.). Metrics and scoring, Precision, recall and F-measures. Used for definitions of classification metrics
- NIST. (2023). AI RMF 1.0. Used to support reporting of context and limitations
Retrieved 8 September B.E. 2569 (2026). The images, exercises, numbers and criteria were created by the project for learning; there are no training results or field tests in this lesson.