Giter Club home page Giter Club logo

attr2font's Introduction

⭐️ Hello World!

  • 🔭 I’m currently studying Computer Vision and doing some cool stuff 🤖
  • 🎓 Google Scholar

attr2font's People

Contributors

hologerry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

attr2font's Issues

RuntimeError: CUDA error: an illegal memory access was encountered

Hi, I can not run "Sampling " part code .

Attr2Font/main.py

Lines 242 to 248 in 810404b

val_attr_A_intensity = val_batch['attr_A'].to(device)
val_attr_A_intensity = attr_unsuper_tolearn(val_fontembed_A)
val_attr_A_intensity = val_attr_A_intensity.view(val_attr_A_intensity.size(0), val_attr_A_intensity.size(2))
val_attr_A_intensity = torch.sigmoid(3*val_attr_A_intensity) # convert to [0, 1]
val_attr_B_intensity = val_batch['attr_B'].to(device)

it occur in this part code .
And I confused L242 and L243 are the both set variable val_attr_A_intensity but with different value, why ?

What is the char class for?

It looks like the generator model includes a character classifier output, which classifies the character to one of 52 one-hot values. The number 52 is hardcoded: https://github.com/hologerry/Attr2Font/blob/master/model.py#L231. What is this for? The discriminator takes in a character class param, but then ignores it and never references it https://github.com/hologerry/Attr2Font/blob/master/model.py#L367. Is the char class being in this algorithm a mistake, or is it necessary for the font generation to function? If so, why?

Model Interpolation Error

I have done Model Training and Model Testing. When I start to do Model Interpolation, the error occurs as follows:

$ python main.py --phase test_interp --test_epoch EPOCH
usage: main.py [-h] [--init_epoch INIT_EPOCH] [--n_epochs N_EPOCHS]
               [--decay_epoch DECAY_EPOCH] [--multi_gpu MULTI_GPU]
               [--data_root DATA_ROOT] [--dataset_name {explor_all}]
               [--img_size IMG_SIZE] [--batch_size BATCH_SIZE]
               [--n_threads N_THREADS] [--n_style N_STYLE] [--channel CHANNEL]
               [--attr_channel ATTR_CHANNEL] [--attr_embed ATTR_EMBED]
               [--style_out_channel STYLE_OUT_CHANNEL]
               [--n_res_blocks N_RES_BLOCKS] [--attention ATTENTION]
               [--dis_pred DIS_PRED] [--lr LR] [--b1 B1] [--b2 B2]
               [--experiment_name EXPERIMENT_NAME] [--check_freq CHECK_FREQ]
               [--sample_freq SAMPLE_FREQ] [--log_freq LOG_FREQ]
               [--phase {train,test,test_interp}] [--test_epoch TEST_EPOCH]
               [--interp_cnt INTERP_CNT] [--lambda_l1 LAMBDA_L1]
               [--lambda_char LAMBDA_CHAR] [--lambda_GAN LAMBDA_GAN]
               [--lambda_cx LAMBDA_CX] [--lambda_attr LAMBDA_ATTR]
main.py: error: argument --test_epoch: invalid int value: 'EPOCH'

dataset download

There is some issue with the downloading of the dataset. The downloading is too slow and stops after some time. I think there is some issue on the server side.

about arguments of Test options

@hologerry

Could you explain each options meaning? (--channel, --attr_channel, --attr_embed, etc)
Actually, I want to know how to input attributes value to model.
If I want to make font which is similar with Serif font, how can I do ?

Thanks : )

train error

2020-11-05 15-38-57屏幕截图
when input image size is 64 in style encoder,it will be transformed to a tensor which size is (1, 165, 1 ,1)
and it will be fed into residual black , which has a conv(kernel = 3) and generate an error.

Random result glyphs from generator

Hi!
Found that the generator always produces random glyphs with the same attribute parameters passed (intensity). The font as source for generation is always the same.
Is this normal behavior?
Can the generation be constant with constant input values ​​to the generator?

在自建中文数据集上出现错误

感谢您出色的工作,我自己创建了一个中文数据集,运行时出现了以下错误
Traceback (most recent call last):
File "main.py", line 593, in
main()
File "main.py", line 581, in main
train(opts)
File "main.py", line 135, in train
attr_A_intensity = label_A * attr_A_data + (1 - label_A) * attr_A_embd
RuntimeError: The size of tensor a (17) must match the size of tensor b (37) at non-singleton dimension 1
出错的位置如图所示,图中两个print的输出分别为 torch.Size([64, 17]),torch.Size([64, 37])
图片

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.