UAT 362 Unmanned Aircraft Systems Technology for Industrial, Energy and Infrastructure Applications

Worksheet 4 Evaluating an anomaly detection model

Analysis activity 12 hAssesses CLO2, CLO3

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

  1. Prepare a labelled test set separate from the training set
  2. Run the detector and record TP, FP and FN at no fewer than three thresholds
  3. Use Example 1 to compute precision, recall and F1 and choose a threshold with cost and safety reasons
  4. Sample frames from real video with Example 2 and check for gaps
  5. Write a report separating what is seen, what is hidden and what is still unknown

Record of results

Table 1 Detector results at different thresholds
ThresholdTPFPFNPrecision and recallF1
Table 2 Frame sampling from video
Along-track footprint (m)Required overlapSpeed (m/s)Interval between frames (s)Use one in every N framesGaps found
Model evaluation report: what is seen, what is hidden and what is still unknown

Questions

  1. 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.

  2. 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?

  3. 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?

  4. 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?

  5. 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

CLO2 Use optical, thermal and LiDAR sensing to detect deterioration. CLO3 Assess risk and report inspections. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack