Examples, counting by class

How many people, bicycles and cars cross each line?

Two lines over a car park seen from above, one a tenth of the way in from each edge, count every class the experiment tracks, in both directions. The same pattern counts pedestrians and vehicles on a street or at a building entrance.

West edge East edge
A stored CV-Scope run, redrawn in the browser: 8 anonymous tracks and 8 events from YOLO11m on cuda:0 with ByteTrack (mean track life 50.1 frames), over the person-bicycle-car-detection.mp4 sample clip (Intel IoT DevKit sample videos, CC BY 4.0). Trails are the ground points CV-Scope samples about ten times a second.

What the run recorded

YOLO11m on cuda:0 with ByteTrack, tracking person, bicycle, car. The arrow on each line points in its forward direction, which is to the left for both lines here.

West edge 3 crossings

person 1
bicycle 0
car 2

East edge 5 crossings

person 3
bicycle 2
car 0
Line Total Forward Reverse By class
West edge 3 2 1 car 2, person 1
East edge 5 0 5 person 3, bicycle 2

Tracked objects by class: person 4, bicycle 2, car 2.

Why a cyclist counts twice

The detector sees the rider as a person and the bicycle as a bicycle. Both are tracked, so one cyclist adds one person and one bicycle to a line that counts both classes. That is why the East edge shows three people: one pedestrian and two riders.

To count cyclists, count bicycles. To count pedestrians only, subtract the bicycles from the people, or draw a line that tracks only people where cyclists do not pass. Guide 07 walks through both.

Reproduce it

  1. Install CV-Scope; the setup downloads this clip too.
  2. Follow guide 07 to draw the two lines and track three classes.
  3. Leave part of the picture out with an ignore area, as in guide 08.

Clip: person-bicycle-car-detection.mp4, Intel IoT DevKit sample videos, CC BY 4.0. Data exported 2026-09-29 from CV-Scope at commit 14ae109.

Search CV-Scope

Type to search the documentation, the 26 guides and the site.

Search runs in your browser against an index built with the site. Nothing is sent anywhere.