Comments (10)
Hi, I checked the error and updated the code.
You can check the difference in the latest commit.
Sorry for the inconvenience.
from lffont.
Thank you for your help, It's a great job. But I have other questions.
(1) issue #1 you mentioned that the dataset is 6,654 * 482 = 3,207,228. You used 6654 * 371 for training and 15 * (2615 + 280) for validation evaluation. Is this correct for me to understand?
(2) the content font is not included in the training and test sets (train.json and test.json), you only configured it in cfgs(0250_simple). Does the content font only need to be written to lmdb via meta_file and not appear in train.json ?
from lffont.
(1) It is almost right but the training dataset does not contain exactly that number of images.
In the training dataset, each font covers varying numbers of characters because of rendering issues and 6,654 is the average. So, the total number of images can be slightly different from that value (6654 * 371).
(2) It is right. The content font does not appear in train.json because it should be excluded from the reference styles of training and test sets. However, it still needs to be written to lmdb to render source images.
from lffont.
Hi, I checked the error and updated the code.
You can check the difference in the latest commit.
Sorry for the inconvenience.
Sorry to bother you again, there seems to be a problem with the code in evaluator.py. I am now valid that all fonts in the set generate the same image. Lines 71-72 of the code should probably be changed to the following:
if trg_imgs:
for trg_img in trg_imgs:
trgs.append(trg_img.detach().cpu())
Maybe there's something wrong with my modifications, too, but that's where the problem should be.
from lffont.
Lines 71-72 of evaluator.py are not wrong ([0]
is added to line 72 because of *trg_imgs
in line 61).
Also, they cannot cause the issue that you described because trg_imgs
are the ground truth images (the upper images), not the generated images.
How do your generated images look like?
I have checked and run the code, but my model seems like working well.
from lffont.
Before the modification it looked like this. All results seem to be generated for the first line of the font. So I think it's because the code only saves the first image of the font from trg_imgs.
I modified evaluator.py and it works fine.
from lffont.
@zha-hengfeng
Hi, your modification is fundamentally identical to the original implementation:
if trg_imgs:
for trg_img in trg_imgs:
trgs.append(trg_img.detach().cpu())
Because trg_imgs
is a list with only one element.
We will not revise the code because I don't think there is a bug in the code.
Thanks for your comments, and we hope our implementation helps your own applications.
from lffont.
Thank you again. Your work is great and has helped me a lot.
Now I find that the phase1 model will fail in the test. And the code doesn't to generate a new glyph for the input reference glyphs when testing.
I would like to know what kind of forged glyph the model will generate for the glyph with input reference font.
from lffont.
@zha-hengfeng
Hi,
(1) we have the two-phase training procedure for generating the unseen components in your reference set.
(2) if you only have the phase 1 model, you cannot generate a glyph with unseen components in the reference, for example:
- Reference characters: ["丠", "垙"] => (can be decomposed into ["爿", "匕", "一", "土", "⺌", "一", "儿"]
- You can generate characters such as "壯" => (decomposed into ["爿", "土"])
- You cannot generate characters such as "暛" => (decomposed into ["日", "羊", "工")
(3) phase-2 training solves the problem in (2). Hence you have to train your model with phase-2 if you want to generate unseen glyphs
We already publish the technical details in our paper (https://arxiv.org/abs/2009.11042).
You can check the details in our paper as well
from lffont.
Closing the issue, assuming the answer resolves the problem.
Please re-open the issue as necessary.
from lffont.
Related Issues (20)
- Style transfer for a single font HOT 7
- how to "Build meta file to dump lmdb environment" and how to "python build_dataset.py "? HOT 2
- During training, the model stops at "Start training..." HOT 13
- lmdb_path HOT 7
- Question about p1dataset.py HOT 2
- Pre-trained model for Korean fonts generation HOT 2
- The label number of the chn_decomposed HOT 8
- Question about training
- How to use the data produced by the build_dataset.py file during training HOT 9
- Question about the classfiers for calculating FID ACC(S) and ACC(C) HOT 3
- Hello, may I ask how to process data when using images as training sets in LFFont? HOT 1
- KeyError: '71FC' HOT 3
- IndexError: list index out of range HOT 2
- ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (27, 2) + inhomogeneous part. HOT 4
- Question about korean generator HOT 2
- 数据集 HOT 1
- data set HOT 1
- data set HOT 4
- about phase 1 training HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lffont.