UAT 362 Unmanned Aircraft Systems Technology for Industrial, Energy and Infrastructure Applications
Worksheet 4 Evaluating an anomaly detection model
Objective
Evaluate a detector on a held-out test set, choose a threshold with reasons and report image limits
Equipment and materials
- Specialist-labelled test images
- A detector (for example from UAT 322)
- Real inspection video
- Python and the module 4 example code
- Lab notebook
Safety
- Computer lab work only; no flying
- Do not share images of others' assets outside class
Steps
- Prepare a labelled test set separate from the training set
- Run the detector and record TP, FP and FN at no fewer than three thresholds
- Use Example 1 to compute precision, recall and F1 and choose a threshold with cost and safety reasons
- Sample frames from real video with Example 2 and check for gaps
- Write a report separating what is seen, what is hidden and what is still unknown
Record of results
| Threshold | TP | FP | FN | Precision and recall | F1 |
|---|---|---|---|---|---|
| Along-track footprint (m) | Required overlap | Speed (m/s) | Interval between frames (s) | Use one in every N frames | Gaps found |
|---|---|---|---|---|---|
Questions
Which threshold did your group choose, and why? Explain using the misses and false alarms in Table 1 and the cost of missing one defect.
If the test set had many normal candidates (for example 2000), what would the accuracy be for your detector and for a model that answers "normal" every time? What does this show?
If the pilot flew faster than planned but you kept the frame step in Table 2, how much overlap would remain, and what would that do to the analysis?
Why must the test set be separate from the training set? If the same images were used, could the numbers in Table 1 be trusted?
Give one item from your report that is "hidden" or "still unknown" and explain why not seen in the image does not mean absent.
Check before you hand in
What to hand in
- TP, FP, FN and metrics table
- Chosen threshold with reasons
- Frame sampling result
- Model evaluation report