C# Onnx E2Pose人体关键点检测
C# Onnx E2Pose人体关键点检测
目录
效果
模型信息
项目
代码
下载
效果
模型信息
Inputs
-------------------------
name:inputimg
tensor:Float[1, 3, 512, 512]
---------------------------------------------------------------
Outputs
-------------------------
name:kvxy/concat
tensor:Float[1, 341, 17, 3]
name:pv/concat
tensor:Float[1, 341, 1, 1]
---------------------------------------------------------------
项目
代码
using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
namespace Onnx_Demo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";
string image_path = "";
string startupPath;
DateTime dt1 = DateTime.Now;
DateTime dt2 = DateTime.Now;
string model_path;
Mat image;
Mat result_image;
SessionOptions options;
InferenceSession onnx_session;
Tensor<float> input_tensor;
List<NamedOnnxValue> input_container;
IDisposableReadOnlyCollection<DisposableNamedOnnxValue> result_infer;
DisposableNamedOnnxValue[] results_onnxvalue;
Tensor<float> result_tensors;
int inpHeight, inpWidth;
float confThreshold;
int[] connect_list = { 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 6, 5, 7, 7, 9, 6, 8, 8, 10, 5, 11, 6, 12, 11, 12, 11, 13, 13, 15, 12, 14, 14, 16 };
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = fileFilter;
if (ofd.ShowDialog() != DialogResult.OK) return;
pictureBox1.Image = null;
image_path = ofd.FileName;
pictureBox1.Image = new Bitmap(image_path);
textBox1.Text = "";
image = new Mat(image_path);
pictureBox2.Image = null;
}
unsafe private void button2_Click(object sender, EventArgs e)
{
if (image_path == "")
{
return;
}
button2.Enabled = false;
pictureBox2.Image = null;
textBox1.Text = "";
Application.DoEvents();
//读图片
image = new Mat(image_path);
//将图片转为RGB通道
Mat image_rgb = new Mat();
Cv2.CvtColor(image, image_rgb, ColorConversionCodes.BGR2RGB);
Cv2.Resize(image_rgb, image_rgb, new OpenCvSharp.Size(inpHeight, inpWidth));
//输入Tensor
input_tensor = new DenseTensor<float>(new[] { 1, 3, inpHeight, inpWidth });
for (int y = 0; y < image_rgb.Height; y++)
{
for (int x = 0; x < image_rgb.Width; x++)
{
input_tensor[0, 0, y, x] = image_rgb.At<Vec3b>(y, x)[0];
input_tensor[0, 1, y, x] = image_rgb.At<Vec3b>(y, x)[1];
input_tensor[0, 2, y, x] = image_rgb.At<Vec3b>(y, x)[2];
}
}
//将 input_tensor 放入一个输入参数的容器,并指定名称
input_container.Add(NamedOnnxValue.CreateFromTensor("inputimg", input_tensor));
dt1 = DateTime.Now;
//运行 Inference 并获取结果
result_infer = onnx_session.Run(input_container);
dt2 = DateTime.Now;
// 将输出结果转为DisposableNamedOnnxValue数组
results_onnxvalue = result_infer.ToArray();
float[] kpt = results_onnxvalue[0].AsTensor<float>().ToArray();
float[] pv = results_onnxvalue[1].AsTensor<float>().ToArray();
float[] temp = new float[51];
int num_proposal = 341;
int num_pts = 17;
int len = num_pts * 3;
List<List<int>> results = new List<List<int>>();
for (int i = 0; i < num_proposal; i++)
{
Array.Copy(kpt, i * 51, temp, 0, 51);
if (pv[i] >= confThreshold)
{
List<int> human_pts = new List<int>();
for (int ii = 0; ii < num_pts * 2; ii++)
{
human_pts.Add(0);
}
for (int j = 0; j < num_pts; j++)
{
float score = temp[j * 3] * 2;
if (score >= confThreshold)
{
float x = temp[j * 3 + 1] * image.Cols;
float y = temp[j * 3 + 2] * image.Rows;
human_pts[j * 2] = (int)x;
human_pts[j * 2 + 1] = (int)y;
}
}
results.Add(human_pts);
}
}
result_image = image.Clone();
int start_x = 0;
int start_y = 0;
int end_x = 0;
int end_y = 0;
for (int i = 0; i < results.Count; ++i)
{
for (int j = 0; j < num_pts; j++)
{
int cx = results[i][j * 2];
int cy = results[i][j * 2 + 1];
if (cx > 0 && cy > 0)
{
Cv2.Circle(result_image, new OpenCvSharp.Point(cx, cy), 3, new Scalar(0, 0, 255), -1, LineTypes.AntiAlias);
}
start_x = results[i][connect_list[j * 2] * 2];
start_y = results[i][connect_list[j * 2] * 2 + 1];
end_x = results[i][connect_list[j * 2 + 1] * 2];
end_y = results[i][connect_list[j * 2 + 1] * 2 + 1];
if (start_x > 0 && start_y > 0 && end_x > 0 && end_y > 0)
{
Cv2.Line(result_image, new OpenCvSharp.Point(start_x, start_y), new OpenCvSharp.Point(end_x, end_y), new Scalar(0, 255, 0), 2, LineTypes.AntiAlias);
}
}
start_x = results[i][connect_list[num_pts * 2] * 2];
start_y = results[i][connect_list[num_pts * 2] * 2 + 1];
end_x = results[i][connect_list[num_pts * 2 + 1] * 2];
end_y = results[i][connect_list[num_pts * 2 + 1] * 2 + 1];
if (start_x > 0 && start_y > 0 && end_x > 0 && end_y > 0)
{
Cv2.Line(result_image, new OpenCvSharp.Point(start_x, start_y), new OpenCvSharp.Point(end_x, end_y), new Scalar(0, 255, 0), 2, LineTypes.AntiAlias);
}
}
pictureBox2.Image = new Bitmap(result_image.ToMemoryStream());
textBox1.Text = "推理耗时:" + (dt2 - dt1).TotalMilliseconds + "ms";
button2.Enabled = true;
}
private void Form1_Load(object sender, EventArgs e)
{
startupPath = System.Windows.Forms.Application.StartupPath;
model_path = "model/e2epose_resnet50_1x3x512x512.onnx";
// 创建输出会话,用于输出模型读取信息
options = new SessionOptions();
options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_INFO;
options.AppendExecutionProvider_CPU(0);// 设置为CPU上运行
// 创建推理模型类,读取本地模型文件
onnx_session = new InferenceSession(model_path, options);//model_path 为onnx模型文件的路径
// 创建输入容器
input_container = new List<NamedOnnxValue>();
image_path = "test_img/1.jpg";
pictureBox1.Image = new Bitmap(image_path);
image = new Mat(image_path);
inpWidth = 512;
inpHeight = 512;
confThreshold = 0.5f;
}
private void pictureBox1_DoubleClick(object sender, EventArgs e)
{
Common.ShowNormalImg(pictureBox1.Image);
}
private void pictureBox2_DoubleClick(object sender, EventArgs e)
{
Common.ShowNormalImg(pictureBox2.Image);
}
SaveFileDialog sdf = new SaveFileDialog();
private void button3_Click(object sender, EventArgs e)
{
if (pictureBox2.Image == null)
{
return;
}
Bitmap output = new Bitmap(pictureBox2.Image);
sdf.Title = "保存";
sdf.Filter = "Images (*.jpg)|*.jpg|Images (*.png)|*.png|Images (*.bmp)|*.bmp";
if (sdf.ShowDialog() == DialogResult.OK)
{
switch (sdf.FilterIndex)
{
case 1:
{
output.Save(sdf.FileName, ImageFormat.Jpeg);
break;
}
case 2:
{
output.Save(sdf.FileName, ImageFormat.Png);
break;
}
case 3:
{
output.Save(sdf.FileName, ImageFormat.Bmp);
break;
}
}
MessageBox.Show("保存成功,位置:" + sdf.FileName);
}
}
}
}
using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;namespace Onnx_Demo
{public partial class Form1 : Form{public Form1(){InitializeComponent();}string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string image_path = "";string startupPath;DateTime dt1 = DateTime.Now;DateTime dt2 = DateTime.Now;string model_path;Mat image;Mat result_image;SessionOptions options;InferenceSession onnx_session;Tensor<float> input_tensor;List<NamedOnnxValue> input_container;IDisposableReadOnlyCollection<DisposableNamedOnnxValue> result_infer;DisposableNamedOnnxValue[] results_onnxvalue;Tensor<float> result_tensors;int inpHeight, inpWidth;float confThreshold;int[] connect_list = { 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 6, 5, 7, 7, 9, 6, 8, 8, 10, 5, 11, 6, 12, 11, 12, 11, 13, 13, 15, 12, 14, 14, 16 };private void button1_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox1.Image = null;image_path = ofd.FileName;pictureBox1.Image = new Bitmap(image_path);textBox1.Text = "";image = new Mat(image_path);pictureBox2.Image = null;}unsafe private void button2_Click(object sender, EventArgs e){if (image_path == ""){return;}button2.Enabled = false;pictureBox2.Image = null;textBox1.Text = "";Application.DoEvents();//读图片image = new Mat(image_path);//将图片转为RGB通道Mat image_rgb = new Mat();Cv2.CvtColor(image, image_rgb, ColorConversionCodes.BGR2RGB);Cv2.Resize(image_rgb, image_rgb, new OpenCvSharp.Size(inpHeight, inpWidth));//输入Tensorinput_tensor = new DenseTensor<float>(new[] { 1, 3, inpHeight, inpWidth });for (int y = 0; y < image_rgb.Height; y++){for (int x = 0; x < image_rgb.Width; x++){input_tensor[0, 0, y, x] = image_rgb.At<Vec3b>(y, x)[0];input_tensor[0, 1, y, x] = image_rgb.At<Vec3b>(y, x)[1];input_tensor[0, 2, y, x] = image_rgb.At<Vec3b>(y, x)[2];}}//将 input_tensor 放入一个输入参数的容器,并指定名称input_container.Add(NamedOnnxValue.CreateFromTensor("inputimg", input_tensor));dt1 = DateTime.Now;//运行 Inference 并获取结果result_infer = onnx_session.Run(input_container);dt2 = DateTime.Now;// 将输出结果转为DisposableNamedOnnxValue数组results_onnxvalue = result_infer.ToArray();float[] kpt = results_onnxvalue[0].AsTensor<float>().ToArray();float[] pv = results_onnxvalue[1].AsTensor<float>().ToArray();float[] temp = new float[51];int num_proposal = 341;int num_pts = 17;int len = num_pts * 3;List<List<int>> results = new List<List<int>>();for (int i = 0; i < num_proposal; i++){Array.Copy(kpt, i * 51, temp, 0, 51);if (pv[i] >= confThreshold){List<int> human_pts = new List<int>();for (int ii = 0; ii < num_pts * 2; ii++){human_pts.Add(0);}for (int j = 0; j < num_pts; j++){float score = temp[j * 3] * 2;if (score >= confThreshold){float x = temp[j * 3 + 1] * image.Cols;float y = temp[j * 3 + 2] * image.Rows;human_pts[j * 2] = (int)x;human_pts[j * 2 + 1] = (int)y;}}results.Add(human_pts);}}result_image = image.Clone();int start_x = 0;int start_y = 0;int end_x = 0;int end_y = 0;for (int i = 0; i < results.Count; ++i){for (int j = 0; j < num_pts; j++){int cx = results[i][j * 2];int cy = results[i][j * 2 + 1];if (cx > 0 && cy > 0){Cv2.Circle(result_image, new OpenCvSharp.Point(cx, cy), 3, new Scalar(0, 0, 255), -1, LineTypes.AntiAlias);}start_x = results[i][connect_list[j * 2] * 2];start_y = results[i][connect_list[j * 2] * 2 + 1];end_x = results[i][connect_list[j * 2 + 1] * 2];end_y = results[i][connect_list[j * 2 + 1] * 2 + 1];if (start_x > 0 && start_y > 0 && end_x > 0 && end_y > 0){Cv2.Line(result_image, new OpenCvSharp.Point(start_x, start_y), new OpenCvSharp.Point(end_x, end_y), new Scalar(0, 255, 0), 2, LineTypes.AntiAlias);}}start_x = results[i][connect_list[num_pts * 2] * 2];start_y = results[i][connect_list[num_pts * 2] * 2 + 1];end_x = results[i][connect_list[num_pts * 2 + 1] * 2];end_y = results[i][connect_list[num_pts * 2 + 1] * 2 + 1];if (start_x > 0 && start_y > 0 && end_x > 0 && end_y > 0){Cv2.Line(result_image, new OpenCvSharp.Point(start_x, start_y), new OpenCvSharp.Point(end_x, end_y), new Scalar(0, 255, 0), 2, LineTypes.AntiAlias);}}pictureBox2.Image = new Bitmap(result_image.ToMemoryStream());textBox1.Text = "推理耗时:" + (dt2 - dt1).TotalMilliseconds + "ms";button2.Enabled = true;}private void Form1_Load(object sender, EventArgs e){startupPath = System.Windows.Forms.Application.StartupPath;model_path = "model/e2epose_resnet50_1x3x512x512.onnx";// 创建输出会话,用于输出模型读取信息options = new SessionOptions();options.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_INFO;options.AppendExecutionProvider_CPU(0);// 设置为CPU上运行// 创建推理模型类,读取本地模型文件onnx_session = new InferenceSession(model_path, options);//model_path 为onnx模型文件的路径// 创建输入容器input_container = new List<NamedOnnxValue>();image_path = "test_img/1.jpg";pictureBox1.Image = new Bitmap(image_path);image = new Mat(image_path);inpWidth = 512;inpHeight = 512;confThreshold = 0.5f;}private void pictureBox1_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox1.Image);}private void pictureBox2_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox2.Image);}SaveFileDialog sdf = new SaveFileDialog();private void button3_Click(object sender, EventArgs e){if (pictureBox2.Image == null){return;}Bitmap output = new Bitmap(pictureBox2.Image);sdf.Title = "保存";sdf.Filter = "Images (*.jpg)|*.jpg|Images (*.png)|*.png|Images (*.bmp)|*.bmp";if (sdf.ShowDialog() == DialogResult.OK){switch (sdf.FilterIndex){case 1:{output.Save(sdf.FileName, ImageFormat.Jpeg);break;}case 2:{output.Save(sdf.FileName, ImageFormat.Png);break;}case 3:{output.Save(sdf.FileName, ImageFormat.Bmp);break;}}MessageBox.Show("保存成功,位置:" + sdf.FileName);}}}
}
下载
源码下载
相关文章:

C# Onnx E2Pose人体关键点检测
C# Onnx E2Pose人体关键点检测 目录 效果 模型信息 项目 代码 下载 效果 模型信息 Inputs ------------------------- name:inputimg tensor:Float[1, 3, 512, 512] --------------------------------------------------------------- Outputs ---…...

YOLO10:手把手安装教程与使用说明
目录 前言一、YOLO10检测模型二、YOLO安装过程1.新建conda的环境 yolo10安装依赖包测试 总结 前言 v9还没整明白,v10又来了。而且还是打败天下无敌手的存在,连最近很火的RT-DETR都被打败了。那么,笑傲目标检测之林的v10又能持续多久呢&#…...

EasyRecovery2024永久免费crack激活码注册码
在数字化时代,数据已经成为我们生活和工作中不可或缺的一部分。无论是个人用户还是企业用户,都面临着数据丢失的风险。一旦数据丢失,可能会给我们的工作带来极大的不便,甚至可能对企业造成重大损失。因此,数据安全和恢…...
Linux Centos内网环境中安装mysql5.7详细安装过程
一、下载安装包 下载地址(可下载历史版本): https://downloads.mysql.com/archives/community 二、解压到安装路径 tar -zxvf mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz三、重命名 mv /usr/local/mysql-5.7.20-linux-glibc2.12-x86_64 …...
新字符设备驱动实验学习
register_chrdev 和 unregister_chrdev 这两个函数是老版本驱动使用的函数,现在新的字符设备驱动已经不再使用这两个函数,而是使用Linux内核推荐的新字符设备驱动API函数。新字符设别驱动API函数在驱动模块加载的时候自动创建设备节点文件。 分配和释放…...
篇1:Mapbox Style Specification
目录 引言 地图创建与样式加载 Spec Reference Root sources type:vector矢量瓦片...

实时监控与报警:人员跌倒检测算法的实践
在全球范围内,跌倒事件对老年人和儿童的健康与安全构成了重大威胁。据统计,跌倒是老年人意外伤害和死亡的主要原因之一。开发人员跌倒检测算法的目的是通过技术手段及时发现和响应跌倒事件,减少因延迟救助而造成的严重后果。这不仅对老年人群…...

LeetCode25_K个一组翻转链表
. - 力扣(LeetCode) 一、题目描述 二、过程模拟 1. 第一步 2. 第二步:子链表分组 3. 第三步:断开前后两组 4. 第四步:翻转start到end的部分 5. 第五步:连接翻转好的前半部分和未翻转的后半部分ÿ…...

电脑突然提示:“failed to load steamui.dll”是什么情况?分享几种解决steamui.dll丢失的方法
相信有一些用户正在面临一个叫做“failed to load steamui.dll”的问题,这种情况多半发生在试图运行某个程序时,系统会提示一条错误消息:“failed to load steamui.dll”。那么,为何steamui.dll文件会丢失,又应该如何解…...

【vue实战项目】通用管理系统:作业列表
目录 目录 1.前言 2.后端API 3.前端API 4.组件 5.分页 6.封装组件 1.前言 本文是博主前端Vue实战系列中的一篇文章,本系列将会带大家一起从0开始一步步完整的做完一个小项目,让你找到Vue实战的技巧和感觉。 专栏地址: https://blog…...

Scikit-Learn随机森林回归
Scikit-Learn随机森林回归 1、随机森林1.1、集成学习1.2、Bagging方法1.3、随机森林算法1.4、随机森林的优缺点2、Scikit-Learn随机森林回归2.1、Scikit-Learn随机森林回归API2.2、随机森林回归实践(加州房价预测)1、随机森林 随机森林是一种由决策树构成的集成算法,它在大多…...
Vue Router 教程
Vue Router 是 Vue.js 的官方路由管理器,它提供了一种方便的方式来管理应用的路由。在本教程中,我们将介绍 Vue Router 的一些常见用法和示例。 一、安装 Vue Router 使用 Vue Router 之前,需要先安装它。可以使用以下命令通过 npm 安装&am…...

【数据库】SQL--DQL(初阶)
文章目录 DCL1. 基本介绍2. 语法2.1 基础查询2.2 条件查询2.3 聚合函数2.4 聚合查询2.5 分组查询2.6 排序查询2.7 分页查询2.8 综合案例练习2.9 执行顺序 3. DQL总结 DCL 更多数据库MySQL系统内容就在以下专栏: 专栏链接:数据库MySQL 1. 基本介绍 DQL英…...

【docker】docker的安装
如果之前安装了旧版本的docker我们需要进行卸载: 卸载之前的旧版本 卸载 # 卸载旧版本 sudo apt-get remove docker docker-engine docker.io containerd runc # 卸载历史版本 apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker…...

OC IOS 文件解压缩预览
热很。。热很。。。。夏天的城市只有热浪没有情怀。。。 来吧,come on。。。 引用第三方库: pod SSZipArchive 开发实现: 一、控制器实现 头文件控制器定义: // // ZipRarViewController.h // // Created by carbonzhao on 2…...
python-web应用程序-Django-From组件
python-web应用程序-Django-From组件 添加用户时 原始方法(本质)【麻烦】 def user_add(req):if req.method GET:return render(req,XXX.html)#POST请求处理:XXXXX-用户数据没有校验 -出现错误提示 -页面上的每一个字段都需要我们重新写一遍 -关联数…...

K8s(Kubernetes)常用命令
大家好,当谈及容器编排工具时,Kubernetes(常简称为K8s)无疑是当今最受欢迎和广泛使用的解决方案之一。作为一个开源的容器编排平台,Kubernetes 提供了丰富的功能,可以帮助开发人员和运维团队管理、部署和扩…...
C#-for循环语句
for循环语句 语法: for(初始化变量; 判断条件; 增量表达式) { // 内部代码 } 第一个空(初始表达式): 一般用来声明一个临时的局部变量 用来计数第二个空(条件表达式): 表明进入循环的条件 一个bool类型的值(bool类型 条件表达式 逻辑运算符)第三个空(增量表达式): 使用第一个空…...

css动画案例练习之会展开的魔方和交错的小块
这里写目录标题 一级目录二级目录三级目录 下面开始案例的练习,建议第一个动手操作好了再进行下一个一、交错的小块效果展示1.大致思路1.基本结构2.实现动态移动 2.最终版代码 二、会展开的魔方1.大致思路1.基本结构;2.静态魔方的构建3.让静态的魔方动起来 2.最终版…...

前端逆向之下载canvas引用的图片
前端逆向之下载canvas引用的图片 一、来源二、解决三、如果在Network这里也找不到呢? 一、来源 当我们用dom检查器的时候无法选中想要扒下来的图片,只能选中canvas,这种时候该怎么办呢? 二、解决 这个时候应该换个脑子…...

LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器的上位机配置操作说明
LBE-LEX系列工业语音播放器|预警播报器|喇叭蜂鸣器专为工业环境精心打造,完美适配AGV和无人叉车。同时,集成以太网与语音合成技术,为各类高级系统(如MES、调度系统、库位管理、立库等)提供高效便捷的语音交互体验。 L…...
谷歌浏览器插件
项目中有时候会用到插件 sync-cookie-extension1.0.0:开发环境同步测试 cookie 至 localhost,便于本地请求服务携带 cookie 参考地址:https://juejin.cn/post/7139354571712757767 里面有源码下载下来,加在到扩展即可使用FeHelp…...

linux arm系统烧录
1、打开瑞芯微程序 2、按住linux arm 的 recover按键 插入电源 3、当瑞芯微检测到有设备 4、松开recover按键 5、选择升级固件 6、点击固件选择本地刷机的linux arm 镜像 7、点击升级 (忘了有没有这步了 估计有) 刷机程序 和 镜像 就不提供了。要刷的时…...
将对透视变换后的图像使用Otsu进行阈值化,来分离黑色和白色像素。这句话中的Otsu是什么意思?
Otsu 是一种自动阈值化方法,用于将图像分割为前景和背景。它通过最小化图像的类内方差或等价地最大化类间方差来选择最佳阈值。这种方法特别适用于图像的二值化处理,能够自动确定一个阈值,将图像中的像素分为黑色和白色两类。 Otsu 方法的原…...
【python异步多线程】异步多线程爬虫代码示例
claude生成的python多线程、异步代码示例,模拟20个网页的爬取,每个网页假设要0.5-2秒完成。 代码 Python多线程爬虫教程 核心概念 多线程:允许程序同时执行多个任务,提高IO密集型任务(如网络请求)的效率…...

并发编程 - go版
1.并发编程基础概念 进程和线程 A. 进程是程序在操作系统中的一次执行过程,系统进行资源分配和调度的一个独立单位。B. 线程是进程的一个执行实体,是CPU调度和分派的基本单位,它是比进程更小的能独立运行的基本单位。C.一个进程可以创建和撤销多个线程;同一个进程中…...
适应性Java用于现代 API:REST、GraphQL 和事件驱动
在快速发展的软件开发领域,REST、GraphQL 和事件驱动架构等新的 API 标准对于构建可扩展、高效的系统至关重要。Java 在现代 API 方面以其在企业应用中的稳定性而闻名,不断适应这些现代范式的需求。随着不断发展的生态系统,Java 在现代 API 方…...

渗透实战PortSwigger靶场:lab13存储型DOM XSS详解
进来是需要留言的,先用做简单的 html 标签测试 发现面的</h1>不见了 数据包中找到了一个loadCommentsWithVulnerableEscapeHtml.js 他是把用户输入的<>进行 html 编码,输入的<>当成字符串处理回显到页面中,看来只是把用户输…...
高防服务器价格高原因分析
高防服务器的价格较高,主要是由于其特殊的防御机制、硬件配置、运营维护等多方面的综合成本。以下从技术、资源和服务三个维度详细解析高防服务器昂贵的原因: 一、硬件与技术投入 大带宽需求 DDoS攻击通过占用大量带宽资源瘫痪目标服务器,因此…...

sshd代码修改banner
sshd服务连接之后会收到字符串: SSH-2.0-OpenSSH_9.5 容易被hacker识别此服务为sshd服务。 是否可以通过修改此banner达到让人无法识别此服务的目的呢? 不能。因为这是写的SSH的协议中的。 也就是协议规定了banner必须这么写。 SSH- 开头,…...