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

wordpress整合discuz站长工具seo词语排名

wordpress整合discuz,站长工具seo词语排名,济南小程序开发,免费建立网站教程目录 效果 说明 项目 模型信息 代码 下载 效果 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.dt0577.cn/news/9526.html

相关文章:

  • 网络营销的网站建设竞价系统
  • 国外那些网站是做菠菜的疫情最新消息今天公布
  • 如何优化网站打开速度chrome谷歌浏览器
  • 潍坊专业做网站公司事件营销的经典案例
  • 网站详情一般是什么公司做免费网页空间到哪申请
  • 台州 网站建设深圳整站seo
  • 企业网站系统的设计与开发教程电商网站入口
  • 做网络歌手的网站seo网站关键词
  • 信誉好的徐州网站建设上海短视频培训机构
  • b2c网上商城平台seo查询爱站网
  • 网站建设的总体需求分析徐州自动seo
  • 山东青岛网站建设公司郑州关键词优化平台
  • 国内的外贸b2c网站百度官网下载安装到桌面上
  • 做印刷网站公司简介百度知道官网首页登录入口
  • 功能型网站开发价格刷关键词的平台
  • 宝鸡网站制作公司新闻发布平台有哪些
  • 日本做的视频网站爱站网站
  • 网站建设流程包括哪些重庆seo公司
  • 做任务的兼职网站深圳将进一步优化防控措施
  • 广州菜谱制作公司sem推广和seo的区别
  • 南宁网站建设活动广告行业怎么找客户
  • 博兴网站建设招聘互联网舆情监控系统
  • 网站上做商城可用同一域名推广网站免费
  • 网站开发的网页模板百度下载并安装
  • 成都网站设计是什么网络营销策划创意案例点评
  • 汽修网站怎么做网站一年了百度不收录
  • 企业网站的规划与设计seo的研究对象
  • 小升初在线做试卷的网站知乎seo排名的搜软件
  • 网站怎么换服务器软文代发
  • wordpress怎么自动生成内链seo工作前景如何