python:VOC格式数据集转换为YOLO数据集格式

作者:CSDN @ _养乐多_

本文将介绍如何将目标检测中常用的VOC格式数据集转换为YOLO数据集,并进行数据集比例划分,从而方便的进行YOLO目标检测。

如果不想分两步,可以直接看第三节代码。


文章目录

      • 一、将VOC格式数据集转换为YOLO格式数据集
      • 二、YOLO格式数据集划分(训练、验证、测试)
      • 2.1 版本1
      • 2.2 版本2
      • 2.3 版本3
      • 三、一步到位


一、将VOC格式数据集转换为YOLO格式数据集

执行以下脚本将VOC格式数据集转换为YOLO格式数据集。
但是需要注意的是:

  1. 转换之后的数据集只有Images和labels两个文件。还需要执行第二节中的脚本进行数据集划分,将总的数据集划分为训练、验证、测试数据集;
  2. 使用的话,需要修改 class_mapping 中类别名和对应标签,还有VOC数据集路径、YOLO数据集路径。
import os
import shutil
import xml.etree.ElementTree as ET# VOC格式数据集路径
voc_data_path = 'E:\\DataSet\\helmet-VOC'
voc_annotations_path = os.path.join(voc_data_path, 'Annotations')
voc_images_path = os.path.join(voc_data_path, 'JPEGImages')# YOLO格式数据集保存路径
yolo_data_path = 'E:\\DataSet\\helmet-YOLO'
yolo_images_path = os.path.join(yolo_data_path, 'images')
yolo_labels_path = os.path.join(yolo_data_path, 'labels')# 创建YOLO格式数据集目录
os.makedirs(yolo_images_path, exist_ok=True)
os.makedirs(yolo_labels_path, exist_ok=True)# 类别映射 (可以根据自己的数据集进行调整)
class_mapping = {'head': 0,'helmet': 1,'person': 2,# 添加更多类别...
}def convert_voc_to_yolo(voc_annotation_file, yolo_label_file):tree = ET.parse(voc_annotation_file)root = tree.getroot()size = root.find('size')width = float(size.find('width').text)height = float(size.find('height').text)with open(yolo_label_file, 'w') as f:for obj in root.findall('object'):cls = obj.find('name').textif cls not in class_mapping:continuecls_id = class_mapping[cls]xmlbox = obj.find('bndbox')xmin = float(xmlbox.find('xmin').text)ymin = float(xmlbox.find('ymin').text)xmax = float(xmlbox.find('xmax').text)ymax = float(xmlbox.find('ymax').text)x_center = (xmin + xmax) / 2.0 / widthy_center = (ymin + ymax) / 2.0 / heightw = (xmax - xmin) / widthh = (ymax - ymin) / heightf.write(f"{cls_id} {x_center} {y_center} {w} {h}\n")# 遍历VOC数据集的Annotations目录,进行转换
for voc_annotation in os.listdir(voc_annotations_path):if voc_annotation.endswith('.xml'):voc_annotation_file = os.path.join(voc_annotations_path, voc_annotation)image_id = os.path.splitext(voc_annotation)[0]voc_image_file = os.path.join(voc_images_path, f"{image_id}.jpg")yolo_label_file = os.path.join(yolo_labels_path, f"{image_id}.txt")yolo_image_file = os.path.join(yolo_images_path, f"{image_id}.jpg")convert_voc_to_yolo(voc_annotation_file, yolo_label_file)if os.path.exists(voc_image_file):shutil.copy(voc_image_file, yolo_image_file)print("转换完成!")

二、YOLO格式数据集划分(训练、验证、测试)

参考:https://docs.ultralytics.com/datasets/detect/#ultralytics-yolo-format

随机将数据集按照0.7-0.2-0.1比例划分为训练、验证、测试数据集。
注意,修改代码中图片的后缀,如果是.jpg,就把.png修改为.jpg。

最终结果,

在这里插入图片描述

2.1 版本1

用版本1划分就行,也可以用版本2,版本3就不用了。版本1和版本2是两种不同的组织方式都能训练。版本1是官方的组织方法。

import os
import shutil
import randomdef make_yolo_dataset(images_folder, labels_folder, output_folder, train_ratio=0.8):# 创建目标文件夹images_train_folder = os.path.join(output_folder, 'images/train')images_val_folder = os.path.join(output_folder, 'images/val')labels_train_folder = os.path.join(output_folder, 'labels/train')labels_val_folder = os.path.join(output_folder, 'labels/val')os.makedirs(images_train_folder, exist_ok=True)os.makedirs(images_val_folder, exist_ok=True)os.makedirs(labels_train_folder, exist_ok=True)os.makedirs(labels_val_folder, exist_ok=True)# 获取图片和标签的文件名(不包含扩展名)image_files = [f for f in os.listdir(images_folder) if f.endswith('.jpg')]label_files = [f for f in os.listdir(labels_folder) if f.endswith('.txt')]image_base_names = set(os.path.splitext(f)[0] for f in image_files)label_base_names = set(os.path.splitext(f)[0] for f in label_files)# 找出图片和标签都存在的文件名matched_files = list(image_base_names & label_base_names)# 打乱顺序并划分为训练集和验证集random.shuffle(matched_files)split_idx = int(len(matched_files) * train_ratio)train_files = matched_files[:split_idx]val_files = matched_files[split_idx:]# 移动文件到对应文件夹for base_name in train_files:img_src = os.path.join(images_folder, f"{base_name}.jpg")lbl_src = os.path.join(labels_folder, f"{base_name}.txt")img_dst = os.path.join(images_train_folder, f"{base_name}.jpg")lbl_dst = os.path.join(labels_train_folder, f"{base_name}.txt")shutil.copyfile(img_src, img_dst)shutil.copyfile(lbl_src, lbl_dst)for base_name in val_files:img_src = os.path.join(images_folder, f"{base_name}.jpg")lbl_src = os.path.join(labels_folder, f"{base_name}.txt")img_dst = os.path.join(images_val_folder, f"{base_name}.jpg")lbl_dst = os.path.join(labels_val_folder, f"{base_name}.txt")shutil.copyfile(img_src, img_dst)shutil.copyfile(lbl_src, lbl_dst)print("数据集划分完成!")# 使用示例
images_folder = 'path/to/your/images_folder'  # 原始图片文件夹路径
labels_folder = 'path/to/your/labels_folder'  # 原始标签文件夹路径
output_folder = 'path/to/your/output_folder'  # 存放结果数据集的文件夹路径
make_yolo_dataset(images_folder, labels_folder, output_folder)

2.2 版本2

import os
import shutil
import random
from math import floor# 创建输出目录的函数
def create_dirs(output_dir):images_dir = os.path.join(output_dir, 'images')labels_dir = os.path.join(output_dir, 'labels')for split in ['train', 'val', 'test']:os.makedirs(os.path.join(images_dir, split), exist_ok=True)os.makedirs(os.path.join(labels_dir, split), exist_ok=True)return images_dir, labels_dir# 获取图片和对应txt标签的列表
def get_files(images_path, labels_path):image_files = [f for f in os.listdir(images_path) if f.endswith(('jpg', 'png', 'jpeg'))]label_files = [f for f in os.listdir(labels_path) if f.endswith('.txt')]# 检查图片和标签是否配对paired_files = []for image_file in image_files:base_name = os.path.splitext(image_file)[0]label_file = base_name + '.txt'if label_file in label_files:paired_files.append((image_file, label_file))return paired_files# 将文件按比例划分并拷贝到相应目录
def split_and_copy(paired_files, images_path, labels_path, images_dir, labels_dir, train_ratio, val_ratio):random.shuffle(paired_files)  # 随机打乱total_files = len(paired_files)train_count = floor(total_files * train_ratio)val_count = floor(total_files * val_ratio)test_count = total_files - train_count - val_countsplits = {'train': paired_files[:train_count],'val': paired_files[train_count:train_count + val_count],'test': paired_files[train_count + val_count:]}for split, files in splits.items():for image_file, label_file in files:shutil.copy(os.path.join(images_path, image_file), os.path.join(images_dir, split, image_file))shutil.copy(os.path.join(labels_path, label_file), os.path.join(labels_dir, split, label_file))print(f'{split}: {len(files)} files')# 主函数
def main():# 写死的路径images_path = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\totalImages"  # 替换为实际图片文件夹路径labels_path = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\totalLabels"  # 替换为实际txt文件夹路径output_dir = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\output"  # 替换为实际输出主目录路径# 数据划分比例train_ratio = 0.7val_ratio = 0.3test_ratio = 0# 容差值用于浮点数比较epsilon = 1e-6# 确保比例之和等于1assert abs(train_ratio + val_ratio + test_ratio - 1) < epsilon, "比例之和必须等于1"# 创建目录images_dir, labels_dir = create_dirs(output_dir)# 获取文件列表paired_files = get_files(images_path, labels_path)# 进行划分并拷贝split_and_copy(paired_files, images_path, labels_path, images_dir, labels_dir, train_ratio, val_ratio)# 调用主函数
if __name__ == "__main__":main()

2.3 版本3

import os
import shutil
import random# YOLO格式数据集保存路径
yolo_images_path1 = 'E:\\DataSet\\helmet-VOC'
yolo_labels_path1 = 'E:\\DataSet\\helmet-YOLO'
yolo_data_path = yolo_labels_path1yolo_images_path = os.path.join(yolo_images_path1, 'JPEGImages')
yolo_labels_path = os.path.join(yolo_labels_path1, 'labels')# 创建划分后的目录结构
train_images_path = os.path.join(yolo_data_path, 'train', 'images')
train_labels_path = os.path.join(yolo_data_path, 'train', 'labels')
val_images_path = os.path.join(yolo_data_path, 'val', 'images')
val_labels_path = os.path.join(yolo_data_path, 'val', 'labels')
test_images_path = os.path.join(yolo_data_path, 'test', 'images')
test_labels_path = os.path.join(yolo_data_path, 'test', 'labels')os.makedirs(train_images_path, exist_ok=True)
os.makedirs(train_labels_path, exist_ok=True)
os.makedirs(val_images_path, exist_ok=True)
os.makedirs(val_labels_path, exist_ok=True)
os.makedirs(test_images_path, exist_ok=True)
os.makedirs(test_labels_path, exist_ok=True)# 获取所有图片文件名(不包含扩展名)
image_files = [f[:-4] for f in os.listdir(yolo_images_path) if f.endswith('.png')]# 随机打乱文件顺序
random.shuffle(image_files)# 划分数据集比例
train_ratio = 0.7
val_ratio = 0.2
test_ratio = 0.1train_count = int(train_ratio * len(image_files))
val_count = int(val_ratio * len(image_files))
test_count = len(image_files) - train_count - val_counttrain_files = image_files[:train_count]
val_files = image_files[train_count:train_count + val_count]
test_files = image_files[train_count + val_count:]# 移动文件到相应的目录
def move_files(files, src_images_path, src_labels_path, dst_images_path, dst_labels_path):for file in files:src_image_file = os.path.join(src_images_path, f"{file}.png")src_label_file = os.path.join(src_labels_path, f"{file}.txt")dst_image_file = os.path.join(dst_images_path, f"{file}.png")dst_label_file = os.path.join(dst_labels_path, f"{file}.txt")if os.path.exists(src_image_file) and os.path.exists(src_label_file):shutil.move(src_image_file, dst_image_file)shutil.move(src_label_file, dst_label_file)# 移动训练集文件
move_files(train_files, yolo_images_path, yolo_labels_path, train_images_path, train_labels_path)
# 移动验证集文件
move_files(val_files, yolo_images_path, yolo_labels_path, val_images_path, val_labels_path)
# 移动测试集文件
move_files(test_files, yolo_images_path, yolo_labels_path, test_images_path, test_labels_path)print("数据集划分完成!")

三、一步到位

如果不想分两步进行格式转换,那么以下脚本结合了以上两步,直接得到最后按比例划分训练、验证、测试的数据集结果。

在这里插入图片描述

注意:需要修改 voc_data_path ,yolo_data_path ,class_mapping 以及 ‘.png’ 后缀。

import os
import shutil
import random
import xml.etree.ElementTree as ET
from tqdm import tqdm# VOC格式数据集路径
voc_data_path = 'E:\\DataSet-VOC'
voc_annotations_path = os.path.join(voc_data_path, 'Annotations')
voc_images_path = os.path.join(voc_data_path, 'JPEGImages')# YOLO格式数据集保存路径
yolo_data_path = 'E:\\DataSet-YOLO'
yolo_images_path = os.path.join(yolo_data_path, 'images')
yolo_labels_path = os.path.join(yolo_data_path, 'labels')# 创建YOLO格式数据集目录
os.makedirs(yolo_images_path, exist_ok=True)
os.makedirs(yolo_labels_path, exist_ok=True)# 类别映射 (可以根据自己的数据集进行调整)
class_mapping = {'head': 0,'helmet': 1,'person': 2,# 添加更多类别...
}def convert_voc_to_yolo(voc_annotation_file, yolo_label_file):tree = ET.parse(voc_annotation_file)root = tree.getroot()size = root.find('size')width = float(size.find('width').text)height = float(size.find('height').text)with open(yolo_label_file, 'w') as f:for obj in root.findall('object'):cls = obj.find('name').textif cls not in class_mapping:continuecls_id = class_mapping[cls]xmlbox = obj.find('bndbox')xmin = float(xmlbox.find('xmin').text)ymin = float(xmlbox.find('ymin').text)xmax = float(xmlbox.find('xmax').text)ymax = float(xmlbox.find('ymax').text)x_center = (xmin + xmax) / 2.0 / widthy_center = (ymin + ymax) / 2.0 / heightw = (xmax - xmin) / widthh = (ymax - ymin) / heightf.write(f"{cls_id} {x_center} {y_center} {w} {h}\n")# 遍历VOC数据集的Annotations目录,进行转换
print("开始VOC到YOLO格式转换...")
for voc_annotation in tqdm(os.listdir(voc_annotations_path)):if voc_annotation.endswith('.xml'):voc_annotation_file = os.path.join(voc_annotations_path, voc_annotation)image_id = os.path.splitext(voc_annotation)[0]voc_image_file = os.path.join(voc_images_path, f"{image_id}.png")yolo_label_file = os.path.join(yolo_labels_path, f"{image_id}.txt")yolo_image_file = os.path.join(yolo_images_path, f"{image_id}.png")convert_voc_to_yolo(voc_annotation_file, yolo_label_file)if os.path.exists(voc_image_file):shutil.copy(voc_image_file, yolo_image_file)print("VOC到YOLO格式转换完成!")# 划分数据集
train_images_path = os.path.join(yolo_data_path, 'train', 'images')
train_labels_path = os.path.join(yolo_data_path, 'train', 'labels')
val_images_path = os.path.join(yolo_data_path, 'val', 'images')
val_labels_path = os.path.join(yolo_data_path, 'val', 'labels')
test_images_path = os.path.join(yolo_data_path, 'test', 'images')
test_labels_path = os.path.join(yolo_data_path, 'test', 'labels')os.makedirs(train_images_path, exist_ok=True)
os.makedirs(train_labels_path, exist_ok=True)
os.makedirs(val_images_path, exist_ok=True)
os.makedirs(val_labels_path, exist_ok=True)
os.makedirs(test_images_path, exist_ok=True)
os.makedirs(test_labels_path, exist_ok=True)# 获取所有图片文件名(不包含扩展名)
image_files = [f[:-4] for f in os.listdir(yolo_images_path) if f.endswith('.png')]# 随机打乱文件顺序
random.shuffle(image_files)# 划分数据集比例
train_ratio = 0.7
val_ratio = 0.2
test_ratio = 0.1train_count = int(train_ratio * len(image_files))
val_count = int(val_ratio * len(image_files))
test_count = len(image_files) - train_count - val_counttrain_files = image_files[:train_count]
val_files = image_files[train_count:train_count + val_count]
test_files = image_files[train_count + val_count:]# 移动文件到相应的目录
def move_files(files, src_images_path, src_labels_path, dst_images_path, dst_labels_path):for file in tqdm(files):src_image_file = os.path.join(src_images_path, f"{file}.png")src_label_file = os.path.join(src_labels_path, f"{file}.txt")dst_image_file = os.path.join(dst_images_path, f"{file}.png")dst_label_file = os.path.join(dst_labels_path, f"{file}.txt")if os.path.exists(src_image_file) and os.path.exists(src_label_file):shutil.move(src_image_file, dst_image_file)shutil.move(src_label_file, dst_label_file)# 移动训练集文件
print("移动训练集文件...")
move_files(train_files, yolo_images_path, yolo_labels_path, train_images_path, train_labels_path)
# 移动验证集文件
print("移动验证集文件...")
move_files(val_files, yolo_images_path, yolo_labels_path, val_images_path, val_labels_path)
# 移动测试集文件
print("移动测试集文件...")
move_files(test_files, yolo_images_path, yolo_labels_path, test_images_path, test_labels_path)print("数据集划分完成!")# 删除原始的 images 和 labels 文件夹
shutil.rmtree(yolo_images_path)
shutil.rmtree(yolo_labels_path)print("原始 images 和 labels 文件夹删除完成!")

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

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

相关文章

Docker容器安装软件(完整版)

文章目录 一、安装Docker1.1 docker 相关的命令1.2 配置镜像加速 二. 安装es2.1 创建网络2.2 拉取镜像2.3 创建挂载点目录2.4 部署单点es&#xff0c;创建es容器2.5 编写elasticsearch.yml2.6 重启es容器2.7 测试Elasticsearch是否安装成功 三. 基于Docker安装Kibana3.1 拉取镜…

LINUX 指令大全

Linux服务器上有许多常用的命令&#xff0c;可以帮助你管理文件、目录、进程、网络和系统配置等。以下是一些常用的Linux命令&#xff1a; 文件和目录管理 ls&#xff1a;列出当前目录中的文件和子目录 bash lspwd&#xff1a;显示当前工作目录的路径 bash pwdcd&#xff1a;切…

燃气对我们生活的重要性体现在哪里?

燃气在我们的生活中有 多方面的重要性 &#xff0c;以下是燃气对我们生活的重要性的详细说明&#xff1a; 烹饪和热水供应 &#xff1a; 燃气是家庭烹饪的主要能源&#xff0c;能够快速、高效地加热食物&#xff0c;使家庭聚餐更加便捷和愉快。 燃气热水器能够在短时间内提供…

NetAssist 5.0.14网络助手基础使用及自动应答使用方案

以下是NetAssist v5.0.14自动应答功能的详细使用步骤&#xff1a; 一、基础准备&#xff1a; 工具下载网址页面&#xff1a;https://www.cmsoft.cn/resource/102.html 下载安装好后&#xff0c;根据需要可以创建多个server&#xff0c;双击程序图标运行即可&#xff0c;下面…

node.js-node.js作为服务器,前端使用WebSocket(单个TCP连接上进行全双工通讯的协议)

1.WebSocket全双工通信协议 WebSocket是HTML5开始提供的一种单个TCP连接上进行全双工通讯的协议。让客户端和服务器间的数据交互变得简单&#xff0c;允许服务端向客户端主动推送数据。浏览器和服务器间只需要完成一次握手&#xff0c;两者间创建持久性的连接&#xff0c;并进行…

java后端开发day31--集合进阶(一)-----Collection集合List集合数据结构1

&#xff08;以下内容全部来自上述课程&#xff09; 1.集合体系结构 List系列集合&#xff1a;添加的元素是有序、可重复、有索引。 Set系列集合&#xff1a;添加的元素是无序、不重复、无索引。 2.Collection集合 Collection是单列集合的祖宗接口&#xff08;不可直接创建…

Qt配置OpenGL相机踩的坑

项目根据LearnOpenGL配置Qt的相机&#xff0c;更新view矩阵和project矩阵的位移向量变得很大&#xff0c;我设置的明明相机位置是(0,0,3)&#xff0c;理想的位移向量刚好是相反数(0,0,-3)&#xff0c;对应的view矩阵位置向量可以变成(0,0,1200)…离模型非常远矩阵模型也看不见&…

【C++设计模式】第十六篇:迭代器模式(Iterator)

注意&#xff1a;复现代码时&#xff0c;确保 VS2022 使用 C17/20 标准以支持现代特性。 遍历聚合对象的统一方式 1. 模式定义与用途 核心思想 ​迭代器模式&#xff1a;提供一种方法顺序访问聚合对象的元素&#xff0c;而无需暴露其内部表示。关键用途&#xff1a; 1.​统一…

关于WPS的Excel点击单元格打开别的文档的两种方法的探究【为单元格添加超链接】

问题需求 目录和文件结构如下&#xff1a; E:\Dir_Level1 │ Level1.txt │ └─Dir_Level2│ Level2.txt│ master.xlsx│└─Dir_Level3Level3.txt现在要在master.xlsx点击单元格进而访问Level1.txt、Level2.txt、Level3.txt这些文件。 方法一&#xff1a;“单元格右键…

聚类中的相似矩阵和拉普拉斯矩阵

前言&#xff08;可以略过&#xff09; 最近在看的是关于聚类的论文&#xff0c;之前对聚类的步骤和相关内容不太了解&#xff0c;为了读懂论文就去学习了一下&#xff0c;这里将自己的理解记录下来。学习的不全面&#xff0c;主要是为了看懂论文&#xff0c;后续如果有涉及到聚…

前端笔记 --- vue框架

目录 基础知识 指令的修饰符 计算属性 watch侦听器的写法 Vue的生命周期 工程化开发&脚手架 VUE CLI 组件注册的方式 scoped样式冲突与原理 data 组件之间的关系和组件通信 v-model详解 sync修饰符 Dom介绍 操作HTML标签 总结 ref 和 $refs $nextTick 自…

智能双剑合璧:基于语音识别与大模型的技术沙龙笔记整理实战

智能双剑合璧&#xff1a;基于语音识别与大模型的技术沙龙笔记整理实战 ——记一次网络安全技术沙龙的高效知识沉淀 引言&#xff1a;当网络安全遇上AI生产力工具 在绿盟科技举办的"AI驱动的未来网络安全"内部技术沙龙中&#xff0c;笔者亲历了一场关于网络安全攻…

数据结构(蓝桥杯常考点)

数据结构 前言&#xff1a;这个是针对于蓝桥杯竞赛常考的数据结构内容&#xff0c;基础算法比如高精度这些会在下期给大家总结 数据结构 竞赛中&#xff0c;时间复杂度不能超过10的7次方&#xff08;1秒&#xff09;到10的8次方&#xff08;2秒&#xff09; 空间限制&#x…

使用 UNIX 命令在设计中搜索标识符:vcsfind 的入门指南

在现代软件开发和硬件设计中&#xff0c;快速准确地定位和搜索特定标识符是提高开发效率的关键。本文将介绍如何使用 UNIX 命令 vcsfind 在设计中搜索标识符&#xff0c;帮助您更高效地管理您的项目。 什么是 vcsfind&#xff1f; vcsfind 是一个强大的 UNIX 命令行工具&#x…

第56天:Web攻防-SQL注入增删改查盲注延时布尔报错有无回显错误处理审计复盘

#知识点 1、Web攻防-SQL注入-操作方法&增删改查 2、Web攻防-SQL注入-布尔&延时&报错&盲注 一、增删改查 1、功能&#xff1a;数据查询 查询&#xff1a;SELECT * FROM news where id$id 2、功能&#xff1a;新增用户&#xff0c;添加新闻等 增加&#xff1a;IN…

跳表实现学习

1.介绍 2.源码 跳表节点&#xff1a; /* ZSETs use a specialized version of Skiplists */ /*** brief 定义跳跃表节点的数据结构。* * 该结构体用于表示跳跃表中的一个节点&#xff0c;包含元素、分数、后向指针和多层链表信息。*/ typedef struct zskiplistNode {sds ele;…

Python:正则表达式

正则表达式的基础和应用 一、正则表达式核心语法&#xff08;四大基石&#xff09; 1. ​元字符&#xff08;特殊符号&#xff09;​ ​定位符 ^&#xff1a;匹配字符串开始位置 $&#xff1a;匹配字符串结束位置 \b&#xff1a;匹配单词边界​&#xff08;如 \bword\b 匹配…

EB-Cable许可管理中的数据安全与隐私保护

在数字化时代&#xff0c;数据安全与隐私保护已成为企业关注的重中之重。作为专业的电缆管理软件&#xff0c;EB-Cable许可管理不仅在功能丰富和操作便捷方面表现出色&#xff0c;更在数据安全与隐私保护方面为用户提供了坚实的保障。本文将详细介绍EB-Cable许可管理在数据安全…

串口通信函数汇总-ing

谢谢各位佬的阅读&#xff0c;本文是我自己的理解&#xff0c;如果您发现错误&#xff0c;麻烦请您指出&#xff0c;谢谢 首先谈谈我自己对于串口的理解&#xff0c;随便拿一个嵌入式的板子&#xff0c;它上面有两个引脚&#xff0c;一个是rx&#xff0c;一个是tx&#xff0c;r…

如何用HTML5 Canvas实现电子签名功能✍️

&#x1f916; 作者简介&#xff1a;水煮白菜王&#xff0c;一位前端劝退师 &#x1f47b; &#x1f440; 文章专栏&#xff1a; 前端专栏 &#xff0c;记录一下平时在博客写作中&#xff0c;总结出的一些开发技巧和知识归纳总结✍。 感谢支持&#x1f495;&#x1f495;&#…