-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[DetectionDataset] - extend from_coco
and as_coco
with support for masks in RLE format
#1114
Comments
from_coco
and as_coco
with support for masks in RLE format
Hi, great job with supervision! I would like to try contributing, but first I have some doubts regarding this issue. According to coco data format the RLE format is used only when |
Hi @David-rn 👋🏻 I'm really glad you want to contribute to supervision. It's true that detections don't have an
In the second phase, we'll discuss how to integrate them into methods |
Hi @SkalskiP, sure! It does sound okay! |
@David-rn I'm excited. Let me know if you need any help. I'm assigning this issue to you. Good luck! |
Hi, I have not noticed that someone is interested in this issue and already have done some work (encode/decode function+modification to coco_annotations_to_detections+tests). If you have not started implementation @David-rn I would be happy to complete this task. |
Hi @David-rn, thanks, and sorry for the mix-up. SAVING DETECTIONS: I have 2 ideas for that however they are quite limiting.
I am not sure how to specify the mask format on a single annotation/detection level. COLAB NOTEBOOK: |
I'm very sorry to see such confusion. I've thought about how to resolve this situation, and especially considering that @David-rn hasn't started working on the task yet and @emsko already has a draft PR open, we will allow @emsko to continue working on this task. @David-rn, I'm very sorry, and I hope you won't hold it against me. 🙏🏻 If you had already started writing your code, I would have given you priority since you were already assigned to the task. Is there another task in our backlog that you might be interested in? @emsko, standard practice in larger open-source projects is to inform under the GH issue that you want to work on the task, which helps avoid such misunderstandings. As for your PR, it's a good start! 🔥 I have already left comments under it. |
This issue was just implemented via #1163. I'm closing the issue. |
Description
The COCO dataset format allows for the storage of segmentation masks in two ways:
Run-Length Encoding (RLE): RLE compresses segments of pixels into counts of consecutive pixels (runs). This method efficiently sequences pixels by reporting the number of pixels that are either foreground or background. For instance, starting from the top left of an image, the encoding might record '5 white pixels, 3 black pixels, 6 white pixels', and so on.
Supervision currently only supports Polygon Masks, but we want to expand support for masks in RLE format. To do this, you will need to make changes in
coco_annotations_to_detections
anddetections_to_coco_annotations
.Links
Additional
The text was updated successfully, but these errors were encountered: