绿色检查
链接复制到剪贴板

Region-based object counting using Ultralytics YOLO11

Learn how Ultralytics YOLO11 simplifies region-based object counting for sectors like retail, traffic, and security, enabling real-time Vision AI insights.

Object counting might sound simple, but in busy places like roads, stores, or warehouses, it can quickly become a very real challenge. For years, object counting has been done primarily by hand. Hours have been spent counting vehicles, tracking footfall in and out of stores, or monitoring movement for security purposes. However, this approach is time-consuming, prone to mistakes, and doesn’t scale well.

This is where artificial intelligence (AI), specifically computer vision, comes into play. Computer vision is a subfield of AI that deals with processing visual data, similar to humans. One of its key applications is object counting, which helps automatically detect and track objects in a given area.  

Typically, object counting is limited to simply totaling a number of items; it doesn’t show where those objects are. Region-based counting or using counting regions solves this by focusing on specific areas within an image. It provides more detailed insights and helps track movement in a more meaningful way.

Ultralytics YOLO11 is a computer vision model that supports various computer vision tasks, like object detection and tracking, that can be used for region-based object counting. In this article, we’ll explore how Ultralytics YOLO11 can be used for counting objects within a region, its real-world applications, and key benefits. Let’s get started!

An overview of object counting in regions

Detecting and counting objects in an image can only tell us so much, especially in places like airports or malls, where people can crowd in multiple regions in a single frame. Insights like exactly where those objects are and how many pass through specific regions are more important. 

Computer vision models such as YOLO11 can be used easily for such computer vision applications. By assigning zones to key locations, like boarding gates or waiting lounges, YOLO11 can be used to count only the objects in that particular space. Movable regions can also be used to find the count of objects in different regions in real-time.

Fig 1. An example of using YOLO for region-based player counting in sports.

Ultralytics YOLO11 can make this process simple and efficient. It can help with detecting objects, tracking their movement, and counting them based on the zones they enter or exit. What makes YOLO11 especially impactful is its ability to deliver real-time results without compromising accuracy. It also supports multi-object tracking within each defined zone, helping systems to count and categorize various objects all at once. 

Using Ultralytics YOLO11 for object counting in regions

Ultralytics provides easy-to-use solutions that showcase cutting-edge use cases of YOLO models. These include real-world solutions like object counting, object counting in movable regions, blurring, and speed estimation. 

Setting up and running the Ultralytics solution for region-based object counting is straightforward and simple. This allows users to focus on insights rather than complex configurations. 

Behind the scenes, the region-based object-counting solution uses YOLO11 to detect objects in each frame of the video. These detections are then passed through a tracking algorithm (such as BoT-SORT or ByteTrack) to assign consistent IDs to each object across frames. 

Once objects are detected and tracked, the system checks whether they intersect with any of the predefined regions (polygons, rectangles, or lines). If they do, they are counted based on their entry or movement across those zones. 

Here are some other key features of the Ultralytics solution for region-based object counting:

  • Fast processing: The solution enables real-time object counting using YOLO11, ensuring quick and efficient analysis of video streams.
  • Customizable regions: Users can define specific regions in a video frame using polygons, rectangles, or lines, allowing precise control over where counting occurs.
  • Multi-object counting: The system can detect and count multiple types of objects simultaneously within the same defined region.
  • Easy integration: Integration with existing systems is seamless using the Ultralytics Python API or command-line interface, requiring minimal configuration effort.

Getting hands-on with object counting in regions

To get started with the Ultralytics solution for region-based counting, you can take a look at the official Ultralytics documentation, which walks step by step through how to use YOLO11 to count objects in regions

If you have any issues while setting up the solution, here are some tips to keep in mind:

  • Ensure the Ultralytics Python package is correctly installed. Check out the troubleshooting guide in the official documentation.
  • Verify region settings and make sure the defined regions are set up correctly in the interface.
  • Check for updates and new releases and keep the Ultralytics Python package up to date.

Real-world applications of object counting in regions

Now that we have a better understanding of how to use Ultralytics YOLO11 for region-based object counting, let’s explore some real-world applications it can be used for.

Tracking customer flow for retail analytics

Region-based object counting can easily answer questions related to where customers spend most of their time in a store. YOLO11 can help retailers track movement patterns at key locations, such as exit points, checkout counters, and high-interest product sections. Instead of just measuring overall foot traffic, this region-based approach provides insights into how many customers visit specific areas. 

Using the Ultralytics solution helps retailers by eliminating the need for manual coding or complex setup processes. Retailers can easily mark different sections of the store to track customer movement and foot traffic using polygons or rectangular lines.

YOLO11 can then detect objects, track their movement, and update counts in real time as people enter or leave that region. This helps retailers understand customer flow, measure engagement, and make data-driven decisions.

Fig 2. YOLO being used to count people outside a store using region-based detection.

Traffic management in toll plazas

Cities are always bustling with traffic, with cars merging onto highways, stopping at traffic lights, and lining up at busy intersections. Managing traffic is a critical part of keeping roads safe and things moving smoothly. R

egion-based object counting with YOLO11 can support this by dividing roadways into sections, such as intersections or toll lanes. Traffic management teams can monitor vehicle counts in each region in real time. This live data enables quicker responses, better traffic planning, and smoother overall flow.

An interesting use case of this is toll plazas that can quickly become crowded if they’re not monitored properly. With the Ultralytics solution for region-based counting, each toll lane can be tracked separately. I

nstead of monitoring all the traffic at once, the system focuses only on the vehicles passing through specific lanes. As cars enter or leave, YOLO11 can count them instantly, helping operators keep track of which lanes are getting busy.

Fig 3. Region-based counting enabled by YOLO11 at a toll plaza.

Animal counting in farms and shelters

Counting animals can be difficult, especially when they move in herds through tight spaces. A few missed counts here and there can lead to problems with feeding, health checks, or farm records. For farmers, maintaining accurate numbers without slowing things down is essential.

Ultralytics YOLO11 makes this process much smoother. Farmers can use it to create custom tracking zones, whether it’s a wide gate, a narrow path, or a curved enclosure. Within these zones, the model detects animals in real time, marks them with bounding boxes, and tracks their movement. For example, it can quickly and accurately count large herds of sheep or goats as they move through a fenced corridor without any manual effort. 

Crowd monitoring for public safety

Crowded public spaces can go from empty to packed in a matter of minutes. In metros, airports, or concerts, too many people in one place can slow down movement and create safety concerns. Monitoring foot traffic in real-time gives authorities a way to spot crowd build-ups early and act before things get out of hand.

Specifically, region-based counting using YOLO11 makes it possible to monitor movement across specific zones like entry gates, platforms, or waiting areas rather than tracking everyone in view. This allows security teams to focus on movement patterns, identify congestion points quickly, and make better operational decisions ranging from schedule changes to staff deployment.

Fig 4. Counting people using YOLO11 within regions for better metro crowd management.

主要收获

Region-based object counting with Ultralytics YOLO11 makes tracking objects in specific areas more efficient and accurate. Whether in retail, traffic management, or public safety, this Vision AI-driven approach helps businesses and city planners make better, data-backed decisions. Automating counting reduces manual effort and improves overall efficiency.

In the future, AI and computer vision will likely make object counting even smarter. We can expect better accuracy, adaptive learning to handle different environments, and integrations with automation and IoT (Internet of Things) systems. This kind of smart automation is shaping the future of how we manage spaces, people, and movement.

Learn more about AI on our GitHub repository and be part of our growing community. Explore advancements in AI in automotive vehicles and computer vision in agriculture. Check out our licensing options and bring your Vision AI projects to life.

LinkedIn 徽标Twitter 徽标Facebook 徽标复制链接符号

在此类别中阅读更多内容

让我们共同打造人工智能的未来

开始您的未来机器学习之旅