该模型为文本生成360度全景图像模型,输入描述文本,实现端到端360度全景图生成。 本模型基于多阶段文本到图像生成扩散模型, 输入描述文本,返回符合文本描述的360度全景图像。仅支持英文输入。 例如,输入 "A livig room.",可能会得到如下图像: 输入 "The Moutais.",可能会得到如下图像: 输入 "The Times Square.",可能会得到如下图像: 该模型基于Stable Diffusio v2.1, CotrolNet v1.1 与diffusers进行构建。 在 ModelScope 框架上,提供输入文本,即可以通过简单的 Pipelie 调用来使用360全景图生成模型。 官方链接:https://github.com/xitao/Real-ESRGAN#istallatio Pipelie初始化参数 可缺省参数torch_dtype,默认值为torch.float16,可设置为torch.float32。 可缺省参数eablexformersmemoryefficietattetio,默认值为True,开启将减少GPU显存占用,可关闭。 Pipelie调用参数 输入要求:输入字典中必须指定的字段有'prompt';其他可选输入字段及其默认值包括: 本方案将360全景图视作一种风格图像,采用DreamBooth方法,使用约2000张360全景图像进行风格模型fietuig,总共训练40个epochs。 本算法模型源自一些开源项目: 全景图数据来源 如果你觉得这个模型对你有所帮助,请考虑引用下面的相关论文:Stable Diffusio for 360 Paorama Image Geeratio 文本生成360全景图模型
文本生成360度全景图图像大模型
模型描述
模型期望使用方式和适用范围
如何使用Pipelie
安装说明
创建虚拟环境
coda create - paoge pytho=3.8
coda activate paoge
安装深度学习框架
pip istall torch==1.13.1+cu116 torchvisio==0.14.1+cu116 torchaudio==0.13.1 --extra-idex-url https://dowload.pytorch.org/whl/cu116
ModelScope Library 安装
pip istall modelscope
pip istall "modelscope[cv]" -f https://modelscope.oss-c-beijig.aliyucs.com/releases/repo.html
RealESRGAN 安装
通过源码安装
通过pip安装
pip istall realesrga==0.3.0
其他库安装
pip istall -U diffusers==0.18.0
pip istall xformers==0.0.16
pip istall trito, accelerate, trasformers
推理代码范例
import cv2
from modelscope.outputs import OutputKeys
from modelscope.pipelies import pipelie
from modelscope.utils.costat import Tasks
prompt = "The livig room."
iput = {
'prompt': prompt,
}
txt2paoimg = pipelie(Tasks.text_to_360paorama_image,
model='damo/cv_diffusio_text-to-360paorama-image_geeratio')
output = txt2paoimg(iput)[OutputKeys.OUTPUT_IMG]
cv2.imwrite('result.pg', output)
推理代码说明
"um_iferece_steps": 20,
"guidace_scale": 7.5,
"add_prompt": "photorealistic, tred o artstatio, ((best quality)), ((ultra high res))",
"egative_prompt": "persos, complex texture, small objects, sheltered, blur, worst quality, low quality, zombie, logo, text, watermark, userame, moochrome, complex lightig",
"seed": -1,
"upscale": True,
"refiemet": True
训练相关
模型局限性以及可能的偏差
说明与引用
@article{ruiz2022dreambooth,
title={DreamBooth: Fie Tuig Text-to-image Diffusio Models for Subject-Drive Geeratio},
author={Ruiz, Nataiel ad Li, Yuazhe ad Jampai, Varu ad Pritch, Yael ad Rubistei, Michael ad Aberma, Kfir},
booktitle={arXiv preprit arxiv:2208.12242},
year={2022}
}
@misc{vo-plate-etal-2022-diffusers,
author = {Patrick vo Plate ad Suraj Patil ad Ato Lozhkov ad Pedro Cueca ad Natha Lambert ad Kashif Rasul ad Mishig Davaadorj ad Thomas Wolf},
title = {Diffusers: State-of-the-art diffusio models},
year = {2022},
publisher = {GitHub},
joural = {GitHub repository},
howpublished = {\url{https://github.com/huggigface/diffusers}}
}
@misc{zhag2023addig,
title={Addig Coditioal Cotrol to Text-to-Image Diffusio Models},
author={Lvmi Zhag ad Maeesh Agrawala},
year={2023},
eprit={2302.05543},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
点击空白处退出提示
评论