Ultralytics YOLO27: Join the waitlist.
License YOLO
Ultralytics YOLO

Object Detection with a pre-trained Ultralytics YOLOv8 model

Learn how to run object detection with a pre-trained Ultralytics YOLOv8 model in two lines of Python, tune prediction arguments, and detect objects on a webcam.

Nuvola LadiNuvola Ladi3 min read

Listen to this article

Learn how to run object detection with a pre-trained Ultralytics YOLOv8 model in two lines of Python, tune prediction arguments, and detect objects on a webcam.

In this tutorial, we explore Ultralytics YOLO models and how to use them for object detection.

Ultralytics YOLOv8 model overview#

Let's start with the features of the Ultralytics YOLOv8 model. This model represents a significant advancement in the field of object detection, offering a strong balance between speed and accuracy. Compared to previous YOLO models, YOLOv8 delivers faster inference without compromising detection accuracy.

During our exploration, we'll compare Ultralytics YOLOv8's inference speed and accuracy to other YOLO models, showing its advantages for real-time object detection. With YOLOv8, users can expect a significant improvement in performance across a wide range of applications.

Using pre-trained Ultralytics YOLOv8 models#

One of the key highlights of the Ultralytics YOLOv8 model is the ease of use, especially with pre-trained models. Whether you're an expert developer or just starting your journey in computer vision, machine learning or deep learning, using pre-trained YOLOv8 models is straightforward.

With just two lines of Python code, you can run a pre-trained Ultralytics YOLOv8 model for object detection. This makes it easy to integrate computer vision capabilities into your projects with minimal effort.

Ultralytics YOLOv8 documentation and arguments#

It also helps to know the resources available for the Ultralytics YOLOv8 model. Our future tutorials will cover a range of topics, including custom object detection, object tracking, pose estimation, and segmentation, providing comprehensive guidance for users at every level.

Main tasks performed by Ultralytics YOLO models

Fig 1. Main tasks performed by Ultralytics YOLO models.

Furthermore, we'll cover the key prediction arguments for getting the most out of Ultralytics YOLOv8. Understanding these arguments, such as source, confidence threshold, and device selection, will help you tailor your models to specific requirements.

Real-time object detection with webcam#

Ultralytics YOLOv8 can also run real-time object detection on a webcam. In the video, YOLOv8 detects objects in a live webcam feed at over 100 frames per second.

Whether you're monitoring a busy street or tracking objects in a chaotic environment, Ultralytics YOLOv8 performs well in real-time scenarios. With the ability to detect a wide range of objects with precision and efficiency, YOLOv8 opens up new possibilities for applications across various industries, including healthcare, agriculture and manufacturing.

Wrapping up#

In conclusion, YOLOv8 represents a significant step forward in object detection. At Ultralytics, we're committed to giving developers and researchers practical tools and resources for machine learning and artificial intelligence. YOLOv8 has since been succeeded by Ultralytics YOLO26, which you can run with the same Python API.

Watch the full video and stay tuned for more tutorials, guides, and insights. Join our community to share what you build with Ultralytics YOLO!

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