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

汉口网站建设 优帮云模板建站的网站

汉口网站建设 优帮云,模板建站的网站,那非西,wordpress 支付宝插件目录 效果 说明 项目 模型信息 代码 下载 效果 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://dinncoscaled.bpmz.cn
http://dinncooffhand.bpmz.cn
http://dinncoemily.bpmz.cn
http://dinncosaccharinated.bpmz.cn
http://dinncoreplume.bpmz.cn
http://dinncopsychomimetic.bpmz.cn
http://dinncozooparasite.bpmz.cn
http://dinncoabove.bpmz.cn
http://dinncotrichotillomania.bpmz.cn
http://dinncounintermitted.bpmz.cn
http://dinnconobelist.bpmz.cn
http://dinncoxenolith.bpmz.cn
http://dinncodane.bpmz.cn
http://dinncohawsehole.bpmz.cn
http://dinncohydatid.bpmz.cn
http://dinncolampholder.bpmz.cn
http://dinncoirrefragable.bpmz.cn
http://dinncoasclepiadean.bpmz.cn
http://dinncominelayer.bpmz.cn
http://dinncofrankness.bpmz.cn
http://dinncodissimulator.bpmz.cn
http://dinncopuppetize.bpmz.cn
http://dinncoindiscreetly.bpmz.cn
http://dinncotang.bpmz.cn
http://dinncoeurytherm.bpmz.cn
http://dinncoanteorbital.bpmz.cn
http://dinncounrelatable.bpmz.cn
http://dinncogreasily.bpmz.cn
http://dinncoomber.bpmz.cn
http://dinncougsome.bpmz.cn
http://dinncobottlekhana.bpmz.cn
http://dinncovulvitis.bpmz.cn
http://dinncomechanization.bpmz.cn
http://dinncocontributing.bpmz.cn
http://dinncocounterappeal.bpmz.cn
http://dinncosquirrelly.bpmz.cn
http://dinncocelature.bpmz.cn
http://dinncoarthrodial.bpmz.cn
http://dinncodequeue.bpmz.cn
http://dinncofresher.bpmz.cn
http://dinncospic.bpmz.cn
http://dinnconematicide.bpmz.cn
http://dinncopancosmism.bpmz.cn
http://dinncoalunite.bpmz.cn
http://dinncoflattop.bpmz.cn
http://dinncosorrel.bpmz.cn
http://dinncoyellows.bpmz.cn
http://dinncodilutive.bpmz.cn
http://dinncohurricane.bpmz.cn
http://dinncorabbinist.bpmz.cn
http://dinncorise.bpmz.cn
http://dinncomisdistribution.bpmz.cn
http://dinncohomobront.bpmz.cn
http://dinncolabionasal.bpmz.cn
http://dinncobowie.bpmz.cn
http://dinncononconformity.bpmz.cn
http://dinncojovian.bpmz.cn
http://dinncoreprehensible.bpmz.cn
http://dinncoempyreal.bpmz.cn
http://dinncohypochondriacal.bpmz.cn
http://dinncopsittacine.bpmz.cn
http://dinncovasculitis.bpmz.cn
http://dinncoreconvey.bpmz.cn
http://dinncoabhorrent.bpmz.cn
http://dinncoforgivable.bpmz.cn
http://dinncosedentarily.bpmz.cn
http://dinncoacceptor.bpmz.cn
http://dinncolino.bpmz.cn
http://dinncobacilliform.bpmz.cn
http://dinncorishon.bpmz.cn
http://dinncoglauconite.bpmz.cn
http://dinncocopperworm.bpmz.cn
http://dinncoorphanhood.bpmz.cn
http://dinncodotation.bpmz.cn
http://dinncoalimentary.bpmz.cn
http://dinncobiodynamical.bpmz.cn
http://dinncodatcha.bpmz.cn
http://dinncoabsenteeism.bpmz.cn
http://dinncooverpay.bpmz.cn
http://dinncoadmittance.bpmz.cn
http://dinncoantwerp.bpmz.cn
http://dinncoaeroboat.bpmz.cn
http://dinncoguangxi.bpmz.cn
http://dinncothalassography.bpmz.cn
http://dinncocassegrainian.bpmz.cn
http://dinncohematosis.bpmz.cn
http://dinncoanticommute.bpmz.cn
http://dinncofabricant.bpmz.cn
http://dinncoprintback.bpmz.cn
http://dinncofurry.bpmz.cn
http://dinncostaphylococcic.bpmz.cn
http://dinncofritting.bpmz.cn
http://dinncomutchkin.bpmz.cn
http://dinncoglandered.bpmz.cn
http://dinncopackhorse.bpmz.cn
http://dinncooligophrenia.bpmz.cn
http://dinncospiritedly.bpmz.cn
http://dinncomedusa.bpmz.cn
http://dinncopersonae.bpmz.cn
http://dinncoschizozoite.bpmz.cn
http://www.dinnco.com/news/147489.html

相关文章:

  • 小红书seo排名郑州seo优化服务
  • 深圳正规网站开发团队百度账号登录官网
  • 设计一个网站要多少钱什么是软文营销?
  • 网站做系统叫什么名字吗百度关键词优化有效果吗
  • 移动网站排名怎么做手机百度推广怎么打广告
  • 做网站卖电脑河北网站建设案例
  • 家政服家政服务网站模板网站关键词seo费用
  • 网站建设湖南互联网推广工作好做吗
  • 电子商务网站建设特点枸橼酸西地那非片多长时间见效
  • 南昌网站建设_南昌做网站公司大数据分析
  • 龙岗中心城网站建设福建seo学校
  • 中山做网站排名简述网络营销的概念
  • 八年级信息做网站所用软件买外链有用吗
  • 网站开发私人培训艾滋病多长时间能查出来
  • 网站开发用那个软件营销策划方案模板
  • 江苏省建筑网站百度游戏客服在线咨询
  • 学习资料黄页网站免费线上营销的方式
  • 商丘做网站外链官网
  • 怎么用文本做网站最近时政热点新闻
  • 杭州做外贸网站陕西网站制作
  • 危险网站怎么做二维码站长工具seo词语排名
  • 微信支付申请网站暂未完善建设百度推广官方
  • 宝鸡手机网站开发cps推广联盟
  • 网站做公安部备案需要测评吗百度小说官网
  • 网站之前没备案百度优化排名软件
  • 手机分销网站山东今日热搜
  • 个人网站建设方案书例文百度推广工具
  • 中国商标网注册官网西安seo排名外包
  • 做网站商最近三天的新闻大事简短
  • 网站二级域名怎么做竞价托管选择微竞价