C#版Facefusion:让你的脸与世界融为一体!-05 人脸增强

news2024/9/29 13:27:00

C#版Facefusion:让你的脸与世界融为一体!-05 人脸增强

目录

说明

效果

模型信息

项目

代码

下载


说明

C#版Facefusion一共有如下5个步骤:

1、使用yoloface_8n.onnx进行人脸检测
2、使用2dfan4.onnx获取人脸关键点
3、使用arcface_w600k_r50.onnx获取人脸特征值
4、使用inswapper_128.onnx进行人脸交换
5、使用gfpgan_1.4.onnx进行人脸增强

本文分享使用gfpgan_1.4.onnx实现C#版Facefusion第五步:人脸增强。

到此人脸替换就全部完成了。

效果

模型信息

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

Outputs
-------------------------
name:output
tensor:Float[1, 3, 512, 512]
---------------------------------------------------------------

项目

代码

Form5.cs

using Newtonsoft.Json;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

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

        string source_path = "";

        FaceEnhance enhance_face;

        private void button1_Click(object sender, EventArgs e)
        {
            if (pictureBox1.Image == null)
            {
                return;
            }

            pictureBox3.Image = null;
            button1.Enabled = false;
            Application.DoEvents();

            Mat source_img = Cv2.ImRead(source_path);

            List<Point2f> target_landmark_5 = new List<Point2f>();
            string target_landmark_5Str = "[{\"X\":485.602539,\"Y\":247.84906},{\"X\":704.237549,\"Y\":247.422546},{\"X\":527.5082,\"Y\":360.211731},{\"X\":485.430084,\"Y\":495.7987},{\"X\":647.741638,\"Y\":505.131042}]";
            target_landmark_5 = JsonConvert.DeserializeObject<List<Point2f>>(target_landmark_5Str);

            Mat resultimg = enhance_face.process(source_img, target_landmark_5);

            pictureBox3.Image = resultimg.ToBitmap();

            button1.Enabled = true;

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            enhance_face = new FaceEnhance("model/gfpgan_1.4.onnx");

            source_path = "images/swapimg.jpg";

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

using Newtonsoft.Json;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

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

        string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";

        string startupPath = "";

        string source_path = "";
        string target_path = "";

        SwapFace swap_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;
            button1.Enabled = false;
            Application.DoEvents();

            Mat source_img = Cv2.ImRead(source_path);
            Mat target_img = Cv2.ImRead(target_path);

            List<float> source_face_embedding = new List<float>();
            string source_face_embeddingStr = "[1.27829754,-0.843142569,-0.06048897,1.217865,0.05804708,-0.922453,-0.3946921,0.354699373,-0.463791549,-0.2642475,0.105297916,-0.7907695,-0.356749445,0.3069641,-0.8946595,0.170947254,1.44868386,0.759071946,-0.269189358,-0.5085244,-0.9652322,-1.04884982,0.9766977,1.07973742,0.0248709321,-0.4092621,-0.6058987,-0.848997355,-1.03252912,-0.9534966,-0.9342567,0.9198751,0.4637577,-0.12646234,-0.959137,0.215259671,0.202829659,0.386633456,-1.06374037,0.9076231,0.4178339,-0.307011932,0.175406933,-0.8017055,0.0265568867,-0.0304557681,0.381101757,-0.613952756,-0.446841478,-0.02897077,-1.83899212,-0.303131342,-0.4501938,-0.156551331,0.463839,2.24176764,-1.44412839,0.07924119,-0.478609055,-0.07747641,-0.227516085,-0.6149595,0.247599155,0.7158034,-0.989331543,0.336038023,-0.260178417,-0.736905932,0.6045121,-0.5151367,0.0177601129,0.2451405,-0.4607039,-0.9134231,-0.9179117,0.0190813988,-0.0810294747,-0.7007484,0.05699861,0.794708,0.189010963,-0.6672335,-0.0455337241,0.103580572,0.5497576,0.995198667,-0.957392335,0.7217704,-0.359451652,0.4541813,-0.230636075,-0.547900736,-0.5641564,1.813883,-0.7031114,0.00149327889,-1.0309937,-0.103514418,0.4285911,0.0026740334,-0.661017954,-0.6178541,0.0246957541,-0.350938439,-0.852270365,0.388598084,-0.8937982,0.472674131,0.522144735,0.799444556,0.2309232,-1.08995068,-1.442019,-1.91144061,-0.7164683,-0.6465371,0.760996938,-0.420196772,-1.26484954,-0.09949406,-0.151404992,-0.61891,-0.743678153,0.00494776666,0.20202066,-1.08374822,0.0426106676,-0.955584645,0.09357526,-0.766932249,-0.507255733,0.04017231,0.289033234,0.4830236,-0.262155324,-0.7767182,0.179391116,0.320753068,0.6572064,0.7744924,-0.880204558,-0.9739305,0.475606382,-0.0342647,0.505723536,-0.4457739,-0.6569923,-0.9067787,0.4584064,0.107994281,-0.414298415,-0.524813831,-1.03696835,-0.298128754,0.94455415,0.578622341,0.4745661,-0.5985398,0.419998139,-0.0477161035,-0.805623531,1.22836232,-0.996593058,-0.449891567,0.252311468,-1.76361179,0.204254434,-1.17584419,0.0494393073,0.2145797,-1.75655448,0.548028231,-0.3806628,0.8410565,-1.35499954,0.140949339,0.591043949,0.0298345536,0.12179298,-0.7399838,-0.06857535,0.23784174,-0.690012932,-0.147698313,-0.911997,0.680546463,0.1976757,0.9299851,-0.362830281,0.318164885,-0.0501053035,-0.575328946,0.129042387,1.08131313,-0.8875152,0.559377253,1.11513853,1.12112761,-0.123456843,1.202241,-0.6952012,-0.557888448,0.540348053,-0.521905243,-0.138044775,-0.550300062,-2.14852977,-1.39409924,0.104200155,0.839064062,0.281964779,-0.202217847,-0.480831623,1.08107018,0.7986622,-0.2772641,-1.57516074,-0.5475309,0.25043875,1.18010235,0.6972798,0.1838305,-0.151265711,0.5103554,-0.883137345,-1.34374917,0.8238913,0.373506874,-0.506602466,1.12764454,-0.00945023447,-0.0426563546,-0.671316266,0.252278179,-0.7500384,-0.858895063,-0.7738279,0.489211917,0.7337883,-0.5536902,-0.710563064,0.533735633,-0.267439723,-0.08325979,-0.9056747,1.1245147,1.34881878,0.4010091,-0.150992,-0.413697422,0.876372457,0.864017546,0.7379206,-0.6320749,-0.419689536,0.815245,-0.118938759,0.683474243,-0.6155008,-0.6915616,-0.6239222,-0.583537,0.110704079,-0.302822769,0.3435551,-1.17488611,-1.01326025,0.32583034,0.381028563,0.6072552,-0.3146818,0.371741,0.187356383,0.1772259,-1.85920739,-0.504295051,-0.8785569,0.13697955,-1.11337721,-0.01934576,-0.4575694,-1.15144432,1.89849365,-0.1349,-0.6015017,1.42154992,-0.716133237,-0.153033137,0.76939106,-0.07523422,-0.6604878,-1.48084462,0.2875409,-1.12858534,-0.5869999,-0.614957333,-1.463373,-0.6721835,-0.8257968,-0.8025705,-0.05431364,0.692136168,1.29751766,0.488991469,1.05194938,0.270692348,-0.9085438,-0.802716434,0.309471458,0.448509455,0.6789823,-0.5252856,-0.435200185,0.225147322,-0.07077629,1.345535,0.387805045,0.5236529,-0.764065266,0.0691546053,0.250542849,0.1982695,0.149731383,0.845968544,-0.566032946,0.654774547,0.07547854,0.8683217,1.290068,-0.152055,-0.803692758,-0.152090073,0.558371961,0.157687336,0.839655459,1.01181054,-0.5604553,-1.40365577,-0.0167575851,0.933371544,0.078309074,-0.399255246,1.34938979,-0.119476132,0.432984,-0.300964683,0.226254016,0.012853846,0.02476523,-1.31901956,-0.127706885,-0.6488211,-0.7127493,0.749162853,-0.893739045,-0.175434247,-0.335470438,1.18117,0.492022336,1.23091626,0.406947345,-0.3563189,0.8080479,-0.426982045,-0.739384949,-0.551647067,0.1390677,0.20869185,-0.0231712535,-0.214353234,-0.174618453,0.0277073532,-0.241463527,0.9559633,0.262964159,-0.851067245,-0.03425724,0.08168835,0.3511026,-0.466765344,-0.134850383,0.08376661,1.48223615,-1.61568224,1.56967258,-0.391382277,-1.56669474,-1.37852716,0.124903291,-0.3481225,-1.23350728,-0.6862239,0.103708193,1.10754442,0.057642363,-0.321929336,-0.2979336,1.83333886,-0.904876,-0.3975336,-1.07201684,0.458736777,-0.4938286,-0.763312,-1.83132732,-0.748038769,0.475634664,0.297061145,-0.2685745,-0.0666656047,0.4759698,-1.03472865,-0.406694651,-0.4281593,-0.9864616,-0.300786138,-0.12080624,0.631304443,-0.153151155,1.42306745,-0.3394043,-0.5216301,0.9424391,0.407645643,-0.240343288,1.197725,0.62536,-0.756885648,0.510467649,0.4989131,0.0761876553,0.10052751,0.105433822,-0.167532444,0.8946594,-0.521723866,-0.580115259,-1.10355973,-0.418604881,0.163044125,0.402529866,0.385285437,0.50639534,1.8232342,0.343647063,0.8509874,-0.7942822,0.6470037,0.00863461,0.4432856,0.7659954,-0.9592937,0.5787302,-0.496584,-1.267057,-0.8610047,0.0339910947,-0.145451844,-1.28451169,-0.193874747,0.5775311,-0.537475049,0.197097167,-1.57822132,0.257652581,0.163942844,1.132039,0.108674683,-0.185894847,0.50037,0.07695928,-0.420834035,-0.3034144,0.162115663,-0.45547688,-0.295086831,-0.0236618519,0.6726147,0.764866352,0.35937,-0.330009639,0.151511714,-0.533296764,-1.08290327,0.230814755,0.06941691,-0.354930282,0.5848398,-1.68328464,-0.476737082,-1.61717749,1.00269365,-1.809915,0.6276051,-0.848550439,0.288911045,-0.4656973,0.5820218,0.851961,0.01968059,0.03812991,0.33123517,-0.349143356,0.16208598,-1.4402169,-0.6137045,-0.3490757,0.2402328,-1.21176457,0.119369812,-0.896918654,0.1288858]";
            source_face_embedding = JsonConvert.DeserializeObject<List<float>>(source_face_embeddingStr);

            List<Point2f> target_landmark_5 = new List<Point2f>();
            string target_landmark_5Str = "[{\"X\":485.602539,\"Y\":247.84906},{\"X\":704.237549,\"Y\":247.422546},{\"X\":527.5082,\"Y\":360.211731},{\"X\":485.430084,\"Y\":495.7987},{\"X\":647.741638,\"Y\":505.131042}]";
            target_landmark_5 = JsonConvert.DeserializeObject<List<Point2f>>(target_landmark_5Str);

            Mat swapimg = swap_face.process(target_img, source_face_embedding, target_landmark_5);
            Cv2.ImWrite("swapimg.jpg", swapimg);

            pictureBox3.Image = swapimg.ToBitmap();

            button1.Enabled = true;

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            swap_face = new SwapFace("model/inswapper_128.onnx");

            target_path = "images/target.jpg";
            source_path = "images/source.jpg";

            pictureBox1.Image = new Bitmap(source_path);
            pictureBox2.Image = new Bitmap(target_path);
        }
    }
}

FaceEnhance.cs

using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Linq;

namespace FaceFusionSharp
{
    internal class FaceEnhance
    {
        float[] input_image;
        int input_height;
        int input_width;
        List<Point2f> normed_template;
        float FACE_MASK_BLUR = 0.3f;
        int[] FACE_MASK_PADDING = new int[4] { 0, 0, 0, 0 };

        SessionOptions options;
        InferenceSession onnx_session;

        public FaceEnhance(string modelpath)
        {

            input_height = 512;
            input_width = 512;

            options = new SessionOptions();
            options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_INFO;
            options.AppendExecutionProvider_CPU(0);// 设置为CPU上运行

            // 创建推理模型类,读取本地模型文件
            onnx_session = new InferenceSession(modelpath, options);//model_path 为onnx模型文件的路径

            //在这里就直接定义了,没有像python程序里的那样normed_template = TEMPLATES.get(template) * crop_size
            normed_template = new List<Point2f>();
            normed_template.Add(new Point2f(192.98138112f, 239.94707968f));
            normed_template.Add(new Point2f(318.90276864f, 240.19360256f));
            normed_template.Add(new Point2f(256.63415808f, 314.01934848f));
            normed_template.Add(new Point2f(201.26116864f, 371.410432f));
            normed_template.Add(new Point2f(313.0890496f, 371.1511808f));
        }

        void preprocess(Mat srcimg, List<Point2f> face_landmark_5, ref Mat affine_matrix, ref Mat box_mask)
        {
            Mat crop_img = new Mat();
            affine_matrix = Common.warp_face_by_face_landmark_5(srcimg, crop_img, face_landmark_5, normed_template, new Size(512, 512));
            int[] crop_size = new int[] { crop_img.Cols, crop_img.Rows };
            box_mask = Common.create_static_box_mask(crop_size, FACE_MASK_BLUR, FACE_MASK_PADDING);

            Mat[] bgrChannels = Cv2.Split(crop_img);
            for (int c = 0; c < 3; c++)
            {
                bgrChannels[c].ConvertTo(bgrChannels[c], MatType.CV_32FC1, 1 / (255.0 * 0.5), -1.0);
            }

            Cv2.Merge(bgrChannels, crop_img);

            foreach (Mat channel in bgrChannels)
            {
                channel.Dispose();
            }

            input_image = Common.ExtractMat(crop_img);
            crop_img.Dispose();
        }


        internal Mat process(Mat target_img, List<Point2f> target_landmark_5)
        {
            Mat affine_matrix = new Mat();
            Mat box_mask = new Mat();

            preprocess(target_img, target_landmark_5, ref affine_matrix, ref box_mask);

            Tensor<float> input_tensor = new DenseTensor<float>(input_image, new[] { 1, 3, input_height, input_width });
            List<NamedOnnxValue> input_container = new List<NamedOnnxValue>
            {
                NamedOnnxValue.CreateFromTensor("input", input_tensor)
            };
            var ort_outputs = onnx_session.Run(input_container).ToArray();

            float[] pdata = ort_outputs[0].AsTensor<float>().ToArray();
            int out_h = 512;
            int out_w = 512;
            int channel_step = out_h * out_w;

            for (int i = 0; i < pdata.Length; i++)
            {
                pdata[i] = (pdata[i] + 1) * 0.5f;
                if (pdata[i] < -1)
                {
                    pdata[i] = -1;
                }
                if (pdata[i] > 1)
                {
                    pdata[i] = 1;
                }

                pdata[i] = pdata[i] * 255.0f;
                if (pdata[i] < 0)
                {
                    pdata[i] = 0;
                }
                if (pdata[i] > 255)
                {
                    pdata[i] = 255;
                }
            }

            float[] temp_r = new float[channel_step];
            float[] temp_g = new float[channel_step];
            float[] temp_b = new float[channel_step];

            Array.Copy(pdata, temp_r, channel_step);
            Array.Copy(pdata, channel_step, temp_g, 0, channel_step);
            Array.Copy(pdata, channel_step * 2, temp_b, 0, channel_step);

            Mat rmat = new Mat(out_h, out_w, MatType.CV_32FC1, temp_r);
            Mat gmat = new Mat(out_h, out_w, MatType.CV_32FC1, temp_g);
            Mat bmat = new Mat(out_h, out_w, MatType.CV_32FC1, temp_b);

            Mat result = new Mat();

            Cv2.Merge(new Mat[] { bmat, gmat, rmat }, result);

            result.ConvertTo(result, MatType.CV_8UC3);

            float[] box_mask_data;
            box_mask.GetArray<float>(out box_mask_data);
            int cols = box_mask.Cols;
            int rows = box_mask.Rows;
            MatType matType = box_mask.Type();

            for (int i = 0; i < box_mask_data.Length; i++)
            {
                if (box_mask_data[i] < 0)
                {
                    box_mask_data[i] = 0;
                }

                if (box_mask_data[i] > 1)
                {
                    box_mask_data[i] = 1;
                }
            }
            box_mask = new Mat(rows, cols, matType, box_mask_data);

            Mat paste_frame = Common.paste_back(target_img, result, box_mask, affine_matrix);
            Mat dstimg = Common.blend_frame(target_img, paste_frame);
            return dstimg;
        }
    }
}

下载

源码下载

其他

C#版Facefusion ,换脸器和增强器-CSDN博客

C#版Facefusion:让你的脸与世界融为一体!-01 人脸检测-CSDN博客

C#版Facefusion:让你的脸与世界融为一体!-02 获取人脸关键点-CSDN博客

C#版Facefusion:让你的脸与世界融为一体!-03 获取人脸特征值-CSDN博客

C#版Facefusion:让你的脸与世界融为一体!-04 人脸替换-CSDN博客

C#版Facefusion:让你的脸与世界融为一体!-05 人脸增强-CSDN博客

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1614650.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C++高级特性:虚函数与多态的实现原理(十三)

1、虚函数表和虚函数表指针 如果一个类存在virtual关键字函数或者继承的基类中存在virtual关键字的函数&#xff0c;那么该类的就会存在vptr和一个vtable vptr虚函数表指针全称virtual table pointer、vtable是虚函数表virtual table的缩写。 class A{ public:~A(); };class B…

随机森林(Random Forests)

通过5个条件判定一件事情是否会发生&#xff0c;5个条件对这件事情是否发生的影响力不同&#xff0c;计算每个条件对这件事情发生的影响力多大&#xff0c;写一个随机森林&#xff08;Random Forests&#xff09;模型程序,最后打印5个条件分别的影响力。 ChatGPT 下面是一个使…

书生·浦语大模型实战营Day04OpenXLab 部署

书生浦语大模型实战营Day04OpenXLab 部署 如何在 OpenXLab 部署一个 InternLM2-7B chat 的应用。 OpenXLab浦源平台介绍 OpenXLab 浦源平台以开源为核心&#xff0c;旨在构建开源开放的人工智能生态&#xff0c;促进学术成果的开放共享。OpenXLab面向 AI 研究员和开发者提供…

微电子领域常见概念(五)界面结合能

微电子领域常见概念&#xff08;五&#xff09;界面结合能 界面结合能&#xff0c;也称为界面能或界面自由能&#xff0c;是描述两种不同材料接触时在它们的交界面上存在的特殊能量状态的物理量。在材料科学中&#xff0c;界面结合能是一个重要的概念&#xff0c;因为它直接影响…

【机器学习】特征筛选:提升模型性能的关键步骤

一、引言 在机器学习领域&#xff0c;特征筛选是一个至关重要的预处理步骤。随着数据集的日益庞大和复杂&#xff0c;特征的数量往往也随之激增。然而&#xff0c;并非所有的特征都对模型的性能提升有所贡献&#xff0c;有些特征甚至可能是冗余的、噪声较大的或者与目标变量无关…

STM32定时器编码器模式

定时器编码器模式&#xff1a; Timer -mode Cubemx配置项&#xff1a; 定时器编码模式选择&#xff1a; Encode: mode: TI1: 通道1上升沿使计数器1 TI2: 通道2上升沿使计数器1 TI1 and TI2: 1 和 2 都会1 EX: 获取 编码器正反转数值 数值demo&#xff1a; int Read_Spee…

claude3国内注册

claude3国内注册 Claude 3 作为大型语言模型的强大之处在于其先进的算法设计和大规模训练数据的应用&#xff0c;能够执行复杂和多样化的任务。以下是 Claude 3 主要的强项&#xff1a; 接近人类的理解能力&#xff1a;Claude 3 能够更加深入地理解文本的含义&#xff0c;包括…

7.Prism框架之对话框服务

文章目录 一. 目标二. 技能介绍① 什么是Dialog?② Prism中Dialog的实现方式③ Dialog使用案例一 (修改器)④ Dialog使用案例2(异常显示窗口) 一. 目标 1. 什么是Dialog?2. 传统的Dialog如何实现?3. Prism中Dialog实现方式4. 使用Dialog实现一个异常信息弹出框 二. 技能介…

python编写一个简单的课时记录系统

&#x1f47d;发现宝藏 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。【点击进入巨牛的人工智能学习网站】。 使用Python创建一个简单的课时记录系统 在学习过程中&#xff0c;跟踪课时的进度是非常重要…

LeetCode in Python 69. Sqrt(x) (x的平方根)

求x的平方根&#xff0c;第一想法可能是遍历0&#xff5e;x&#xff0c;求其平方&#xff0c;找到或且但其时间复杂度为O(n)&#xff0c;或是想到遍历0&#xff5e;M即可&#xff0c;其中M x // 2&#xff0c;将时间复杂度降至O()。本文利用二分思想&#xff0c;给出一种时间复…

python--pyQt5 进度条:QProgressBar

https://www.cnblogs.com/itwangqiang/articles/14959401.html https://blog.csdn.net/weixin_43990846/article/details/123880081 进度条用于向用户指示操作的进度&#xff0c;并向他们保证应用程序仍在运行 例 1 import sys from PyQt5.QtWidgets import QApplication, QWi…

(十六)C++自制植物大战僵尸游戏的宏定义讲解

植物大战僵尸游戏开发教程专栏地址http://t.csdnimg.cn/uzrnw 宏定义 在游戏代码中为了方便,定义了许多宏定义。使用宏定义简化代码并提高可读性。下面将讲解游戏中用到的宏定义。 代码位置 代码所在位置是Class\Scenes\GameScene文件夹中。具体如下图所示。 Define.h …

尝试给笔记本超频

超频&#xff08;英语&#xff1a;overclocking&#xff09;是把一个电子配件的时脉速度提升至高于厂方所定的速度运作&#xff0c;从而提升性能的方法&#xff0c;但此举有可能导致该配件稳定性以及配件寿命下降。 笔记本配置为&#xff1a; 处理器 AMD Ryzen 7 7730U wit…

学习部分排序,插入排序,冒泡排序以及希尔排序

1.插入排序 <1>.首先我们举个例子 我们要把6进行前面的插入&#xff0c;那我们要进行比较&#xff0c;首先确定一个end的指针&#xff0c;然后他指向的数字就是我们需要比较的&#xff0c;如果end指向的数比我们end1 的大的话&#xff0c;那我们就往前挪一个&#xff0c…

四六级英语听力考试音频无线发射系统在安顺学院的成功应用分析

四六级英语听力考试音频无线发射系统在安顺学院的成功应用分析 由北京海特伟业科技任洪卓发布于2024年4月22日 安顺学院为了提高学生的外语听力水平&#xff0c;并确保英语四六级听力考试的稳定可靠进行&#xff0c;决定对传统的英语听力音频传输系统进行改造&#xff0c;以提供…

【YOLOv9】实战二:手把手教你使用TensorRT实现YOLOv9实时目标检测(含源码)

‍‍&#x1f3e1;博客主页&#xff1a; virobotics(仪酷智能)&#xff1a;LabVIEW深度学习、人工智能博主 &#x1f384;所属专栏&#xff1a;『LabVIEW深度学习实战』 &#x1f4d1;上期文章&#xff1a;『【YOLOv9】实战一&#xff1a;在 Windows 上使用LabVIEW OpenVINO工具…

gitlab 16.x - ERR unknown command ‘HELLO‘

现象 gitlab部分操作报错500。通过Rails日志发现以下报错&#xff1a; 报错&#xff1a; RedisClient::CommandError ERR unknown command HELLO {"severity": "ERROR","time": "2024-04-22T02:50:16.906Z","correlation_id&quo…

3667B芯茂微SOP7封装5V1A 5W适配器/充电器芯片

3667B是一款高度集成的隔离型适配器和充电器的自供电PSR控制芯片&#xff0c;外部设计极其简单。LP3667 固定原边峰值电流&#xff0c;通过变压器原副边匝比来设置输出恒流点&#xff1b;通过设定一个FB 电阻来设置输出恒压点。为了实现系统成本的简化&#xff0c;LP3667 内置启…

CSS基础常用属性之字体属性(如果想知道CSS的字体属性知识点,那么只看这一篇就足够了!)

前言&#xff1a;在我们学习CSS的时候&#xff0c;主要学习选择器和常用的属性&#xff0c;而这篇文章讲解的就是最基础的属性之一——文字属性。 ✨✨✨这里是秋刀鱼不做梦的BLOG ✨✨✨想要了解更多内容可以访问我的主页秋刀鱼不做梦-CSDN博客 废话不多说&#xff0c;让我们直…

删除二叉树的子树:假设二叉树中的结点均不相等,采用二叉链存储,设计递归算法删除根结点值为x的子树。(C语言)

目录 实验内容&#xff1a; 实验过程&#xff1a; 1.算法设计 2.程序清单 3.复杂度分析 4.运行结果 实验内容&#xff1a; 删除二叉树的子树:假设二叉树中的结点均不相等&#xff0c;采用二叉链存储&#xff0c;设计递归算法删除根结点值为x的子树。 实验过程&#xff1…