Object detection and segmentation using YOLOv8 for Images | Image/Object segmentation using Python

preview_player
Показать описание
In this video, we are going to do Object detection and segmentation in an image using the Yolov8 model. We will segment the various detected objects and display the segmentation masks and also the outline segments in Python.

Image segmentation is primarily required when we need to segment objects from the scene and do some other analysis on it. The most common way to do object segmentation or object segmentation is that we have the get a mask from the model and we then convert that mask to a grayscale image and display it using Opencv. In this video we are going to do just that. In addition to that we are also going to draw the outline segments of the different objects in the image. Lastly, we are also going to print the class names of the objects detected.

coco_names = ["person" , "bicycle" , "car" , "motorcycle" , "airplane" , "bus" , "train" , "truck" , "boat" , "traffic light" , "fire hydrant" , "street sign" , "stop sign" , "parking meter" , "bench" , "bird" , "cat" , "dog" , "horse" , "sheep" , "cow" , "elephant" , "bear" , "zebra" , "giraffe" , "hat" , "backpack" , "umbrella" , "shoe" , "eye glasses" , "handbag" , "tie" , "suitcase" ,
"frisbee" , "skis" , "snowboard" , "sports ball" , "kite" , "baseball bat" ,
"baseball glove" , "skateboard" , "surfboard" , "tennis racket" , "bottle" ,
"plate" , "wine glass" , "cup" , "fork" , "knife" , "spoon" , "bowl" ,
"banana" , "apple" , "sandwich" , "orange" , "broccoli" , "carrot" , "hot dog" ,
"pizza" , "donut" , "cake" , "chair" , "couch" , "potted plant" , "bed" ,
"mirror" , "dining table" , "window" , "desk" , "toilet" , "door" , "tv" ,
"laptop" , "mouse" , "remote" , "keyboard" , "cell phone" , "microwave" ,
"oven" , "toaster" , "sink" , "refrigerator" , "blender" , "book" ,
"clock" , "vase" , "scissors" , "teddy bear" , "hair drier" , "toothbrush" , "hair brush"]
Рекомендации по теме
Комментарии
Автор

Thank you so much for your help. It's very clear, even to a non-native speaker. Thank you again very much

showpiecep
Автор

THANK U VERY MUCH FOR THIS AMAZING VIDEO. Love from Indonesia😻😻

jasanontonfilm
Автор

very interesting .. how it can be to generate more than one image(large size)?

mulugetashitie
Автор

Hi thanks for ur video. How do create text file for our custom data? Do you have any video to create text file ?

DeathlessLife
Автор

can we access a custom-trained model when calling through YOLO

CITLAB-zpsj
Автор

sir is there any video to fine tune the yolo v8 for image segmentation on custome dataset.
plz sir give me the link

RanjitSingh-rqqx
Автор

What do other values mean in the doggo.txt file? I know the first value is for the class label.

sudhirprasad
Автор

I'd have to use some python code, YOLO and a webcam so it detects visually.

DDDprinting
Автор

Is there a way of separating masks according to the class of the object

achukasimonallan
Автор

I got
AttributeError: 'Masks' object has no attribute 'masks'. See valid attributes below.

Does anyone have solution?

rfbxuqj