Comments (9)
How to define unseen_unis and seen_unis, unseen_fonts and seen_fonts in the 'valid' field of the tarin.json file
from lffont.
I have rewritten it according to the format given by train.json, combined with my own dataset.
unseen_unis : some characters that are not visible during training
seen_unis : I define all the characters that are seen in the training set
unseen_fonts: invisible fonts for training
seen_fonts: fonts used during training
I don't know if this is the correct way to write it. And about the avail, I defined the fonts seen and unseen in training and the characters contained in the fonts.
from lffont.
Hi, sorry for the late reply.
Firstly, I recommend to use this repository (clovaai/fewshot-font-generation) because that repo builds the dataset from TTF files -- that means, you do not need to build the LMDB datasets.
However, you are doing right to build the dataset for this repository.
from lffont.
Thank you very much for your reply, I followed the data set I made myself and trained the network, the network returned a BUG
{
File "/home/zeng/for_translation_stroke/lffont-master/datasets/p1dataset.py", line 129, in
content_imgs = torch.cat([self.env_get(self.env, self.content_font, uni, self.transform)for uni in trg_unis]).unsqueeze_(1)
File "train.py", line 141, in
env_get = lambda env, x, y, transform: transform(read_data_from_lmdb(env, f'{x}_{y}')['img'])
TypeError: 'NoneType' object is not subscriptable
}
Source code:
{
content_imgs = torch.cat([self.env_get(self.env, self.content_font, uni, self.transform)for uni in trg_unis]).unsqueeze_(1)
}
I don't know what caused this bug. Is it related to the insufficient memory of the graphics card?
Thanks a lot for the link, so should I build the dataset from this file?
from lffont.
I ran the code of your other article MX-FONT. Can the method of making a dataset in that article be applied to LF-FONT? The network ran successfully when I made the MX-FONT dataset, and got exciting results.
from lffont.
Thank you very much for your reply, I followed the data set I made myself and trained the network, the network returned a BUG { File "/home/zeng/for_translation_stroke/lffont-master/datasets/p1dataset.py", line 129, in content_imgs = torch.cat([self.env_get(self.env, self.content_font, uni, self.transform)for uni in trg_unis]).unsqueeze_(1) File "train.py", line 141, in env_get = lambda env, x, y, transform: transform(read_data_from_lmdb(env, f'{x}_{y}')['img']) TypeError: 'NoneType' object is not subscriptable
} Source code: {
content_imgs = torch.cat([self.env_get(self.env, self.content_font, uni, self.transform)for uni in trg_unis]).unsqueeze_(1)
} I don't know what caused this bug. Is it related to the insufficient memory of the graphics card? Thanks a lot for the link, so should I build the dataset from this file?
File "train.py", line 141, in
env_get = lambda env, x, y, transform: transform(read_data_from_lmdb(env, f'{x}_{y}')['img'])
TypeError: 'NoneType' object is not subscriptable
}
This error usually caused by that the given character does not exist in the given font.
Please check your meta file carefully.
If you ran build_dataset.py
, you can find the json file which contains the available font-char dictionary at --json_path
.
from lffont.
I ran the code of your other article MX-FONT. Can the method of making a dataset in that article be applied to LF-FONT? The network ran successfully when I made the MX-FONT dataset, and got exciting results.
The repository clovaai/fewshot-font-generation uses very similar dataset code with MX-Font repository and it also supports LF-Font.
It will be much easier to use because it does not need to build LMDB dataset and also the meta file for that repository is much simpler.
Please check the repository and the docs/Dataset.md
.
from lffont.
Thank you very much for your quick reply. I will modify the project according to your suggestions next. If I have a problem, I'm here to ask you.
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
- Training interrupted by validation HOT 10
- 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
- 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 4
- 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.