Green check
Link copied to clipboard

How to Use Ultralytics YOLO11 for Object Detection

Explore how the new Ultralytics YOLO11 model can be used for object detection to achieve higher precision in various applications across a range of industries.

Computer vision is a field of artificial intelligence (AI) that helps machines interpret and understand visual information to enable essential tasks like object detection. Unlike image classification, object detection not only identifies what objects are in an image but also pinpoints their exact locations. This makes it a critical tool for vision AI applications like self-driving cars, real-time security systems, and warehouse automation.

Over time, object detection technology has become more advanced and easier to use. A major step forward was announced at Ultralytics’ annual hybrid event, YOLO Vision 2024 (YV24), with the launch of the Ultralytics YOLO11 model. YOLO11 improves accuracy and performance while supporting the same tasks as YOLOv8, making it easy for users of previous models to transition seamlessly.

Fig 1. An example of using the Ultralytics YOLO11 model for object detection.

In this article, we’ll break down what object detection is, how it’s different from other computer vision tasks, and explore its real-world applications. We’ll also walk you through how to use the YOLO11 model with the Ultralytics Python package and the Ultralytics HUB platform. Let’s get started!

​​What is Object Detection?

Object detection is a core task in computer vision that does more than just identify objects in an image. Unlike image classification, which only determines whether a specific object is present, object detection recognizes multiple objects and pinpoints their exact locations using bounding boxes. 

For example, it can identify and locate faces in a group photo, cars on a busy street, or products on a store shelf. Combining object recognition and localization makes it especially useful for applications like surveillance, crowd monitoring, and automated inventory management.

Fig 2. Using YOLO11 to detect faces.

What sets object detection apart from other tasks like semantic or instance segmentation is its focus and efficiency. 

Semantic segmentation labels every pixel in an image but doesn’t differentiate between individual objects of the same type (e.g., all faces in a photo would be grouped as "face"). Instance segmentation takes it further by separating each object, and outlining its exact shape, even for objects of the same class. 

Object detection, however, provides a more streamlined approach by identifying and classifying objects while marking their positions. This makes it ideal for real-time tasks like detecting faces in security footage or identifying obstacles for autonomous vehicles.

Applications of YOLO11 and Object Detection

YOLO11's advanced object detection features make it useful across many industries. Let’s take a look at some examples.

Using YOLO11 for Retail Analytics

YOLO11 and object detection are redefining retail analytics by making inventory management and shelf monitoring more efficient and accurate. The model's ability to quickly and reliably detect objects helps retailers track stock levels, organize shelves, and reduce mistakes in inventory counts.

For example, YOLO11 can detect specific items like sunglasses on a store shelf. But why would a retailer want to monitor a shelf? Keeping shelves stocked and organized is vital for ensuring customers can find what they need, which directly impacts sales. By monitoring shelves in real-time, retailers can quickly spot when items are running low, misplaced, or overcrowded, helping them maintain an organized and attractive display that improves the shopping experience.

Fig 3. An example of using YOLO11 to detect products on shelves.

YOLO11 in Smart City Applications

A bustling city relies on smooth traffic flow and safe streets to function efficiently, and YOLO11 can help make this possible. In fact, many smart city applications can be integrated with YOLO11. 

One interesting case involves using object detection to identify license plates on moving vehicles. By doing so, YOLO11 can support faster toll collection, better traffic management, and quicker regulation enforcement. 

Fig 4. Using object detection and YOLO11 to detect license plates.

Insights from Vision AI systems monitoring roads can alert authorities to traffic violations or congestion before they escalate into bigger problems. YOLO11 can also detect pedestrians and cyclists, making streets safer and more efficient for everyone. 

As a matter of fact, YOLO11’s ability to process visual data makes it a powerful tool for improving city infrastructure. For instance, it can help optimize traffic light timing by analyzing vehicle and pedestrian movement. It can also enhance safety in school zones by detecting children and alerting drivers to slow down. With YOLO11, cities can take proactive measures to address challenges and create a more efficient environment for everyone.

Real-time Video Detection with YOLO11: Increasing Accessibility

Real-time object detection refers to the ability of a system to identify and classify objects in a live video feed as they appear. YOLO11 is designed for superior real-time performance and excels at supporting this capability. Its applications go beyond just streamlining processes - it can also help create a more inclusive and accessible world.

For instance, YOLO11 can assist visually impaired individuals by identifying objects in real-time. Based on the detections, audio descriptions can be provided, which helps users navigate their surroundings with greater independence.

Consider a visually impaired person shopping for groceries. Picking out the right items can be challenging, but YOLO11 can assist. As they place items in their cart, a system integrated with YOLO11 could be used to identify each item - like bananas, avocados, or a carton of milk - and provide real-time audio descriptions. This allows them to confirm their choices and ensure they’ve got everything they need. By recognizing everyday items, YOLO11 can make shopping simpler.

Fig 5. Object detection can help make the world more accessible for the visually impaired.

Step-By-Step Guide to Object Detection with YOLO11 

Now that we’ve covered the basics of object detection and its diverse applications, let’s dive into how you can get started with the Ultralytics YOLO11 model for tasks like object detection.

There are two straightforward ways to use YOLO11: through the Ultralytics Python package or the Ultralytics HUB. Let’s explore both methods, starting with the Python package.

Running Inferences using YOLO11

Inferencing is when an AI model analyzes new, unseen data to make predictions, classify information, or provide insights based on what it learned during training. With respect to object detection, that means identifying and locating specific objects within an image or video, drawing bounding boxes around them, and labeling them based on the model's training.

To infer using the YOLO11 object detection model, you’ll first need to install the Ultralytics Python package via pip, conda, or Docker. If you encounter any installation issues, check out the troubleshooting guide for tips and tricks to help you solve them. Once installed, you can use the following code to load the YOLO11 object detection model and make predictions on an image.

Fig 6. Running an inference on an image using YOLO11n.

Training a Custom YOLO11 Model

YOLO11 also supports custom training to better fit your specific use cases. By fine-tuning the model, you can tailor it to detect objects relevant to your project. For instance, when using computer vision in healthcare, a custom-trained YOLO11 model could be used to detect specific abnormalities in medical images, such as tumors in MRI scans or fractures in X-rays, helping doctors make faster and more accurate diagnoses.

The code snippet below showcases how to load and train a YOLO11 model for object detection. You can start from a YAML configuration file or a pre-trained model, transfer weights, and train on datasets such as COCO for more refined object detection capabilities.


from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n.yaml")  # build a new model from YAML
model = YOLO("yolo11n.pt")  # load a pretrained model (recommended for training)
model = YOLO("yolo11n.yaml").load("yolo11n.pt")  # build from YAML and transfer weights

# Train the model
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)

After you train a model, you can also export the trained model in various formats for deployment in different environments.

YOLO11 Object Detection on Ultralytics HUB

For those looking for a no-code alternative, Ultralytics HUB provides an easy-to-use Vision AI platform for training and deploying YOLO models, including YOLO11.

To run object detection on images, simply create an account, navigate to the ‘Models’ section, and select the YOLO11 object detection model variant. Upload your image, and the platform will display the detected objects in a preview section.

Fig 7. Running inferences on Ultralytics HUB.

By combining the flexibility of the Python package with the ease of the HUB, YOLO11 makes it simple for developers and businesses alike to harness the power of advanced object detection technology.

Key Takeaways

YOLO11 sets a new standard in object detection, combining high accuracy with versatility to meet the needs of various industries. From enhancing retail analytics to managing smart city infrastructure, YOLO11 is built for real-time, reliable performance across countless applications.

With options for custom training and an easy-to-use interface through Ultralytics HUB, integrating YOLO11 into your workflows has never been simpler. Whether you're a developer exploring computer vision or a business looking to innovate with AI, YOLO11 offers the tools you need to succeed.

To learn more, check out our GitHub repository, and engage with our community. Explore AI applications in self-driving cars and computer vision for agriculture on our solutions pages. 🚀

Facebook logoTwitter logoLinkedIn logoCopy-link symbol

Read more in this category

Let’s build the future
of AI together!

Begin your journey with the future of machine learning