UAT 306 Artificial Intelligence for UAS
Worksheet 4 Training and evaluating a detector
Objective
Train an object detector by transfer learning, compute AP yourself against the tool and analyse errors
Equipment and materials
- Computer with a GPU or a cloud notebook
- A small YOLO model (e.g. Ultralytics)
- Dataset from worksheet 3
- Module 4 example code
Safety
- Desk work only; no flying
- For cloud training, upload only data that you are permitted to upload
Steps
- In class: compute feature-map sizes of the first three layers with Example 2
- In class: start training a detector on the module 3 dataset by transfer learning
- Self-study: finish training and keep the training log and model weights
- In class: export validation predictions and compute AP@0.5 with Example 3
- Self-study: compare AP with the tool and explain the difference
- In class: vary NMS IoU and confidence threshold; observe precision and recall
- Self-study: review wrong predictions one by one and group their causes
Record of results
| Layer | Input size (px) | k, s, p | Output size (px) | Channels in → out | Parameters |
|---|---|---|---|---|---|
| NMS IoU | Confidence threshold | Precision | Recall | AP@0.5 own | AP@0.5 tool |
|---|---|---|---|---|---|
| Cause group | False alarm (FP) or miss (FN) | Images | Example image no. | Possible fix |
|---|---|---|---|---|
Questions
How far is your own AP@0.5 from the value reported by the tool? Explain where the difference can come from.
As the confidence threshold rises, how do precision and recall in Table 2 change? For screening where misses cost far more than false alarms (Module 1), which setting would you choose?
If NMS IoU is set very high, such as 0.95, what happens to duplicate boxes and how does AP change?
What is the largest cause group in Table 3, and what data or labels would fix it (link to Module 3)?
Check before you hand in
What to hand in
- Layer-size table
- Training log and model weights
- AP from both sources
- Effect of IoU and threshold
- Grouped error causes