← Computer Vision for EveryoneToolsInVisionLearning Center
Cameras and Geometry · Lesson 1

Choose the Right Vision Task

A camera watches a parking lot with twelve marked spaces.

Watch the lesson

Choose the Right Vision Task explained visually

1:37

A camera watches a parking lot with twelve marked spaces. English captions are optional and start off. The complete transcript follows the written lesson.

Lesson overview

What you will learn

A camera watches a parking lot with twelve marked spaces.

  1. The parking-lot question
  2. Choose an output
  3. Check the rule
  4. Count the free spaces
01

The parking-lot question

A camera looks down on a parking lot with twelve marked spaces. The owner wants to know how many are free. If a model only says, “I see a car,” it has not answered the question. We need to decide what the system should predict for each space.

02

Choose an output

One option is to crop each marked space and classify that crop as occupied or empty. Another is to detect cars with boxes, then connect each car to a space. Segmentation can outline the car more precisely when a box reaches across neighboring spaces. Tracking links observations across video frames, but we do not need to know a car's identity just to count open spaces. Each method produces different evidence; none gives the final count on its own.

03

Check the rule

Picture a car driving through the lane. A detector can correctly find it. The parking system would still be wrong if it marked the nearest space occupied. The rule connecting a detected car to a painted space must be tested too. Shadows and partly hidden cars can make that decision uncertain.

04

Count the free spaces

For our first version, let's produce one occupied-or-empty decision for each marked space, then count the empty ones. We can compare that result with a simple crop-based approach and review the difficult spaces. In the next lesson, we'll see why a space near the camera and one far away look different in the image.

Worked example

For parking occupancy, one possible rule associates a detected vehicle with an annotated parking region. A vehicle box outside every parking region should not make a space occupied. The detector supplies visual evidence; the application rule converts that evidence into the requested decision.

Knowledge check

Quick check: test your understanding

Try it yourself: Write separate output requirements for counting cars and following one selected car through a video.

Check the reasoning

Counting requires a count or set of detections per image. Following one car requires a persistent association across frames and a policy for occlusion or missed observations.

Does a high classification score tell you where the object is?

No. Localization requires an output designed for that purpose.

Can one whole-image car-present label identify free spaces?

No. An occupied-or-empty decision is needed for each marked space.

Does a vehicle in the driving lane occupy a parking space?

No. The occupancy rule needs evidence within a marked region.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 1 transcript231 words · Video transcript · Matches the published narration and captionsOpen transcript

A camera looks down on a parking lot with twelve marked spaces. The owner wants to know how many are free. If a model only says, “I see a car,” it has not answered the question. We need to decide what the system should predict for each space.

One option is to crop each marked space and classify that crop as occupied or empty. Another is to detect cars with boxes, then connect each car to a space. Segmentation can outline the car more precisely when a box reaches across neighboring spaces. Tracking links observations across video frames, but we do not need to know a car's identity just to count open spaces. Each method produces different evidence; none gives the final count on its own.

Picture a car driving through the lane. A detector can correctly find it. The parking system would still be wrong if it marked the nearest space occupied. The rule connecting a detected car to a painted space must be tested too. Shadows and partly hidden cars can make that decision uncertain.

For our first version, let's produce one occupied-or-empty decision for each marked space, then count the empty ones. We can compare that result with a simple crop-based approach and review the difficult spaces. In the next lesson, we'll see why a space near the camera and one far away look different in the image.