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

基于yolov11的汽车损伤检测系统python源码+onnx模型+评估指标曲线+精美GUI界面

【算法介绍】

基于YOLOv11的汽车损伤检测系统是一种先进的计算机视觉技术,旨在快速准确地识别汽车的各种损伤类型。该系统利用YOLOv11模型的强大性能,实现了对车辆损伤的精确检测与分类。

该系统能够识别的损伤类型包括裂纹(crack)、凹陷(dent)、玻璃破碎(glass shatter)、车灯损坏(lamp broken)、划痕(scratch)以及轮胎漏气或扁平(tire flat)。这些损伤类型涵盖了车辆常见的各种损坏情况,能够满足不同场景下的检测需求。

在检测过程中,系统会对输入的车辆图像进行智能分析,自动标出损伤部位,并提供详细的损伤报告。这不仅大大缩短了定损时间,还提高了定损的准确性和公正性。

此外,基于YOLOv11的汽车损伤检测系统还具有广泛的应用前景。它不仅可以用于保险理赔过程中的车辆定损,还可以应用于车辆维修、二手车交易以及智能交通系统等领域。通过实时监测车辆的损伤状态,系统可以为驾驶员提供及时的预警信息,帮助驾驶员预防潜在的交通事故,从而提高道路安全性。

总之,基于YOLOv11的汽车损伤检测系统是一种高效、准确的汽车损伤检测工具,具有广泛的应用价值和市场前景。

【效果展示】

 

【测试环境】

windows10
anaconda3+python3.8
torch==2.3.0
ultralytics==8.3.81
onnxruntime==1.16.3

【模型可以检测出6类别】

裂纹(crack)、凹陷(dent)、玻璃破碎(glass shatter)、车灯损坏(lamp broken)、划痕(scratch)以及轮胎漏气或扁平(tire flat)

【训练数据集介绍】

数据集格式:Pascal VOC格式+YOLO格式(不包含分割路径的txt文件,仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件)

图片数量(jpg文件个数):4000

标注数量(xml文件个数):4000

标注数量(txt文件个数):4000

标注类别数:6

标注类别名称(注意yolo格式类别顺序不和这个对应,而以labels文件夹classes.txt为准):["crack","dent","glass shatter","lamp broken","scratch","tire flat"]

每个类别标注的框数:

crack 框数 = 898

dent 框数 = 2543

glass shatter 框数 = 681

lamp broken 框数 = 704

scratch 框数 = 3595

tire flat 框数 = 319

总框数:8740

使用标注工具:labelImg

标注规则:对类别进行画矩形框

重要说明:暂无

特别声明:本数据集不对训练的模型或者权重文件精度作任何保证,数据集只提供准确且合理标注

图片预览:

标注例子:

【训练信息】

参数
训练集图片数2400
验证集图片数800
训练map69.6%
训练精度(Precision)78.1%
训练召回率(Recall)65.4%

 验证集测试精度信息

类别

map0.5

all

70

crack

31

dent

56

glass shatter

98

lamp broken

85

scratch

53

tire flat

96

 【界面设计】

import os
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QThread, pyqtSignal
from PyQt5.QtGui import QImage, QPixmap
from PyQt5.QtWidgets import QFileDialog, QLabel, QApplication
import image_rc
import threading
import cv2
import numpy as np
import time
from Yolo11Detector import *class Ui_MainWindow(QtWidgets.QMainWindow):signal = QtCore.pyqtSignal(str, str)def setupUi(self):self.setObjectName("MainWindow")self.resize(1280, 728)self.centralwidget = QtWidgets.QWidget(self)self.centralwidget.setObjectName("centralwidget")self.detector=Noneself.weights_dir = './weights'self.picture = QtWidgets.QLabel(self.centralwidget)self.picture.setGeometry(QtCore.QRect(260, 10, 1010, 630))self.picture.setStyleSheet("background:black")self.picture.setObjectName("picture")self.picture.setScaledContents(True)self.label_2 = QtWidgets.QLabel(self.centralwidget)self.label_2.setGeometry(QtCore.QRect(10, 10, 81, 21))self.label_2.setObjectName("label_2")self.cb_weights = QtWidgets.QComboBox(self.centralwidget)self.cb_weights.setGeometry(QtCore.QRect(10, 40, 241, 21))self.cb_weights.setObjectName("cb_weights")self.cb_weights.currentIndexChanged.connect(self.cb_weights_changed)self.label_3 = QtWidgets.QLabel(self.centralwidget)self.label_3.setGeometry(QtCore.QRect(10, 70, 72, 21))self.label_3.setObjectName("label_3")self.hs_conf = QtWidgets.QSlider(self.centralwidget)self.hs_conf.setGeometry(QtCore.QRect(10, 100, 181, 22))self.hs_conf.setProperty("value", 25)self.hs_conf.setOrientation(QtCore.Qt.Horizontal)self.hs_conf.setObjectName("hs_conf")self.hs_conf.valueChanged.connect(self.conf_change)self.dsb_conf = QtWidgets.QDoubleSpinBox(self.centralwidget)self.dsb_conf.setGeometry(QtCore.QRect(200, 100, 51, 22))self.dsb_conf.setMaximum(1.0)self.dsb_conf.setSingleStep(0.01)self.dsb_conf.setProperty("value", 0.3)self.dsb_conf.setObjectName("dsb_conf")self.dsb_conf.valueChanged.connect(self.dsb_conf_change)self.dsb_iou = QtWidgets.QDoubleSpinBox(self.centralwidget)self.dsb_iou.setGeometry(QtCore.QRect(200, 160, 51, 22))self.dsb_iou.setMaximum(1.0)self.dsb_iou.setSingleStep(0.01)self.dsb_iou.setProperty("value", 0.45)self.dsb_iou.setObjectName("dsb_iou")self.dsb_iou.valueChanged.connect(self.dsb_iou_change)self.hs_iou = QtWidgets.QSlider(self.centralwidget)self.hs_iou.setGeometry(QtCore.QRect(10, 160, 181, 22))self.hs_iou.setProperty("value", 45)self.hs_iou.setOrientation(QtCore.Qt.Horizontal)self.hs_iou.setObjectName("hs_iou")self.hs_iou.valueChanged.connect(self.iou_change)self.label_4 = QtWidgets.QLabel(self.centralwidget)self.label_4.setGeometry(QtCore.QRect(10, 130, 72, 21))self.label_4.setObjectName("label_4")self.label_5 = QtWidgets.QLabel(self.centralwidget)self.label_5.setGeometry(QtCore.QRect(10, 210, 72, 21))self.label_5.setObjectName("label_5")self.le_res = QtWidgets.QTextEdit(self.centralwidget)self.le_res.setGeometry(QtCore.QRect(10, 240, 241, 400))self.le_res.setObjectName("le_res")self.setCentralWidget(self.centralwidget)self.menubar = QtWidgets.QMenuBar(self)self.menubar.setGeometry(QtCore.QRect(0, 0, 1110, 30))self.menubar.setObjectName("menubar")self.setMenuBar(self.menubar)self.statusbar = QtWidgets.QStatusBar(self)self.statusbar.setObjectName("statusbar")self.setStatusBar(self.statusbar)self.toolBar = QtWidgets.QToolBar(self)self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)self.toolBar.setObjectName("toolBar")self.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)self.actionopenpic = QtWidgets.QAction(self)icon = QtGui.QIcon()icon.addPixmap(QtGui.QPixmap(":/images/1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.actionopenpic.setIcon(icon)self.actionopenpic.setObjectName("actionopenpic")self.actionopenpic.triggered.connect(self.open_image)self.action = QtWidgets.QAction(self)icon1 = QtGui.QIcon()icon1.addPixmap(QtGui.QPixmap(":/images/2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.action.setIcon(icon1)self.action.setObjectName("action")self.action.triggered.connect(self.open_video)self.action_2 = QtWidgets.QAction(self)icon2 = QtGui.QIcon()icon2.addPixmap(QtGui.QPixmap(":/images/3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.action_2.setIcon(icon2)self.action_2.setObjectName("action_2")self.action_2.triggered.connect(self.open_camera)self.actionexit = QtWidgets.QAction(self)icon3 = QtGui.QIcon()icon3.addPixmap(QtGui.QPixmap(":/images/4.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.actionexit.setIcon(icon3)self.actionexit.setObjectName("actionexit")self.actionexit.triggered.connect(self.exit)self.toolBar.addAction(self.actionopenpic)self.toolBar.addAction(self.action)self.toolBar.addAction(self.action_2)self.toolBar.addAction(self.actionexit)self.retranslateUi()QtCore.QMetaObject.connectSlotsByName(self)self.init_all()

 

【训练步骤】

使用YOLO11训练自己的数据集需要遵循一些基本的步骤。YOLO11是YOLO系列模型的一个版本,它在前代基础上做了许多改进,包括但不限于更高效的训练流程和更高的精度。以下是训练自己YOLO格式数据集的详细步骤:

一、 准备环境

1. 安装必要的软件:确保你的计算机上安装了Python(推荐3.6或更高版本),以及CUDA和cuDNN(如果你打算使用GPU进行加速)。

2. 安装YOLO11库:你可以通过GitHub克隆YOLOv8的仓库或者直接通过pip安装YOLO11。例如:
   pip install ultralytics

二、数据准备

3. 组织数据结构:按照YOLO的要求组织你的数据文件夹。通常,你需要一个包含图像和标签文件的目录结构,如:

   dataset/
   ├── images/
   │   ├── train/
   │   └── val/
   ├── labels/
   │   ├── train/
   │   └── val/

   其中,train和val分别代表训练集和验证集。且images文件夹和labels文件夹名字不能随便改写或者写错,否则会在训练时候找不到数据集。

4. 标注数据:使用合适的工具对图像进行标注,生成YOLO格式的标签文件。每个标签文件应该是一个.txt文件,每行表示一个边界框,格式为:

   <类别ID> <中心点x> <中心点y> <宽度> <高度>

   这些值都是相对于图像尺寸的归一化值。

5. 创建数据配置文件:创建一个.yaml文件来定义你的数据集,包括路径、类别列表等信息。例如:
yaml
   # dataset.yaml
   path: ./dataset  # 数据集根目录
   train: images/train  # 训练图片相对路径
   val: images/val  # 验证图片相对路径
   
   nc: 2  # 类别数
   names: ['class1', 'class2']  # 类别名称


三、模型训练

6. 加载预训练模型:可以使用官方提供的预训练模型作为起点,以加快训练速度并提高性能。

7. 配置训练参数:根据需要调整训练参数,如批量大小、学习率、训练轮次等。这通常可以通过命令行参数或配置文件完成。

8. 开始训练:使用YOLO11提供的命令行接口开始训练过程。例如:

   yolo train data=dataset.yaml model=yolo11n.yaml epochs=100 imgsz=640

更多参数如下:

参数默认值描述
modelNoneSpecifies the model file for training. Accepts a path to either a .pt pretrained model or a .yaml configuration file. Essential for defining the model structure or initializing weights.
dataNonePath to the dataset configuration file (e.g., coco8.yaml). This file contains dataset-specific parameters, including paths to training and validation data , class names, and number of classes.
epochs100Total number of training epochs. Each epoch represents a full pass over the entire dataset. Adjusting this value can affect training duration and model performance.
timeNoneMaximum training time in hours. If set, this overrides the epochs argument, allowing training to automatically stop after the specified duration. Useful for time-constrained training scenarios.
patience100Number of epochs to wait without improvement in validation metrics before early stopping the training. Helps prevent overfitting by stopping training when performance plateaus.
batch16Batch size, with three modes: set as an integer (e.g., batch=16), auto mode for 60% GPU memory utilization (batch=-1), or auto mode with specified utilization fraction (batch=0.70).
imgsz640Target image size for training. All images are resized to this dimension before being fed into the model. Affects model accuracy and computational complexity.
saveTrueEnables saving of training checkpoints and final model weights. Useful for resuming training ormodel deployment.
save_period-1Frequency of saving model checkpoints, specified in epochs. A value of -1 disables this feature. Useful for saving interim models during long training sessions.
cacheFalseEnables caching of dataset images in memory (True/ram), on disk (disk), or disables it (False). Improves training speed by reducing disk I/O at the cost of increased memory usage.
deviceNoneSpecifies the computational device(s) for training: a single GPU (device=0), multiple GPUs (device=0,1), CPU (device=cpu), or MPS for Apple silicon (device=mps).
workers8Number of worker threads for data loading (per RANK if Multi-GPU training). Influences the speed of data preprocessing and feeding into the model, especially useful in multi-GPU setups.
projectNoneName of the project directory where training outputs are saved. Allows for organized storage of different experiments.
nameNoneName of the training run. Used for creating a subdirectory within the project folder, where training logs and outputs are stored.
exist_okFalseIf True, allows overwriting of an existing project/name directory. Useful for iterative experimentation without needing to manually clear previous outputs.
pretrainedTrueDetermines whether to start training from a pretrained model. Can be a boolean value or a string path to a specific model from which to load weights. Enhances training efficiency and model performance.
optimizer'auto'Choice of optimizer for training. Options include SGDAdamAdamWNAdamRAdamRMSProp etc., or auto for automatic selection based on model configuration. Affects convergence speed and stability.
verboseFalseEnables verbose output during training, providing detailed logs and progress updates. Useful for debugging and closely monitoring the training process.
seed0Sets the random seed for training, ensuring reproducibility of results across runs with the same configurations.
deterministicTrueForces deterministic algorithm use, ensuring reproducibility but may affect performance and speed due to the restriction on non-deterministic algorithms.
single_clsFalseTreats all classes in multi-class datasets as a single class during training. Useful for binary classification tasks or when focusing on object presence rather than classification.
rectFalseEnables rectangular training, optimizing batch composition for minimal padding. Can improve efficiency and speed but may affect model accuracy.
cos_lrFalseUtilizes a cosine learning rate scheduler, adjusting the learning rate following a cosine curve over epochs. Helps in managing learning rate for better convergence.
close_mosaic10Disables mosaic data augmentation in the last N epochs to stabilize training before completion. Setting to 0 disables this feature.
resumeFalseResumes training from the last saved checkpoint. Automatically loads model weights, optimizer state, and epoch count, continuing training seamlessly.
ampTrueEnables AutomaticMixed Precision 
 (AMP) training, reducing memory usage and possibly speeding up training with minimal impact on accuracy.
fraction1.0Specifies the fraction of the dataset to use for training. Allows for training on a subset of the full dataset, useful for experiments or when resources are limited.
profileFalseEnables profiling of ONNX and TensorRT speeds during training, useful for optimizing model deployment.
freezeNoneFreezes the first N layers of the model or specified layers by index, reducing the number of trainable parameters. Useful for fine-tuning or transfer learning 
.
lr00.01Initial learning rate (i.e. SGD=1E-2Adam=1E-3) . Adjusting this value is crucial for the optimization process, influencing how rapidly model weights are updated.
lrf0.01Final learning rate as a fraction of the initial rate = (lr0 * lrf), used in conjunction with schedulers to adjust the learning rate over time.
momentum0.937Momentum factor for SGD or beta1 for Adam optimizers, influencing the incorporation of past gradients in the current update.
weight_decay0.0005L2 regularization  term, penalizing large weights to prevent overfitting.
warmup_epochs3.0Number of epochs for learning rate warmup, gradually increasing the learning rate from a low value to the initial learning rate to stabilize training early on.
warmup_momentum0.8Initial momentum for warmup phase, gradually adjusting to the set momentum over the warmup period.
warmup_bias_lr0.1Learning rate for bias parameters during the warmup phase, helping stabilize model training in the initial epochs.
box7.5Weight of the box loss component in the loss_function, influencing how much emphasis is placed on accurately predicting bouding box coordinates.
cls0.5Weight of the classification loss in the total loss function, affecting the importance of correct class prediction relative to other components.
dfl1.5Weight of the distribution focal loss, used in certain YOLO versions for fine-grained classification.
pose12.0Weight of the pose loss in models trained for pose estimation, influencing the emphasis on accurately predicting pose keypoints.
kobj2.0Weight of the keypoint objectness loss in pose estimation models, balancing detection confidence with pose accuracy.
label_smoothing0.0Applies label smoothing, softening hard labels to a mix of the target label and a uniform distribution over labels, can improve generalization.
nbs64Nominal batch size for normalization of loss.
overlap_maskTrueDetermines whether object masks should be merged into a single mask for training, or kept separate for each object. In case of overlap, the smaller mask is overlayed on top of the larger mask during merge.
mask_ratio4Downsample ratio for segmentation masks, affecting the resolution of masks used during training.
dropout0.0Dropout rate for regularization in classification tasks, preventing overfitting by randomly omitting units during training.
valTrueEnables validation during training, allowing for periodic evaluation of model performance on a separate dataset.
plotsFalseGenerates and saves plots of training and validation metrics, as well as prediction examples, providing visual insights into model performance and learning progression.

   这里,data参数指向你的数据配置文件,model参数指定使用的模型架构,epochs设置训练轮次,imgsz设置输入图像的大小。

四、监控与评估

9. 监控训练过程:观察损失函数的变化,确保模型能够正常学习。

10. 评估模型:训练完成后,在验证集上评估模型的性能,查看mAP(平均精确度均值)等指标。

11. 调整超参数:如果模型的表现不佳,可能需要调整超参数,比如增加训练轮次、改变学习率等,并重新训练模型。

五、使用模型

12. 导出模型:训练完成后,可以将模型导出为ONNX或其他格式,以便于部署到不同的平台。比如将pytorch转成onnx模型可以输入指令
yolo export model=best.pt format=onnx
这样就会在pt模块同目录下面多一个同名的onnx模型best.onnx

下表详细说明了可用于将YOLO模型导出为不同格式的配置和选项。这些设置对于优化导出模型的性能、大小和跨各种平台和环境的兼容性至关重要。正确的配置可确保模型已准备好以最佳效率部署在预期的应用程序中。

参数类型默认值描述
formatstr'torchscript'Target format for the exported model, such as 'onnx''torchscript''tensorflow', or others, defining compatibility with various deployment environments.
imgszint or tuple640Desired image size for the model input. Can be an integer for square images or a tuple (height, width) for specific dimensions.
kerasboolFalseEnables export to Keras format for Tensorflow SavedModel, providing compatibility with TensorFlow serving and APIs.
optimizeboolFalseApplies optimization for mobile devices when exporting to TorchScript, potentially reducing model size and improving performance.
halfboolFalseEnables FP16 (half-precision) quantization, reducing model size and potentially speeding up inference on supported hardware.
int8boolFalseActivates INT8 quantization, further compressing the model and speeding up inference with minimal accuracy loss, primarily for edge devices.
dynamicboolFalseAllows dynamic input sizes for ONNX, TensorRT and OpenVINO exports, enhancing flexibility in handling varying image dimensions.
simplifyboolTrueSimplifies the model graph for ONNX exports with onnxslim, potentially improving performance and compatibility.
opsetintNoneSpecifies the ONNX opset version for compatibility with different ONNX parsers and runtimes. If not set, uses the latest supported version.
workspacefloat4.0Sets the maximum workspace size in GiB for TensorRT optimizations, balancing memory usage and performance.
nmsboolFalseAdds Non-Maximum Suppression (NMS) to the CoreML export, essential for accurate and efficient detection post-processing.
batchint1Specifies export model batch inference size or the max number of images the exported model will process concurrently in predict mode.
devicestrNoneSpecifies the device for exporting: GPU (device=0), CPU (device=cpu), MPS for Apple silicon (device=mps) or DLA for NVIDIA Jetson (device=dla:0 or device=dla:1).


调整这些参数可以定制导出过程,以满足特定要求,如部署环境、硬件约束和性能目标。选择适当的格式和设置对于实现模型大小、速度和精度之间的最佳平衡至关重要。

导出格式:

可用的YOLO11导出格式如下表所示。您可以使用format参数导出为任何格式,即format='onnx'或format='engine'。您可以直接在导出的模型上进行预测或验证,即yolo predict model=yolo11n.onnx。导出完成后,将显示您的模型的使用示例。

导出格式格式参数模型属性参数
pytorch-yolo11n.pt-
torchscripttorchscriptyolo11n.torchscriptimgszoptimizebatch
onnxonnxyolo11n.onnximgszhalfdynamicsimplifyopsetbatch
openvinoopenvinoyolo11n_openvino_model/imgszhalfint8batch
tensorrtengineyolo11n.engineimgszhalfdynamicsimplifyworkspaceint8batch
CoreMLcoremlyolo11n.mlpackageimgszhalfint8nmsbatch
TF SaveModelsaved_modelyolo11n_saved_model/imgszkerasint8batch
TF GraphDefpbyolo11n.pbimgszbatch
TF Litetfliteyolo11n.tfliteimgszhalfint8batch
TF Edge TPUedgetpuyolo11n_edgetpu.tfliteimgsz
TF.jstfjsyolo11n_web_model/imgszhalfint8batch
PaddlePaddlepaddleyolo11n_paddle_model/imgszbatch
MNNmnnyolo11n.mnnimgszbatchint8half
NCNNncnnyolo11n_ncnn_model/imgszhalfbatch

13. 测试模型:在新的数据上测试模型,确保其泛化能力良好。

以上就是使用YOLO11训练自己数据集的基本步骤。请根据实际情况调整这些步骤中的具体细节。希望这些信息对你有所帮助!

【常用评估参数介绍】

在目标检测任务中,评估模型的性能是至关重要的。你提到的几个术语是评估模型性能的常用指标。下面是对这些术语的详细解释:

  1. Class
    • 这通常指的是模型被设计用来检测的目标类别。例如,一个模型可能被训练来检测车辆、行人或动物等不同类别的对象。
  2. Images
    • 表示验证集中的图片数量。验证集是用来评估模型性能的数据集,与训练集分开,以确保评估结果的公正性。
  3. Instances
    • 在所有图片中目标对象的总数。这包括了所有类别对象的总和,例如,如果验证集包含100张图片,每张图片平均有5个目标对象,则Instances为500。
  4. P(精确度Precision)
    • 精确度是模型预测为正样本的实例中,真正为正样本的比例。计算公式为:Precision = TP / (TP + FP),其中TP表示真正例(True Positives),FP表示假正例(False Positives)。
  5. R(召回率Recall)
    • 召回率是所有真正的正样本中被模型正确预测为正样本的比例。计算公式为:Recall = TP / (TP + FN),其中FN表示假负例(False Negatives)。
  6. mAP50
    • 表示在IoU(交并比)阈值为0.5时的平均精度(mean Average Precision)。IoU是衡量预测框和真实框重叠程度的指标。mAP是一个综合指标,考虑了精确度和召回率,用于评估模型在不同召回率水平上的性能。在IoU=0.5时,如果预测框与真实框的重叠程度达到或超过50%,则认为该预测是正确的。
  7. mAP50-95
    • 表示在IoU从0.5到0.95(间隔0.05)的范围内,模型的平均精度。这是一个更严格的评估标准,要求预测框与真实框的重叠程度更高。在目标检测任务中,更高的IoU阈值意味着模型需要更准确地定位目标对象。mAP50-95的计算考虑了从宽松到严格的多个IoU阈值,因此能够更全面地评估模型的性能。

这些指标共同构成了评估目标检测模型性能的重要框架。通过比较不同模型在这些指标上的表现,可以判断哪个模型在实际应用中可能更有效。

【使用步骤】

使用步骤:
(1)首先根据官方框架ultralytics安装教程安装好yolov11环境,并安装好pyqt5
(2)切换到自己安装的yolo11环境后,并切换到源码目录,执行python main.py即可运行启动界面,进行相应的操作即可

【提供文件】

python源码
yolo11n.onnx模型(不提供pytorch模型)
训练的map,P,R曲线图(在weights\results.png)
测试图片(在test_img文件夹下面)

注意提供数据集

     

    相关文章:

    基于yolov11的汽车损伤检测系统python源码+onnx模型+评估指标曲线+精美GUI界面

    【算法介绍】 基于YOLOv11的汽车损伤检测系统是一种先进的计算机视觉技术&#xff0c;旨在快速准确地识别汽车的各种损伤类型。该系统利用YOLOv11模型的强大性能&#xff0c;实现了对车辆损伤的精确检测与分类。 该系统能够识别的损伤类型包括裂纹&#xff08;crack&#xff…...

    华为IP(3)

    DHCP Relay报文格式 DHCP Relay主要负责转发DHCP客户端与DHCP服务器之间的DHCP报文&#xff0c;所以DHCP Relay的报文格式只是把DHCP的报文部分字段做了相应的修改&#xff0c;报文格式没有发生变化 hops&#xff1a;表示当前DHCP报文经过DHCP中继的数目&#xff0c;该字段由…...

    面试问题总结:qt工程师/c++工程师

    C 语言相关问题答案 面试问题总结&#xff1a;qt工程师/c工程师 C 语言相关问题答案 目录基础语法与特性内存管理预处理与编译 C 相关问题答案面向对象编程模板与泛型编程STL 标准模板库 Qt 相关问题答案Qt 基础与信号槽机制Qt 界面设计与布局管理Qt 多线程与并发编程 目录 基础…...

    【TS学习】(15)分布式条件特性

    在 TypeScript 中&#xff0c;分布式条件类型&#xff08;Distributive Conditional Types&#xff09; 是一种特殊的行为&#xff0c;发生在条件类型作用于裸类型参数&#xff08;Naked Type Parameter&#xff09; 时。这种特性使得条件类型可以“分布”到联合类型的每个成员…...

    四款高效数据报表工具 让数据分析更简单

    概述 在数字化时代&#xff0c;企业和组织越来越依赖数据驱动决策&#xff0c;报表软件成为提高数据可视化能力、优化业务管理的关键工具。本文将为大家介绍四款功能强大的报表软件&#xff0c;帮助不同需求的企业找到合适的解决方案。 一、山海鲸报表 山海鲸报表是一款零代…...

    QT 非空指针 软件奔溃

    在用QT的实际项目中&#xff0c;出现如下现象&#xff1a; 运行软件再关闭软件&#xff0c;然后再运行软件会崩溃。等待5~10分钟&#xff0c;再运行软件&#xff0c;又正常&#xff0c;百思不得其解&#xff0c;后面找到原因是在头文件里定义指针变量时没有赋初nullptr&#x…...

    图漾相机——C#语言属性设置

    文章目录 前言1.示例程序说明2.SDK API功能介绍2.1 ListDevice2.2 Open2.3 OpenDeviceByIP2.4 Close2.5 DeviceStreamEnable2.6 DeviceStreamFormatDump2.7 DeviceStreamFormatConfig2.8 DeviceReadCurrentEnumData2.9 DeviceReadCalibData2.10 DeviceStreamOn2.11 DeviceStrea…...

    WPF中viewmodel单例模式

    1、单例模式介绍 单例模式是一种创建型设计模式&#xff0c;确保一个类只有一个实例&#xff0c;并提供一个全局访问点来获取这个实例。它常用于需要全局唯一访问点的场景&#xff0c;如配置管理、日志记录、数据库连接等。 2、WPF 中 ViewModel 的单例实现 在 WPF 中&#…...

    AI比人脑更强,因为被植入思维模型【36】时光机理论思维

    giszz的理解&#xff1a;据说是软银孙正义提出的一种思维模型&#xff0c;他利用同一时间内的地区差&#xff0c;通过引入技术、思维&#xff0c;在同一地区&#xff0c;形成了时间差。所谓商业模式&#xff0c;有时就是打空间差、时间差&#xff0c;信息差。 一、定义 时光机…...

    SQL Server:用户权限

    创建 & 删除 1. 创建用户命令整理 创建 admin2 用户 -- 在 master 数据库创建登录名 USE master; BEGINCREATE LOGIN [admin2] WITH PASSWORDNCljslrl0620!, DEFAULT_DATABASE[master], CHECK_EXPIRATIONOFF, CHECK_POLICYON; END;-- 在 db03 数据库创建用户并添加到相应…...

    Qt之QTextEdit控制文本滚动, 停止滚动, 开始滚动, 鼠标控制滚动

    对工作台文本框进行控制。含以下内容。详细说明在源码中可查看 至最底部停止滚动开始滚动 源码分两部分. .h文件和.cpp文件 MyTextEdit.h #ifndef MYTEXTEDIT_H #define MYTEXTEDIT_H#include <QObject> #include <QTextEdit> #include <QScrollBar> #includ…...

    策略模式与元数据映射模式融合 JSR 380 验证规范实现枚举范围校验

    类文件 Target({ElementType.METHOD,ElementType.FIELD,ElementType.ANNOTATION_TYPE,ElementType.CONSTRUCTOR,ElementType.PARAMETER,ElementType.TYPE_USE }) Retention(RetentionPolicy.RUNTIME) Documented Constraint(validatedBy {InEnumValidator.class, InEnumColle…...

    9对象树(3)

    目录 创建自定义的类&#xff0c;最主要的目的,是自定义一个析构函数,在析构函数中,完成打印.方便咱们看到最终的自动销毁对象的效果!!! 写完一个函数的声名之后, 按下 altenter, 在按下enter就可以自动的在对应的 cpp 文件中添加函数的定义了 内置类型&#xff0c;析构不会明…...

    深入 OpenPDF:高级 PDF 生成与操作技巧

    1 引言 1.1 项目背景 在许多企业级应用中,生成和操作 PDF 文档是一个常见的需求。PDF(Portable Document Format)因其格式统一、易于打印和分发而被广泛使用。本文将介绍如何使用 OpenPDF 库在 Java 项目中生成和操作 PDF 文档。 1.2 技术选型理由 OpenPDF:OpenPDF 是一…...

    电脑屏幕亮度随心控,在Windows上自由调整屏幕亮度的方法

    调整电脑屏幕的亮度对于保护视力和适应不同环境光线条件非常重要。无论是在白天强光下还是夜晚昏暗环境中&#xff0c;合适的屏幕亮度都能让您的眼睛更加舒适。本文中简鹿办公小编将向您介绍几种在 Windows 系统中调整屏幕亮度的方法。 方法一&#xff1a;使用快捷键 大多数笔…...

    Navicat导出mysql数据库表结构说明到excel、word,单表导出方式记录

    目前只找到一张一张表导出的方式 使用information_schema传入表名查询 字段名根据需要自行删减&#xff0c;一般保留序号、字段名、类型、说明就行 SELECT COLUMNS.ORDINAL_POSITION AS 序号, COLUMNS.COLUMN_NAME AS 字段名, COLUMNS.COLUMN_TYPE AS 类型(长度), COLUMNS.N…...

    【C++笔记】C++常见二叉树OJ和拓扑排序

    【C笔记】C常见二叉树OJ和拓扑排序 &#x1f525;个人主页&#xff1a;大白的编程日记 &#x1f525;专栏&#xff1a;C笔记 文章目录 【C笔记】C常见二叉树OJ和拓扑排序前言一.二叉树OJ1.1 根据二叉树创建字符串1.2 二叉树的层序遍历1.3 二叉树的最近公共祖先1.4 将二叉搜索…...

    ARM-----数据处理、异常处理、模式切换

    实列一&#xff1a; 1. 异常向量表 area reset, code, readonly code32 entry area reset, code, readonly&#xff1a;定义一个名为reset的代码区域&#xff0c;只读。 code32&#xff1a;指示编译器生成32位ARM指令。 entry&#xff1a;标记程序的入口点。 2. 程序入口…...

    mapbox基础,使用geojson加载line线图层,实现铁路黑白间隔效果

    👨‍⚕️ 主页: gis分享者 👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅! 👨‍⚕️ 收录于专栏:mapbox 从入门到精通 文章目录 一、🍀前言1.1 ☘️mapboxgl.Map 地图对象1.2 ☘️mapboxgl.Map style属性1.3 ☘️line线图层样式二、🍀使用geojson加载…...

    Python FastAPI + Celery + RabbitMQ 分布式图片水印处理系统

    FastAPI 服务器Celery 任务队列RabbitMQ 作为消息代理定时任务处理 首先创建项目结构&#xff1a; c:\Users\Administrator\Desktop\meitu\ ├── app/ │ ├── __init__.py │ ├── main.py │ ├── celery_app.py │ ├── tasks.py │ └── config.py…...

    阶段项目:Windows 服务器的组建与管理

    项目概述 公司简介 创鑫公司是一家新成立的小型 IT 公司 公司决定组建部署一个小型的企业网络 员工人数不到20人 使用一台独立的 Windows 服务器提供各种网络服务 网络拓扑 设计需求 权限部分 权限部分要求 公司的网络管理员对办公计算机和服务器分别进行独立管理&#xff…...

    【408】26考研-王道计算机408

    王道408考研全套视频资料&#xff1a; 讲义01.26考研王道计算机【C语言督学营】02.【408领学班】26考研王道计算机B站独家03.26考研王道计算机【组成原理领学班】04.26王道计算机【计算机网络领学班】05.26考研王道计算机【数据结构领学班】06.26王道计算机【操作系统领学班】…...

    数据分析问题思考路径

    一、思考问题 1. 确认问题 因为背景: 因为5月1日的营业额突然下滑了10%,而历史从未出现过类似的跌幅 我想目的: 我想知道本次下滑的原因以此避免再出现这样的异常情况 现在思路: 现在能想到是原因是节假日和产品环节转化异常 最后感谢: 想请你帮我取数分析一下&#xff0c…...

    vue省市区懒加载,用el-cascader 新增和回显

    el-cascader对于懒加载有支持方法&#xff0c;小难点在于回显的时候&#xff0c;由于懒加载第一次只有一层&#xff0c;所以要根据选中id数组一层层的加载。 子组件 <template><el-cascaderref"cascaderRef"v-model"selectedValue":props"…...

    从零构建大语言模型全栈开发指南:第三部分:训练与优化技术-3.3.3领域适配案例:医疗文本分类与法律合同生成

    👉 点击关注不迷路 👉 点击关注不迷路 👉 点击关注不迷路 文章大纲 从零构建大语言模型全栈开发指南-第三部分:训练与优化技术-3.3.3 领域适配案例:医疗文本分类与法律合同生成1. 领域适配的核心挑战与解决方案2. 医疗文本分类:从通用到专业的跃迁2.1 医疗领域适配的技…...

    Web网页内嵌 Adobe Pdf Reader 谷歌Chrome在线预览编辑PDF文档

    随着数字化办公的普及&#xff0c;PDF文档已成为信息处理的核心载体&#xff0c;虽然桌面端有很多软件可以实现预览编辑PDF文档&#xff0c;而在线在线预览编辑PDF也日益成为一个难题。 作为网页内嵌本地程序的佼佼者——猿大师中间件&#xff0c;之前发布的猿大师办公助手&am…...

    Python WebSockets 库详解:从基础到实战

    1. 引言 WebSocket 是一种全双工、持久化的网络通信协议&#xff0c;适用于需要低延迟的应用&#xff0c;如实时聊天、股票行情推送、在线协作、多人游戏等。相比传统的 HTTP 轮询方式&#xff0c;WebSocket 减少了带宽开销&#xff0c;提高了实时性。 在 Python 中&#xff…...

    php根据一个数组里面的元素顺序来排序另外一个数组的的顺序

    根据arr2的顺序来排序arr $arr [[size_id > 9],[size_id > 1],[size_id > 1],[size_id > 6],[size_id > 6],[size_id > 8],];$arr2 [1,9,6,8];usort($arr, function ($item1, $item2) use ($arr2) {return array_search($item1[size_id], $arr2) - array_s…...

    从JVM到分布式锁:高并发架构设计的六把密钥

    【300秒速览分布式核心技术栈】 作为十年架构老兵&#xff0c;今天用一张图说透高并发系统的底层逻辑&#xff1a; &#x1f511; ​JVM锁&#xff1a;synchronized与AQS构筑单机防线&#xff0c;却难逃分布式困局 &#x1f511; ​数据库锁&#xff1a;MySQL行锁/间隙锁守住…...

    《深度剖析SQL游标:复杂数据处理场景下的智慧抉择》

    在数据库领域的广袤天地中&#xff0c;SQL游标宛如一把独特的钥匙&#xff0c;为复杂数据处理场景开启了一扇充满可能的大门。它以一种细腻且精准的方式&#xff0c;穿梭于数据库的记录之间&#xff0c;为众多棘手的数据处理难题提供了解决之道。 复杂数据处理场景的挑战 随着…...

    【数据分享】中国3254座水库集水区特征数据集(免费获取)

    水库在水循环、碳通量、能量平衡中扮演关键角色&#xff0c;实实在在地影响着我们的生活。其功能和环境影响高度依赖于地理位置、上游流域属性&#xff08;如地形、气候、土地类型&#xff09;和水库自身的动态特征&#xff08;如水位、蒸发量&#xff09;。但在此之前一直缺乏…...

    【蓝桥杯每日一题】4.1

    &#x1f3dd;️专栏&#xff1a; 【蓝桥杯备篇】 &#x1f305;主页&#xff1a; f狐o狸x "今日秃头刷题&#xff0c;明日荣耀加冕&#xff01;" 今天我们来练习二分算法 不熟悉二分算法的朋友可以看&#xff1a;【C语言刷怪篇】二分法_编程解决算术问题-CSDN博客 …...

    PHY——LAN8720A 代码解析 (三)

    文章目录 PHY——LAN8720A 代码解析 (三)PHY 源码解析ETH_PHY_IO_InitETH_PHY_IO_DeInitETH_PHY_IO_WriteRegETH_PHY_IO_ReadRegETH_PHY_IO_GetTick LAN8720 源码解析LAN8720_RegisterBusIOLAN8720_InitLAN8720_DisablePowerDownModeLAN8720_EnablePowerDownMode PHY——LAN872…...

    【工具】BioPred一个用于精准医疗中生物标志物分析的 R 软件包

    介绍 R 语言包 BioPred 提供了一系列用于精准医疗中的亚组分析和生物标志物分析的工具。它借助极端梯度提升&#xff08;XGBoost&#xff09;算法&#xff0c;并结合倾向得分加权和 A 学习方法&#xff0c;帮助优化个体化治疗规则&#xff0c;从而简化亚组识别过程。BioPred 还…...

    如何修复 SQL Server 数据库中的恢复挂起状态?

    原文&#xff1a;如何修复 SQL Server 数据库中的恢复挂起状态&#xff1f; | w3cschool笔记 当我们想与关系数据库交互时&#xff0c;SQL 就会出现并帮助用户与数据库进行交互。SQL 从高级语言中获取用户的输入&#xff0c;然后访问将代码转换为机器可理解的形式。SQL 确实会…...

    C++11QT复习 (十)

    基类与派生类之间的转换 **Day7-4 基类与派生类之间的转换****一、问题回顾****二、基类与派生类间的转换****1. 类型适应&#xff08;Upcasting&#xff09;****2. 逆向转换&#xff08;Downcasting&#xff09;** **三、代码示例****四、派生类间的复制控制****五、总结****1…...

    Linux——冯 • 诺依曼体系结构操作系统初识

    目录 1. 冯 • 诺依曼体系结构 1.1 冯•诺依曼体系结构推导 1.2 内存提高冯•诺依曼体系结构效率的方法 1.3 理解数据流动 2. 初步认识操作系统 2.1 操作系统的概念 2.2 设计OS的目的 3. 操作系统的管理精髓 1. 冯 • 诺依曼体系结构 1.1 冯•诺依曼体系结构推导 计算…...

    JVM 学习计划表(2025 版)

    JVM 学习计划表&#xff08;2025 版&#xff09; &#x1f4da; 基础阶段&#xff08;2 周&#xff09; 1. JVM 核心概念 ​JVM 作用与体系结构 理解 JVM 在 Java 跨平台运行中的核心作用&#xff0c;掌握类加载子系统、运行时数据区、执行引擎的交互流程​内存结构与数据存…...

    arm_mat_init_f32用法 dsp库

    arm_mat_init_f32 是 CMSIS DSP 库中的一个函数&#xff0c;用于初始化一个浮点矩阵结构体。以下是其使用方法&#xff1a; 函数原型 c复制 void arm_mat_init_f32(arm_matrix_instance_f32 * S,uint16_t nRows,uint16_t nColumns,float32_t * pData ); 参数说明 S&#xf…...

    【蓝桥杯14天冲刺课题单】Day3

    1. 题目链接&#xff1a;1025 答疑 贪心类型的题目做法很简单&#xff0c;只需要保证局部解最优即可保证整体解最优。 这里的思路就是第i个学生前面的人答疑所用的时间最短&#xff0c;那么他所发送短信的时间节点越小。这道题目有个需要注意的点是&#xff1a;要先将前i-1个…...

    基于开源AI大模型与S2B2C模式的线下服务型门店增长策略研究——以AI智能名片与小程序源码技术为核心

    摘要 在传统零售行业中&#xff0c;商品零售可通过无限流量实现销量增长&#xff0c;但服务型门店&#xff08;如餐饮、医疗、美容等&#xff09;因受限于地理位置、服务承载能力及非标化服务特性&#xff0c;需从“流量驱动”转向“复购驱动”增长模式。本研究以“开源AI大…...

    批量修改图像命名

    打开存放图片的文件 ctrA全选 找到功能栏上的三个点的位置&#xff0c;点击选择复制路径 打开一个Excel表格 将复制的图片路径复制到Excel表格中 选中刚复制的图片路径&#xff0c;点击选择数据->分列->分列 在打开的窗口中选中分隔符号&#xff0c;在点击下一步 选中…...

    linux-- 0. C语言过、Java半静对、Python纯动和C++对+C

    学习目标&#xff1a; java,CPYTHONC 学习内容&#xff1a; java,CPYTHONC 目录 学习目标&#xff1a; 学习内容&#xff1a; java 纯解释型语言&#xff08;如 Python&#xff09;的对比‌ C语言与Java的核心区别 java,C PYTHON C 学习时间&#xff1a; 学习产出…...

    程序化广告行业(50/89):Cookie映射技术深度剖析

    程序化广告行业&#xff08;50/89&#xff09;&#xff1a;Cookie映射技术深度剖析 大家好&#xff01;一直以来&#xff0c;我都希望能和大家一起深入探索程序化广告行业&#xff0c;共同学习进步。在之前的分享中&#xff0c;我们已经了解了程序化广告的很多关键内容&#x…...

    大语言模型智体的综述:方法论、应用和挑战(下)

    25年3月来自北京大学、UIC、广东大亚湾大学、中科院计算机网络信息中心、新加坡南阳理工、UCLA、西雅图华盛顿大学、北京外经贸大学、乔治亚理工和腾讯优图的论文“Large Language Model Agent: A Survey on Methodology, Applications and Challenges”。 智体时代已经到来&a…...

    【操作系统】Linux进程管理和调试

    在 Linux 中&#xff0c;可以通过以下方法查看 PID&#xff08;进程ID&#xff09;对应的进程名称和详细信息&#xff1a; 1. 使用 ps 命令&#xff08;最直接&#xff09; ps -p <PID> -o pid,comm,cmd示例&#xff1a; ps -p 1234 -o pid,comm,cmd输出&#xff1a; P…...

    C++---RAII模式

    一、RAII模式概述 1. 定义 RAII&#xff08;Resource Acquisition Is Initialization&#xff09;即资源获取即初始化&#xff0c;是C中用于管理资源生命周期的一种重要编程模式。其核心在于将资源的获取和释放操作与对象的生命周期紧密绑定。当对象被创建时&#xff0c;资源…...

    Clion刷题攻略-配置Cmake

    使用Clion刷题&#xff0c;在一个项目中创建多个main函数&#xff0c;每一个文件对应一道题目&#xff0c;将Clion作为题目管理系统使用&#xff0c;并且cpp文件允许使用中文名&#xff0c;exe文件统一输出到runtime目录&#xff0c;防止污染根目录&#xff0c;CmakeLists文件如…...

    DEBUG:file命令

    file 命令详解 file 是 Linux/Unix 系统中用于检测文件类型的实用工具。它通过检查文件的**魔数&#xff08;magic number&#xff09;**和内容结构来判断文件类型&#xff0c;而不是依赖文件扩展名。 1. 基本语法 file [选项] 文件名... 常用选项 选项说明-b (--brief)简洁…...

    hackmyvn-casino

    arp-scan -l nmap -sS -v 192.168.255.205 目录扫描 dirsearch -u http://192.168.255.205/ -e * gobuster dir -u http://192.168.255.205 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php -b 301,401,403,404 80端口 随便注册一个账号 玩游戏时的…...