Safety early warning method based on YOLOv8 and DeepSORT algorithms

By using YOLOv8 and DeepSORT algorithms in the security early warning system, combined with high-resolution infrared camera to acquire video data, effective tracking and repeated capture of multiple targets is achieved, and the insufficient performance and accuracy of the target detection and tracking algorithm in the prior art is solved. The problem of the system improves the robustness and accuracy of the system.

CN119107582APending Publication Date: 2024-12-10ANHUI UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411193554.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing security early warning system has shortcomings in the performance and accuracy of the target detection and tracking algorithm, especially in high-density populations and complex scenarios, and it is difficult to repeatedly capture when the target disappears, resulting in late warning.

Method used

The security early warning method based on YOLOv8 and DeepSORT algorithms is adopted to collect video data through a high-resolution infrared camera, use YOLOv8 for object detection and combine with DeepSORT for tracking, so as to achieve effective tracking and repeated capture of multiple targets.

Benefits of technology

Improve the system's high-performance processing capabilities under low computing resources, enhance the detection ability of targets of different sizes, ensure the identity consistency and robustness of targets in complex scenarios, and significantly improve the system's robustness and accuracy. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107582A_ABST
    Figure CN119107582A_ABST
Patent Text Reader

Abstract

The invention discloses a security early warning method based on YOLOv8 and DeepSORT algorithms, belongs to the technical field of security early warning, and aims to solve the problems that the performance and accuracy of a target detection tracking algorithm are remarkably reduced, a plurality of targets cannot be captured at the same time, and particularly, repeated capture is difficult under the condition that the targets disappear. The system comprises a data acquisition module, a data processing module, a target detection module, a target tracking module, a behavior analysis module and an early warning mechanism. According to the invention, the YOLOv8 target detection algorithm is used to improve the detection precision, so that the system has high detection speed and precision, and the DeepSORT is used as the target tracking algorithm, so that the system has strong tracking performance, and multi-target tracking and fullness capability are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security early warning technology, and in particular to a security early warning method based on YOLOv8 and DeepSORT algorithms. Background Art

[0002] The current safety warning system has made significant progress in many fields such as earthquake disaster prevention, but it still faces many technical and application challenges. Future development will continue to rely on the progress of technologies such as artificial intelligence, the Internet of Things, and cloud computing, while also needing to address key issues such as data privacy and system integration. With the continuous development of technology and the deepening of its application, the safety warning system will play an increasingly important role in industrial safety, smart homes, and commercial security. However, the current safety warning system still has technical deficiencies, so the research on the safety warning system has become a major social hotspot.

[0003] The current security warning system mainly uses target detection algorithms such as YOLO, SSD, and Faster R-CNN for target detection, and uses multi-target tracking algorithms such as ByteTrack to combine appearance features and motion information to achieve target tracking. However, the extremely high computing requirements have reduced system performance, and the limitation of computing resources has made it impossible for the system to complete data processing and analysis in a short time, resulting in delayed warnings. At the same time, in complex scenarios such as high-density crowds and large-scale monitoring, the performance and accuracy of target detection and tracking algorithms have significantly decreased, and it is impossible to capture multiple targets at the same time. In particular, when the target disappears, it is difficult to capture it again.

[0004] To address the above problems, a security warning method based on YOLOv8 and DeepSORT algorithms was proposed. Summary of the invention

[0005] The purpose of the present invention is to provide a security warning method based on YOLOv8 and DeepSORT algorithms, and adopt this device to work, so as to solve the problem that the performance and accuracy of the target detection and tracking algorithm in the above background are significantly reduced, and multiple targets cannot be captured at the same time, especially when the target disappears, it is difficult to capture repeatedly.

[0006] To achieve the above object, the present invention provides the following technical solution: a security early warning method based on YOLOv8 and DeepSORT algorithm, comprising the following steps:

[0007] S1: Using the data acquisition module, a high-resolution infrared camera is used to capture details;

[0008] S2: Using the data processing module, the collected video data is denoised, the video data is preprocessed frame by frame, the video is divided into separate frames, and basic preprocessing and size adjustment are performed on each frame;

[0009] S3: Use the object detection module to perform object detection using the YOLOv8 model, output the bounding box, confidence, and category probability, decode the predicted bounding box coordinates from the feature map space to the original image space, perform non-maximum suppression on the predicted bounding box, and remove duplicate detection results;

[0010] S4: Using the target recognition module, the DeepSORT algorithm is used to track the targets detected by YOLOv8;

[0011] S5: Analyze the behavior pattern of the detection target using the behavior analysis module;

[0012] S6: Utilize the early warning mechanism, taking industrial hazardous chemicals safety as an example, define early warning rules according to industrial safety regulations and actual needs, and trigger an early warning when personnel are detected driving hazardous chemicals or abnormal movement patterns occur.

[0013] Furthermore, the use of the data acquisition module in S1 specifically includes the following steps:

[0014] S101: Uses high-resolution infrared cameras to collect video data of factory areas in real time;

[0015] S102: Adjust the camera to ensure that it covers all areas that need to be monitored in the factory, and use a bracket to maintain the stability of the camera.

[0016] Furthermore, the use of the data processing module in S2 specifically includes the following steps:

[0017] S201: Use a convolutional neural network (CNN) to denoise the video frame, and adjust the mean square error to minimize the difference between the denoised image and the clean image;

[0018] S202: Use the trained denoising CNN model to denoise the new image. Input the new noisy image into the trained denoising CNN model and output the denoised image;

[0019] S203: Use histogram equalization image processing technology to enhance the contrast of the image. Apply histogram equalization to each frame of the video data, convert the image into other color spaces, equalize the brightness channel, and then convert the color space back;

[0020] S204: Adjust the size, adjust the size of each frame to ensure uniformity.

[0021] Furthermore, the use of the target detection module in S3 specifically includes the following steps:

[0022] S301: using the backbone network CSPDarknet to extract the basic features of the video frame obtained by the data processing module, that is, using the backbone network to perform multi-layer convolution, pooling, activation and normalization operations on the input image, and finally generating a feature map;

[0023] S302: Use a feature pyramid network to fuse features of different scales to improve the detection performance of small targets, that is, extract feature maps of multiple levels from the backbone network and fuse these feature maps through top-down paths and lateral links;

[0024] S303: using the detection head to further process the features and generate the final detection results, i.e., the bounding box, the category, and the confidence level;

[0025] S304: Use YOLOv8 to divide the image into S×S grid cells, and each grid cell predicts multiple bounding boxes and the category probability of each bounding box. Each bounding box is represented by the center coordinates, width and height;

[0026] S305: It is also necessary to consider the three-part loss function of YOLOv8: position loss (L box ), confidence loss (L conf ) and class loss (L class ), the total loss is the weighted sum of the three losses;

[0027] S306: After the above process is completed, a series of bounding boxes and corresponding confidence levels and category probabilities are generated. In order to remove duplicate detection results, the non-maximum suppression method is used to calculate the intersection over union ratio of each pair of bounding boxes A and B. If IoU>threshold, the bounding box with higher confidence level is retained and the bounding box with lower confidence level is suppressed.

[0028] Furthermore, the specific steps of S302 are:

[0029] S3021: Assume that the backbone network outputs feature maps of multiple scales: C2, C3, C4, C5, where C2 is a high-resolution feature map and C5 is a low-resolution feature map;

[0030] S3022: The high-level feature maps are gradually upsampled through a top-down path and fused with the low-level feature maps to improve the detection performance of small objects;

[0031] S3033: Next, the lateral connection fuses the bottom-up feature map with the top-down feature map by using 1×1 convolution to adjust the number of channels so that they remain consistent when the feature maps are fused.

[0032] Furthermore, the use of the target recognition module in S4 specifically includes the following steps:

[0033] S401: First, a Kalman filter is initialized for each detected target to predict the motion state of the target, and the state vector of the Kalman filter includes position and velocity;

[0034] S402: extracting feature vectors from the target image region using a ReID deep learning model for target association;

[0035] S403: using the Hungarian algorithm to associate the target between the detection result of the current frame and the prediction result of the tracker, the construction of the association matrix is ​​based on the Mahalanobis distance and the depth feature distance;

[0036] S404: Use the Hungarian algorithm to solve the minimum value in the correlation matrix and find the optimal detection and tracker match;

[0037] S405: Finally, in order to improve the accuracy and robustness of multi-target tracking, the state and covariance matrix of the Kalman filter are updated according to the associated results.

[0038] Furthermore, the use of the behavior analysis module in S5 specifically includes the following steps:

[0039] S501: Establish a behavior model to identify key behaviors, classify key behaviors, use supervised learning methods to identify normal operation behaviors, and use unsupervised learning methods to detect abnormal behaviors;

[0040] S502: It is necessary to calculate the reconstruction error and perform anomaly scoring to improve the accuracy of behavior analysis.

[0041] Furthermore, the use of the early warning mechanism in S6 specifically includes the following steps:

[0042] S601: Classify the abnormal behaviors obtained by the behavior analysis module and set different alarm levels according to the severity of the behaviors;

[0043] S602: Set different alarm notification methods, such as local alarm, which is to sound and light alarm within the detection range, and remote notification, which notifies relevant personnel through SMS, email or dedicated application.

[0044] Furthermore, by integrating YOLOv8 and DeepSORT algorithms into the monitoring system, a safety early warning system can be realized.

[0045] Furthermore, by identifying abnormal behaviors, an early warning mechanism is triggered and the situation is fed back to the user, thereby achieving the purpose of maintaining factory safety.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] 1. The present invention uses the YOLOv8 algorithm for target detection, which is more efficient. Its efficient model structure and single-stage detection mechanism can process high-resolution video frames with low latency. At the same time, it can perform target detection at different scales, improving the detection ability of targets of different sizes.

[0048] 2. The present invention uses the DeepSORT algorithm for target tracking, which enables the safety warning system to have powerful tracking performance. It can track multiple targets at the same time and maintain the identity consistency of the targets, and is suitable for multi-target tracking in complex scenes such as factories. The DeepSORT algorithm combines the appearance characteristics and motion information of the target, so that the target can still be effectively tracked when the target is frequently occluded or disappears.

[0049] 3. The combination of the two algorithms enables the system of the present invention to achieve high-performance processing under limited computing resources, thereby improving the overall efficiency of the system. At the same time, the combination of the two algorithms enables the system to have environmental adaptability of the glue gun, and can operate stably under different lighting, weather and scene conditions, which significantly improves the robustness and accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a hierarchical schematic diagram of the system of the present invention;

[0051] Figure 2 It is a schematic diagram of the process of the present invention;

[0052] Figure 3 It is a specific flow chart of the data acquisition module in the present invention;

[0053] Figure 4 It is a specific flow chart of the data processing module in the present invention;

[0054] Figure 5 It is a schematic diagram of a specific process of the target detection module in the present invention;

[0055] Figure 6 It is a specific flow chart of the target recognition module in the present invention;

[0056] Figure 7 It is a specific flow chart of the behavior analysis module in the present invention;

[0057] Figure 8 It is a specific flow chart of the early warning mechanism in the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] In order to solve the technical problems that the performance and accuracy of target detection and tracking algorithms are significantly reduced, multiple targets cannot be captured at the same time, especially when the target disappears, it is difficult to capture repeatedly, such as Figure 1 - Figure 8 As shown, the following preferred technical solutions are provided:

[0060] A security early warning method based on YOLOv8 and DeepSORT algorithm includes the following steps:

[0061] S1: Using the data acquisition module, a high-resolution infrared camera is used to capture details;

[0062] S2: Using the data processing module, the collected video data is denoised, the video data is preprocessed frame by frame, the video is divided into separate frames, and basic preprocessing and size adjustment are performed on each frame;

[0063] S3: Use the object detection module to perform object detection using the YOLOv8 model, output the bounding box, confidence, and category probability, decode the predicted bounding box coordinates from the feature map space to the original image space, perform non-maximum suppression on the predicted bounding box, and remove duplicate detection results;

[0064] S4: Using the target recognition module, the DeepSORT algorithm is used to track the targets detected by YOLOv8;

[0065] S5: Analyze the behavior pattern of the detection target using the behavior analysis module;

[0066] S6: Utilize the early warning mechanism, taking industrial hazardous chemicals safety as an example, define early warning rules according to industrial safety regulations and actual needs, and trigger an early warning when personnel are detected driving hazardous chemicals or abnormal movement patterns occur.

[0067] In this solution: YOLOv8 target detection algorithm is used to improve detection accuracy, so that the system has high detection speed and accuracy. DeepSORT is used as the target tracking algorithm, which gives the system powerful tracking performance and realizes multi-target tracking and full recognition capabilities.

[0068] The use of the data acquisition module in S1 specifically includes the following steps:

[0069] S101: Uses high-resolution infrared cameras to collect video data of factory areas in real time;

[0070] S102: Adjust the camera to ensure that it covers all areas that need to be monitored in the factory, avoid blind spots and overlaps, and use a bracket to maintain the stability of the camera.

[0071] The use of the data processing module in S2 specifically includes the following steps:

[0072] S201: Use a convolutional neural network (CNN) to denoise the video frame, and use the mean square error to minimize the difference between the denoised image and the clean image.

[0073] Train a denoising CNN model, the convolution formula is as follows:

[0074]

[0075] Among them, O i,j is the pixel value of the output feature map, I is the input image, K is the convolution kernel, b is the bias, and k is the size of the convolution kernel.

[0076] In order to minimize the difference between the denoised image and the clean image, the mean square error is used for adjustment, and the calculation formula is as follows:

[0077]

[0078] Where N is the total number of pixels, I clean,i is the clean image value of the ith pixel, I denoised,i is the denoised image value of the i-th pixel.

[0079] S202: Use the trained denoising CNN model to denoise the new image. Input the new noisy image into the trained denoising CNN model and output the denoised image. The above steps significantly improve the image quality and provide a reliable data basis for subsequent target detection and behavior analysis.

[0080] S203: Use histogram equalization image processing technology to enhance the contrast of the image. Apply histogram equalization to each frame of the video data, convert the image into other color spaces, equalize the brightness channel, and then convert the color space back.

[0081] The histogram calculation formula is as follows:

[0082]

[0083] Among them, r k is the kth gray level, n k is the gray level r kThe number of occurrences, n is the total number of pixels.

[0084] The cumulative distribution function (CDF) calculation formula is as follows:

[0085]

[0086] The gray level calculation formula after equalization is as follows:

[0087] s k =(L-1)·cdf(r k )

[0088] Where L is the total number of gray levels (for 8-bit images, L=256).

[0089] S204: Adjust the size. Adjust the size of each frame to ensure uniformity. The formula is as follows:

[0090] frame resized =resize(frame,(H,W))

[0091]

[0092] Among them, H and W are the height and width required by the YOLOv8 model input.

[0093] The use of the target detection module in S3 specifically includes the following steps:

[0094] S301: Use the backbone network CSPDarknet to extract the basic features of the video frame obtained by the data processing module, that is, use the backbone network to perform multi-layer convolution, pooling, activation and normalization operations on the input image to finally generate a feature map.

[0095] Specifically, first input the image so that I0=I, and then perform the first layer of convolution and activation. The formula is as follows:

[0096] O1=ReLU(W1*I0+b1)

[0097] Next, perform the first layer of pooling, the formula is as follows:

[0098] P1=MaxPool(O1)

[0099] Perform the second layer of convolution and activation, the formula is as follows:

[0100] O2=ReLU(W2*P1+b2)

[0101] Perform the second layer of pooling, the formula is as follows:

[0102] P2=MaxPool(O2)

[0103] After repeated multi-layer convolution, pooling, and activation, high-level features of the input image are generated for subsequent detection tasks.

[0104] S302: Use a feature pyramid network to fuse features of different scales to improve the detection performance of small targets, that is, extract feature maps of multiple levels from the backbone network and fuse these feature maps through top-down paths and lateral links.

[0105] S303: using the detection head to further process the features and generate the final detection results, i.e., the bounding box, the category, and the confidence level;

[0106] S304: Use YOLOv8 to divide the image into S×S grid cells, and each grid cell predicts multiple bounding boxes and the category probability of each bounding box. Each bounding box is represented by the center coordinates, width and height;

[0107] S305: It is also necessary to consider the three-part loss function of YOLOv8: position loss (L box ), confidence loss (L conf ) and class loss (L class ), the total loss is the weighted sum of the three losses; the method is as follows:

[0108] L=L box +λ conf L conf +λ class L class

[0109] Among them, λ conf and λ class is the weight parameter.

[0110] S306: After the above process is completed, a series of bounding boxes and corresponding confidence levels and category probabilities are generated. In order to remove duplicate detection results, a non-maximum suppression method is used. The specific formula is as follows:

[0111]

[0112] For each bounding box A and B, calculate their intersection over union (IoU). If IoU>threshold, retain the bounding box with higher confidence and suppress the bounding box with lower confidence.

[0113] The specific steps of S302 are:

[0114] S3021: Assume that the backbone network outputs feature maps of multiple scales: C2, C3, C4, C5, where C2 is a high-resolution feature map and C5 is a low-resolution feature map;

[0115] S3022: The high-level feature map is gradually upsampled through a top-down path and fused with the low-level feature map to improve the detection performance of small targets. The specific formula is as follows:

[0116] P5=Conv(C5)

[0117] P4=Conv(C4)+UpSample(P5)

[0118] P3=Conv(C3)+UpSample(P4)

[0119] P2=Conv(C2)+UpSample(P3)

[0120] Among them, Conv represents the convolution operation, UpSample represents the upsampling operation, and P i (i=2,...,5) is the fused feature map.

[0121] S3033: Next, the lateral connection fuses the bottom-up feature map with the top-down feature map. The number of channels is adjusted by using 1×1 convolution so that it remains consistent when the feature maps are fused. The formula is as follows:

[0122] P l =Conv1×1(C l )+UpSample(P l+1 )

[0123] Among them, Conv1×1 represents 1×1 convolution, P l Represents the feature map of the lth layer. Through the above steps, we finally get the fused feature maps of multiple scales.

[0124] The use of the target recognition module in S4 specifically includes the following steps:

[0125] S401: First, a Kalman filter is initialized for each detected target to predict the motion state of the target, and the state vector of the Kalman filter includes position and velocity;

[0126]

[0127] Where x, y are the coordinates of the center of the bounding box, s is the area, and r is the aspect ratio. is the speed of these quantities. Use the state transition model to predict the next state of the target. The state transition equation is as follows:

[0128] x k / k-1 =Fx k-1 / k-1 +Bu k +w k

[0129] Among them, F is the state transfer matrix, B is the control matrix, and u k is the control input, w k is the process noise. The observation model is used to link the state vector to the bounding box detected by YOLOv8, and the formula is as follows:

[0130] z k =Hx k +v k

[0131] Where H is the observation matrix, v k is the observation noise.

[0132] S402: extracting feature vectors from the target image region using a ReID deep learning model for target association;

[0133] S403: Use the Hungarian algorithm to associate the target between the detection result of the current frame and the prediction result of the tracker. The construction of the association matrix is ​​based on the Mahalanobis distance and the deep feature distance. The specific feature distance calculation formula is as follows;

[0134]

[0135] Among them, S j is the covariance matrix of the Kalman filter, z i It is the test result.

[0136] Then calculate the feature distance (cosine distance), the formula is as follows:

[0137]

[0138] The total distance is the weighted sum of the Mahalanobis distance and the feature distance, and the formula is as follows:

[0139] d(i,j)=λd mahalanobsi (i,j)+(1-λ)d cosine (f i ,f j )

[0140] Among them, λ is the weight parameter.

[0141] S404: Use the Hungarian algorithm to solve the minimum value in the association matrix and find the optimal detection and tracker match; obtain the association matrix: D = [d(i, j)].

[0142] S405: Finally, in order to improve the accuracy and robustness of multi-target tracking, the state and covariance matrix of the Kalman filter are updated according to the associated results. The state update formula is as follows:

[0143] K k =P k|k-1H T (HP k|k-1 H T +R) -1

[0144] x k|k =x k|k-1 +K k (z k -Hx k|k-1 )

[0145] P k|k =(IK k H)P k|k-1

[0146] Among them, K k is the Kalman gain, P k|k is the updated covariance matrix. At the same time, it is necessary to manage the life cycle of the tracker, that is, initialize new trackers and delete trackers that have not been matched for a long time, and finally output the status of each tracker, including the bounding box and ID.

[0147] The use of the behavior analysis module in S5 specifically includes the following steps:

[0148] S501: Establish a behavior model to identify key behaviors, classify key behaviors, use supervised learning methods to identify normal operation behaviors, and use unsupervised learning methods to detect abnormal behaviors;

[0149] S502: It is necessary to calculate the reconstruction error and perform anomaly scoring to improve the accuracy of behavior analysis.

[0150] The use of the early warning mechanism in S6 specifically includes the following steps:

[0151] S601: Classify the abnormal behaviors obtained by the behavior analysis module and set different alarm levels according to the severity of the behaviors;

[0152] S602: Set different alarm notification methods, such as local alarm, which is to sound and light alarm within the detection range, and remote notification, which notifies relevant personnel through SMS, email or dedicated application.

[0153] By integrating YOLOv8 and DeepSORT algorithms into the monitoring system, a safety early warning system can be realized.

[0154] By identifying abnormal behaviors, the early warning mechanism is triggered and the situation is fed back to the user, thus achieving the purpose of maintaining factory safety.

[0155] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0156] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A security warning method based on YOLOv8 and DeepSORT algorithm, characterized in that: The following steps are involved: S1: Using the data acquisition module, a high-resolution infrared camera is used to capture details; S2: Using the data processing module, the collected video data is denoised, the video data is preprocessed frame by frame, the video is divided into separate frames, and basic preprocessing and size adjustment are performed on each frame; S3: Use the object detection module to perform object detection using the YOLOv8 model, output the bounding box, confidence, and category probability, decode the predicted bounding box coordinates from the feature map space to the original image space, perform non-maximum suppression on the predicted bounding box, and remove duplicate detection results; S4: Using the target recognition module, the DeepSORT algorithm is used to track the targets detected by YOLOv8; S5: Analyze the behavior pattern of the detection target using the behavior analysis module; S6: Utilize the early warning mechanism, taking industrial hazardous chemicals safety as an example, define early warning rules according to industrial safety regulations and actual needs, and trigger an early warning when personnel are detected driving hazardous chemicals or abnormal movement patterns occur.

2. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 1, characterized in that: The use of the data acquisition module in S1 specifically includes the following steps: S101: Uses high-resolution infrared cameras to collect video data of factory areas in real time; S102: Adjust the camera to ensure that it covers all areas that need to be monitored in the factory, and use a bracket to maintain the stability of the camera.

3. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 2, characterized in that: The use of the data processing module in S2 specifically includes the following steps: S201: Use a convolutional neural network (CNN) to denoise the video frame, and adjust the mean square error to minimize the difference between the denoised image and the clean image; S202: Using the trained denoising CNN model to denoise the new image, inputting the new noisy image into the trained denoising CNN model, and outputting the denoised image; S203: using a histogram equalization image processing technique to enhance the contrast of the image, applying histogram equalization to each frame of the video data, converting the image into other color spaces, equalizing the brightness channel, and then converting the color space back; S204: Adjust the size, adjust the size of each frame to ensure uniformity.

4. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 3, characterized in that: The use of the target detection module in S3 specifically includes the following steps: S301: using the backbone network CSPDarknet to extract the basic features of the video frame obtained by the data processing module, that is, using the backbone network to perform multi-layer convolution, pooling, activation and normalization operations on the input image, and finally generating a feature map; S302: Use a feature pyramid network to fuse features of different scales to improve the detection performance of small targets, that is, extract feature maps of multiple levels from the backbone network and fuse these feature maps through top-down paths and lateral links; S303: using the detection head to further process the features and generate the final detection results, i.e., the bounding box, the category, and the confidence level; S304: Use YOLOv8 to divide the image into S×S grid cells, and each grid cell predicts multiple bounding boxes and the category probability of each bounding box. Each bounding box is represented by the center coordinates, width and height; S305: It is also necessary to consider the three-part loss function of YOLOv8: position loss (L box ), confidence loss (L conf ) and class loss (L class ), the total loss is the weighted sum of the three losses; S306: After the above process is completed, a series of bounding boxes and corresponding confidence levels and category probabilities are generated. In order to remove duplicate detection results, the non-maximum suppression method is used to calculate the intersection over union ratio of each pair of bounding boxes A and B. If IoU>threshold, the bounding box with higher confidence level is retained and the bounding box with lower confidence level is suppressed.

5. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 4, characterized in that: The specific steps of S302 are: S3021: Assume that the backbone network outputs feature maps of multiple scales: C2, C3, C4, C5, where C2 is a high-resolution feature map and C5 is a low-resolution feature map; S3022: The high-level feature maps are gradually upsampled through a top-down path and fused with the low-level feature maps to improve the detection performance of small objects; S3033: Next, the lateral connection fuses the bottom-up feature map with the top-down feature map by using 1×1 convolution to adjust the number of channels so that they remain consistent when the feature maps are fused.

6. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 5, characterized in that: The use of the target recognition module in S4 specifically includes the following steps: S401: First, a Kalman filter is initialized for each detected target to predict the motion state of the target, and the state vector of the Kalman filter includes position and velocity; S402: extracting feature vectors from the target image region using a ReID deep learning model for target association; S403: Use the Hungarian algorithm to associate the target between the detection result of the current frame and the prediction result of the tracker. The construction of the association matrix is ​​based on the Mahalanobis distance and the deep feature distance; S404: Use the Hungarian algorithm to solve the minimum value in the correlation matrix and find the optimal detection and tracker match; S405: Finally, in order to improve the accuracy and robustness of multi-target tracking, the state and covariance matrix of the Kalman filter are updated according to the associated results.

7. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 6, characterized in that: The use of the behavior analysis module in S5 specifically includes the following steps: S501: Establish a behavior model to identify key behaviors, classify key behaviors, use supervised learning methods to identify normal operation behaviors, and use unsupervised learning methods to detect abnormal behaviors; S502: It is necessary to calculate the reconstruction error and perform anomaly scoring to improve the accuracy of behavior analysis.

8. A security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 7, characterized in that: The use of the early warning mechanism in S6 specifically includes the following steps: S601: Classify the abnormal behaviors obtained by the behavior analysis module and set different alarm levels according to the severity of the behaviors; S602: Set different alarm notification methods, such as local alarm, which is to sound and light alarm within the detection range, and remote notification, which notifies relevant personnel through SMS, email or dedicated application.

9. The security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 8, characterized in that: By integrating YOLOv8 and DeepSORT algorithms into the monitoring system, a safety early warning system can be realized.

10. The security early warning method based on YOLOv8 and DeepSORT algorithm according to claim 9, characterized in that: By identifying abnormal behaviors, the early warning mechanism is triggered and the situation is fed back to the user, thus achieving the purpose of maintaining factory safety.

Citation Information

Cited By

  • Intelligent garbage recycle bin monitoring method and system based on target tracking

    CN119863761A

  • An intelligent garbage recycling station monitoring method and system based on target tracking

    CN119863761B

  • Garlic seed budding method based on multi-modal learning network

    CN120088698A

  • A garlic seed sprouting method based on multimodal learning network

    CN120088698B