Two object-detection pipelines run on the same nine public-domain test images so the strengths and failure modes of each are easy to read off. Pipeline 1 is a classical edge-and-contour pipeline (Gaussian blur, Canny, morphological close, contour bounding boxes). Pipeline 2 is YOLOv8n pretrained on COCO. The classical pipeline locates regions; the deep-learning pipeline classifies them. Each pipeline wins in different regimes, and the comparison makes those regimes explicit.
Gaussian blur (5 × 5) → Canny edge detection (50, 150) → morphological close (5 × 5 rect kernel) → external contour finding → bounding box for every contour with area ≥ 500 px²
Detections are unlabelled. The pipeline cares about where the boundaries are, not what is bounded.
Inference via the ultralytics package, confidence threshold 0.20. The COCO class set covers 80 categories: people, animals, vehicles, common indoor and outdoor objects. Detections come with class labels and confidence scores. Anything outside the 80-class vocabulary is invisible to the model.
| Image | Classical | YOLOv8n | YOLO classes |
|---|---|---|---|
| airplane | 1 | 1 | airplane |
| cameraman | 1 | 1 | person |
| crowd | 11 | 18 | person, book |
| houses | 3 | 0 | — (no relevant COCO class) |
| lenna | 3 | 2 | person, umbrella |
| pepper | 1 | 8 | apple, banana |
| sailboat | 9 | 1 | bird |
| tiffany | 10 | 1 | person |
| yacht | 2 | 8 | boat, person |
Detections per image per pipeline (left), and top YOLOv8n classes across the test set (right).