📚 Course contents

AI & Computer Vision, lesson 48 of 52

Capstone Data Sprint: Capture & Annotate

advanced34 min readFull course

Introduction

Your product needs its own data. In this sprint your team captures, labels and checks a dataset in a few days, using everything from Unit 3. More pictures isn't the goal: more variety is. You'll also build a quality gate that refuses bad data before it ever reaches the training stove.

By the end of this lesson you'll be able to:

  • Capture images in several different sessions, following the consent rules of lesson 14
  • Label to a written rule so two teammates draw the same box
  • Split by session, so the test set is a different day from the training set
  • Augment the training images only
  • Run a readiness gate and fix every FAIL before training
  • Explain why a clean small dataset beats a big messy one

Working principle

150 is a floor, not a goal

The outline asks for 150 or more labelled images. Treat that as the least that makes a baseline worth training. If your brief (lesson 47) says "recall of 90%" for a ball, you also need enough examples of the ball, not only enough pictures. The gate checks both: images in total and boxes per class against your quota.

Sessions matter more than pictures

A session is one visit: one place, one day, one light. Fifty frames from one minute of video are almost one picture repeated. Ten pictures from each of five different sessions teach the model far more. The lesson 11 capture script names files <class>_<session>_<n>.jpg, so the session is in the name and the gate can read it.

Aim for at least three sessions with some variety: morning and afternoon, near and far, crowded and empty. The gate fails below two.

Nothing in this lesson overrides lesson 14. Before a camera is raised:

  • Only film people whose consent (and a parent's, for under 18) you have in writing.
  • Capture the minimum. If a face is not needed, frame it out.
  • Keep the raw pictures in a private folder, not in a public repository or a shared drive.
  • Tell people how to ask for their pictures to be deleted, and then delete them when asked.

India's Digital Personal Data Protection Rules were notified in November 2025 and the parts that cover children's data come in later phases. Please confirm the details and dates with your school; this lesson is general guidance and not legal advice.

Labelling is a written rule

Two teammates draw different boxes round the same ball. The model learns the disagreement. Write the rule down before anyone clicks:

QuestionOur rule, for example
How tight is the box?Touching the visible edge of the object, no gap
Partly hidden object?Label only if more than half is visible
Blurred by motion?Label it, if you can still tell what it is
Tiny and far away?Skip it if it is under 10 pixels, and skip it the same way everywhere
Two overlapping players?Two boxes

Then have a second person check 10 labels each. The gate catches broken files. It cannot catch a box that is wrong but valid, which is why this check is done by eyes.

Split by session

Roboflow can split randomly by picture. For video frames that is a trap: a frame in training and the very next frame in test look the same, and the test score will be flattering and useless (lesson 13 called this leakage). Put whole sessions in each split. For example, with five sessions: three train, one valid, one test.

How you do it in Roboflow depends on its current interface: upload each session as its own batch and assign batches to the splits, or build the split yourself in Python (lesson 13) before you upload. Check which your version supports. The gate will tell you if you got it wrong.

Augment only in training

Augmentation (flips, brightness, small rotations) makes copies of training images to teach the model that these changes do not matter. Never augment valid or test: they must stay as real as the world. Roboflow applies augmentation to the training split, but check the settings and then confirm with the gate that valid and test have not grown.

Do not flip if left and right mean something: a goal on the left is not the same as a goal on the right in your brief, for example. Do not use a colour change that destroys the cue the model needs (a yellow ball turned blue).

Class balance

If the dataset has 400 players and 30 balls, the model gets good at players and mediocre at the ball. The gate fails when a class is under the quota from your brief, and when the valid or test split has no examples of a class. It warns when train has none.

What the gate checks

CheckFail or warnWhy
Fewer than 150 imagesFailToo little to train a baseline
Fewer than 2 sessionsFailThe model learns one situation
Image without a label file, or the reverseFailA missing label teaches that the object is not there
Label line without 5 numbers, or box outside 0 to 1FailThe file is broken
Session in more than one splitFailLeakage
Near-duplicate across splitsFailLeakage
Class under its quotaFailNot enough examples
Valid or test with no example of a classFailYou cannot measure that class
Near-duplicate in the same splitWarnWasted effort, not a disaster
Very blurry pictureWarnLook at it and decide
Tiny boxWarnCheck it is not a slip

How the near-duplicate check works

It shrinks each picture to 16 by 16 grey squares, and writes a bit per square: 1 if brighter than the average, 0 if not. That is the picture's fingerprint. Two pictures whose fingerprints differ in only a few bits are almost the same picture. The cut-off (12 of 256 bits) is a starting point to tune on your own data, not a law.

Honest limits

The gate checks files, not truth. It cannot tell you that a box is on the wrong object, that the labelling rule drifted halfway, or that all your sessions were in the same gym. Those need people.

Capstone Data Sprint: Capture & Annotate | Electronics Simplified