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

Blank anno gt_.txt files #16

Open
QuickLearner171998 opened this issue Apr 22, 2020 · 1 comment
Open

Blank anno gt_.txt files #16

QuickLearner171998 opened this issue Apr 22, 2020 · 1 comment

Comments

@QuickLearner171998
Copy link

QuickLearner171998 commented Apr 22, 2020

How to handle the case when my dataset contains images with no texts. .i.e empty annotations files
Right now it gives - ValueError: need at least one array to stack error

@Wovchena
Copy link
Owner

Wovchena commented Apr 22, 2020

I assume that happens in

return transform(img, np.stack(quads), texts, self.normalizer, self)
(that would be simpler if you left the full error with traceback)

In that case you should build your tuple with np.array() (or None) instead of np.stack(quads). But I can't say for sure that the rest of the code won't complain that you return an empty array.

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

2 participants