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

devtools/2024/9/22 15:10:14/

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

目录

说明

效果

模型信息

项目

代码

下载


说明

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

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

本文分享使用arcface_w600k_r50.onnx实现C#版Facefusion第三步:获取人脸特征值。

效果

模型信息

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

Outputs
-------------------------
name:683
tensor:Float[1, 512]
---------------------------------------------------------------

项目

代码

Form3.cs

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

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

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

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

        FaceEmbdding face_embedding;

        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;
            }

            button1.Enabled = false;
            Application.DoEvents();

            Mat source_img = Cv2.ImRead(source_path);

            List<Point2f> face68landmarks = new List<Point2f>();
            string face68landmarksStr = "[{\"X\":388.652832,\"Y\":492.494781},{\"X\":639.836365,\"Y\":493.765778},{\"X\":501.1994,\"Y\":655.1151},{\"X\":393.037354,\"Y\":730.373047},{\"X\":646.8359,\"Y\":733.28894}]";
            face68landmarks = JsonConvert.DeserializeObject<List<Point2f>>(face68landmarksStr);

            List<float> source_face_embedding = face_embedding.detect(source_img, face68landmarks);
            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]";

            textBox1.Text= JsonConvert.SerializeObject(source_face_embedding);

            button1.Enabled = true;

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            face_embedding = new FaceEmbdding("model/arcface_w600k_r50.onnx");

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

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

using Newtonsoft.Json;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;namespace FaceFusionSharp
{public partial class Form3 : Form{public Form3(){InitializeComponent();}string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string source_path = "";string target_path = "";FaceEmbdding face_embedding;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;}button1.Enabled = false;Application.DoEvents();Mat source_img = Cv2.ImRead(source_path);List<Point2f> face68landmarks = new List<Point2f>();string face68landmarksStr = "[{\"X\":388.652832,\"Y\":492.494781},{\"X\":639.836365,\"Y\":493.765778},{\"X\":501.1994,\"Y\":655.1151},{\"X\":393.037354,\"Y\":730.373047},{\"X\":646.8359,\"Y\":733.28894}]";face68landmarks = JsonConvert.DeserializeObject<List<Point2f>>(face68landmarksStr);List<float> source_face_embedding = face_embedding.detect(source_img, face68landmarks);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]";textBox1.Text= JsonConvert.SerializeObject(source_face_embedding);button1.Enabled = true;}private void Form1_Load(object sender, EventArgs e){face_embedding = new FaceEmbdding("model/arcface_w600k_r50.onnx");target_path = "images/target.jpg";source_path = "images/source.jpg";pictureBox1.Image = new Bitmap(source_path);pictureBox2.Image = new Bitmap(target_path);}}
}

FaceEmbdding.cs

using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors;
using OpenCvSharp;
using System.Collections.Generic;
using System.Linq;namespace FaceFusionSharp
{internal class FaceEmbdding{float[] input_image;int input_height;int input_width;List<Point2f> normed_template = new List<Point2f>();SessionOptions options;InferenceSession onnx_session;public FaceEmbdding(string modelpath){input_height = 112;input_width = 112;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_sizenormed_template.Add(new Point2f(38.29459984f, 51.69630032f));normed_template.Add(new Point2f(73.53180016f, 51.50140016f));normed_template.Add(new Point2f(56.0252f, 71.73660032f));normed_template.Add(new Point2f(41.54929968f, 92.36549952f));normed_template.Add(new Point2f(70.72989952f, 92.20409968f));}void preprocess(Mat srcimg, List<Point2f> face_landmark_5){Mat crop_img = new Mat();Common.warp_face_by_face_landmark_5(srcimg, crop_img, face_landmark_5, normed_template, new Size(112, 112));Mat[] bgrChannels = Cv2.Split(crop_img);for (int c = 0; c < 3; c++){bgrChannels[c].ConvertTo(bgrChannels[c], MatType.CV_32FC1, 1 / 127.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 List<float> detect(Mat srcimg, List<Point2f> face_landmark_5){preprocess(srcimg, face_landmark_5);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.1", input_tensor)};var ort_outputs = onnx_session.Run(input_container).ToArray();float[] pdata = ort_outputs[0].AsTensor<float>().ToArray(); // 形状是(1, 512)return pdata.ToList(); ;}}
}

下载

源码下载

 


http://www.ppmy.cn/devtools/10414.html

相关文章

clickhouse ttl不生效

现象&#xff1a; 日志保留31天&#xff0c; 但是发现1年前的数据还有。 表结构&#xff1a; CREATE TABLEads_xxxx_metrics_1m_local (static_time String COMMENT 统计时间,......) ENGINE ReplacingMergeTree (process_time) PARTITION BYtoYYYYMMDD (toDate (static_tim…

IP设置https访问

目录 但是IP地址的SSL证书和传统域名证书又有着一些区别&#xff1a; IP证书的原理&#xff1a; IP证书是如何工作的&#xff1a; 具体申请IP证书&#xff1a; 首先IP地址是可以实现https访问的&#xff0c;和传统的域名地址一样&#xff0c;需要用到数字证书部署&#xff0…

Xilinx 7系列FPGA的时钟管理

在7系列FPGA中&#xff0c;时钟管理单元&#xff08;CMT&#xff09;包含了混合模式时钟管理器&#xff08;MMCM&#xff09;和锁相环&#xff08;PLL&#xff09;。PLL是包含了MMCM功能的一个子集。CMT骨干网可用于链接CMT的时钟功能。CMT图&#xff08;图3-1&#xff09;展示…

GHO文件安装到Vmware的两种姿势

1、使用 Ghost11.5.1.2269 将gho转换为vmdk文件(虚拟机硬盘)&#xff0c;Vmware新建虚拟机自定义配置&#xff0c;然后添加已有的虚拟硬盘文件。 注意ghost的版本&#xff0c;如果你是用Ghost11.5备份的gho文件&#xff0c;再用Ghost12把gho文件转换为vmdk&#xff0c;则vmdk文…

探究C++20协程(5)——基于挂起实现无阻塞的定时器

实现目标 当用传统的线程 sleep 函数来让程序等待时&#xff0c;实际上是在阻塞当前线程。阻塞意味着这个线程在指定的时间&#xff08;例如100毫秒&#xff09;内无法执行任何其他任务。这种方式虽然简单&#xff0c;但效率低下&#xff0c;因为它导致CPU资源在等待期间未被充…

指针专题(4)【qsort函数的概念和使用】

1.前言 上节我们学习了指针的相关内容&#xff0c;本节我们在有指针的基础的条件下学习一下指针的运用&#xff0c;那么废话不多说&#xff0c;我们正式进入今天的学习 2.回调函数 我们既然已经学习了指针的相关基础&#xff0c;那么我们此时就可以用指针来实现回调函数 而回…

ruoyi-cloud-plus添加一个不要认证的公开新页面

文章目录 一、前端1. 组件创建2. src/router/index.ts3. src/permission.ts 二、后端1. 设计思想2. ruoyi-gateway.yml3. 开发Controller 版本RuoYiCloudPlusv2.1.2plus-uiVue3 ts 以新增一个公开的课程搜索页面为例。 一、前端 1. 组件创建 在view目录下创建一个页面的vue…

华媒舍:百度竞价排名如何提升点击率

在网络推广中&#xff0c;提升点击率是十分重要的。运用百度搜索引擎广告是一种常用的提升点击率的形式。而百度竞价推广是搜索引擎所提供的一种付费流量方法&#xff0c;根据提高网站在搜索结果中的排名&#xff0c;可以有效提升点击率。下面我们就详细介绍如何运用百度竞价推…