Meet YOLO26: next-gen vision AI.
Ultralytics
Ultralytics YOLO

Segmentation with pre-trained Ultralytics YOLOv8 models in Python

Discover the power of YOLOv8. Learn about its speed, accuracy, and real-time detection capabilities. Explore key highlights and join our GitHub Discussions for more.

NUNuvola Ladi
2 min read
Segmentation with pre-trained Ultralytics YOLOv8 models in Python

Let’s take a look at the world of object segmentation with the Ultralytics YOLOv8 model. In this blogpost we’ll guide you through the ins and outs of setting up and running segmentation with ease in Python.

Link to this sectionSetting the stage for segmentation#

Let's kick things off by focusing on YOLOv8. Installing this powerhouse model is a breeze, and within moments, you'll be primed and ready to tap into its segmentation capabilities.

Instance segmentation takes you one step further from object detection by pinpointing individual objects within an image and separating them from the background.

Its output comprises masks or contours outlining each object, accompanied by class labels and confidence scores. This technique proves invaluable when precise object shapes are essential, providing not just object location but also detailed information on their form.

With a few simple commands, you'll be able to execute predictions from the command line, witnessing first-hand the innovation and simplicity that YOLOv8 brings to the table.

Link to this sectionLive segmentation: Bringing images to life#

But why limit ourselves to static images when we can experience segmentation in real time? Our Python script is your gateway to the dynamic world of live segmentation.

By leveraging the YOLO class and integrating it seamlessly with OpenCV, you can breathe life into your projects, uncovering hidden insights and patterns as you go.

From identifying chairs to delineating plants, the possibilities are as endless as your imagination.

Nicolai Nielsen outlining the COCO segmentation pre-trained models

Fig 1. Nicolai Nielsen outlining the COCO segmentation pre-trained models.

At Ultralytics, we also provide support for COCO segmentation pre-trained models, which serve as an excellent starting point for any use case. You can then fine-tune these models for your specific needs.

As a whole, we offer support for various datasets, such as carparts instance segmentation, crack segmentation, and industrial package segmentation. Training segmentation models on these datasets is made simple with a single command available in our documentation:

Link to this sectionStay tuned#

Join us in the coming videos as we dive deeper into the realm of YOLOv8, exploring custom training and inference on your very own datasets.

We are committed to simplifying the complexities of AI and machine learning, one segment at a time. Our mission is to empower individuals and organizations alike to harness the full potential of cutting-edge technologies like YOLOv8. With our guidance and your curiosity, there's no telling what incredible breakthroughs await.

Join us as we unlock the full potential of Ultralytics YOLOv8. Watch the full video Watch the full video!

Explore solutions

Real-time AI that works with your team

AI 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
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI 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
Real-time AI tailored to your operation

AI 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
Real-time AI that works with your team

AI 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
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI 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
Real-time AI tailored to your operation

AI 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
Real-time AI that works with your team

AI 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
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI 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
Real-time AI tailored to your operation

AI 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