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

fix: discard polygons with length of 4 or less #2100

Merged
merged 4 commits into from
Sep 2, 2020

Conversation

savan77
Copy link
Contributor

@savan77 savan77 commented Aug 28, 2020

It was found that Matterport's MaskRCNN implementation generates polygons with length of 4 which creates lot of issues since pycocotools considers them as a bounding box. It looks like these polygons with length of 4 are just garbage values. That is actually a single point repeated twice. So, we can just filter them out.
More discussion around this topic can be found here #1769.

Motivation and context

It will solve issues where users were not able to see the job because there were polygons with length of 4. It will also solve an issue with export dataset feature as we go through pycocotools there as well.

How has this been tested?

This has been tested locally as well as on Onepanel.

Checklist

License

  • [x ] I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@savan77 savan77 requested a review from nmanovic as a code owner August 28, 2020 18:20
@nmanovic
Copy link
Contributor

@savan77 , need to add a line into CHANGELOG. Also please check I submit my code changes under the same MIT License. Probably server itself should have corresponding checks and don't accept "bad" polygons.

@savan77
Copy link
Contributor Author

savan77 commented Aug 31, 2020

@nmanovic Made changes as per your suggestions. Yeah, that might be one possible way. Let me know what do you guys think. For now, this will solve multiple errors (#1769) that arises because of MaskRCNN generating polygons with two points (both are same).

nmanovic
nmanovic previously approved these changes Sep 2, 2020
@nmanovic nmanovic merged commit e52ff96 into cvat-ai:develop Sep 2, 2020
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.

3 participants