-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finally, the working version of YoloV8 Instance Segmentation #918
Conversation
The interface is identical to the detection model `from sahi.sahi import AutoDetectionModel detection_model = AutoDetectionModel.from_pretrained( pred = get_sliced_prediction('small-vehicles1.jpeg', detection_model, pred.export_visuals('test_results/', file_name='sliced_small-vehicles1-seg.jpeg')` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating!! I managed to use yolov8 seg model to sahi. However, you missed threshold_confidence. At line 72, 73
Original, Line 72, 73
prediction_result_ = [(result.boxes.data[result.boxes.data[:, 4] >= 0.5],
result.masks.data[result.boxes.data[:, 4] >= 0.5])
for result in prediction_result]
Modified
prediction_result_ = [(result.boxes.data[result.boxes.data[:, 4] >= self.confidence_threshold],
result.masks.data[result.boxes.data[:, 4] >= self.confidence_threshold])
for result in prediction_result]
This code worked well.
Thanks a lot! I set a fixed trash hold for local tests, forgot to change it back |
Probably I did something wrong, but I still have the following error:
I use the following code:
Here is the picture: I detect obstacles on the roof, but somehow I get an error with invalid boolean mask. I also had this error with previous pull request. At the same time, if I use another parameters, like
then it seems to work, but result.object_prediction_list[0].mask.bool_mask contains 'False' values instead of points. |
I will check what the problem may be asap |
Is this implemented in the main branch? I can't see the yolov8 segmentation model there |
Hey @sweetlhare, is there any update on this? |
Any update on this? |
Any updates? masks are correct and it works fine |
Thanks a lot, can you update please? @sweetlhare Guys if you have problem with new version of ultralytics, you can change |
|
the same for me |
which code you have been used for segmentation with sahi? |
I also wrote similar code to yours, but I found that the memory usage was very very high.. |
Ouod you please write which code you have been using
…On Sat, 28 Oct 2023 at 5:50 AM, Shilong Li ***@***.***> wrote:
I also wrote similar code to yours, but I found that the memory usage was
very very high..
—
Reply to this email directly, view it on GitHub
<#918 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBVNZNT45TUKTIFW2R7XQS3YBR6IJAVCNFSM6AAAAAA2TABKICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGY4DMOJVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello everyone! |
I am also verry interested in YOLOv8 segmentation with SAHI. Tried version from
It processes several images and then throw an exception.
Let me know if you need more info or more context. coldwater_10_sec.mp4 |
sahi segmentation with coco format??? can i use just the image to segment with sahi? |
Wow amazing to hear that! Feel free to ping me once PR is ready so that I can merge it 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yolov8 demo notebook should be updated with a segmentation example, failing tests need to be handled
Add YoloV8 Instance Segmentation
Hi! Is there any updates on this? |
We need @sweetlhare's cooperation to make this PR ready (fixing tests and adding/updating a demo notebook) |
Hi!
|
How to fix ValueError: Invalid boolean mask? |
I was wondering if there will be a similar update for using segmentation for YoloV5? Thanks a lot! |
Hi, how would I get the actual polygon of the segmented area, currently only the mask seems to be available. Is this something that is there, or is it not implemented ? |
Does anyone has a colab notebook for this solution? I am trying to replicate but no success... :( |
i also need SAHI with segmentation for polygon ? |
I included the provided code for segmentation and it works partially. Unfortunately is the bounding box prediction worse than before. It seems it is wrongly shifted. Someone has the same issue? |
I'm having the same issue. Has anyone else found a solution for this? |
closing the PR in favor of #1039 |
Redid the previous pull request. Conducted testing.