深度学习系列66:试穿模型IDM-VTON上手

news/2024/9/24 0:24:30/

1. 模型概述

在这里插入图片描述
如图,总体流程为:

  1. 输入为:衣服的编码xg;人物+noise的编码xt;人物身上衣物的mask和人体pose分割(densepose);
  2. 衣服部分经过两部分网络:1)高级语义网络IP-Adapter:是一个图像编码器,比如CLIP模型;2)低级语义网络:称为GarmentNet,是一个UNet,用来提取图像低级细节特征,例如纹理,图案等等。
  3. 人体部分经过TryonNet,也是一个UNet。其输入和GarmentNet同层进行拼接后,输入自注意力层,然后取左半部分,与IPAdaper的结果,以及文本编码结果进行交叉注意力计算。

官网为:https://idm-vton.github.io/
不同模型的效果对比图如下:
在这里插入图片描述

2. 快速上手

可以在huggingface的demo上进行尝试:https://hf-mirror.com/spaces/yisol/IDM-VTON
参考https://github.com/camenduru/IDM-VTON-jupyter/blob/main/IDM_VTON_jupyter.ipynb,执行代码:

git clone  https://hub.nuaa.cf/camenduru/IDM-VTON-hf
cd IDM-VTON-hf
apt -y install -qq aria2
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/densepose/model_final_162be9.pkl -d /content/IDM-VTON-hf/ckpt/densepose -o model_final_162be9.pkl
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/humanparsing/parsing_atr.onnx -d /content/IDM-VTON-hf/ckpt/humanparsing -o parsing_atr.onnx
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/humanparsing/parsing_lip.onnx -d /content/IDM-VTON-hf/ckpt/humanparsing -o parsing_lip.onnx
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/openpose/ckpts/body_pose_model.pth -d /content/IDM-VTON-hf/ckpt/openpose/ckpts -o body_pose_model.pth
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/IDM-VTON-DC/unet/diffusion_pytorch_model.bin -d /content/IDM-VTON-hf/ckpt/openpose/ckpts/unet -o diffusion_pytorch_model.bin
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://hf-mirror.com/camenduru/IDM-VTON/resolve/main/IDM-VTON-DC/unet/config.json -d /content/IDM-VTON-hf/ckpt/openpose/ckpts/unet -o config.jsonpip install -q diffusers==0.25.0 accelerate==0.26.1 einops==0.7.0 onnxruntime==1.16.2 cloudpickle omegaconf gradio==4.24.0 fvcore av config spaces -i https://pypi.tuna.tsinghua.edu.cn/simple

然后执行python app.py启动应用即可
另外下载的模型也可以替换为F16的版本,参考:https://hf-mirror.com/camenduru/IDM-VTON-F16/tree/main


http://www.ppmy.cn/news/1446350.html

相关文章

Qt:Qt框架的初步认识和基本使用

文章目录 Qt是什么Qt的优点Qt开发环境的基本使用对象树其他控件输入框按钮 本篇总结的是对于Qt框架的基本认识 Qt是什么 Qt框架是一个跨平台的C图形用户界面应用程序框架,框架是一群大佬发明出来的,帮助新手使用的一个内容,如果没有框架的存…

Ubuntu 18.04 安装 CMake Ceres-Solver 记录

1. 安装 CMake-3.22.1 不可卸载原有版本 CMake(防止 ROS 出现问题),只需建立软链接即可 1. 源码下载并解压wget https://cmake.org/files/v3.22/cmake-3.22.1.tar.gz tar -xvzf cmake-3.22.1.tar.gz2. 移动到合适目录sudo mv cmake-3.22.1 /u…

【大数据】LSM树,专为海量数据读写而生的数据结构

目录 1.什么是LSM树? 2.LSM树的落地实现 1.什么是LSM树? LSM树(Log-Structured Merge Tree)是一种专门针对大量写操作做了优化的数据存储结构,尤其适用于现代大规模数据处理系统,如NoSQL数据库&#xff…

介绍一下mybatis的基本配置(mybatis-config.xml)

src/main/resources/mybatis-config.xml 这句代码&#xff0c;是XML的声明&#xff0c;它指定了&#xff0c;XML的版本 和 编码方式 <?xml version"1.0" encoding"UTF-8" ?>这句代码&#xff0c;声明了XML文档类型&#xff0c;它告诉解析器&#x…

Java集合相关的List、Set、Map基础知识

目录 一、集合介绍 二、List 三、Map HashMap的数据结构 如何理解红黑树 四、set 一、集合介绍 在Java中&#xff0c;集合是一种用于存储对象的数据结构&#xff0c;它提供了一种更加灵活和强大的方式来处理和操作数据。Java集合框架提供了一系列接口和类&#xff0c;用…

docker容器练习

1.修改虚拟机的主机名为 docker。 [rootadmin ~]# hostnamectl set-hostname docker [rootadmin ~]# bash [rootdocker ~]# 2.修改虚拟机网卡地址&#xff0c;使其可以上外网&#xff0c;能够 ping 通 www.baidu.com [rootdocker ~]# nmcli connection modify ens160 i…

又重新搭了个个人博客

哈喽大家好&#xff0c;我是咸鱼。 前段时间看到一个学弟写了篇用 Hexo 搭建博客的教程&#xff0c;心中沉寂已久的激情重新被点燃起来。&#xff08;以前搞过一个个人网站&#xff0c;但是因为种种原因最后不了了之&#xff09; 于是花了一天时间参考教程搭了个博客网站&…

leetCode61. 旋转链表

leetCode61. 旋转链表 题目思路&#xff1a;见如图所示 代码展示 /*** Definition for singly-linked list.* struct ListNode {* int val;* ListNode *next;* ListNode() : val(0), next(nullptr) {}* ListNode(int x) : val(x), next(nullptr) {}* Li…