Sample it from the conditions the model will meet in production, not from the same pool as the training data. Split by scene, camera, video or time, never by individual frame, to prevent near-duplicate leakage. Include the hard slices deliberately, such as night, rain, occlusion and rare classes, tag them so you can report results per slice, label it to a higher standard than the training data, and freeze it so results stay comparable.
Why interviewers ask this
Many vision projects fail because the test set was too easy or leaked into training. Interviewers want to hear about leakage through near-identical frames, splitting by a grouping variable such as video or location, deliberate coverage of difficult conditions, and per slice reporting. They also listen for discipline around the test set, such as higher quality labels and freezing it, which shows you have been burned by moving targets before.
How to structure your answer
- Sample from production conditions.
- Split by video, scene or time to prevent leakage.
- Cover hard slices deliberately and tag them.
- Label carefully and freeze the set.
Example answer
The first rule is that test data has to come from where the model will be used, ideally from the deployed cameras over a different time period from the training data. The second rule is splitting by group, not by image. Consecutive video frames are almost identical, so if you split frames randomly, the test set is effectively the training set and the scores mean nothing. I learned that early, when a model scored brilliantly and then fell apart at a new site. Now I split by video, camera or location. Third, I build in the hard cases deliberately: night, glare, rain, crowded scenes, rare classes and small objects, each tagged so I can report results per slice, because an average across easy and hard cases tells you very little. I label the test set more carefully than the training data, usually with a second review pass, since label noise in the test set makes every comparison unreliable. And I freeze it, adding a new version only when production changes, so that results across model versions stay comparable.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How big does a test set need to be for a rare class?
- How would you evaluate a model for a site you have no data from yet?
- When should you refresh or replace a frozen test set?
Related computer vision engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions