mirror of
https://github.com/sjvasquez/handwriting-synthesis.git
synced 2026-04-03 00:19:13 -06:00
Unable to write characters such as "@", "+" or "✓", even after adding them to the valid_char_set. Problem with _sample function. #57
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/handwriting-synthesis#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AIMLAPP on 7/13/2020
Hi,
I attempted to generate handwritten "@", "+" and "✓" signs, but was unable to.
E.g. the phone number +1234, and the email sample@email.com will not generate anything at all.
Within the "write" function of demo.py (line 42) => valid_char_set = set(drawing.alphabet), alphabet is called from drawing.py. Therefore, I modified within drawing.py (see line 10), the list alphabet by adding the new characters. Adding "@" or "+" to the list caused major problems as even regular words such as "John Smith" can no longer be written i.e. no handwriting output at all.
I have identified where within demo.py, the code breaks after adding the new characters to the list. The line strokes = self._sample(lines, biases=biases, styles=styles) (line 61), calls the function _sample. Within _sample, it is from line 94 to line 106, which fails (see below)
Would anyone be able to provide an explanation and solution for this please? i.e. explanation to why nothing is drawn at all, and why adding an additional character could not solve this. And what the solution would be to generate handwriting for "@", "+" and "✓"?
Many Thanks!
PS: I also attempted on the web demo to create"@", "+" and "✓". Although not drawn properly, at least handwriting can be generated.