<ul class="dashed" data-apple-notes-indent-amount="0"><li><span style="font-family: '.PingFangSC-Regular'">文章标题:</span>InstructPix2Pix: Learning to Follow Image Editing Instructions</li><li><span style="font-family: '.PingFangSC-Regular'">文章地址:</span><a href="https://arxiv.org/abs/2211.09800">https://arxiv.org/abs/2211.09800</a> </li><li>CVPR 2023</li></ul> <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1725934113/CB378641-EBC1-4664-855F-E35DD5792BA7.png" style="background-color:initial;max-width:min(100%,2424px);max-height:min(1048px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1725934113/CB378641-EBC1-4664-855F-E35DD5792BA7.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="2424" height="1048"> <span style="font-family: '.PingFangSC-Regular'"> 文章提出了一种利用人类指令进行图片编辑的方法:提供一张输入图片以及写下一个指令给模型,模型可以根据该指令对图片进行对应的编辑。</span> <span style="font-family: '.PingFangSC-Regular'"> 难点在于训练数据的获取,为了获取训练数据,作者利用了</span>GPT3和SD,具体如何获取见主图。<span style="font-family: '.PingFangSC-Regular'">文章的模型叫</span>InstructPix2Pix,模型使用构造的数据进行训练,并在推理时能够处理真实图像。<span style="font-family: '.PingFangSC-Regular'">推理时,由于不需要对每张图像进行微调或反转,该方法的推理时间特别短。</span> <span style="font-family: '.PingFangSC-Regular'"> 训练数据构造过程为:</span>1)利用GPT3根据指令生成文本对(修改前和修改后),2)使用SD+Prompt-to-Prompt生成图片对,3)构造训练数据:指令+图片对。 <span style="font-family: '.PingFangSC-Regular'"> 模型结构为传统的</span>SD加入了图像条件,具体是在第一个卷积层的隐变量增加条件图像隐变量的通道。并且使用系数分别控制Classifier-free Guidance中文本和图像的配比。 <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1725934113/ED2708E3-BB80-4196-B17A-E853D8AC35C5.png" style="background-color:initial;max-width:min(100%,2436px);max-height:min(1390px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1725934113/ED2708E3-BB80-4196-B17A-E853D8AC35C5.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="2436" height="1390"> <ul class="dashed" data-apple-notes-indent-amount="0"><li>数据:自己构造</li><li>指标:CLIP图像相似性(编辑后的图像与输入图像的一致程度);有向CLIP相似性(文字说明的变化与图片的变化有多大程度上的一致)</li><li>硬件:8 A100/bs1024</li><li>开源:timothybrooks.com/instruct-pix2pix</li></ul>