Ultralytics YOLO27: Join the waitlist.
License YOLO
Ultralytics YOLO

Object detection and tracking with Ultralytics YOLOv8

Learn object detection and tracking with Ultralytics YOLOv8: set up the model, configure ByteTrack or BoT-SORT, and run real-time inference on video and webcam.

Nuvola LadiNuvola Ladi3 min read

Listen to this article

Learn object detection and tracking with Ultralytics YOLOv8: set up the model, configure ByteTrack or BoT-SORT, and run real-time inference on video and webcam.

Today, we're diving into another chapter of our journey with Ultralytics YOLOv8. In this episode, our focus is on object detection and tracking, a fundamental aspect of computer vision that enables many applications across industries. Join us as we explore the capabilities of YOLOv8 in this domain, with Nicolai Nielsen.

Object detection and tracking play crucial roles in various scenarios, from surveillance systems to industrial automation. With Ultralytics YOLOv8, these capabilities are easy to put to work. Nicolai walks us through the process, highlighting key insights and practical demonstrations along the way.

Setting the stage#

Before delving into the intricacies of object detection and tracking, Nicolai emphasizes the versatility of Ultralytics YOLOv8. Whether it's identifying individuals in a crowded space or monitoring objects on a production line, YOLOv8 offers a robust solution.

Model setup#

In this video, Nicolai works in Visual Studio Code and demonstrates how to set up the Ultralytics YOLOv8 model for object detection and tracking. Using the medium model, he shows how even larger models can run in real time on capable hardware.

Configuring the tracker#

In object tracking, choosing the right tracker is important. Nicolai introduces us to the ByteTrack algorithm, known for its accuracy and reliability. Additionally, he highlights the versatility of Ultralytics YOLOv8 by mentioning alternative trackers like BoT-SORT, catering to diverse tracking requirements.

Real-time inference#

With the model and tracker configured, it's time to witness Ultralytics YOLOv8 in action. During this tutorial, we can see how the program runs, providing a live demonstration of object detection and tracking using a pre-recorded video. Each object is assigned a unique ID, so it can be followed from frame to frame.

Nicolai Nielsen showcasing object detection and tracking with Ultralytics YOLOv8

Fig 1. Nicolai Nielsen showcasing the inner-working of object detection and tracking with Ultralytics YOLOv8.

Live webcam testing#

Taking the demonstration a step further, we see how one can switch to a live webcam feed to showcase real-time tracking capabilities. From detecting individuals to identifying objects, Ultralytics YOLOv8 maintains consistency in tracking, even amidst camera movements and occlusions.

Object tracking on multiple streams#

Object tracking across multiple video streams using multithreading is ideal for handling numerous surveillance camera feeds. Using Python's threading module with Ultralytics YOLOv8, each thread manages a separate tracker instance, enabling efficient background processing. This feature is useful and plays an important role in advanced analytics.

Practical applications#

As the demonstration unfolds, Nicolai underscores the practical relevance of object detection and tracking. From the healthcare industry to agriculture and the manufacturing industry, the applications are vast and varied. He also emphasizes the importance of integrating tracking functionalities alongside detection for enhanced efficiency and accuracy.

Wrapping up#

In conclusion, the countless applications for object detection and tracking allow for flexibility and creative solutions within any industry. Join us in exploring what computer vision can do with Ultralytics YOLOv8.

Stay tuned and join our community as we continue to explore the ever-evolving landscape of artificial intelligence and machine learning.

Written by

Nuvola Ladi
Nuvola Ladi

Digital Content Manager · Ultralytics

Nuvola Ladi is a Digital Content Manager at Ultralytics, where she creates content covering vision AI and Ultralytics YOLO and represents the company at industry events such as the PyTorch Conference 2025. Based in Spain, she holds a Master's degree in Visual and Digital Media from IE University. Before joining Ultralytics, she held roles at organizations including XVA Gallery & Hotel and Rolex.

Comments

Ask a question, share your results, or help someone else.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Turn drone and aerial imagery into real-time insights for agriculture, aquaculture, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Apply computer vision in aerospace with Ultralytics YOLO for aircraft inspection, runway FOD detection, airport ground operations, and composite defect detection.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning