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

for prerendering, 0-dimensional alpha_crop causes resize error. #4

Open
junhocho opened this issue Jan 11, 2022 · 2 comments
Open

for prerendering, 0-dimensional alpha_crop causes resize error. #4

junhocho opened this issue Jan 11, 2022 · 2 comments

Comments

@junhocho
Copy link

I appreciate the provided code and tried myself.

For the prerendering script python -m util_lib.gen_pams

Following resize code causes error:

alpha_crop, (64, 64), interpolation=cv2.INTER_CUBIC)

This is beause why alpha_crop = crop_alpha_area(alpha) results some (0,n) or (n,0) shaped array, therefore resize is impossible.
To deal with this, I temporarily altered code and checked how this issue as following:

image

and this is following logs:

image

Is this ok? Looks like lots of crop errors occur and result resizing error.

@junhocho
Copy link
Author

test code and the demo with jupyter notebook seemingly work, but still i wonder if you have faced same issue on prerendering

@shimoda-uec
Copy link
Collaborator

I expect most of these errors from the lack of glyphs for the specific characters in font files.
We handle 94 characters, and font files sometimes do not have glyphs for all characters.
We ignore such characters whose glyph does not exist.

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