Closed deepak36ccny closed 9 months ago
👋 Hello @deepak36ccny, thank you for leaving an issue on Roboflow Notebooks.
If you are filing a bug report, please be as detailed as possible. This will help us more easily diagnose and resolve the problem you are facing. To learn more about contributing, check out our Contributing Guidelines.
If you require support with custom code that is not part of Roboflow Notebooks, please reach out on the Roboflow Forum or on the GitHub Discussions page associated with this repository.
Do you have more questions about Roboflow that we haven't responded to yet? Feel free to ask them on the Roboflow Discuss forum. Our developer advocates and community team actively respond to questions there.
To ask questions about Notebooks, head over to the GitHub Discussions section of this repository.
Assign to me, so I can working on it
Hi @deepak36ccny 👋🏻 You can do it using supervision.
pip install supervision
in your project, and than add this to your code:
import supervision as sv
from ultralytics import YOLO
model = YOLO('yolov8x-seg.pt')
image = ...
result = model(image)[0]
detections = sv.Detections.from_ultralytics(result)
mask_annotator = sv.MaskAnnotator()
annotated_image = mask_annotator.annotate(
scene=image.copy(),
detections=detections
)
You can learn more about supervision annotators here: https://supervision.roboflow.com/annotators
Feel free to reopen this issue if you will face any problems.
Hi, I want to get the segmented mask, but not the bounding box and the labeling that comes with it. How can I do this with Ultralytics Yolov8 segmentation model? Thank you.