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

AssertionError: COCOAPI does not support empty polygons #53

Open
W-hary opened this issue Aug 25, 2023 · 2 comments
Open

AssertionError: COCOAPI does not support empty polygons #53

W-hary opened this issue Aug 25, 2023 · 2 comments

Comments

@W-hary
Copy link

W-hary commented Aug 25, 2023

The following error occurs when training a custom dataset

1692994856764
@liyanhhh
Copy link

Hello, Do you solve the problem?

@CHN-001
Copy link

CHN-001 commented Mar 15, 2024

This issue generally occurs as an error that interrupts the training code after running for a period of time. Although I searched on GitHub and found some people encountering the same problem, there were no useful results to refer to. I suspected that there might be a problem with my own dataset. However, my dataset can run smoothly on mmdetection. Meanwhile, the error occurred in the file detectron2/structures/masks.py. So I investigated the masks.py in both mmdetection and detectron2, and indeed found that the statement "assert len(polygons) > 0, "COCOAPI does not support empty polygons"" was not present in mmdetection and detectron2. Instead, it was replaced by other statements in mmdetection and detectron2. After replacing the statement with the corresponding one from mmdetection and detectron2, the error no longer occurred, and the training proceeded smoothly.

first u should comment the following code,then add new codes in following picture

#assert len(polygons) > 0, "COCOAPI does not support empty polygons" #To comment out this line

image

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

No branches or pull requests

3 participants