UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS

Worksheet 3 Detecting, tracking and counting in drone video

Lab 90 minAssesses CLO2, CLO3

Objective

Detect with tiling, merge duplicate boxes, track with the Hungarian method and count with a count line without double counting

Equipment and materials

  • A YOLO-family detector you have the right to use
  • Sample video, or a drone with a camera to record in the training area
  • Computer with Python, numpy, opencv, scikit-learn, scipy and the example code at /downloads/uat-456/
  • Sheet for counting by eye

Safety

  • If recording your own video, fly within CAAT conditions in visual line of sight, keep people clear, and check batteries and propellers before flight
  • Record people or vehicles without identifying individuals or number plates
  • Blur or crop identifiable people before sharing, and keep data only on department storage

Steps

  1. Run the detector on Worksheet 1 images, both shrunken whole and tiled, and compare box counts
  2. Merge tile boxes with Example 1, try several IoU and IoS thresholds, and compare with counting by eye
  3. Run the detector on every video frame and match with the Hungarian method from Example 2
  4. Count with a count line as in Example 3 and compare with ID counting and counting by eye
  5. Log ID breaks and propose one fix

Record of results

Table 1 Still-image counts
ImageCount by eyeWhole image shrunkTiles + NMS IoUTiles + IoSThreshold used
Table 2 Video counts by three methods
Video or segmentCount by eyeNumber of track IDsEvery line crossingOne crossing per track
Log of ID breaks and the proposed fix

Questions

  1. In Table 1, which method over-counts and which under-counts, why, and what is the risk of an IoS threshold that is too low?

  2. Did greedy and Hungarian matching differ in any of your frames? Explain with an IoU matrix such as row T1 = 0.9, 0.8 and row T2 = 0.7, 0.1 at a 0.3 minimum.

  3. Why does counting each track once at the line not over-count when an ID breaks before the line, and which case does it still miss?

  4. If a system has DetA 0.81 and AssA 0.64, what is HOTA, and why should gate counting not report MOTA alone?

Check before you hand in

What to hand in

  • Still-image count table for each method
  • Video with track IDs
  • Video count table for three methods
  • ID-break log and proposed fix

CLO2 Develop image classification, object detection and tracking, image segmentation and anomaly detection with machine learning and deep-learning models. CLO3 Evaluate automated image-analysis systems for accuracy, confidence calibration, processing time and fairness under real operating conditions. (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