Teaching pack · UAT 306

A 15-week teaching plan, 5 worksheets, a scoring rubric and a map from the course description to the lessons, for instructors to evaluate and adapt before teaching.

Last updated: · 3(3-0-6) · Per week: lecture 3 h, lab 0 h, self-study 6 h; 45 contact hours per term

Coverage of the course description

The lessons fully teach 10 of 10 description topics. Each topic lists the modules and lesson sections that teach it, and incomplete topics say what is missing.

Description topicModulesWhere it is taughtStatus
Artificial intelligence fundamentalsM1Module 1: Types and approaches of AI (Example 1, a hand-written rule versus a threshold learned from data), Framing a measurable problem, and AI supports decisions; it does not make themCovered
Machine learningM1M2Module 1: Types and approaches of AI (supervised, unsupervised and reinforcement learning) · Module 2: logistic regression trained with gradient descent, overfitting and cross-validationCovered
Data preparationM3Module 3: labelling guidelines, splitting by flight while keeping class proportions, and checking the dataset before trainingCovered
ClassificationM1M2Module 1: choosing classification, detection or segmentation, and rare targets · Module 2: separating cracks from stains with logistic regressionCovered
RegressionM2Module 2: Regression with drone flight data (Example 3, hover current and endurance from mass, RMSE, R² and extrapolation) and Overfitting and cross-validation (Example 2)Covered
Neural networksM2M4Module 4: Neurons, layers and backpropagation (Example 1, one step by hand and a hidden-layer network with hand-written backpropagation) and Convolution layers · Module 2: logistic regression as a single neuronCovered
Deep learningM4Module 4: convolution layers, removing duplicates with NMS, and transfer-learning a detector in the labCovered
Model evaluationM1M2M4M5Module 1: precision for rare targets and cost-based thresholds · Module 2: cross-validation · Module 4: precision, recall and AP · Module 5: measuring time correctlyCovered
Use of sensor and image dataM3M4Module 3: Sensor and telemetry data (Example 3, detecting a chipped propeller from IMU vibration, and lab step 6) and the image datasets · Module 4: object detection in imagesCovered
Deployment of models in unmanned aircraft systemsM5Module 5: shrinking the model with INT8 and the deployment plan for the droneCovered

Weekly teaching plan

WeekTopicPre-classLectureLabEvidence
1 M1Types of AI and framing a measurable AI problemRead module 1 on types and approaches of AI and framing a measurable problem; run Example 1Approaches of AI (rules, search, probability, machine learning), EASA AI levels, what users do with AI output, and choosing classification, detection or segmentationIn class: choose an inspection job as a group, write what users will do with the AI output and pick the problem type · Self-study: Worksheet 1 part A, write the one-page problem statementOne-page problem statement
2 M1When the target is rareRead the rare-target section; run Example 2Prevalence, precision and why a good detector can raise many false alarmsIn class: estimate real prevalence and compute expected precision with Example 2 · Self-study: Worksheet 1 part B, write the precision calculation for the chosen job with its assumptionsPrecision calculation with assumptions
3 M1Cost-based thresholds and the limits of AI decisionsRead the threshold and decision-support sections; run Example 3; take the module 1 quizCost of misses versus false alarms, and what humans must checkIn class: agree the cost ratio of misses to false alarms and pick the lowest-cost threshold with Example 3 · Self-study: Worksheet 1 part C, write the AI's decision boundary and finish the Worksheet 1 reportWorksheet 1 report and quiz result
4 M2Logistic regressionRead module 2 on logistic regression; run Example 1Sigmoid, cross-entropy loss and gradient descentIn class: run Example 1 with learning rates 0.01, 0.5 and 100 and watch the loss · Self-study: Worksheet 2 part A, plot the three loss curves and explain the differencesThree loss curves
5 M2Hand-written model versus a libraryReview Example 1; read the scikit-learn LogisticRegression docsAccuracy and weight direction of the hand-written model compared with the libraryIn class: train the same data with scikit-learn LogisticRegression and compare accuracy and the direction of the weights · Self-study: Worksheet 2 part B, make the comparison table against the hand-written modelWeights and accuracy comparison
6 M2Overfitting, cross-validation and regressionRead the overfitting and flight-data regression sections; run Examples 2 and 3; take the module 2 quizTraining versus validation error, choosing complexity, linear regression, RMSE and R², and the danger of predicting outside the data rangeIn class: run Example 2 with degrees 1 to 12, then reduce the data to 15 points · Self-study: Worksheet 2 part C, build the hover-current model from flight logs supplied by the lecturer (or your own) and report RMSE and mass rangeWorksheet 2 short report with the regression RMSE and mass range, and quiz result
7 M3Labelling guidelines and annotator agreementRead module 3 on labelling guidelines; run Example 1Kappa and IoU; guidelines with positive and negative examplesIn class: write a one-page crack guideline in pairs and each person labels the same first 10 images in CVAT to test it · Self-study: Worksheet 3 part A, complete labelling to 50 images and compute first-round kappa and IoUGuideline and first-round kappa and IoU
8 M3Splitting by flight with class balanceRead the splitting section; run Example 2Leakage from random image splits and StratifiedGroupKFoldIn class: revise the guideline where annotators disagree and split by flight with Example 2 · Self-study: Worksheet 3 part B, relabel, remeasure and make the class-proportion tableSecond-round agreement and class-proportion table
9 M3Checking the dataset; midtermRead the sensor and telemetry section; run Example 3; review modules 1–3; take the module 3 quizIMU and telemetry data: windows, physics-based features and splitting by flight (first hour), then the midterm examination (modules 1–3)The midterm takes the class period, so there is no in-class practice · Self-study: Worksheet 3 part C, check the dataset against the minimum list, write the dataset documentation and compute vibration features from an IMU log supplied by the lecturer (or your own)Dataset documentation, vibration-feature table and midterm score
10 M4Neurons, backpropagation and convolution layersRead module 4 on neurons, layers and backpropagation and on convolution layers; run Examples 1 and 2Neurons and activations, the forward and backward passes of backpropagation, feature-map size, parameter count and transfer learningIn class: compute the first three layer sizes with Example 2 and start training a small YOLO on the module 3 data on a GPU or a cloud notebook · Self-study: Worksheet 4 part A, finish training and keep the training logLayer-size table and training log
11 M4NMS, precision, recall and APRead the NMS and AP sections; run Example 3Matching boxes by IoU, the precision-recall curve and AP@0.5In class: export validation predictions and compute AP@0.5 yourself with Example 3 · Self-study: Worksheet 4 part B, compare with the value the tool reports and explain the differenceAP from both sources with explanation of differences
12 M4Error analysis of the detectorReview module 4; take the module 4 quizEffects of NMS IoU and confidence thresholdIn class: vary NMS IoU and confidence threshold and observe precision and recall · Self-study: Worksheet 4 part C, review wrong predictions one by one, group their causes and write the short reportWorksheet 4 short report and quiz result
13 M5Measuring inference time correctlyRead module 5 on timing; run Example 1Warm-up, percentiles and end-to-end timeIn class: time the model on a PC at least 200 runs after warm-up with Example 1 and watch the lecturer demonstrate the same measurement on the lab's onboard computer · Self-study: Worksheet 5 part A, make the table of p50, p95 and maximum for at least two machinesTable of p50, p95 and maximum
14 M5INT8 quantisation and the deployment planRead the INT8 and deployment sections; run Example 2; take the module 5 quizOutliers and INT8 error; acceptance criteria for deploymentIn class: export to ONNX and quantise to INT8 as in Example 2, comparing size and time · Self-study: Worksheet 5 part B, compare AP of FP32 and INT8, measure end-to-end time and write the drone deployment plan with acceptance criteriaFP32 versus INT8 table
15 M5Mini-project presentationsPrepare the drone deployment plan with acceptance criteriaCourse wrap-up and project criteriaThe class period is used to present the AI system from problem framing, dataset and evaluation to the onboard deployment plan · Self-study: revise the report after the commentsMini-project report and presentation, scored with the rubric

Worksheets and instructor guide

One worksheet per module. Students open it on the web, print it or download the .docx. The instructor guide under each worksheet gives the class timing, expected results, discussion questions and notes for students with different backgrounds.

1Worksheet 1 Framing an AI problem for a real job
Analysis activity · About 3 h of class time · CLO1

Objective: Frame a drone inspection AI problem measurably, estimate precision from prevalence and choose a cost-based threshold

Equipment

  • Computer with Python
  • Example code at /downloads/uat-306/

Safety

  • Desk work only; no flying

Steps

  1. In class: choose an inspection job; write what users will do with the AI output
  2. In class: choose classification, detection or segmentation with reasons
  3. In class: estimate the prevalence and compute expected precision with Example 2
  4. In class: agree the cost ratio of misses to false alarms; choose a threshold with Example 3
  5. Self-study: write the one-page problem statement and the precision calculation with assumptions
  6. Self-study: write what the AI may decide and what a person must check

Deliverables

  • One-page problem statement
  • Precision and threshold calculations
  • Decision boundary of the AI

Checklist

  • Table 1 has at least 4 prevalence levels, including the real job's prevalence with its source (Problem framing and data preparation)
  • Table 2 covers all 5 thresholds, states the cost ratio used and circles the threshold with the lowest total cost (Model training and evaluation)
  • The threshold is chosen on the validation set, not the default 0.5 without a reason (Model training and evaluation)
  • The one-page framing states clearly that the AI is a screening tool and the structural safety decision belongs to the engineer (Communication and reporting)

Instructor guide

Class timing 180 min

  1. Objectives and review of the bridge-crack case15 min
  2. Choose the job, write what the user does with the result, choose the problem type40 min
  3. Estimate prevalence and compute precision with Example 2 (Table 1)35 min
  4. Agree the cost ratio and choose a threshold with Example 3 (Table 2)40 min
  5. Write the framing and the AI decision boundary35 min
  6. Wrap-up, questions and hand-in checklist15 min

Expected results

  1. Record: Table 1 Expected precision by prevalence (per 1,000 images)Table 1 (using Example 2 values, sensitivity 0.95, specificity 0.98, per 1,000 images): prevalence 20% gives TP 190.0, FP 16.0, precision 0.92; 10% gives 95.0, 18.0, 0.84; 5% gives 47.5, 19.0, 0.71; 2% gives 19.0, 19.6, 0.49; 1% gives 9.5, 19.8, 0.32. The group's real-job prevalence must fall on the same curve; accept ±0.01 from rounding. The source of the prevalence must be stated (user experience, past inspection reports or a written assumption).
  2. Record: Table 2 Total cost by thresholdTable 2 (Example 3 simulated scores, 1,000 validation images with 60 cracks, ratio 50:1): threshold 0.3 gives 0 missed, 607 false alarms, cost 607; 0.4 gives 0, 363, 363; 0.5 gives 2, 155, 255; 0.6 gives 9, 45, 495; 0.7 gives 26, 11, 1311. The best threshold is 0.5 (recall 0.97, precision 0.27). If the group agreed another ratio, the costs must be recomputed from the same FN and FP counts.
  3. Record: One-page framing: job, what the user does with the result, problem type, cost ratio and the AI's decision boundaryA strong framing has: a clear job and user (for example, screening images for an engineer), the problem type with reasons, the prevalence with its source, the cost ratio the user accepts, the threshold chosen on the validation set, and a boundary saying the AI screens while the engineer decides safety, with what the system must show (confidence, location in the image, model version).
  4. Question 1: At the prevalence of your chosen job (Table 1), out of every 100 crack alerts from the AI, about how many are real cracks, and what does this mean for the workload of the engineer who rechecks them?It depends on the job's prevalence: at 2% about 49 of 100 alerts are real cracks, at 1% about 32, so most alerts are false. The engineer must look at every image the AI flags, but that is still fewer than looking at all images. A strong answer says the detector must be evaluated at the real job's prevalence, not the vendor dataset's.
  5. Question 2: If the user now agrees that one miss costs as much as 10 false alarms (instead of 50), which way does the best threshold in Table 2 move? Explain with numbers.At 10:1 the costs are 607, 363, 175, 135, 271, so the best threshold moves up from 0.5 to 0.6 (135 is below 175): misses are now cheaper, so accepting more misses (9 images) to cut false alarms from 155 to 45 pays off. At 100:1 the threshold stays at 0.5 (cost 355).
  6. Question 3: Why did your group choose this problem type (classification, detection or segmentation)? Link it to what the user will do with the AI output and the labels you would need.A strong answer links the type to the use: if the user only needs to know which images to look at, whole-image classification has the cheapest labels; if the engineer needs the location pointed out, use detection (boxes); if the crack length or area must be measured, use segmentation, which has the most expensive labels.
  7. Question 4: Within your scope, which decisions must always stay with the engineer, and what should the system show or record so that results can be traced?Deciding whether the structure is safe or needs repair always belongs to a qualified engineer; the AI is at the level of assisting a human. The system should show its confidence, mark locations in the image and record the model version used, so that questions can be traced back.

Discussion questions

  • A vendor claims its detector is 99% accurate. What should we ask before believing it?
  • Which drone inspection tasks are better served by hand-written rules than by machine learning, and why?
  • Who should set the cost ratio of misses to false alarms: the AI team or the user?

Adapting to student background

Upper secondary (M.6)
Have them compute one row of PPV by formula on paper before running the code, then explain with a 2×2 table why low prevalence gives low precision.
Vocational certificate
Start by counting real images (for example 1,000 images with 10 cracks: how many caught, how many false alarms) instead of proportions, and fill Table 2 with a calculator alongside the code.
Diploma
Extension: use an inspection job from their own workplace experience, estimate prevalence from that experience and interview one user to find the cost ratio.

Common student mistakes: Common mistakes in the module 1 lesson

2Worksheet 2 Training by hand and comparing with a library
Analysis activity · About 3 h of class time · CLO1, CLO3

Objective: Understand gradient-descent training against a library and use cross-validation to detect underfitting and overfitting, and build a regression model from flight data

Equipment

  • Computer with Python, numpy, scikit-learn and matplotlib
  • Module 2 example code
  • Flight logs with battery current (from the lecturer, or your own if available)

Safety

  • Desk work only; no flying

Steps

  1. In class: run Example 1 with learning rates 0.01, 0.5 and 100; observe the loss
  2. Self-study: plot the three loss curves and explain the differences
  3. In class: train the same data with scikit-learn LogisticRegression; compare accuracy and the direction of the weights
  4. In class: run Example 2 for degrees 1 to 12; plot both error curves
  5. In class: reduce the data to 15 points; see whether the best degree changes
  6. Self-study: replace the data in Example 3 with hover current from flight logs; fit the line and report the leave-one-flight-out RMSE and the mass range
  7. Self-study: summarise how to tell whether a model underfits or overfits

Deliverables

  • Loss curves by learning rate
  • Comparison with scikit-learn
  • Error-by-degree plots for both cases
  • Conclusion on underfitting and overfitting
  • Hover-current model with its RMSE and valid mass range

Checklist

  • Table 1 has all three learning rates and the scikit-learn row, with three labelled loss curves (Model training and evaluation)
  • Table 2 covers degrees 1 to 12 for both cases and circles the degree with the lowest validation RMSE, not training RMSE (Model training and evaluation)
  • Table 3 gives the line equation, R², leave-one-flight-out RMSE and the mass range of the data, all with units (Model training and evaluation)
  • The underfitting and overfitting summary quotes numbers from your own tables and states the source of the flight logs used (Communication and reporting)

Instructor guide

Class timing 180 min

  1. Review of logistic regression and gradient descent10 min
  2. Run Example 1 with three learning rates and plot40 min
  3. Train with scikit-learn and compare weights25 min
  4. Run Example 2 for degrees 1 to 12 with 30 and 15 points45 min
  5. Build the hover-current model from flight logs45 min
  6. Wrap-up, questions and hand-in checklist15 min

Expected results

  1. Record: Table 1 Effect of learning rate and comparison with scikit-learnTable 1 (Example 1 simulated data, 500 iterations): rate 0.01 gives loss 0.665 (iteration 10) and 0.237 (iteration 500), very slow; rate 0.5 gives 0.241 and 0.083 with weights (0.09, 4.25, 3.11); rate 100 gives 0.308 and 0.094 with weights (1.22, 6.18, 4.27). Accuracy is 0.98, 0.98 and 0.975 respectively. Rate 100 is above the ceiling of about 85 (2 divided by the largest curvature, 0.0236), so the loss alternates between 0.092 and 0.094 on every iteration and never falls to the 0.080 that rate 5 reaches (if students also try rate 5 they get 0.096 and 0.080, converging normally). For the scikit-learn row, compare only accuracy, which is the same 0.98, and the direction of the weights: both features positive, with elongation larger than edge strength. The weight sizes need not match the hand-written model (the library's default settings give about 0.06, 2.92, 2.23). The lecturer does not need to ask students to explain the size difference.
  2. Record: Table 2 Error by polynomial degree (5-fold)Table 2 (Example 2 data): with 30 points, degree 1 gives 1.09/1.22, degree 3 gives 0.55/0.61 (lowest validation), degree 9 gives 0.46/0.74, degree 12 gives 0.41/1.69. Reducing to 15 points by keeping every second point, the best degree becomes 2 (0.61/0.78) and the validation RMSE of degree 9 jumps to about 75. The 15-point numbers depend on which points are kept and the random folds; accept them if the best degree stays the same or drops and high degrees clearly get worse.
  3. Record: Table 3 Hover-current model from takeoff massTable 3 (if the lesson's Example 3 data is used because no lab flight logs are available yet): current = -13.2 + 15.52 × mass (A, kg), R² 0.994, training RMSE 0.55 A, leave-one-flight-out RMSE 0.73 A, mass range 2.0 to 3.4 kg; at 3.3 kg it predicts 38.0 A and 12.6 min of hover with 8 Ah usable. With real logs the numbers differ, but the leave-one-flight-out RMSE should exceed the training RMSE and the mass range must be stated.
  4. Question 1: From Table 1 and the three loss curves, which learning rate suits this data best, and what does the loss curve look like when the learning rate is too high?Rate 0.5 suits best: it falls fast and settles. Rate 0.01 is very slow (loss still 0.237 after 500 iterations). Rate 100 is above the ceiling of about 85, so the loss alternates between 0.092 and 0.094 and does not converge; far above it (for example 300) the loss shoots up to 4.9 instead of falling. If students try rate 5 they find it converges, faster than 0.5, because it is below the ceiling. A strong answer also mentions standardising the features.
  5. Question 2: From Table 2, which degree gives the lowest validation RMSE with 30 points and with 15 points? Why does the best degree not increase when there is less data?Degree 3 with 30 points (validation RMSE 0.61), and the same or a lower degree with 15 points (for example 2 at 0.78), because with less data a complex model memorises noise easily: the training RMSE of high degrees approaches 0 while the validation RMSE explodes. So do not increase complexity when data is scarce.
  6. Question 3: Over what mass range is the current model in Table 3 valid? If the team fits a new camera that takes the mass outside that range, what should it do before planning flight times?Only within the mass range of the training data (2.0 to 3.4 kg in the lesson). Outside it, at 4.0 kg, the line predicts 48.8 A and 9.8 min, but the measured current is 50.9 A and 9.4 min, an underestimate of 2.1 A, because hover power grows faster than linearly according to momentum theory. The team must fly hover tests at the new mass and refit the model first.
  7. Question 4: Using your own results, explain how to tell whether a model underfits or overfits, quoting training and validation RMSE.Underfitting is wrong on both sets, for example degree 1 with 1.09 and 1.22; overfitting has low training but high validation error, for example degree 12 with 0.41 and 1.69; a good fit has the lowest validation error close to the training error, for example degree 3 with 0.55 and 0.61. A strong answer uses its own numbers and never uses the test set to choose complexity.

Discussion questions

  • If a library trains a model in a few lines, why must an engineer still understand gradient descent?
  • How does leave-one-flight-out RMSE differ from RMSE on the training data, and which should be reported to a flight planner?
  • Besides hover current, what other quantities in flight logs could be predicted by regression, and how should the data range be handled?

Adapting to student background

Upper secondary (M.6)
Have them compute one weight update by hand from w ← w − η∇L before running the code, and link it to the derivatives they learned at school.
Vocational certificate
Focus on reading graphs before formulas: plot training and validation RMSE on graph paper and point to the minimum, and use real logs from drones they have built or flown.
Diploma
Extension: collect one extra hover log at a mass outside the original range (supervised by the lecturer and following flying rules) and show how far the straight line is off.

Common student mistakes: Common mistakes in the module 2 lesson

3Worksheet 3 A trustworthy dataset
Analysis activity · About 3 h of class time · CLO2

Objective: Write labelling guidelines, measure annotator agreement, split by flight and document the dataset

Equipment

  • Drone images with cracks (from the lecturer)
  • CVAT
  • Python and the module 3 example code or StratifiedGroupKFold
  • One ArduPilot or PX4 flight log (from the lecturer, or your own if available)

Safety

  • Desk work only; no flying
  • Crop or blur people or number plates before sharing images with the group

Steps

  1. In class: write a one-page crack labelling guideline with positive and negative examples
  2. In class: have two classmates label the same first 10 images in CVAT to test the guideline
  3. Self-study: complete labelling to 50 images, then compute kappa and IoU with Example 1
  4. In class: revise the guideline where they disagree, then split by flight with Example 2
  5. Self-study: relabel, remeasure and report class proportions
  6. Self-study: check the dataset against the minimum list and write the documentation
  7. Self-study: export the IMU (or VIBE) messages from one flight log, cut them into 1-second windows and compute both features of Example 3

Deliverables

  • Revised labelling guideline
  • Kappa and IoU before and after revision
  • Split and class-proportion table
  • Dataset documentation
  • Table of vibration features per window

Checklist

  • The revised guideline has positive and negative examples, how to draw boxes and what to do when unsure (Problem framing and data preparation)
  • Table 1 has rounds before and after revision with p_o, p_e and kappa, not just percent agreement (Problem framing and data preparation)
  • In Table 2 no flight appears in both train and test, and every split has its class share (Problem framing and data preparation)
  • Table 3 has at least 10 windows from a named flight log, with units (Model training and evaluation)
  • The dataset documentation states image rights, the split method and the results of the minimum checklist (Communication and reporting)

Instructor guide

Class timing 180 min

  1. Objectives, image privacy and using CVAT10 min
  2. Write the guideline and have two classmates label the first 10 images50 min
  3. Compute kappa and IoU with Example 1, then revise the guideline30 min
  4. Split by flight with Example 2 and check the minimum list35 min
  5. Export IMU or VIBE and compute the Example 3 features40 min
  6. Wrap-up, questions and hand-in checklist15 min

Expected results

  1. Record: Table 1 Annotator agreement before and after revising the guidelineTable 1 (real numbers depend on the group's images; the lesson's Example 1 gives reference values): 100 images, p_o 0.86, p_e 0.42, kappa 0.76, box IoU of the three pairs 0.85, 0.38, 0.04 (mean 0.42). After revising the box-drawing rule, kappa and IoU should rise; if they do not, the guideline is still unclear. Check that kappa = (p_o − p_e)/(1 − p_e) is computed correctly.
  2. Record: Table 2 Split by flight and class proportionsTable 2 (Example 2 data, 12 flights, 1,318 images): train F05, F04, F01, F03, F06, F07, F11, F02 with 901 images (68%), crack share 0.180; validation F08, F12 with 192 images (15%), 0.178; test F09, F10 with 225 images (17%), 0.220. With StratifiedGroupKFold the result may differ, but no flight may appear in more than one split.
  3. Record: Table 3 Vibration features per 1-second windowTable 3 (Example 3 simulated data at 400 samples per second, rotor at 95 revolutions per second): sound propellers give a standard deviation of about 5.3 to 6.5 m/s² and an energy share near 95 Hz of about 0.02 to 0.09; a chipped propeller gives 25.3 to 36.3 m/s² and a share of 0.95 to 0.98. A real log from a drone with sound propellers should show vibration below 30 m/s/s, as in the ArduPilot documentation. Real numbers depend on the drone; the rotor frequency used must be stated for each window.
  4. Question 1: How much did your group's kappa and IoU change after revising the guideline, and which revised wording caused the change? Why not report observed agreement alone?In the lesson, 86% agreement looks high, but kappa is 0.76 because chance agreement is as high as 0.42 when one class is common. A strong answer names the revised rule (for example, boxes tight to the crack, excluding shadow) and shows the low box IoUs (0.38, 0.04) improving after revision.
  5. Question 2: How close are the crack shares in your train, validation and test splits? If you had split randomly by image instead, why would the test score be less trustworthy?In the lesson's example, train and validation are very close (0.180 and 0.178) and test is slightly higher (0.220), because with few flights the split is coarse. With a random split by image, very similar images from one flight end up in both train and test, so the score looks better than it is.
  6. Question 3: In Table 3, which feature tells the propeller condition better? Is your vibration level below the 30 m/s/s guideline, and why must the frequency band follow the motor speed in real logs?The energy share near the rotor frequency is better: in the example it flags 50 of 50 chipped-propeller windows, while the rule std above 30 m/s² flags only 25 of 50, because a moderate imbalance can stay under the guideline. Rotor speed changes with throttle, so the band must follow the motor speed recorded in the log. The answer must compare the group's own vibration level with 30 m/s/s.
  7. Question 4: What must your dataset documentation record so that others can reuse and check the dataset?At least: class definitions and the labelling guideline, image source and usage rights, numbers of images and flights, the split method and class share per split, annotator agreement, and the results of the minimum checklist (duplicates across splits, boxes outside the image or of zero size, images missing labels).

Discussion questions

  • If two annotators disagree on an image, who should decide, and where should the decision be recorded?
  • If all images come from one bridge, should you split by flight or by site, and how does this limit using the model on other bridges?
  • Which other sensor data in a flight log might reveal a drone fault before it shows in the images?

Adapting to student background

Upper secondary (M.6)
Have them compute kappa from the 3×3 table on paper before using the code, and explain with probability where chance agreement comes from.
Vocational certificate
Start with labelling in CVAT and comparing two boxes on screen before showing IoU as overlap area over union area; allow a spreadsheet for the flight split instead of code.
Diploma
Extension: export two logs from a drone they maintain, before and after balancing or replacing propellers, and compare both features.

Common student mistakes: Common mistakes in the module 3 lesson

4Worksheet 4 Training and evaluating a detector
Analysis activity · About 4 h of class time · CLO3, CLO1

Objective: Train an object detector by transfer learning, compute AP yourself against the tool and analyse errors

Equipment

  • 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

  1. In class: compute feature-map sizes of the first three layers with Example 2
  2. In class: start training a detector on the module 3 dataset by transfer learning
  3. Self-study: finish training and keep the training log and model weights
  4. In class: export validation predictions and compute AP@0.5 with Example 3
  5. Self-study: compare AP with the tool and explain the difference
  6. In class: vary NMS IoU and confidence threshold; observe precision and recall
  7. Self-study: review wrong predictions one by one and group their causes

Deliverables

  • Layer-size table
  • Training log and model weights
  • AP from both sources
  • Effect of IoU and threshold
  • Grouped error causes

Checklist

  • Table 1 shows the output-size and parameter formulas and uses values from the actual model structure (Model training and evaluation)
  • Both AP values in Table 2 state the IoU criterion and are computed on the validation set, not the training set (Model training and evaluation)
  • Table 3 groups errors into at least 3 groups with image numbers that can be traced (Model training and evaluation)
  • The training log and model weights are attached, naming the worksheet 3 dataset used (Problem framing and data preparation)
  • The answers quote numbers from your own tables and always report AP with its criterion (Communication and reporting)

Instructor guide

Class timing 240 min

  1. Review of neurons, backpropagation and convolution layers15 min
  2. Compute the first three feature-map sizes with Example 225 min
  3. Start training the detector by transfer learning60 min
  4. Export validation predictions and compute AP@0.5 with Example 350 min
  5. Vary NMS IoU and confidence threshold; record precision and recall40 min
  6. Review wrong predictions, group causes, wrap up and run the hand-in checklist50 min

Expected results

  1. Record: Table 1 Feature-map size and parameters of the first three layersTable 1 (if the model takes 640 px images and its first three layers are 3×3 convolutions with stride 2 and padding 1, channels 3 → 16 → 32 → 64; check against the structure file of the model actually used): output sizes 320, 160, 80 px and 448, 4,640 and 18,496 parameters from k×k×C_in×C_out + C_out. Lesson reference values: 640 px gives 640 at stride 1 and 320 at stride 2; a 3 → 32 channel layer has 896 and a 32 → 64 layer has 18,496 parameters.
  2. Record: Table 2 AP@0.5 from two sources and the effect of NMS IoU and confidence thresholdTable 2 (reference values from Example 3, one image with 4 cracks): NMS IoU 0.5 with no confidence cut gives precision 0.60, recall 0.75, AP 0.688; threshold 0.5 gives 0.75, 0.75, 0.688; threshold 0.7 gives 0.67, 0.50, 0.500; threshold 0.9 gives 1.00, 0.25, 0.250; NMS IoU 0.95 with no cut gives 0.43, 0.75, 0.542. Real validation results depend on the dataset. Your own AP should be close to the tool's (a few hundredths apart) when the same criterion is used.
  3. Record: Table 3 Grouped causes of wrong predictionsCommon groups to expect: small or thin cracks lost when the image is resized (FN), stains, shadows or concrete joints reported as cracks (FP), blur or glare, boxes whose extent differs from the label (IoU below 0.5), and wrong labels in the dataset itself. A strong answer gives the number of images per group and a practical fix.
  4. Question 1: How far is your own AP@0.5 from the value reported by the tool? Explain where the difference can come from.Differences come from: a different IoU criterion (AP@0.5 versus AP@0.5:0.95), the way the area under the curve is approximated (every point, 11 points or 101 points), pooling all images together instead of per image, and different confidence or NMS settings. A strong answer states the criterion and method of both sources.
  5. Question 2: 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?As the threshold rises, precision usually rises and recall falls (in the example, 0.5 gives 0.75/0.75 and 0.9 gives 1.00/0.25). For screening where misses are expensive, choose a threshold low enough to keep recall high and accept false alarms, choosing it on the validation set with the Module 1 costs.
  6. Question 3: If NMS IoU is set very high, such as 0.95, what happens to duplicate boxes and how does AP change?Duplicate boxes are no longer removed, because the duplicates in the example overlap at IoU 0.83 and 0.79, below 0.95. They count as false alarms, so precision falls from 0.60 to 0.43 and AP from 0.688 to 0.542.
  7. Question 4: What is the largest cause group in Table 3, and what data or labels would fix it (link to Module 3)?It depends on the group's results. If many small cracks are missed, use larger input images or tiles and add images of small cracks; if stains or shadows are flagged, add negative examples to the guideline and the dataset; if wrong labels are found, fix the guideline, relabel and remeasure kappa.

Discussion questions

  • Why does transfer learning suit our small crack dataset better than training from scratch?
  • If two vendors report mAP under different criteria, how can we compare them fairly?
  • What does looking at wrong images one by one tell us that a single mAP value cannot?

Adapting to student background

Upper secondary (M.6)
Have them work one neuron by hand as in Example 1 (forward, backward and update) before training the detector, so they see what the tool does inside.
Vocational certificate
Start with reviewing wrong images and grouping causes, then compute AP with a fill-in table row by row (sort by score, count hits, compute cumulative precision and recall).
Diploma
Extension: retrain at two input sizes (for example 640 and 960 px) and compare small-crack recall and training time.

Common student mistakes: Common mistakes in the module 4 lesson

5Worksheet 5 Benchmarking and shrinking the model
Lab · About 4 h of class time · CLO3

Objective: Measure inference time correctly on a PC and an onboard computer, quantise the model to INT8 and write a deployment plan

Equipment

  • Model from worksheet 4
  • At least one accessible computer, such as a personal PC or a cloud notebook
  • The lab's onboard computer (demonstrated by the lecturer in class, or open for use outside class time if available) with a camera and power supply
  • ONNX and a quantisation tool

Safety

  • Bench or desk work only; no flying
  • If you use the onboard computer yourself, use the correct supply voltage and beware of hot heat sinks during long runs

Steps

  1. In class: time inference on a PC at least 200 times after warm-up and watch the lecturer run the same measurement on the onboard computer
  2. Self-study: report p50, p95 and maximum for at least two machines with Example 1, stating hardware, runtime and image size
  3. In class: export to ONNX, quantise to INT8 and compare size and time
  4. Self-study: compare the AP of FP32 and INT8
  5. Self-study: measure end-to-end time from frame to result and compare with model time
  6. Self-study: write a deployment plan with acceptance criteria
  7. In class (week 15): present the whole AI system

Deliverables

  • Inference-time table for at least two machines, including the onboard-computer result demonstrated by the lecturer
  • End-to-end timing
  • FP32 versus INT8 table
  • Drone deployment plan

Checklist

  • Table 1 has at least two machines, at least 200 runs after discarding warm-up, and states machine, runtime and image size (Onboard deployment)
  • p50, p95 and maximum are reported, not the mean alone (Onboard deployment)
  • Table 2 re-measures INT8 AP on the same validation set as FP32 (Model training and evaluation)
  • The plan has acceptance criteria for end-to-end time, accuracy after shrinking, power and heat, and the overload behaviour (Onboard deployment)
  • Model time and end-to-end time are clearly separated in the report and presentation (Communication and reporting)

Instructor guide

Class timing 240 min

  1. Objectives, safety of power supply and heat sinks15 min
  2. Time 200+ runs on a PC after warm-up and watch the onboard-computer demo60 min
  3. Export to ONNX, quantise to INT8, compare size, time and AP60 min
  4. Measure end-to-end time from frame to result45 min
  5. Write the drone deployment plan with acceptance criteria45 min
  6. Wrap-up, questions and hand-in checklist15 min

Expected results

  1. Record: Table 1 Model inference time after warm-upTable 1 (numbers depend on the real machines; reference values from the Example 1 simulated onboard-computer data): including warm-up, 205 runs, mean 46.1, p50 43.0, p95 59.3, max 202.9 ms; after dropping the first 5, 200 runs, mean 42.8, p50 42.8, p95 56.4, max 63.4 ms. An onboard computer is usually slower than a PC with a GPU. Check that the maximum after warm-up is not abnormally high like the first runs.
  2. Record: Table 2 FP32 versus INT8Table 2: the INT8 file is about one quarter of FP32 (in Example 2, 10,000 weights fall from 39.1 KiB to 9.8 KiB). Time may fall on hardware with fast INT8, but some machines are not faster. AP must be re-measured; real numbers depend on the model and quantisation tool, so there is no fixed answer. Check that it is measured on the same validation set and compared with the criterion the group set in advance.
  3. Record: End-to-end time (capture, resize, inference, send) and the drone deployment plan with acceptance criteriaEnd-to-end time must always exceed model time. Example (assumed): model p95 56.4 ms, image read 8 ms, resize 6 ms, send 5 ms gives 75.4 ms, about 13.3 frames per second. A good plan states the machine and runtime, image size, maximum accepted end-to-end p95, minimum AP after shrinking, power and heat, and what happens when processing falls behind.
  4. Question 1: From the p95 after warm-up of each machine in Table 1, how many frames per second can the system sustain for 95% of frames, and is that enough for your inspection job?Frames per second is about 1000/p95: p95 of 56.4 ms gives about 17.7 fps, and 50 ms gives 20. A strong answer compares this with the frame rate the job needs; for example, still images for later inspection need far less than a task that must react in flight.
  5. Question 2: How much longer is the measured end-to-end time than the model time, which part takes longest, and how far does a drone flying at 10 m/s move in that time?In the assumed example, end-to-end time of 75.4 ms is 19 ms more than model time, and a drone at 10 m/s moves about 0.75 m while one frame is processed. A strong answer names the slowest part from real measurements (for example image reading or resizing), which may take longer than the model itself.
  6. Question 3: How much does INT8 AP fall from FP32, is that acceptable under your criterion, and how can an outlier among the weights make INT8 error larger?The AP drop depends on the group's results and must be compared with the criterion set before measuring. An outlier makes the scale coarse: in Example 2, using the true maximum gives scale 0.00472 and mean error 1.186e-3, about 3 times higher than clipping at ±0.2 (0.00157, 0.392e-3), but clipping distorts the outlier by 0.400, so accuracy must be re-measured every time.
  7. Question 4: If onboard processing cannot keep up with incoming frames, what does your plan make the system do, and why that choice?The options taught are skipping frames (processing only the latest frame) or storing images for processing after the flight. A strong answer chooses by task: crack inspection that needs no immediate reaction can store images for post-flight processing without losing data, and states how the system informs the operator.

Discussion questions

  • Why do some vendors report only mean model time, and what extra data should a buyer ask for?
  • If the onboard computer heats up and slows itself down during a long flight, under what conditions should our acceptance criteria be measured?
  • Which drone tasks should be processed onboard, and which can wait until after the flight?

Adapting to student background

Upper secondary (M.6)
Have them compute p50 and p95 by hand from the first 20 measurements before using numpy, and compute the scale and q values for three weights with the quantisation formula.
Vocational certificate
Focus on setting up and measuring on the real hardware with the lecturer, using a prepared script, and fill Table 1 cell by cell, explaining in words that p95 means 95 of 100 runs finish within that time.
Diploma
Extension: connect the camera to the onboard computer themselves under supervision, and measure real end-to-end time and heat-sink temperature during a 10-minute continuous run.

Common student mistakes: Common mistakes in the module 5 lesson

Scoring rubric

For worksheets and the mini-project. Each criterion scores level (1–4) ÷ 4 × weight.

CriterionWeightExcellent (4)Good (3)Fair (2)Needs work (1)
Problem framing and data preparation25%Measurable problem; dataset with guideline, agreement scores and correct split by flightNearly completeNo agreement check or a leaky splitUnclear problem and undocumented dataset
Model training and evaluation30%Task-appropriate metrics, AP matching the tool, grouped error analysisCorrect evaluation, partial error analysisUnsuitable metrics or evaluation on training dataNo trustworthy evaluation
Onboard deployment25%Correct timing, full INT8 comparison, plan with acceptance criteria and overload behaviourNearly completeTiming includes warm-up or plan lacks criteriaNo measurements on real hardware
Communication and reporting20%Clear, concise, states the AI's scope and limits honestlyClear with minor flawsHard to follow or missing partsDoes not communicate results

Assessment map: CLOs and how they are assessed Draft

The CLOs are a web-team draft; the course owner sets the final ones (curriculum book, part 4). This table is built from the worksheet and module-quiz data, so it follows any change to the CLOs.

CLOWorksheetsModule quizzes
CLO1 Explain machine learning and deep learning principlesW 1W 2W 4M1M2M4
CLO2 Prepare drone image datasets correctlyW 3M3
CLO3 Train, evaluate and deploy modelsW 2W 4W 5M2M4M5