sjvasquez / handwriting-synthesis

Handwriting Synthesis with RNNs ✏️
4.27k stars 568 forks source link

Tick before every line #10

Closed alex-a-robinson closed 6 years ago

alex-a-robinson commented 6 years ago

I get a tick before the first character of every line, is there a way to remove this? e.g. screen shot 2018-03-10 at 22 22 02

sjvasquez commented 6 years ago

https://github.com/sjvasquez/handwriting-synthesis/blob/master/lyrics.py#L68

alex-a-robinson commented 6 years ago

Sorry I didn't make myself clear, all lines have a single quote mark, despite it not appearing the in source text. Is this expected behaviour?

My results from the demo,

screen shot 2018-03-11 at 13 12 49

demo.py

...
# demo number 3 - varying bias, fixed style
    lines = lyrics.give_up.split("\n")
    biases = .2*np.flip(np.cumsum([len(i) == 0 for i in lines]), 0)
    styles = [7 for i in lines]

    hand.write(
        filename='img/give_up.svg',
        lines=lines,
        biases=biases,
        styles=styles,
    )

lyrics.py

...
give_up = """We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy

I just wanna tell you how I'm feeling
Gotta make you understand

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
...
"""
sjvasquez commented 6 years ago

I see, thanks for clarifying. I was able to reproduce that behavior using python 3. I'll try to track down the source of the bug, but for now using python 2 should fix things.

sjvasquez commented 6 years ago

Should be fixed now. Bug stemmed from the fact that Python 3 makes a distinction between byte strings and strings.