Construction method of recognition model based on YOLOv8 and security recognition system
By constructing a recognition model based on YOLOv8 and processing data using dynamic target detection and multi-level review criteria, the problems of small target recognition and low-precision detection at nuclear power plant sites were solved, achieving efficient and stable safety recognition results.
Patent Information
- Application Number
- CN202511139101.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional computer vision-based detection methods have limitations in addressing issues such as small target identification and low-precision detection at nuclear power plant sites. Target detection is particularly challenging under conditions of low light, occlusion, and diverse personnel. Furthermore, traditional models are complex and computationally intensive, leading to complex on-site deployments and insufficient reliance on manual screening.
A YOLOv8-based recognition model was adopted. By acquiring an initial image dataset, the data was cleaned and filtered using dynamic object detection and multi-level review criteria to establish an initial model. The model was then trained using a training dataset to construct the recognition model.
It improves the accuracy of the training dataset and the precision of the recognition model, ensures the stability of the model in different training batches, reduces training time, and can quickly identify unsafe behaviors such as not wearing protective clothing or safety helmets, thus improving the robustness and real-time performance of the model.
Smart Images

Figure CN120976532A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of security monitoring technology, and in particular to a method for constructing a YOLOv8-based identification model and a security identification system. Background Technology
[0002] With the increasing complexity of industrial production environments, occupational safety has become a pressing issue for various production enterprises, especially in high-risk industries. How to monitor and assess employees' personal protective equipment (PPE) wearing and unsafe behaviors in real time at dynamically changing nuclear power production sites has become a crucial topic in the field of industrial safety.
[0003] Currently, traditional computer vision-based detection methods exhibit limitations when facing challenges such as small target recognition and low-precision detection. This is particularly true in industrial environments where low lighting, occlusion, and diverse personnel significantly increase the difficulty of target detection. Complex scenarios severely test the robustness of the models. Furthermore, in nuclear power plants, the installation location of cameras leads to low accuracy in small target detection. Additionally, traditional models are complex in structure and computationally intensive, resulting in complex on-site deployment. Traditional nuclear power safety risk identification primarily relies on manual screening, which has several shortcomings and deficiencies. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method for constructing a recognition model based on YOLOv8 and a secure recognition system.
[0005] The technical solution adopted by this invention to solve its technical problem is: a method for constructing a recognition model based on YOLOv8, comprising the following steps:
[0006] Obtain the initial image dataset;
[0007] The initial image dataset is cleaned using dynamic object detection to obtain an image sample set;
[0008] The image sample set is filtered according to multi-level review criteria to obtain the training dataset;
[0009] An initial model was established based on the YOLOv8 model;
[0010] The initial model is trained using the training dataset to obtain the recognition model.
[0011] Preferably, obtaining the initial dataset includes:
[0012] Collect surveillance video data of the work area as the initial video dataset.
[0013] Preferably, the step of cleaning the initial image dataset using dynamic object detection to obtain an image sample set includes:
[0014] The initial image dataset is used to detect people using an object detection model. Data without human activity in the initial image dataset is then removed to obtain the edited image dataset.
[0015] The image sample set is obtained by performing frame extraction optimization on the edited image dataset.
[0016] Preferably, the step of performing frame-by-frame optimization on the edited image dataset to obtain the image sample set includes:
[0017] The image sample set is obtained by sampling the edited image dataset using a time-series uniform sampling method.
[0018] Preferably, the step of filtering the image sample set according to multi-level review criteria to obtain the training dataset includes:
[0019] Determine whether the images in the image sample set meet the preset image filtering requirements; if not, remove the images; use the image sample set with the removed images as the first training set.
[0020] The first training set is labeled with bounding boxes to obtain the second training set;
[0021] Controversial images with partial occlusion and multiple overlapping images were obtained from the second training set;
[0022] The disputed images are identified using a double blind review mechanism to obtain effectively labeled images;
[0023] The uncontroversial images in the second training set and the valid labeled images are combined to obtain the training dataset.
[0024] Preferably, determining whether the image images in the image sample set meet the preset image filtering requirements includes:
[0025] Obtain environmental information, image clarity, and image similarity of the image;
[0026] Determine whether the environmental information obstructs the people in the image; if so, determine that the image does not meet the preset image filtering requirements.
[0027] Determine whether the image clarity meets the preset clarity requirements; if not, determine that the image does not meet the preset image filtering requirements.
[0028] Determine whether the image similarity between any two images is greater than a preset similarity; if it is greater than the preset similarity, then one of the two corresponding images is determined not to meet the preset image filtering requirements.
[0029] The first training set is obtained by deleting the images in the image sample set that do not meet the preset image screening requirements.
[0030] Preferably, the step of labeling the first training set with bounding boxes to obtain the second training set includes:
[0031] The first training set is labeled with bounding boxes using the LabelImg tool to obtain the second training set.
[0032] Preferably, the disputed images include images of multiple people overlapping and images obscured by handheld tools.
[0033] Preferably, an initial model is established based on the YOLOv8 model, including:
[0034] The backbone network structure of the YOLOv8 model is set as an efficient neural network architecture based on the "star operation" characteristic; the feature vector of the training dataset is extracted using the backbone network;
[0035] The YOLOv8 model employs a PAN-FAN structure in its network layers, comprising one SPPF module and two PAN modules. The feature vectors are processed using these network layers to obtain feature information.
[0036] The detection head of the YOLOv8 model consists of a detection head and a classification head; the detection head is used to process the feature information to identify the target.
[0037] The YOLOv8 model with the modified backbone network is used as the initial model.
[0038] A YOLOv8-based security identification system includes:
[0039] The detection module is used to input the security recognition image to be detected into the recognition model described above for recognition and to obtain the detection result.
[0040] The implementation of this invention has the following beneficial effects:
[0041] This invention utilizes dynamic object detection and multi-level evaluation criteria to process the initial image dataset, improving the accuracy of the training dataset. Furthermore, it enhances the accuracy of the recognition model obtained after training the initial model using this dataset, ensuring its stability across different training batches and reducing training time. This enables the recognition model to quickly identify behaviors such as operators not wearing protective clothing or helmets, and the presence of open flames, smoking, or using mobile phones. Attached Figure Description
[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0043] Figure 1 This is a flowchart of a maintenance method for a rotating device in one embodiment;
[0044] Figure 2 This is a schematic diagram of the structure of StarNet, a lightweight backbone network in one embodiment. Detailed Implementation
[0045] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0046] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0047] This invention provides a method for constructing a recognition model based on YOLOv8, such as... Figure 1 As shown, it includes the following steps:
[0048] Obtain the initial image dataset.
[0049] Specifically, the initial image dataset was constructed based on real image data from multiple scenarios at nuclear power plants, and the data acquisition methods strictly followed industrial safety monitoring standards.
[0050] Dynamic object detection is used to clean the initial image dataset to obtain an image sample set.
[0051] Understandably, using dynamic object detection to clean the initial image dataset can significantly improve data quality and usability. It removes background noise and irrelevant dynamic elements from the initial image dataset, accurately extracts the main targets, and ensures consistency across multiple viewpoints. Simultaneously, this technique removes duplicate frames, extracts keyframes, reduces data redundancy, improves annotation efficiency, and enhances data interpretability, such as identifying behavioral patterns. Furthermore, it reduces storage and computational costs, filters sensitive information, and improves data security and privacy. Therefore, dynamic object detection makes the initial image dataset more concise, efficient, and secure, providing high-quality foundational data for the final training dataset and reducing substandard data during annotation and training.
[0052] The image sample set was filtered according to multi-level review criteria to obtain the training dataset.
[0053] Specifically, the multi-level review criteria, through layers of screening and progressively refined evaluation dimensions, can more accurately identify image samples that meet the requirements. Each level of review focuses on specific key indicators, thereby ensuring the quality of the screening results.
[0054] An initial model was built based on the YOLOv8 model.
[0055] It's worth noting that YOLOv8 is fast and accurate, and its optimized model structure and multi-scale detection capabilities make it perform exceptionally well in complex scenes. It also supports various data augmentation and regularization techniques to enhance generalization capabilities. Furthermore, YOLOv8 training is flexible and easy to deploy, allowing for rapid project startup. It is highly adaptable, easy to optimize and extend, and can significantly reduce development costs and improve development efficiency.
[0056] The initial model is trained using the training dataset to obtain the recognition model.
[0057] This invention utilizes dynamic object detection and multi-level evaluation criteria to process the initial image dataset, improving the accuracy of the training dataset. This enhances the generalization ability of the recognition model trained on this dataset on unseen data, reducing overfitting. Furthermore, it improves the accuracy of the recognition model obtained after training the initial model based on the YOLOv8 model using this training dataset, ensuring its stability across different training batches and reducing training time.
[0058] In one executable embodiment, obtaining the initial dataset includes:
[0059] Collect surveillance video data of the work area as the initial video dataset.
[0060] In one executable embodiment, dynamic object detection is used to clean the initial image dataset to obtain an image sample set, including:
[0061] A target detection model was used to detect people in the initial image dataset. Data without human activity was removed from the initial image dataset to obtain the edited image dataset.
[0062] Furthermore, the basic YOLOv8 model is used to detect people in the initial image data and filter out empty scene segments without human activity in real time.
[0063] In some scenarios, using the basic YOLOv8 model to detect people on initial image data can reduce redundant data by 72%.
[0064] Frame extraction and optimization are performed on the edited video dataset to obtain an image sample set.
[0065] Frame extraction optimization of edited video datasets significantly reduces data redundancy, improves processing speed, enhances data representativeness, lowers storage costs, improves model performance, adapts to real-time application requirements, facilitates annotation and analysis, and enhances data security. Furthermore, converting video data into image sample sets improves training efficiency, and because image data is smaller than video data, it speeds up model training and shortens training time. Simultaneously, it requires fewer hardware resources, such as GPU memory, compared to video datasets, reducing hardware costs.
[0066] In one executable embodiment, the edited video dataset is subjected to frame-by-frame optimization to obtain an image sample set, including:
[0067] A temporal uniform sampling method was used to sample the edited video dataset to obtain an image sample set.
[0068] In some scenarios, a temporal uniform sampling method was used on the edited video dataset, extracting 1 frame every 5 seconds. An adaptive enhancement strategy was adopted, and the basic YOLOv8 model was used to identify densely populated areas. For densely populated areas, the sampling frequency was increased to 1 frame every 2 seconds, resulting in a total of 128,000 original samples.
[0069] In one executable embodiment, the image sample set is filtered according to multi-level review criteria to obtain a training dataset, including:
[0070] Determine whether the images in the image sample set meet the preset image selection requirements; if not, remove the images. Use the image sample set with the removed images as the first training set.
[0071] Understandably, in some scenarios, labelers manually remove blurry frames (such as those caused by camera vibration or steam) and duplicate frames that are accidentally triggered by the device.
[0072] The first training set is labeled with bounding boxes to obtain the second training set.
[0073] Understandably, labeling bounding boxes on the first training set can provide detailed annotation information for the initial model, thereby improving the training effect and detection accuracy of the model.
[0074] Controversial images with partial occlusion and multiple overlapping images were obtained from the second training set.
[0075] Disputed images were identified using a double blind review mechanism, resulting in effectively labeled images.
[0076] Specifically, using a double-blind review mechanism to identify disputed images can improve the objectivity and fairness of effectively labeled images.
[0077] The uncontroversial images and validly labeled images in the second training set are combined to obtain the training dataset.
[0078] In one executable embodiment, determining whether an image in the image sample set meets preset image filtering requirements includes:
[0079] Acquire environmental information, image sharpness, and image similarity of images.
[0080] Determine whether environmental information obstructs people in the image; if so, determine that the image does not meet the preset image selection requirements.
[0081] Specifically, determining whether environmental information obstructs people in images includes the obstruction caused by vapor.
[0082] Determine if the image clarity meets the preset clarity requirements; if not, determine that the image does not meet the preset image selection requirements.
[0083] Specifically, if the image is blurred due to camera vibration, then the image does not meet the preset image selection requirements.
[0084] Determine whether the image similarity between any two images is greater than a preset similarity; if it is greater than the preset similarity, then one of the corresponding two images is determined not to meet the preset image filtering requirements.
[0085] It should be noted that if the image similarity between any two images is greater than a preset similarity, then the two images are considered duplicate frames. Removing duplicate frames can significantly reduce data redundancy, improve processing efficiency, enhance data representativeness, reduce storage costs, improve model performance, adapt to real-time application needs, facilitate annotation and analysis, effectively improve the efficiency and quality of data processing, and enhance data security.
[0086] Images that do not meet the preset image selection requirements are deleted from the image sample set to obtain the first training set.
[0087] In one executable embodiment, bounding box annotations are performed on the first training set to obtain a second training set, including:
[0088] The LabelImg tool was used to annotate the bounding boxes of the first training set to obtain the second training set.
[0089] In one executable embodiment, the disputed images include overlapping images of multiple people and images obscured by handheld tools.
[0090] In one executable embodiment, the double-blind review mechanism identifies disputed images using the principle of "double-blind review + majority rule".
[0091] In one embodiment, a senior security officer uses a "double-blind review + majority rule" principle to decide, ultimately retaining 4134 valid labeled images from the 128,000-frame image sample set after frame extraction and optimization. This results in a final training dataset containing 7514 labeled targets, with positive examples (fully clothed) accounting for 63.2%, primarily for identifying whether work clothes are worn. In this experiment, a total of 4134 valid images were collected. After screening, the training set contained 3200 images, the test set 400 images, and the validation set 400 images, divided in an 8:1:1 ratio. The dataset contains a total of 7514 valid targets. In this embodiment, the model training iterations were set to 200, the learning rate to 0.01, the batch size to 8, and the Adam optimizer was used. This configuration aims to balance training speed and model convergence, ensuring the model can learn sufficiently on the given training set and be effectively evaluated on the test and validation sets. Reference images for some samples are shown below, including both positive and negative examples.
[0092] In one executable embodiment, an initial model is built based on the YOLOv8 model, including:
[0093] The backbone network structure of the YOLOv8 model is set as an efficient neural network architecture based on the "star operation" characteristic; the backbone network is used to extract feature vectors from the training dataset.
[0094] Specifically, such as Figure 2As shown, the input image is first downsampled through a convolutional layer, and then features are extracted through four repeating star-shaped blocks (Stage 1, Stage 2, Stage 3, Stage 4). This module begins with a deep convolutional layer, followed by two fully connected layers performing a special star-shaped operation (Element-Wise multiply), then another fully connected layer replacing Layer Normalization with Batch Normalization to improve inference efficiency. Finally, a deep convolutional layer is added to fuse the results. The channel expansion is set to 4. After one stage, the network width doubles. The activation function in the star-shaped blocks is replaced with the ReLU function, which is a variation of ReLU (Rectified Linear Unit), as shown in Equation 1.
[0095] ReLU6(x) = min(max(0, x), 6) (1)
[0096] An upper limit mechanism has been added, with a maximum positive input value of 6. This design offers several advantages: Firstly, it effectively avoids precision loss due to an excessively large output range when using low-precision float16 operations on mobile devices, especially with low-precision numerical resolution. Secondly, it enhances model sparsity by truncating large activation values, reducing the contribution of invalid features and improving model sparsity. Thirdly, it enhances generalization ability by preventing overfitting. The original star-shaped operation typically fuses features from two linear transformations through simple element-wise multiplication, where W represents the weight matrix and B represents the bias. This alternative method fuses the weight matrix and bias, with the weight matrix represented as... The X parameter can also be expressed as Therefore, the original star operation can be rewritten as the following formula:
[0097]
[0098]
[0099] Where i, j represent channel numbers; α represents the correlation coefficient of each item; d represents the dimension of the input features; X represents the input features; W represents the weight matrix; x represents the input features of each channel; and w represents the weight matrix of each channel. The rewritten star-shaped operation can be extended to very high dimensions through simple hierarchical stacking, greatly enhancing the computational power in high-dimensional spaces, thereby expanding the range of channels covered and easily extending to multiple output channels. By outputting feature vectors of fixed size, robustness to changes in target size is enhanced, resulting in a more efficient overall design that maintains excellent feature representation capabilities while reducing computational load.
[0100] The YOLOv8 model uses a PAN-FAN structure in its network layers, which includes one SPPF module and two PAN modules. The network layers are used to process the feature vectors to obtain feature information.
[0101] Specifically, the network layers aggregate through bottom-up and top-down paths. This structure enhances the expressive power of the feature maps, enabling the model to capture and utilize feature information at different scales more efficiently.
[0102] The detection head of the YOLOv8 model consists of a detection head and a classification head; the detection head is used to process feature information and identify targets.
[0103] Specifically, the detection head includes 3×3 convolutions and 1×1 convolutions. The detection head predicts the bounding box coordinates (x, y, w, h) and the objectness using 3×3 and 1×1 convolutions.
[0104] The classification head includes a sigmoid activation function. It uses global average pooling and the sigmoid activation function (supporting multi-label classification), outputting a dimension of `num_classes` to determine the probability of each class. A decoupled head is used to separate the classification and regression tasks. The ANCHOR-FREE mechanism directly predicts center points without using predefined anchor boxes, improving both detection and classification accuracy.
[0105] The YOLOv8 model with modified backbone network was used as the initial model.
[0106] The initial model built on YOLOv8 performs excellently in industrial safety detection scenarios, effectively identifying unsafe human behaviors. In actual deployments, it demonstrates strong real-time performance, high accuracy, and good scenario adaptability.
[0107] Replacing the YOLOv8s backbone network with a highly efficient neural network architecture based on "star-shaped operation" significantly improves the model's processing efficiency and real-time performance. This not only simplifies the backbone network structure but also significantly reduces computational resource consumption, ensuring efficient model operation in complex environments. Without sacrificing model accuracy, this design better addresses the high-frequency dynamic changes at nuclear power plant production sites, enabling real-time monitoring of employee PPE wearing and hazardous behaviors, thereby effectively improving the efficiency and accuracy of occupational safety supervision.
[0108] The present invention also provides a security identification system based on YOLOv8, comprising:
[0109] The detection module is used to input the security recognition image to be detected into the recognition model mentioned above for recognition and to obtain the detection result.
[0110] Specifically, the safety identification system can identify operators who are not wearing protective clothing, not wearing safety helmets, or engaging in activities such as smoking, using mobile phones, etc., through its detection module.
[0111] For example, when the safety identification system detects that an operator is wearing protective clothing but not a safety helmet, it will identify this behavior and handle it accordingly. It can also trigger alarms, generate records, and issue reminders. The system can be configured according to the specific needs of the scenario.
[0112] When the security identification system detects that an operator is smoking, for example, with a cigarette in their mouth or in their hand, it will identify the behavior and process it accordingly.
[0113] The above embodiments only illustrate preferred embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. Therefore, all equivalent transformations and modifications made with respect to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A method for constructing a recognition model based on YOLOv8, characterized in that, Includes the following steps: Obtain the initial image dataset; The initial image dataset is cleaned using dynamic object detection to obtain an image sample set; The image sample set is filtered according to multi-level review criteria to obtain the training dataset; An initial model was established based on the YOLOv8 model; The initial model is trained using the training dataset to obtain the recognition model.
2. The construction method according to claim 1, characterized in that, The process of obtaining the initial dataset includes: Collect surveillance video data of the work area as the initial video dataset.
3. The construction method according to claim 1, characterized in that, The step of cleaning the initial image dataset using dynamic object detection to obtain an image sample set includes: The initial image dataset is used to detect people using an object detection model. Data without human activity in the initial image dataset is then removed to obtain the edited image dataset. The image sample set is obtained by performing frame extraction optimization on the edited image dataset.
4. The construction method according to claim 3, characterized in that, The step of performing frame extraction optimization on the edited video dataset to obtain the image sample set includes: The image sample set is obtained by sampling the edited image dataset using a time-series uniform sampling method.
5. The construction method according to claim 1, characterized in that, The image sample set is filtered according to multi-level review criteria to obtain a training dataset, including: Determine whether the images in the image sample set meet the preset image filtering requirements; if not, remove the images; use the image sample set with the removed images as the first training set. The first training set is labeled with bounding boxes to obtain the second training set; Controversial images with partial occlusion and multiple overlapping images were obtained from the second training set; The disputed images are identified using a double blind review mechanism to obtain effectively labeled images; The uncontroversial images in the second training set and the valid labeled images are combined to obtain the training dataset.
6. The construction method according to claim 5, characterized in that, The step of determining whether the images in the image sample set meet the preset image filtering requirements includes: Obtain environmental information, image clarity, and image similarity of the image; Determine whether the environmental information obstructs the people in the image; if so, determine that the image does not meet the preset image filtering requirements. Determine whether the image clarity meets the preset clarity requirements; if not, determine that the image does not meet the preset image filtering requirements. Determine whether the image similarity between any two images is greater than a preset similarity; if it is greater than the preset similarity, then one of the two corresponding images is determined not to meet the preset image filtering requirements. The first training set is obtained by deleting the images in the image sample set that do not meet the preset image screening requirements.
7. The construction method according to claim 5, characterized in that, The step of labeling the first training set with bounding boxes to obtain the second training set includes: The first training set is labeled with bounding boxes using the LabelImg tool to obtain the second training set.
8. The construction method according to claim 5, characterized in that, The controversial images include overlapping images of multiple people and images obscured by handheld tools.
9. The construction method according to claim 1, characterized in that, An initial model was built based on the YOLOv8 model, including: The backbone network structure of the YOLOv8 model is set as an efficient neural network architecture based on the "star operation" characteristic; the feature vector of the training dataset is extracted using the backbone network; The YOLOv8 model employs a PAN-FAN structure in its network layers, comprising one SPPF module and two PAN modules. The feature vectors are processed using these network layers to obtain feature information. The detection head of the YOLOv8 model consists of a detection head and a classification head; the detection head is used to process the feature information to identify the target. The YOLOv8 model with the modified backbone network is used as the initial model.
10. A secure identification system based on YOLOv8, characterized in that, include: The detection module is used to input the security recognition image to be detected into the recognition model constructed according to claims 1 to 9 for recognition and to obtain the detection result.
Citation Information
Patent Citations
Industrial safety detection method based on improved YOLOv8 algorithm
CN118761980A
Wheat scab detection method and system based on unmanned aerial vehicle remote sensing and improved YOLOv8
CN119206505A
Student classroom behavior analysis method based on improved YOLOv8
CN120299079A
Safety helmet target detection method based on YOLOv8
CN120411473A