tasks/segment/ #8734
Replies: 101 comments 233 replies
-
|
I have a question about segmentation dataset and really wish you can answer, my dataset contains lots of information including bbox and segmentations, however it has wrong category_id and all categories have been marked as the same category, does this has bad influence on finetuing? If so, how can I fix that? |
Beta Was this translation helpful? Give feedback.
-
|
How can I run my code on GPU ? From the processor the recognition is freezing |
Beta Was this translation helpful? Give feedback.
-
|
I am building a streamlit app on YOLOv8 models, |
Beta Was this translation helpful? Give feedback.
-
|
has the ability to use image masks instead of contour points as labels ever been implemented ? |
Beta Was this translation helpful? Give feedback.
-
|
Hi there! I am using the pre-trained segmentation model by Yolov8. I have an image that contains several objects, and I only want to receive the mask of any person present in the frame, while ignoring all the other masks. My requirements:
|
Beta Was this translation helpful? Give feedback.
-
|
I have a question, how do you visualize the segmentation mask with the detected label? it seems it's not discussed in the documentation, it just shows here how to predict using it but not visualizing it with an image. I even checked the list of results but it seems its just returning segmentation masks, not the classes that it predicts, with that said my question is can you visualize the segmentation mask with a label only because of what i see in the tutorial it has a bounding box too which i think that's how you put the label there because i think the segmentation masks are not directly related in the class ID, my goal is to detect object with segmentation and put label to it without bounding box. looking forward to your answer thank you |
Beta Was this translation helpful? Give feedback.
-
|
I have a question. Can anyone suggest me how can I save the predicted bounding box and segmented mask in the format of : |
Beta Was this translation helpful? Give feedback.
-
|
I have an important question, i want going to train yolov8 model for instance segmentation but i need to save all the segmented mask on my disk after training the model. how i can get that |
Beta Was this translation helpful? Give feedback.
-
|
Query: |
Beta Was this translation helpful? Give feedback.
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
-
|
Hi there! I'd like to share with you a project I've recently worked on. Together with a colleague, we've created a repository that serves as a tool with a SAHI-like inference but specifically tailored for instance segmentation tasks. Our repository allows for segmenting small objects in images by combining mask predictions from various overlapping patches. We support both YOLOv8-seg and FastSAM. Additionally, we have a variant for object detection tasks, and the key distinction from SAHI is the support for all the current models from the Ultralytics team: YOLOv9, YOLOv8, RTDTR, and others. I'm a huge fan of Ultralytics, so I'd be thrilled to assist you if you're interested in our project. I'm confident that for many people, the task of finding a large number of segments would be beneficial, especially when using standard Ultralytics models. Here's the link to the project: YOLO-Patch-Based-Inference. Honestly, I wasn't sure where to share information about the project, so I decided to start with the YOLO-seg support section, as it seemed like the most obvious choice. I would greatly appreciate your feedback on the potential usefulness of our project for you. Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
YOLO V8 has pre-trained models that are performed on the COCO dataset. However, I am working on a project for image segmentation where the classes are not available in the COCO dataset. In this case, do I need to train a model from scratch? About the dataset: Looking for an answer. Thankyou! |
Beta Was this translation helpful? Give feedback.
-
|
Is Panoptic Segmentation supported by Yolov8 or in any version of Yolo? |
Beta Was this translation helpful? Give feedback.
-
|
I have trained custom yolov8 model for Instance segmentation on video. Now I have to make video inference for the same please guide me. And I have to deploy it in mobile application which was developed in flutter give me guidance on these for Yolov8 .tflite format model for instance segmentation. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I have a question. I have trained a custom model based on a pre trained one to segment the shirts from cyclists. The problem however is that it recognizes 2 slightly different shirt on 1 image. My idea was to only use the one with the highest confidence score, but this object appears to be none (results.probs or results.keypoint are both none objects). Is it possible to get the confidence score or do I have to apply a different methode? |
Beta Was this translation helpful? Give feedback.
-
|
Hey, Would like to ask a few questions I encountered in my tinkering with the segmentation task -
d] How should I freeze the pre-trained weights you learned, if I would like to keep the feature extraction (backbone) of your model? Thanks alot! |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I have a question. I would like to calculate the Dice score using our predicted masks and ground truth masks while working with the YOLO11n-seg model. Could you help me with this? Thank you very much in advance! |
Beta Was this translation helpful? Give feedback.
-
|
Question 1: The resolution of my dataset is 1280x720 and the target is in the middle of the image, if I set imgsz=640 during training, is it taking 640x640 from the middle of the image? Or is there another way to do it? |
Beta Was this translation helpful? Give feedback.
-
|
i have a problem with my meshes. i have images which are about 2000*6000 pixels in size. i have trained a mesh with 1000 images with a resolution of 1920p. however, i don't get everything segmented. every now and then it just cuts it off. and as soon as i lower the resolution during inference it recognises more, but not as sharp as before. what could be the reason for this? |
Beta Was this translation helpful? Give feedback.
-
|
Hi there! |
Beta Was this translation helpful? Give feedback.
-
|
For the Python API, is there a way to disable the segmentation output to save time but just use the bounding boxes? |
Beta Was this translation helpful? Give feedback.
-
|
Just to confirm, while auto annotating, instead of using SAM one can also use one's custom build model. right ?? |
Beta Was this translation helpful? Give feedback.
-
|
Good day all, I am working on a project with instance segmentation, I want to get the area of the segmented mask in cm2 and the depth. What’s the best approach for this? Accuracy really matters here. Thabk you |
Beta Was this translation helpful? Give feedback.
-
|
Can I use YOLOv9 and YOLOv12 segmentation using: I have tried using this for one of my semantic segmentation task. I am also not sure about the evaluation metrics on training the segmentation model. I have seen mAP for segmentation as well. I want to use Precision, |
Beta Was this translation helpful? Give feedback.
-
|
Hello Ultralytics team, I would appreciate your clarification on the loss functions used in the following segmentation models: YOLOv8-seg, YOLOv9-seg and YOLO11-seg Specifically, could you please specify which types of losses are applied to the bounding box, classification, and segmentation (mask) branches in each version? Thank you very much for your time and support. |
Beta Was this translation helpful? Give feedback.
-
|
Dear All, I'm using Yolo8n to classify only persons. I'm using an NVIDIA Jetson Orin Nano for inference and a Raspberry Pi for alarm activation. My question about segmentation is: Can I use segmentation to identify a person when they are more than 20 m from the camera where the event happened? If yes, could you guide me on how to do that? At this distance, I can't yet detect the person. The event must be detected at night, not in daylight, using night-vision cameras. |
Beta Was this translation helpful? Give feedback.
-
|
zoom in
…On Thu, 15 Jan 2026 at 21:22, Andrés Rojas ***@***.***> wrote:
Dear All, I'm using Yolo8n to classify only persons. I'm using an NVIDIA
Jetson Orin Nano for inference and a Raspberry Pi for alarm activation. My
question about segmentation is: Can I use segmentation to identify a person
when they are more than 20 m from the camera where the event happened? If
yes, could you guide me on how to do that? At this distance, I can't yet
detect the person. The event must be detected at night, not in daylight,
using night-vision cameras.
—
Reply to this email directly, view it on GitHub
<#8734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATLJGEHOEPDYVM6H6WPC2LL4G6ZUTAVCNFSM6AAAAABEKFCKICVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNJQHA2TKMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
|
Hello, I am trying to train on a pre-trained yolo segmentation model. I'm using yolo26n-seg.pt and a dataset from roboflox. I keep getting a no labels found warning. I have verified that the folder structure is as it needs to be - images > train, val and labels > train, val. I've verified that file stem names are the same in image and label folders, and I've visually verified that the labels are polygons outlining book spines. The output I'm getting includes:
Could you please help me debug this? |
Beta Was this translation helpful? Give feedback.
-
|
to @ALL
May I ask a general question,
What is the effect of reducing the image size on classification accuracy.
Suppose my input images are 16:9 (or 4:3) aspect ratio images taken from
mobile camera ( shape is either 2000x4000 or 3000x4000).
I want to build a classification model. I want to know the effects of input
images resolution on the model accuracy.
What will happen if I keep the input imgsz to
1. At imgsz = 640
2. at imgsz = 1280
3. At imgsz = 320 (for smaller VRAM GPUs)
Which one should I prefer or if any of you have already tested this please
tell your logic behind resizing images.
I don't just want to know the appropriate value for imgsz, I want to know
the whole rationale behind it with proper logic.
Thank you in advance for reading this.
…On Fri, 30 Jan, 2026, 4:08 pm Glenn Jocher, ***@***.***> wrote:
That warning typically means the loader is discarding all your mask labels
as invalid/empty (common with Roboflow exports if polygon coords are not
normalized to [0,1], the row has an odd token count, or class ids fall
outside 0..nc-1), which then also triggers the zero-size array... error
during label plotting—please paste (as text) one full line from a
labels/train/*.txt file and your data.yaml, and run this and share the
output:
yolo checks
After you fix the label format, delete any cached label files and rerun:
find path/to/dataset/labels -name "*.cache" -delete
For reference, each segmentation row must be <class-index> <x1> <y1> <x2>
<y2> ... with coordinates normalized and at least 3 (x,y) points—see the Segmentation
dataset format <https://docs.ultralytics.com/datasets/segment/> and the
end-to-end training example in the Instance Segmentation docs
<https://docs.ultralytics.com/tasks/segment/>.
—
Reply to this email directly, view it on GitHub
<#8734 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATLJGEFBDQ3D2POWDNVSXJD4JMYA7AVCNFSM6AAAAABEKFCKICVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNRUHE3DQOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
|
hello if I wanted to use your segmentation model for inference on a live camera preview, to only detect a single item at a time, how would I go about it? thank you. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
tasks/segment/
Learn how to use instance segmentation models with Ultralytics YOLO. Instructions on training, validation, image prediction, and model export.
https://docs.ultralytics.com/tasks/segment/
Beta Was this translation helpful? Give feedback.
All reactions