Skip to content
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

Added polygon filter method to reduce number of polygon given gven from SAM predictions. #142

Merged
merged 6 commits into from
Aug 4, 2023

Conversation

samz5320
Copy link
Contributor

Added method to reduce number of polygon points produced by SAM for polygon ouptut .
threshold can be changed to alter the number of polygon points.

This will also help lable studio to load annotations faster and prevent page from crashing.

After Filter
less_points

Before Filter
more_points

@samz5320 samz5320 marked this pull request as draft July 18, 2023 10:53
@samz5320 samz5320 marked this pull request as ready for review July 18, 2023 11:15
@JimmyMa99
Copy link
Contributor

Nice idea, but I have a question, doesn't this mean that you need to point the polygon all the way inside the object?

@samz5320
Copy link
Contributor Author

Hey , Thanks for the appreciation, can you please elaborate the question,
if im not wrong as what i guessed is you meant if there is a curve and this script might remove that, that wont happend as it takes nearest neighbours to calculate what points are needed to be remove and we made the threshold that low that only overlapping points are getting removed so you will not loose any information dont matter how small curves are

@OpenMMLab-Assistant-004

Hi @samz5320,

We'd like to express our appreciation for your valuable contributions to the playground. Your efforts have significantly aided in enhancing the project's quality.
It is our pleasure to invite you to join our community thorugh Discord_Special Interest Group (SIG) channel. This is a great place to share your experiences, discuss ideas, and connect with other like-minded people. To become a part of the SIG channel, send a message to the moderator, OpenMMLab, briefly introduce yourself and mention your open-source contributions in the #introductions channel. Our team will gladly facilitate your entry. We eagerly await your presence. Please follow this link to join us: ​https://discord.gg/UjgXkPWNqA.

If you're on WeChat, we'd also love for you to join our community there. Just add our assistant using the WeChat ID: openmmlabwx. When sending the friend request, remember to include the remark "mmsig + Github ID".

Thanks again for your awesome contribution, and we're excited to have you as part of our community!

@JimmyMa99
Copy link
Contributor

I misinterpreted what you meant before, sorry, I'll be testing it out soon.

label_anything/sam/filter_poly.py Outdated Show resolved Hide resolved
label_anything/sam/filter_poly.py Outdated Show resolved Hide resolved
@JimmyMa99
Copy link
Contributor

Please resolve the conflict.

@vansin vansin merged commit 27baddc into open-mmlab:main Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants