UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS
Worksheet 13 A baseline for classification, detection and segmentation
Objective
Build a classical baseline and evaluate it with precision, recall, IoU and the tolerant metric, with the group's decision table
Equipment and materials
- At least 20 real images of a concrete surface or wall
- Computer with Python, OpenCV and scikit-learn
- The module 13 example code
Safety
- Mainly desk work; no flying
- Keep images showing faces or number plates out of the dataset
Steps
- Cut at least 200 patches of 128 × 128 pixels, label two classes and split by source image
- Extract features, train logistic regression and report accuracy against always answering 'normal', with the confusion table
- Choose the threshold on the validation set, report the test result and explain the difference
- Detect a repeated object with a template; report precision and recall at IoU 0.5 and test light and scale
- Label crack masks by hand on five images, run black-hat and report strict Dice and the 2-pixel tolerant metric
- Write a 5-method by 5-criterion decision table and find the weight at which the result flips
Record of results
| Probability threshold | Recall | Precision | False alarms per panel | Set used (validation/test) |
|---|---|---|---|---|
| Situation | Threshold | TP | FP | FN | Precision / recall |
|---|---|---|---|---|---|
| Method or image | IoU | Dice | Precision, 2 px tolerance | Recall, 2 px tolerance | Weighted score |
|---|---|---|---|---|---|
Questions
How far is your classifier's accuracy from always answering 'normal', and why must the false-alarm rate be converted into a count per panel?
How did the threshold chosen on validation behave on the test set, and why?
Why does TM_CCOEFF_NORMED tolerate light changes but not scale changes, and what did you base the scale range on?
If the crack Dice equals that of a perfect answer shifted by 1 px, should you conclude the method is weak?
In your decision table, which weight had to change by how much for the result to flip, and what does that say about the choice?
Check before you hand in
What to hand in
- Confusion table and the chosen threshold
- Template-matching precision and recall table
- Table of the two segmentation metrics
- Decision table with sensitivity analysis