Lecțiile acestui traseu sunt publicate deocamdată doar în engleză, așa că lecția de mai jos apare în engleză. Restul — module, quiz și materiale — funcționează la fel.
Perception: Cameras, Depth and Foundation Vision Models
Vei putea să:
You can trace a pixel back to a ray in the world using the pinhole model, explain how depth sensors and monocular depth models differ in what they can and cannot measure, and decide when a promptable segmentation model is the right tool for a robot's perception stack.
From pixels to the world and back
A robot's camera is a measurement device, and like any measurement device it has a model. If you know the model you can ask the two questions that matter in robotics: where in the image will a point in the world appear? and which ray in the world does a given pixel correspond to? Everything else in perception, from depth sensing to foundation segmentation models, is a way of filling in what the camera model alone cannot tell you.
The pinhole model in four numbers
A pinhole camera maps a 3D point (X, Y, Z) in the camera's own frame to a pixel (u, v) by dividing by depth:
u = fx · X / Z + cx
v = fy · Y / Z + cy
fx and fy are the focal lengths in pixels, cx and cy the principal point (roughly the image centre). Together they form the intrinsic matrix K. Real lenses also bend straight lines near the edges, so a few distortion coefficients are estimated alongside K; calibration with a checkerboard, as described in the Stanford CS231A notes, recovers all of them. A second transform, the extrinsics, relates the camera frame to the robot's base frame. For an arm with a wrist camera this is the hand-eye calibration, and getting it wrong by a few millimetres is one of the most common reasons a grasp misses.
Worked example: the cube that cannot be sized
Take fx = fy = 600 px, a 640×480 image, cx = 320, cy = 240. A 10 cm cube whose front face is 50 cm away has corners at X = ±0.05 m, so its front face spans u from 320 - 600·0.05/0.5 = 260 to 380, a 120 px square. Move the same cube to 70 cm and the face spans about 86 px. Now place a 14 cm cube at 70 cm: its face spans 600·0.07/0.7 = 60 px either side, exactly the 120 px of the small near cube. One image cannot distinguish them. This is the scale ambiguity of monocular vision, and it is why a robot that needs metric positions needs a second source of information.
Where depth comes from
- Stereo. Two cameras a baseline B apart see the same point at slightly different horizontal pixel positions; the difference is the disparity d, and Z = f · B / d. Depth precision falls off with distance squared and fails on textureless surfaces, where there is nothing to match.
- Active sensors. Structured light and time-of-flight cameras project their own infrared pattern or pulses, so they work on blank walls, but they fail on glass, on very dark or shiny surfaces, and in direct sunlight that swamps the projector.
- Monocular depth models. Networks such as Depth Anything predict a dense depth map from a single RGB image, trained on huge unlabeled collections. They are remarkably good at relative depth, which surface is in front of which, and much less reliable at metric depth unless fine-tuned for a known camera. For a robot, relative depth is enough to decide what to pick first and not enough to decide where to close the gripper.
The practical pattern is to fuse: an active depth camera for metric geometry where it works, a learned model to fill the holes it leaves on glass and dark objects.
Foundation vision models in the perception stack
The last few years changed what a robot perception stack is built from. Segment Anything (SAM) is a promptable segmenter: give it a point, a box or a mask and it returns the object around it, without being trained on that object class. DINOv2 produces general-purpose image features without labels, and those features turn out to transfer well to robot tasks, which is why OpenVLA (module 6) uses DINOv2 as one of its vision backbones. Open-vocabulary detectors let you ask for "the red mug" instead of training a mug classifier.
For a robot engineer these are tools with costs. A large segmenter may run at a few frames per second on an onboard computer, which is fine for deciding what to grasp and too slow for closing the loop during the grasp. A common architecture runs the heavy model once to find and segment the target, then tracks it with something cheap at full frame rate.
Two ways to use perception
An object-centric pipeline detects, segments and estimates the pose of objects, and hands explicit coordinates to a planner. It is debuggable: you can look at the mask and see what went wrong. An end-to-end policy maps pixels straight to motor commands and learns whatever intermediate representation helps. It can exploit cues no engineer thought to extract, and it fails in ways that are hard to inspect. Which is better is genuinely unsettled; the honest current answer is that end-to-end policies are winning on flexible tabletop tasks with lots of data, and object-centric pipelines still dominate where you need guarantees about what the robot is reacting to.
What to remember
- Projection divides by depth; a single image loses absolute scale.
- Depth sensors each have a failure surface: texture for stereo, glass and sunlight for active sensors, metric accuracy for monocular models.
- Calibration (intrinsics and hand-eye) is a precondition, and the usual culprit when grasps miss.
- Promptable segmentation and self-supervised features are the new building blocks; budget their latency.
- Object-centric versus end-to-end is a real trade-off between inspectability and flexibility.
Materiale selectate
1.6hMunca de profunzime se întâmplă aici — lecția este briefingul tău.
În direct pe aiqbench
Subiectul acestei lecții în restul site-ului, astăzi.
În știri, ultimele 30 de zile
- Cenotian raises $48M to underwrite robotics deployments and cut factory riskDealroom.co ·
- DeepSeek Officially Posts Job for Talent in Embodied Intelligence36Kr ·
- NVIDIA Expands US Technology Initiatives Across Energy, Robotics and Quantum ComputingThe Quantum Insider ·
Testează-ți cunoștințele
5 întrebări în 100 de secunde, pe o pagină separată. Citește mai întâi tot ce este mai sus.
Testează-ți cunoștințele →Misiunea modulului
30–40 minUsing only NumPy, implement the pinhole projection for a camera with focal length 600 px and a 640×480 image. Project the eight corners of a 10 cm cube placed 50 cm in front of the camera and draw the wireframe. Then place a 14 cm cube 5 cm to the right and 20 cm further away (70 cm) and show that both cubes project to the same 120 px, so a single image cannot tell them apart in size. Save the two drawings and a short note on what a depth channel would add.
Se încarcă lucrarea ta…