ligoudaner377 / font_translator_gan

88 stars 9 forks source link

where can I get the font_file ? #1

Closed asmitks closed 3 years ago

asmitks commented 3 years ago

Hey, Great work! I wanted to train your model for Japanese language. I would require a font_file as mentioned in your font2image.ipynb notebook. Where can I find one?

Would really appreciate a quick response! Thanks

ligoudaner377 commented 3 years ago

Hi @asmitks ,

font2image.ipynb notebook is used to convert a font file (ttf, otf, ...) to the specified character png files. You can download the Japanese fonts you need from the Internet and put them in a folder. There are many websites that provide free Japanese fonts, Here's one. (https://www.freejapanesefont.com/) Don't forget to change common_list to the Japanese characters you need.

But you mentioned that you want to train the model for the Japanese language. Does that mean learning style from English characters and applying to Japanese characters? Our model is currently designed for learning style from English characters and applying to Chinese characters. Only a few images are needed when testing, however, during training, we collect a large dataset (847 fonts each with more than 1000 Chinese characters and 52 English characters) to train our model.

So, considering your question my suggestion is: 1, Collect a big Japanese font dataset (typically more than 100 fonts) to train the model. 2, or you can use the dataset we provided and fine-tune the model on your collected Japanese fonts, in this case, you don't need to collect too much data.

Hope this comment can help you!

asmitks commented 3 years ago

Thanks a lot for the quick response and the suggestions!

fx-hit commented 3 years ago

Hi @asmitks ,

font2image.ipynb notebook is used to convert a font file (ttf, otf, ...) to the specified character png files. You can download the Japanese fonts you need from the Internet and put them in a folder. There are many websites that provide free Japanese fonts, Here's one. (https://www.freejapanesefont.com/) Don't forget to change common_list to the Japanese characters you need.

But you mentioned that you want to train the model for the Japanese language. Does that mean learning style from English characters and applying to Japanese characters? Our model is currently designed for learning style from English characters and applying to Chinese characters. Only a few images are needed when testing, however, during training, we collect a large dataset (847 fonts each with more than 1000 Chinese characters and 52 English characters) to train our model.

So, considering your question my suggestion is: 1, Collect a big Japanese font dataset (typically more than 100 fonts) to train the model. 2, or you can use the dataset we provided and fine-tune the model on your collected Japanese fonts, in this case, you don't need to collect too much data.

Hope this comment can help you!

Excuse me, where did you get the Chinese and English font files?

fx-hit commented 3 years ago

Hi @asmitks , font2image.ipynb notebook is used to convert a font file (ttf, otf, ...) to the specified character png files. You can download the Japanese fonts you need from the Internet and put them in a folder. There are many websites that provide free Japanese fonts, Here's one. (https://www.freejapanesefont.com/) Don't forget to change common_list to the Japanese characters you need. But you mentioned that you want to train the model for the Japanese language. Does that mean learning style from English characters and applying to Japanese characters? Our model is currently designed for learning style from English characters and applying to Chinese characters. Only a few images are needed when testing, however, during training, we collect a large dataset (847 fonts each with more than 1000 Chinese characters and 52 English characters) to train our model. So, considering your question my suggestion is: 1, Collect a big Japanese font dataset (typically more than 100 fonts) to train the model. 2, or you can use the dataset we provided and fine-tune the model on your collected Japanese fonts, in this case, you don't need to collect too much data. Hope this comment can help you!

Excuse me, where did you get the Chinese and English font files?

https://www.freechinesefont.com/ yes?

ligoudaner377 commented 3 years ago

Hi @asmitks , font2image.ipynb notebook is used to convert a font file (ttf, otf, ...) to the specified character png files. You can download the Japanese fonts you need from the Internet and put them in a folder. There are many websites that provide free Japanese fonts, Here's one. (https://www.freejapanesefont.com/) Don't forget to change common_list to the Japanese characters you need. But you mentioned that you want to train the model for the Japanese language. Does that mean learning style from English characters and applying to Japanese characters? Our model is currently designed for learning style from English characters and applying to Chinese characters. Only a few images are needed when testing, however, during training, we collect a large dataset (847 fonts each with more than 1000 Chinese characters and 52 English characters) to train our model. So, considering your question my suggestion is: 1, Collect a big Japanese font dataset (typically more than 100 fonts) to train the model. 2, or you can use the dataset we provided and fine-tune the model on your collected Japanese fonts, in this case, you don't need to collect too much data. Hope this comment can help you!

Excuse me, where did you get the Chinese and English font files?

https://www.freechinesefont.com/ yes?

I write a simple script to download fonts from this site(https://chinesefontdesign.com/category/chinese-font/page/14 ). and manually check the style of English and Chinese characters to make sure they are visually compatible (some fonts only design one language and use a random style for another language, be careful about that).

fx-hit commented 3 years ago

Hi @asmitks , font2image.ipynb notebook is used to convert a font file (ttf, otf, ...) to the specified character png files. You can download the Japanese fonts you need from the Internet and put them in a folder. There are many websites that provide free Japanese fonts, Here's one. (https://www.freejapanesefont.com/) Don't forget to change common_list to the Japanese characters you need. But you mentioned that you want to train the model for the Japanese language. Does that mean learning style from English characters and applying to Japanese characters? Our model is currently designed for learning style from English characters and applying to Chinese characters. Only a few images are needed when testing, however, during training, we collect a large dataset (847 fonts each with more than 1000 Chinese characters and 52 English characters) to train our model. So, considering your question my suggestion is: 1, Collect a big Japanese font dataset (typically more than 100 fonts) to train the model. 2, or you can use the dataset we provided and fine-tune the model on your collected Japanese fonts, in this case, you don't need to collect too much data. Hope this comment can help you!

Excuse me, where did you get the Chinese and English font files?

https://www.freechinesefont.com/ yes?

I write a simple script to download fonts from this site(https://chinesefontdesign.com/category/chinese-font/page/14 ). and manually check the style of English and Chinese characters to make sure they are visually compatible (some fonts only design one language and use a random style for another language, be careful about that).

Thank you a lot for your quick reply!

manhvela commented 2 years ago

Thanks a lot for the quick response and the suggestions!

how do you fine tune the model?