Muse: Efficient Scene Synthesizer with Smoothed Codebook
ref
deepemd,gpt2,taming
http://acronymify.com
FASt High-resolutION image synthesis for homE Design
| FASHIONED | FASt High-resolutION homE Design |
|---|---|
igpt是预训练,最后做分类任务
https://zhuanlan.zhihu.com/p/359526033
related work
encoding function
vq vqvae vqvae2 vqgan
linear projection
不支持生成,分辨率较小
VIT
https://zhuanlan.zhihu.com/p/457621594
clip vit32
emd
字节最佳论文
deepemd
methodology
preliminary
给一张16x16的original,reordered编码图
实验
四种一阶段模型
四个task
速度更快
fid,clip分数更好
poe强过分别训相加
四个任务实例
可能需要解了孔洞问题
如果能输出逐层结果,就能支持结论,新模型对已生成内容有更新能力
———————————————————————————————
taming使用参考
https://github.com/CompVis/taming-transformers#d-rin-1
条件生成模型的位置
https://github.com/CompVis/taming-transformers/blob/2908a53b88478e5812d619b6ac003dbb29b069a0/taming/models/cond_transformer.py
调用逻辑分析
lightening会调用training_step
shared_step被training和validation共享
get_xc拿到条件与目标
get_input说明要构造一个键
在此处完成了VQGAN,minGPT的挂载
不想改代码的话,直接拼接图片当condition传入模型
模型参数
| Name | Type | Params
———————————————————————-
0 | first_stage_model | VQModel | 91.5 M
1 | cond_stage_model | VQModel | 91.5 M
2 | permuter | Identity | 0
3 | transformer | GPT | 304 M
———————————————————————-
458 M Trainable params
29.4 M Non-trainable params
487 M Total params
1,951.358 Total estimated model params size (MB)
x,c未编码尺寸
bs,channel,height,width
torch.Size([5, 3, 1200, 1200])
torch.Size([5, 3, 1200, 1200])
1200/16=75
75*75=5625
z和c形状不一样可能涉及sliding window attention???
torch.Size([5, 5625])
torch.Size([28125])
采样过程关注
/apsarapangu/disk3/zhangjie.ll/MetaCreator/scripts/taming-transformers/scripts/sample_conditional.py
没有进入第一个分支
if self.training and self.pkeep < 1.0:mask = torch.bernoulli(self.pkeep*torch.ones(z_indices.shape,device=z_indices.device))mask = mask.round().to(dtype=torch.int64)r_indices = torch.randint_like(z_indices, self.transformer.config.vocab_size)a_indices = mask*z_indices+(1-mask)*r_indiceselse:a_indices = z_indices
pkeep是Net2NetTransformer初始化的一个参数,是否使用原序列,不强制使用的话会进行随机替换
r_indices = torch.randint_like(z_indices, self.transformer.config.vocab_size)
配置文件中几组非常重要的对齐项
1 gpt的vocab size要大于等于 两倍(因为要拼接cz) 两个VQGAN的codebook size
此处有一个潜在的问题是没有对两个VQGAN的词表同idx做区分,理论上是有优化的余地的
2gpt的blocksize>= (image_size/16)^2
image 128 block 64
image 256 block 256
image 512 block 1024
image 1024 block 4096=6464
image 1200 block 5625=7575
3 图片尺寸变大,batch size 要减小
CLIP_guide确认要参考,而且该工作也包含了文图生成
https://arxiv.org/pdf/2102.01645.pdf
https://arxiv.org/abs/2102.01645
https://github.com/galatolofederico/clip-glass
https://colab.research.google.com/drive/1fWka_U56NhCegbbrQPt4PWpHPtNRdU49?usp=sharing#scrollTo=zvZFRZtcv8Mp
此工作似乎也是仿照上面的 https://colab.research.google.com/drive/1L8oL-vLJXVcRzCFbPwOoMkPKJ8-aYdPN
但是迭代搜索似乎没有优势,最终效果依然受限于模型本身能生成的东西。不如直接提前生成的方案,但是拿来匹配直方图应该不错,关键是监督信号怎么传递并更新初始值
a yellow car and a blue sedan near the road
————————————————————————
直接映射在结构保持方面有一定亮点,但还需要更多调试
编码方式没有太大问题,是可以还原的
————————-EMD求解器参考——————————
https://pythonot.github.io/auto_examples/plot_Intro_OT.html#sphx-glr-auto-examples-plot-intro-ot-py
https://github.com/PythonOT/POT
https://github.com/locuslab/qpth
https://locuslab.github.io/qpth/
可视化界面开发参考
https://blog.51cto.com/u_15127606/3854357
https://juejin.cn/post/6879991831245881352
https://www.cxybb.com/article/u011042316/109385770
改代码换不同的一阶段编码器打通指标评估补四个实验及性能分析deeemd可能要和CLIP——guided那篇文章取取经
多任务
https://bbs.cvmart.net/articles/2084
https://zhuanlan.zhihu.com/p/400644441
双任务(ade20k,pallete),4编码器,3+1尺寸(128,256,512,1200),HyperHill指标,claim效果好
启发式的风格迁移(可以和模型训练同步推进)
感觉可以做成手动的,因为设计过程必然引入域外的target,干脆就做成编辑功能,VQGAN抓纹理,EMD匹配,还可以接glass式的多目标优化(接入segmentation(datasetgan)、ps选区功能;同时优化判别器,EMD距离,语义相似度;这招可以不写作为秘密武器)
DualEMD,可以定义一个CLIP投影函数带阈值,indices的匹配需要拉出序列后normalize然后再匹配
还是没想明白该怎么做,似乎应该实现色域的映射但是和距离无关,但是怎么保留高频细节,怎么体现区域的关联性,不是很有头绪
给出clip similarity
关键是给出patch才能保证局部细节一致,似乎和二分图的匹配流有关
强调不需要搜索而是利用梯度,也不需要预训练
后处理的必要性是多样化的风格没法训,痛点是搜索太慢或者没有梯度
匹配强度参数
————————————————————————————————
投稿参考
https://2022.acmmm.org/call-for-papers/
https://blog.csdn.net/luoxuexiong/article/details/107066568

尝试使用检查
https://github.com/acmsigsoft/submission-checker

