Open Yuvraj-Dhepe opened 11 months ago
Hello @makseq, I was able to solve the issue, by using the SAM to generate masks, convert them to RLE format, by a mid way solution, of re-drawing contours on these masks, because for some reason, LABELSTUDIO doesn't recognize without re-drawing.
However, now once I have corrected the masks, I am onto finding a way how to convert those masks to yolov8 segmentation labels?
If you know a solution to that, it'll be really helpful.
Thank you
Hello @makseq, I was able to solve the issue, by using the SAM to generate masks, convert them to RLE format, by a mid way solution, of re-drawing contours on these masks, because for some reason, LABELSTUDIO doesn't recognize without re-drawing.
However, now once I have corrected the masks, I am onto finding a way how to convert those masks to yolov8 segmentation labels?
If you know a solution to that, it'll be really helpful.
Thank you
hello bro,have you been find out a way to solve this problem?
@connor-tan I wasn't able to solve the problem. I just used detectron2 for my problem. It doesn't support semantic segmentation directly so I used the polygon based masks n trained the model for instance segmentation. But yah the performance was good enough for me.
@Yuvraj-Dhepe Did you add
<Label value="good" background="rgba(255, 0, 0, 0.7)"/>
to your labeling config? Could you share the resulting tasks.json and the labeling config if you still have it?
Sorry @makseq, unfortunately I don't have the config and tasks.json as of now. Maybe if I retry with your option, I will share the tasks.json or so.
Describe the bug I am currently working with using SAM model, and trying to use the masks generated by SAM on multiple objects in image. After generation of masks, few objects are mis-masked, or not masked, thus I want to correct those masks inside the Label Studio.
As per Import Brush Segmentation Pre-Annotations in RLE Format, I tried converting the masked image to RLE Annotations, however after generating a tasks.json, file for an image and loading that into the Label Studio, The annotations are not loaded well.
To Reproduce Steps to reproduce the behavior: 1) Install SAM & Required Libraries
pip install git+https://github.com/facebookresearch/segment-anything.git
pip install git+https://github.com/facebookresearch/segment-anything.git
2) Load a random image of beans from the internet
3) Make Predictions with SAM
4) Saving the colored masks to an image
5) Convert the masks to RLE Format from the label studio Converter
6) I have installed label-studio locally, I run it on port 8080, after that, I simply create a new project with image segmentation template, once that's created, I simply upload the original image. After uploading the image, I take the path, and create a json, format code as mentioned above. N Finally upload the tasks.json file to Label Studio
Expected behavior I was expecting that I will be able to see all the beans with different colored masks, since SAM performed instance segmentation, however, I see all the beans uncolored inside the label studio as follows![image](https://github.com/HumanSignal/label-studio/assets/67863397/4bd186a1-0dbe-49fd-a741-36e799702bf9)
Could you pls help me solve the issue, so that I see masks on the beans and correct the masks which are incorrectly generated by SAM
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):