sjtuplayer / Compositional_Neural_Painter

[MM 2023] Stroke-based Neural Painting and Stylization with Dynamically Predicted Painting Region
34 stars 7 forks source link

关于 train_renderer-FCN.py 中的问题 #9

Open jzhangCSER01 opened 11 months ago

jzhangCSER01 commented 11 months ago

作者你好,我想使用 train_renderer-FCN.py 先训练一个可微神经渲染器,但是在源代码 43 行中 train_batch=torch.rand(batch_size, stroke_num).cuda(),train_batch 的 shape 是 batch_size*stroke_num,而 16 行 stroke_num=10,stroke_num 设置为 10,但是 draw_oil 函数需要的笔画参数只有 5 个 x0, y0, w, h, theta,这里 stroke_num 为什么还要设置为 10,stroke_num = 5 不就可以吗? Learning to Paint train_renderer.py 中 f = np.random.uniform(0, 1, 10) 是因为在 draw 函数中 所需要的参数个数为 10 个。

sjtuplayer commented 11 months ago

你好,compositor/train_renderer-FCN.py下的stroke_num是设置为的5,可能是版本有更新,请再查验一下看看?

jzhangCSER01 commented 11 months ago

你好,compositor/train_renderer-FCN.py下的stroke_num是设置为的5,可能是版本有更新,请再查验一下看看?

好的,刚看了 github 代码现在 stroke_num = 5,之前下载的那一版是 10,谢谢作者!