▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
Computer Vision in Practice · Lesson 12 of 15 · 2 min read · 5 min video
Video and real-time vision
Process camera streams frame by frame, with tracking and speed tricks.
📄 Download slides (PDF)· free sign-upVideo is just a sequence of images, often 25–30 per second. Real-time vision means processing each frame fast enough to keep up, and tracking objects as they move from one frame to the next.
Reading frames
The speed budget
At 30 frames per second, you have about 33 milliseconds per frame. If your model takes 80 ms, you fall behind. Ways to keep up:
- Use a smaller model (YOLO nano or small) and a smaller input size
- Skip frames: process every 2nd or 3rd frame. Most scenes don't change that fast
- Process only a region of interest, such as just the road, not the sky
- Use a GPU or an edge accelerator, and batch frames from several cameras
Tracking: who is who?
A detector sees each frame on its own. To count vehicles or follow a person, you need to know that the car in frame 10 is the same car in frame 11. A tracker gives each object an ID that stays the same across frames.
- SORT and DeepSORT: predict where each object will move and match it with new detections
- ByteTrack: also uses low-confidence detections, so it keeps track of objects that are partly hidden
Common real-time uses
- Counting people or vehicles crossing a line
- Safety alerts: a person in a restricted zone, a missing helmet
- Queue length at a counter or toll plaza
- Sports and movement analysis
Privacy
Cameras in public or work places capture people who didn't sign up for anything. Blur faces and number plates if you don't need them, keep video only as long as necessary, and put up clear notices.
In one line
Real-time vision processes each frame within a tight time budget, using small models, frame skipping and regions of interest, and trackers keep a steady ID on each object between frames.
Share with a friend