当前位置: 首页 > news >正文

网站可以换虚拟主机吗网站建设地图素材

网站可以换虚拟主机吗,网站建设地图素材,廊坊网站建设报价,阜宁网站制作选哪家目录 效果 说明 项目 模型信息 代码 下载 效果 LivePortrait实现快速、高质量的人像驱动视频生成 说明 官网地址:https://github.com/KwaiVGI/LivePortrait 代码实现参考:https://github.com/hpc203/liveportrait-onnxrun 模型下载:…

目录

效果

说明

项目

模型信息

代码

下载


效果

LivePortrait实现快速、高质量的人像驱动视频生成

说明

官网地址:https://github.com/KwaiVGI/LivePortrait

代码实现参考:https://github.com/hpc203/liveportrait-onnxrun

模型下载:onnx文件在百度云盘,链接: https://pan.baidu.com/s/13wjBFRHIIyCyBsgnBOKqsw 提取码: si95

项目

模型信息

appearance_feature_extractor.onnx

Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:img
tensor:Float[1, 3, 256, 256]
---------------------------------------------------------------

Outputs
-------------------------
name:output
tensor:Float[1, 32, 16, 64, 64]
---------------------------------------------------------------

face_2dpose_106_static.onnx

Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:data
tensor:Float[1, 3, 192, 192]
---------------------------------------------------------------

Outputs
-------------------------
name:fc1
tensor:Float[1, 212]
---------------------------------------------------------------


landmark.onnx
Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:input
tensor:Float[1, 3, 224, 224]
---------------------------------------------------------------

Outputs
-------------------------
name:output
tensor:Float[1, 214]
name:853
tensor:Float[1, 262]
name:856
tensor:Float[1, 406]
---------------------------------------------------------------

motion_extractor.onnx
Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:img
tensor:Float[1, 3, 256, 256]
---------------------------------------------------------------

Outputs
-------------------------
name:pitch
tensor:Float[1, 66]
name:yaw
tensor:Float[1, 66]
name:roll
tensor:Float[1, 66]
name:t
tensor:Float[1, 3]
name:exp
tensor:Float[1, 63]
name:scale
tensor:Float[1, 1]
name:kp
tensor:Float[1, 63]
---------------------------------------------------------------

retinaface_det_static.onnx
Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:input.1
tensor:Float[1, 3, 512, 512]
---------------------------------------------------------------

Outputs
-------------------------
name:448
tensor:Float[8192, 1]
name:471
tensor:Float[2048, 1]
name:494
tensor:Float[512, 1]
name:451
tensor:Float[8192, 4]
name:474
tensor:Float[2048, 4]
name:497
tensor:Float[512, 4]
name:454
tensor:Float[8192, 10]
name:477
tensor:Float[2048, 10]
name:500
tensor:Float[512, 10]
---------------------------------------------------------------

stitching.onnx

Model Properties
-------------------------
---------------------------------------------------------------

Inputs
-------------------------
name:input
tensor:Float[1, 126]
---------------------------------------------------------------

Outputs
-------------------------
name:output
tensor:Float[1, 65]
---------------------------------------------------------------

warping_spade.onnx

Inputs
feature_3d
name: feature_3d
tensor: float32[1,32,16,64,64]
kp_driving
name: kp_driving
tensor: float32[1,21,3]
kp_source
name: kp_source
tensor: float32[1,21,3]
Outputs
name: out
tensor: float32[1,3,512,512]

代码

using LivePortraitSharp;
using OpenCvSharp;
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FaceFusionSharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        string fileFilter = "图片|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";
        string startupPath = "";
        string source_path = "";
        string video_path = "";
        string videoFilter = "视频|*.mp4;*.avi;";
        LivePortraitPipeline livePortraitPipeline;

        /// <summary>
        /// 选择静态图像
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = fileFilter;
            ofd.InitialDirectory = Application.StartupPath + "\\test";
            if (ofd.ShowDialog() != DialogResult.OK) return;

            pictureBox1.Image = null;

            source_path = ofd.FileName;
            pictureBox1.Image = new Bitmap(source_path);
        }

        /// <summary>
        /// 驱动视频
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = videoFilter;
            ofd.InitialDirectory = Application.StartupPath + "\\test\\driving";
            if (ofd.ShowDialog() != DialogResult.OK) return;

            video_path = ofd.FileName;
            textBox1.Text = video_path;

            //读取第一帧显示
            VideoCapture vcapture = new VideoCapture(video_path);
            if (!vcapture.IsOpened())
            {
                MessageBox.Show("打开视频文件失败");
                video_path = "";
                return;
            }
            Mat frame = new Mat();
            if (vcapture.Read(frame))
            {
                pictureBox2.Image = new Bitmap(frame.ToMemoryStream());
                frame.Dispose();
            }
            else
            {
                MessageBox.Show("读取视频文件失败");
                video_path = "";
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (source_path == "")
            {
                MessageBox.Show("请选择静态图");
                return;
            }

            if (video_path == "")
            {
                MessageBox.Show("请选择驱动视频");
                return;
            }

            bool saveDetVideo = false;
            if (checkBox1.Checked)
            {
                saveDetVideo = true;
            }
            else
            {
                saveDetVideo = false;
            }

            button1.Enabled = false;
            textBox1.Text = "";
            Application.DoEvents();

            Task.Factory.StartNew(() =>
            {

                string msg;
                if (!livePortraitPipeline.execute(source_path, video_path, saveDetVideo, out msg))
                {
                    this.Invoke(new Action(() =>
                    {
                        button1.Enabled = true;
                        textBox1.Text = msg;
                    }));
                }
                else
                {
                    this.Invoke(new Action(() =>
                    {
                        button1.Enabled = true;
                        textBox1.Text = "执行完成!";
                    }));
                }

            }, TaskCreationOptions.LongRunning);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            livePortraitPipeline = new LivePortraitPipeline();

            source_path = "test\\0.jpg";
            pictureBox1.Image = new Bitmap(source_path);

            video_path = "test\\driving\\d0.mp4";
            //读取第一帧显示
            VideoCapture vcapture = new VideoCapture(video_path);
            if (!vcapture.IsOpened())
            {
                video_path = "";
                return;
            }
            Mat frame = new Mat();
            if (vcapture.Read(frame))
            {
                pictureBox2.Image = new Bitmap(frame.ToMemoryStream());
                frame.Dispose();
            }
            else
            {
                video_path = "";
            }
        }

    }
}

using LivePortraitSharp;
using OpenCvSharp;
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;namespace FaceFusionSharp
{public partial class Form1 : Form{public Form1(){InitializeComponent();}string fileFilter = "图片|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string startupPath = "";string source_path = "";string video_path = "";string videoFilter = "视频|*.mp4;*.avi;";LivePortraitPipeline livePortraitPipeline;/// <summary>/// 选择静态图像/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button2_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;ofd.InitialDirectory = Application.StartupPath + "\\test";if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox1.Image = null;source_path = ofd.FileName;pictureBox1.Image = new Bitmap(source_path);}/// <summary>/// 驱动视频/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button3_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = videoFilter;ofd.InitialDirectory = Application.StartupPath + "\\test\\driving";if (ofd.ShowDialog() != DialogResult.OK) return;video_path = ofd.FileName;textBox1.Text = video_path;//读取第一帧显示VideoCapture vcapture = new VideoCapture(video_path);if (!vcapture.IsOpened()){MessageBox.Show("打开视频文件失败");video_path = "";return;}Mat frame = new Mat();if (vcapture.Read(frame)){pictureBox2.Image = new Bitmap(frame.ToMemoryStream());frame.Dispose();}else{MessageBox.Show("读取视频文件失败");video_path = "";}}private void button1_Click(object sender, EventArgs e){if (source_path == ""){MessageBox.Show("请选择静态图");return;}if (video_path == ""){MessageBox.Show("请选择驱动视频");return;}bool saveDetVideo = false;if (checkBox1.Checked){saveDetVideo = true;}else{saveDetVideo = false;}button1.Enabled = false;textBox1.Text = "";Application.DoEvents();Task.Factory.StartNew(() =>{string msg;if (!livePortraitPipeline.execute(source_path, video_path, saveDetVideo, out msg)){this.Invoke(new Action(() =>{button1.Enabled = true;textBox1.Text = msg;}));}else{this.Invoke(new Action(() =>{button1.Enabled = true;textBox1.Text = "执行完成!";}));}}, TaskCreationOptions.LongRunning);}private void Form1_Load(object sender, EventArgs e){livePortraitPipeline = new LivePortraitPipeline();source_path = "test\\0.jpg";pictureBox1.Image = new Bitmap(source_path);video_path = "test\\driving\\d0.mp4";//读取第一帧显示VideoCapture vcapture = new VideoCapture(video_path);if (!vcapture.IsOpened()){video_path = "";return;}Mat frame = new Mat();if (vcapture.Read(frame)){pictureBox2.Image = new Bitmap(frame.ToMemoryStream());frame.Dispose();}else{video_path = "";}}}
}

下载

源码下载

http://www.yayakq.cn/news/971062/

相关文章:

  • 虹口专业网站建设企业主页制作
  • 响应式网站建站价格新建的网站需要维护吗
  • 张家港网站设计制作早晨设计中国建盏形象设计大赛获奖名单
  • 迪士尼网站是谁做的备案个人可以做视频网站吗
  • 国家电网建设部网站官网网站设计咨询电话
  • wordpress 漫画在线杭州seook优屏网络
  • 网站开发成本都有哪几项导航类主题wordpress
  • 坪地网站建设价位网站空间怎样设置用户名和密码
  • 电子东莞网站建设网站做产品的审核
  • 做网站一般怎么收费的自建商城网站有哪些平台
  • 网站建设做好了怎样链接域名株洲在线官网
  • 株洲新站建设全国优秀作文选官网
  • 安徽鑫华建设有限公司网站网站建设时间影响因素
  • 做一般的网站要多久太原网站优化
  • app网站开发协议友链互换平台推荐
  • 深圳专业网站建设多少钱wordpress0day
  • 做网站界面用什么软件常州微信网站建设咨询
  • 交友深圳网站建设网站注册 英文
  • 做网站英语老师的简历wordpress数据库修改登陆密码忘记
  • 龙岗企业网站改版公司锦州制作网站公司
  • 建网站网络推广优势网店网站怎么做
  • 街道门户网站的建设思路wordpress如何打开
  • 环境设计排版素材网站北京口碑最好的装修公司
  • 电商网站有什么3 8岁小手工
  • 做网站编辑需要经验吗wordpress 翻页 插件
  • 查找网站备案网站程序文件
  • 镇江网站建设推广公司查企业免费版
  • 营销企业网站建设应遵守的原则网站中文商标域名注册
  • 哪做网站比较便宜桂林视频网站制作
  • 上杭建设局网站济南网站建设认可搜点网络能