Posts

Showing posts from August, 2026

My First YOLO Object Detection Experiment using Python with Multiple Images

Image
I recently tried a simple YOLO (You Only Look Once) object detection exercise using Python and the Ultralytics YOLO11 model. The goal was straightforward: instead of processing just one image, I wanted to provide multiple images , run object detection on all of them, and generate a single combined output image . What I Used Python Ultralytics YOLO YOLO11n pretrained model PIL/Pillow for image processing Multiple JPG images The Basic Approach First, I loaded the pretrained YOLO11 model: from ultralytics import YOLO model = YOLO("yolo11n.pt") I then provided multiple images: image_paths = [ r"D:\Python\images\dog.jpg", r"D:\Python\images\MyPic.jpg" ] results = model(image_paths) YOLO automatically performed object detection on each image and identified objects such as people, animals, vehicles, and other objects that the pretrained model recognizes. The interesting part was combining all the annotated images into one output image . This makes it ...