Teaching Machines to See
A real detector in ten lines.
Welcome to Orchard Vision, a family fruit farm with a problem. Every autumn, a hundred thousand apples roll past tired eyes on a sorting line. Bruised ones slip through, and good ones get thrown away. The owner asks you, could a camera do this? In this course, you'll build AppleEye, a system that can see, and you'll understand every step.

- Orchard Vision: 100,000 apples
- Tired eyes on a sorting line
- You will build AppleEye
A detector in ten lines
Let's begin at the end. Here's a modern object detector, in ten lines. We load a pretrained model, and hand it a photo. It returns boxes, class names, and how confident it is. Run it. It found the person in the picture, and other objects as well, with confidence scores, and it did this in a fraction of a second on a laptop. This took decades of research. By the end of this course, you'll know how it works, and how to train one for apples.
from ultralytics import YOLO
from skimage import data
import cv2
model = YOLO("yolo11n.pt")
image = cv2.cvtColor(data.astronaut(), cv2.COLOR_RGB2BGR)
result = model(image, verbose=False)[0]
for box in result.boxes:
name = model.names[int(box.cls)]
print(f"{name:<8} confidence {float(box.conf):.2f}")
import matplotlib.pyplot as plt
plt.figure(figsize=(5, 5))
plt.imshow(result.plot()[:, :, ::-1]); plt.axis("off")
plt.tight_layout(); plt.savefig("seen.png", dpi=110)person confidence 0.90 sports ball confidence 0.68
What computer vision can do
Computer vision is a family of jobs. Classification says what's in the image. Detection says what, and where. Segmentation marks every pixel. Tracking follows objects through video. Pose finds the joints of a body. And OCR reads text. AppleEye will use nearly all of these. Name the job, and you've found half of the solution.
Summary
In ten lines, you've run a real detector, and you've seen the map of vision tasks. But what does the computer actually see, when you give it a photo? Next, the truth about images. They're just numbers.
Key takeaways- Detection: what and where
- Name the job first
- You'll build AppleEye