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

apache 配置网站地址网络空间安全专业大学排名

apache 配置网站地址,网络空间安全专业大学排名,建设银行信用卡官网站首页,南宁网站制作多少钱C#版Facefusion #xff0c;换脸器和增强器 目录 说明 效果 项目 调用代码 说明 Facefusion是一款最新的开源AI视频/图片换脸项目。是原来ROOP的项目的延续。项目官方介绍只有一句话#xff0c;下一代换脸器和增强器。 代码实现参考 https://github.com/facefusion/f…C#版Facefusion 换脸器和增强器 目录 说明 效果 项目 调用代码  说明 Facefusion是一款最新的开源AI视频/图片换脸项目。是原来ROOP的项目的延续。项目官方介绍只有一句话下一代换脸器和增强器。 代码实现参考 https://github.com/facefusion/facefusion https://github.com/hpc203/facefusion-onnxrun 效果 项目 调用代码  using OpenCvSharp; using OpenCvSharp.Extensions; using System; using System.Collections.Generic; using System.Drawing; 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 target_path ; Yolov8Face detect_face;         Face68Landmarks detect_68landmarks;         FaceEmbdding face_embedding;         SwapFace swap_face;         FaceEnhance enhance_face; private void button2_Click(object sender, EventArgs e)         {             OpenFileDialog ofd new OpenFileDialog();             ofd.Filter fileFilter;             if (ofd.ShowDialog() ! DialogResult.OK) return; pictureBox1.Image null; source_path ofd.FileName;             pictureBox1.Image new Bitmap(source_path);         } private void button3_Click(object sender, EventArgs e)         {             OpenFileDialog ofd new OpenFileDialog();             ofd.Filter fileFilter;             if (ofd.ShowDialog() ! DialogResult.OK) return; pictureBox2.Image null; target_path ofd.FileName;             pictureBox2.Image new Bitmap(target_path);         } private void button1_Click(object sender, EventArgs e)         {             if (pictureBox1.Image null || pictureBox2.Image null)             {                 return;             } pictureBox3.Image null;             Application.DoEvents(); Mat source_img Cv2.ImRead(source_path);             Mat target_img Cv2.ImRead(target_path); ListBbox boxes;             boxes detect_face.detect(source_img); int position 0; //一张图片里可能有多个人脸这里只考虑1个人脸的情况             //ListPoint2f face_landmark_5of68 new ListPoint2f();             ListPoint2f face68landmarks detect_68landmarks.detect(source_img, boxes[position]); //绘图             //Cv2.Rectangle(source_img, new OpenCvSharp.Point(boxes[0].xmin, boxes[0].ymin), new OpenCvSharp.Point(boxes[0].xmax, boxes[0].ymax), new Scalar(255, 0, 0), 2);             //foreach (Point2f item in face68landmarks)             //{             //    Cv2.Circle(source_img, (int)item.X, (int)item.Y, 4, new Scalar(0, 255, 0), -1);             //}             //Cv2.ImShow(source_img, source_img); Listfloat source_face_embedding face_embedding.detect(source_img, face68landmarks); boxes detect_face.detect(target_img); position 0; //一张图片里可能有多个人脸这里只考虑1个人脸的情况             ListPoint2f target_landmark_5;             target_landmark_5 detect_68landmarks.detect(target_img, boxes[position]); //绘图             //Cv2.Rectangle(target_img, new OpenCvSharp.Point(boxes[0].xmin, boxes[0].ymin), new OpenCvSharp.Point(boxes[0].xmax, boxes[0].ymax), new Scalar(255, 0, 0), 2);             //foreach (Point2f item in target_landmark_5)             //{             //    Cv2.Circle(target_img, (int)item.X, (int)item.Y, 4, new Scalar(0, 255, 0), -1);             //}             //Cv2.ImShow(target_img, target_img); Mat swapimg swap_face.process(target_img, source_face_embedding, target_landmark_5); Mat resultimg enhance_face.process(swapimg, target_landmark_5); //pictureBox3.Image swapimg.ToBitmap(); pictureBox3.Image resultimg.ToBitmap(); // Cv2.ImShow(resultimg, resultimg); } private void Form1_Load(object sender, EventArgs e)         {             detect_face new Yolov8Face(model/yoloface_8n.onnx);             detect_68landmarks new Face68Landmarks(model/2dfan4.onnx);             face_embedding new FaceEmbdding(model/arcface_w600k_r50.onnx);             swap_face new SwapFace(model/inswapper_128.onnx);             enhance_face new FaceEnhance(model/gfpgan_1.4.onnx); target_path images/target.jpg;             source_path images/5.jpg; //target_path images/5.jpg;             //source_path images/14.jpg; pictureBox1.Image new Bitmap(source_path);             pictureBox2.Image new Bitmap(target_path);         }     } } using OpenCvSharp; using OpenCvSharp.Extensions; using System; using System.Collections.Generic; using System.Drawing; 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 target_path ;Yolov8Face detect_face;Face68Landmarks detect_68landmarks;FaceEmbdding face_embedding;SwapFace swap_face;FaceEnhance enhance_face;private void button2_Click(object sender, EventArgs e){OpenFileDialog ofd new OpenFileDialog();ofd.Filter fileFilter;if (ofd.ShowDialog() ! DialogResult.OK) return;pictureBox1.Image null;source_path ofd.FileName;pictureBox1.Image new Bitmap(source_path);}private void button3_Click(object sender, EventArgs e){OpenFileDialog ofd new OpenFileDialog();ofd.Filter fileFilter;if (ofd.ShowDialog() ! DialogResult.OK) return;pictureBox2.Image null;target_path ofd.FileName;pictureBox2.Image new Bitmap(target_path);}private void button1_Click(object sender, EventArgs e){if (pictureBox1.Image null || pictureBox2.Image null){return;}pictureBox3.Image null;Application.DoEvents();Mat source_img Cv2.ImRead(source_path);Mat target_img Cv2.ImRead(target_path);ListBbox boxes;boxes detect_face.detect(source_img);int position 0; //一张图片里可能有多个人脸这里只考虑1个人脸的情况//ListPoint2f face_landmark_5of68 new ListPoint2f();ListPoint2f face68landmarks detect_68landmarks.detect(source_img, boxes[position]);//绘图//Cv2.Rectangle(source_img, new OpenCvSharp.Point(boxes[0].xmin, boxes[0].ymin), new OpenCvSharp.Point(boxes[0].xmax, boxes[0].ymax), new Scalar(255, 0, 0), 2);//foreach (Point2f item in face68landmarks)//{// Cv2.Circle(source_img, (int)item.X, (int)item.Y, 4, new Scalar(0, 255, 0), -1);//}//Cv2.ImShow(source_img, source_img);Listfloat source_face_embedding face_embedding.detect(source_img, face68landmarks);boxes detect_face.detect(target_img);position 0; //一张图片里可能有多个人脸这里只考虑1个人脸的情况ListPoint2f target_landmark_5;target_landmark_5 detect_68landmarks.detect(target_img, boxes[position]);//绘图//Cv2.Rectangle(target_img, new OpenCvSharp.Point(boxes[0].xmin, boxes[0].ymin), new OpenCvSharp.Point(boxes[0].xmax, boxes[0].ymax), new Scalar(255, 0, 0), 2);//foreach (Point2f item in target_landmark_5)//{// Cv2.Circle(target_img, (int)item.X, (int)item.Y, 4, new Scalar(0, 255, 0), -1);//}//Cv2.ImShow(target_img, target_img);Mat swapimg swap_face.process(target_img, source_face_embedding, target_landmark_5);Mat resultimg enhance_face.process(swapimg, target_landmark_5);//pictureBox3.Image swapimg.ToBitmap();pictureBox3.Image resultimg.ToBitmap();// Cv2.ImShow(resultimg, resultimg);}private void Form1_Load(object sender, EventArgs e){detect_face new Yolov8Face(model/yoloface_8n.onnx);detect_68landmarks new Face68Landmarks(model/2dfan4.onnx);face_embedding new FaceEmbdding(model/arcface_w600k_r50.onnx);swap_face new SwapFace(model/inswapper_128.onnx);enhance_face new FaceEnhance(model/gfpgan_1.4.onnx);target_path images/target.jpg;source_path images/5.jpg;//target_path images/5.jpg;//source_path images/14.jpg;pictureBox1.Image new Bitmap(source_path);pictureBox2.Image new Bitmap(target_path);}} }
http://www.zqtcl.cn/news/407913/

相关文章:

  • wordpress用户登录界面插件重庆网站排名优化公司
  • 网站整体建设方案设计wordpress 插件升级慢
  • 淄博网站制作升级优化青岛品牌网站建设价格
  • 网站后台管理系统模块星星wordpress模板
  • 网站统计 中文域名优化英语
  • 自己做视频的网站吗怎么建设维护学校的网站
  • 广州网站建设好公司鲁权屯网站建设
  • 网站多数关键词网站使用mip后效果怎么样
  • 如何介绍自己做的网站建设三库一平台
  • 郑州网站商城建设iframe 一直网站底部
  • 1688网站怎么样百度一下你知道
  • 做电商图的设计网站蚌埠网页设计培训
  • 江苏省建设工程质量监督站网站手机网站 案例
  • 优而思 网站科技自立自强是国家强盛之基
  • 去哪里购买网站空间专门做家居的网站
  • 网站信息安全建设方案公众号网站建设
  • 网站的设计方案淘宝大数据查询平台
  • 深圳营销型网站建设 龙华信科网站项目有需要什么技术支持
  • 开源网站模板cms网店推广实训总结
  • 常见的电子商务网站有哪些建设校园门户网站信息意义
  • 象山经济开发区建设有限公司网站足球比赛直播app
  • 国外做mg动画的网站大全网站打不开 别的电脑能打开
  • 手机怎么创网站西宁企业做网站
  • 网站主机多大wordpress连接错误
  • 3d建站电商平台网站开发过程是什么
  • 优化核心系列网站wordpress下拉刷新
  • 深圳建站定制公司国外试用网站空间
  • 网站建设的原则有哪些内容建设网站的详细步骤
  • wordpress网站换字体宣传电脑的网站开发
  • 移动网站设计上机考试修改wordpress域名