Work clothes detection method, system, equipment and medium in combination with yov8 and target tracking

By combining yolov8 and target tracking, the problem of traditional manual monitoring is solved inefficient and susceptible to human interference in the power industry, and efficient and accurate safety monitoring is achieved.

CN119723039AActive Publication Date: 2025-03-28GUANGZHOU UNIPOWER COMP
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411775720.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Traditional manual monitoring is inefficient in the power industry and is susceptible to human factors, making it difficult to ensure the continuity and accuracy of monitoring.

Method used

The work clothes detection method combining yolov8 and target tracking is adopted. By obtaining surveillance video data for pre-processing, the work clothes target detection is used using the yolov8 algorithm, and the work clothes target detection is continuously tracked in combination with the target tracking algorithm, defect detection marks are generated and alarm instructions are triggered.

Benefits of technology

It improves the efficiency and accuracy of security monitoring, reduces the possibility of false alarms and underreports, and enhances the efficient operation of the system and the timeliness and effectiveness of security monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723039A_ABST
    Figure CN119723039A_ABST
Patent Text Reader

Abstract

The invention discloses a work clothes detection method, system and device in combination with yolov8 and target tracking and a medium, and relates to the technical field of safety detection, and the method comprises the steps: obtaining monitoring video data of a target monitoring area, and carrying out the data preprocessing; in a preset work clothes detection model, carrying out work clothes target detection on the preprocessed monitoring video data to obtain a work clothes detection result; performing target tracking analysis based on the work clothes detection result to obtain a work clothes tracking result of the continuous video stream; a preset work clothes detection model is constructed in combination with a yov8 algorithm and a target tracking algorithm; generating a defect detection mark based on the work clothes detection result, and triggering an alarm instruction; acquiring geographical location information based on the work clothes tracking result, and performing spatial matching analysis based on the geographical location information and the work clothes tracking result to obtain a safety target detection result of the corresponding target monitoring area; the invention provides a deep analysis method combining computer vision and a deep learning technology, and the safety monitoring efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of safety detection technology, and in particular to a work clothes detection method, system, equipment and medium combining yolov8 and target tracking. Background Art

[0002] In the power industry, the importance of safety monitoring is self-evident, as it is directly related to the stable operation of power facilities and the safety of personnel. However, the traditional manual monitoring method is not only inefficient, but also easily interfered by human factors, making it difficult to ensure the continuity and accuracy of monitoring.

[0003] With the development of artificial intelligence technology, how to provide a new security monitoring solution for the power industry through in-depth analysis of video data through technologies such as computer vision and deep learning has always been a technical research direction that has received much attention in the field of power safety. Summary of the invention

[0004] In order to provide a deep analysis method that combines computer vision and deep learning technology and improves safety monitoring efficiency, the present application provides a work clothes detection method, system, equipment and medium that combine yolov8 and target tracking.

[0005] In the first aspect, the invention objective of the present application is achieved by adopting the following technical solutions: A work clothes detection method combining yolov8 and target tracking, comprising: Obtain surveillance video data of the target surveillance area and perform data preprocessing; In the preset work clothes detection model, the pre-processed monitoring video data is subjected to work clothes target detection to obtain the work clothes detection result; based on the work clothes detection result, the target tracking analysis is performed to obtain the work clothes tracking result of the continuous video stream; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; Generate a defect detection mark based on the work clothes detection result and trigger an alarm instruction; The geographical location information is acquired based on the work uniform tracking result, and a spatial matching analysis is performed based on the geographical location information and the work uniform tracking result to obtain a safety target detection result of the corresponding target monitoring area.

[0006] By adopting the above technical solution, monitoring video data is obtained based on computer vision. The preprocessing of monitoring video data includes denoising, normalization and frame extraction, which improves the quality of video data. The work clothes target detection of this application includes people wearing safety helmets and people wearing specific power work clothes. It detects whether the personnel are wearing safety helmets and whether the power workers are wearing specific power work clothes correctly. The work clothes detection model can distinguish between power work clothes and other types of work clothes or ordinary clothing. This classification detection capability is crucial to ensure that workers comply with the dress code regulations of the power industry, and helps to improve the overall safety level of the work site. The yolov8 algorithm is used for work clothes detection. The yolov8 algorithm has high generalization ability and flexibility, and can identify whether the workers are wearing safety helmets and specific work clothes correctly in complex environments such as production workshops in the power industry. At the same time, the high accuracy of the yolov8 algorithm reduces the possibility of false alarms and missed alarms, and improves Reliability and efficiency of detection; combined with the target tracking algorithm, the detected target is continuously tracked, its movement trajectory and state changes are recorded, multiple repeated alarms are effectively avoided, the accuracy and effectiveness of the alarm are improved, and potential safety risks are responded to in a timely manner. Through multi-threading technology and frame skipping technology, the processing speed of target tracking is improved and resource usage is reduced, ensuring the efficient operation of the system; then defect detection marks are generated based on the work clothes defect detection results, and alarm instructions are triggered, so that the system can take immediate action when safety violations are detected, improving the timeliness and effectiveness of safety monitoring; based on the work clothes defect tracking results, geographic location information is obtained, and spatial matching analysis is performed to obtain safety defect target detection results for the corresponding target monitoring area, so that the system can more accurately locate the location of the safety violation, so that the present application provides a deep analysis method that combines computer vision and deep learning technology to improve safety monitoring efficiency.

[0007] In a preferred example of the present application, the acquisition of surveillance video data of the target surveillance area and data preprocessing specifically include: Performing frame processing on the surveillance video data of the target surveillance area to obtain multiple frames of continuous surveillance images to be determined; In the preset work clothes detection model, the pre-processed monitoring video data is subjected to work clothes target detection to obtain the work clothes detection result; based on the work clothes detection result, the target tracking analysis is performed to obtain the work clothes tracking result of the continuous video stream, including: in the preset work clothes detection model, based on the yolov8 algorithm, the work clothes target detection is performed frame by frame on the multiple frames of the monitoring images to be determined, and the initial work clothes detection result of the corresponding continuous multiple frames of monitoring images is obtained; the initial work clothes detection result includes a number of work clothes detection targets; In the preset work clothes detection model, target tracking analysis is performed on several work clothes detection targets based on the target tracking algorithm and the initial attack detection result to obtain the work clothes tracking result of the continuous video stream.

[0008] By adopting the above technical solution, the monitoring video data is frame-processed to ensure the continuity and integrity of the monitoring video data. In the preset work clothes detection model, the work clothes target detection is performed frame by frame on multiple frames of monitoring images to be judged based on the yolov8 algorithm, and the initial work clothes detection results of the corresponding continuous multiple frames of monitoring images are obtained. The yolov8 algorithm has high generalization ability and flexibility, and can accurately identify whether the staff are correctly wearing safety helmets and specific work clothes in various complex environments; at the same time, the high accuracy of the yolov8 algorithm reduces the possibility of false alarms and missed alarms. The target tracking algorithm can continuously track the detected target, record its motion trajectory and state changes, avoid multiple repeated alarms, and improve the accuracy and effectiveness of the alarm.

[0009] In a preferred example of the present application, the acquisition of geographic location information based on the work uniform tracking result, and the spatial matching analysis based on the geographic location information and the work uniform tracking result to obtain the safety target detection result of the corresponding target monitoring area specifically include: Obtaining the geographical location coordinates of the detection device of the monitoring video data, and performing plane coordinate projection transformation on the geographical location coordinates to obtain plane rectangular coordinates; Based on the plane rectangular coordinates, when the monitoring video data is framed, the image coordinates of each frame of the monitoring image are positioned by linear interpolation to obtain frame image positioning information; Determine the geographical location information of the monitoring image of the work clothes tracking result based on the plane rectangular coordinate system and the frame image positioning information; Tracking monitoring is based on the geographic location information of the same work clothes detection target in multiple work clothes tracking results of continuous video streams to obtain the safety target detection results of the corresponding target monitoring area.

[0010] By adopting the above technical solution, the geographic location coordinates of the detection equipment (such as a camera) of the monitoring video data are obtained to obtain accurate geographic location information, which provides a basis for subsequent spatial matching analysis; then the obtained geographic location coordinates are transformed into plane coordinate projection to facilitate subsequent calculations and processing, so as to accurately correspond the geographic information with the location information in the monitoring image, thereby improving the accuracy of the geographic location information; when the monitoring video is framed, each frame of the image is used as an independent processing unit to ensure that each frame of the image can be processed independently, and to facilitate frame extraction detection analysis during subsequent target tracking analysis, which is beneficial to reducing the amount of model calculations; at the same time, the image coordinates of each frame of the monitoring image are positioned based on linear interpolation to obtain frame image positioning information, and the coordinates of unknown points are calculated through known coordinate points to ensure the accuracy of the image coordinates, thereby improving the accuracy of the image coordinate positioning, and based on the plane rectangular coordinate system and the frame image positioning information, the geographic location information of the monitoring image of the work clothes tracking result is determined, and the detection target position in the image is matched with the position in the plane rectangular coordinate system to ensure the accuracy of the spatial matching.

[0011] In a preferred example of the present application, after acquiring the surveillance video data of the target surveillance area and performing data preprocessing, the method further includes: Determine, based on the monitoring video data, a first predicted position of the work clothes detection target when it enters the monitoring area and a second predicted position of the work clothes detection target when it passes through a specific area; Generating a detection target tracking comparison table for comparing and adjusting the work clothes detection target tracking accuracy according to the monitoring video data, the first predicted position and the second predicted position; Obtaining a target position change reference range representing a target position change threshold for work clothes detection, and performing adaptive parameter optimization on the target tracking algorithm according to the target position change reference range and the detection target tracking comparison table; The position information of the first actual work clothes detection target is obtained, and the position information of the first actual work clothes detection target is input into the preset work clothes detection model to adjust the tracking accuracy of the work clothes detection target.

[0012] By adopting the above technical solution, the first predicted position is to predict the position of the target when it enters the monitoring area by analyzing the motion trajectory and target features in the monitoring video data. The second predicted position is to judge the work clothes detection target through the monitoring video data through a specific area, and to predict the position of the target when it passes through the specific area by analyzing the motion trajectory and residence time of the target in the specific area. By accurately predicting the position of the target, it is possible to prepare in advance and improve the efficiency and accuracy of detection and tracking; the detection target tracking comparison table contains the position information and corresponding tracking parameters of the target in different time periods, which provides a reference basis for subsequent tracking accuracy adjustment, ensuring that the system can dynamically adjust the tracking parameters according to actual conditions, improve the tracking accuracy and stability, and the position change threshold is used to determine whether the change in the target position exceeds the normal range. Through adaptive parameter optimization, the tracking parameters are dynamically adjusted according to the actual movement of the detection target to improve the robustness and adaptability of the tracking. At the same time, according to the actual position information and the parameters in the comparison table, the parameters of the tracking algorithm are dynamically adjusted to ensure that the tracking accuracy is always in the optimal state.

[0013] In a preferred example of the present application: the monitoring video data includes the camera type, the camera installation height, the distance between the camera and the monitoring area, and the width and height of the monitoring area; Determining, according to the monitoring video data, a first predicted position of a work clothes detection target when it enters a monitoring area and a second predicted position of a work clothes detection target when it passes through a specific area specifically includes: Obtain parameter information of the work clothes detection model, the parameter information including the detection accuracy of the yolov8 algorithm, the tracking accuracy of the target tracking algorithm, and the minimum size and maximum size of the work clothes detection target; Determine a first predicted position of the work clothes detection target when it enters the monitoring area according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target; The second predicted position of the work clothes detection target when passing through a specific area is determined according to the camera type, the width and height of the monitoring area, the maximum size of the work clothes detection target and the tracking accuracy of the target tracking algorithm.

[0014] By adopting the above technical solution, detailed environmental parameters are obtained based on the physical settings or configuration parameters of the camera, providing accurate environmental parameters for subsequent position prediction. Detailed work clothes detection model parameter information provides detailed information on the algorithm and target features for the predicted position, thereby improving the accuracy of position prediction. Through precise geometric calculations and target feature analysis, the system can accurately predict the position of the work clothes detection target when it enters the monitoring area, thereby improving the timeliness and accuracy of detection. By comprehensively considering the camera type, monitoring area size, target features and tracking accuracy, the system can accurately predict the position of the work clothes detection target when it passes through a specific area, thereby improving the accuracy and reliability of tracking.

[0015] In a preferred example of the present application: the generating of a detection target tracking comparison table for comparing and adjusting the tracking accuracy of the work clothes detection target according to the monitoring video data, the first predicted position and the second predicted position specifically includes: obtaining the predicted trajectory length of the work clothes detection target according to the width and height of the monitoring area, the first predicted position and the second predicted position; According to the detection accuracy of the yolov8 algorithm and the tracking accuracy of the target tracking algorithm, the predicted detection time and the predicted tracking time of the work clothes detection target are obtained; Acquire a predicted tracking speed of the work clothes detection target according to the predicted trajectory length of the work clothes detection target, the predicted detection time, and the predicted tracking time; Calculating a displacement distance between the first predicted position and the second predicted position to obtain a predicted displacement ratio for predicting an actual displacement distance; Calculate the detection and tracking time difference between the predicted detection time and the predicted tracking time, and calculate the tracking speed difference between the predicted tracking speed and the actual tracking speed of the work clothes detection target; According to the detection tracking time difference and the tracking speed difference, a predicted tracking time correspondence relationship for determining an actual tracking speed of a work clothes detection target is obtained; According to the predicted displacement ratio and the predicted tracking speed-time correspondence, a detection target tracking comparison table for comparing and adjusting the tracking accuracy of the work clothes detection target is generated.

[0016] By adopting the above technical scheme, a work clothes detection method combining computer vision and deep learning technology is provided, which can accurately predict and track the work clothes detection target, improve the efficiency and reliability of safety monitoring, and can geometrically calculate and accurately obtain the predicted trajectory length of the work clothes detection target to provide basic data for subsequent tracking accuracy adjustment. Through experimental data and model parameters, the detection time of the yolov8 algorithm and the tracking time of the target tracking algorithm can be accurately calculated to improve the prediction accuracy and stability, and through the time-distance relationship, the predicted tracking speed of the target can be accurately calculated; through geometric calculation, the system can accurately calculate the displacement ratio of the target; through the calculation of time difference and speed difference, the system can better adjust the tracking parameters and improve the tracking accuracy and stability. Through the relationship between time difference and speed difference, the system can establish a corresponding relationship between the predicted tracking time and the actual tracking time, and improve the tracking accuracy and real-time performance.

[0017] In a preferred example of the present application: before determining the first predicted position of the work clothes detection target when it enters the monitoring area according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, the method further includes: Obtaining a camera adjustment angle, and determining the recognition accuracy of the work clothes detection target according to the camera installation height and the camera adjustment angle; Obtaining a first coefficient for adjusting a first predicted position according to the recognition accuracy of the work clothes detection target; The determining, according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, of a first predicted position when the work clothes detection target enters the monitoring area specifically includes: The first predicted position of the work clothes detection target entering the monitoring area is determined according to the first coefficient, the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target.

[0018] By adopting the above technical scheme, the recognition accuracy of the work clothes detection target is judged according to the camera installation height and the camera adjustment angle. Through geometric calculation and experimental data, the influence of the camera adjustment angle on the recognition accuracy is analyzed to more accurately evaluate the recognition accuracy of the work clothes detection target and improve the detection accuracy. By obtaining the first coefficient, the system can dynamically adjust the first predicted position according to the recognition accuracy. By comprehensively considering the camera adjustment angle, recognition accuracy and target characteristics, the system can more accurately predict the position of the work clothes detection target when it enters the monitoring area.

[0019] In the second aspect, the invention objective of the present application is achieved by adopting the following technical solutions: A work clothes detection system combining yolov8 and target tracking is applied to a work clothes detection method combining yolov8 and target tracking as described above, and the system comprises: A data acquisition module is used to acquire surveillance video data of the target surveillance area and perform data preprocessing; A work clothes detection module is used to perform work clothes target detection on the preprocessed monitoring video data in a preset work clothes detection model to obtain a work clothes detection result; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; A target tracking module, used for performing target tracking analysis based on the work clothes detection result to obtain the work clothes tracking result of the continuous video stream; A defect detection module, used to generate a defect detection mark based on the work clothes detection result and trigger an alarm instruction; The geographic location module is used to obtain geographic location information based on the work uniform tracking result, perform spatial matching analysis based on the geographic location information and the work uniform tracking result, and obtain the safety target detection result of the corresponding target monitoring area.

[0020] In the third aspect, the invention objective of the present application is achieved by adopting the following technical solutions: A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned work clothes detection method combining yolov8 and target tracking are implemented.

[0021] In a fourth aspect, the invention objective of the present application is achieved by adopting the following technical solutions: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned work clothes detection method combining yolov8 and target tracking are implemented.

[0022] In summary, the present application includes at least one of the following beneficial technical effects: 1. Use the yolov8 algorithm to detect work clothes. The yolov8 algorithm has high generalization ability and flexibility. It can identify whether the workers are wearing safety helmets and specific work clothes correctly in complex environments such as production workshops in the power industry. At the same time, the high accuracy of the yolov8 algorithm reduces the possibility of false alarms and missed alarms, and improves the reliability and efficiency of detection; combined with the target tracking algorithm, the detected target is continuously tracked, and its motion trajectory and state changes are recorded, which effectively avoids multiple repeated alarms, improves the accuracy and effectiveness of the alarm, and responds to potential safety risks in a timely manner. Through multi-threading technology and frame skipping technology, the processing speed of target tracking is improved and resource occupation is reduced, ensuring the efficient operation of the system; then, based on the work clothes defect detection results, a defect detection mark is generated, and an alarm instruction is triggered, so that the system can take immediate action when a safety violation is detected, which improves the timeliness and effectiveness of safety monitoring; based on the work clothes defect tracking results, the geographic location information is obtained, and spatial matching analysis is performed to obtain the safety defect target detection results of the corresponding target monitoring area, so that the system can more accurately locate the location of the safety violation, so that the present application provides a deep analysis method combining computer vision and deep learning technology to improve the efficiency of safety monitoring; 2. A work clothes detection method combining computer vision and deep learning technology is provided, which can accurately predict and track the work clothes detection target, improve the efficiency and reliability of safety monitoring, and can geometrically calculate and accurately obtain the predicted trajectory length of the work clothes detection target to provide basic data for subsequent tracking accuracy adjustment. Through experimental data and model parameters, the detection time of the yolov8 algorithm and the tracking time of the target tracking algorithm can be accurately calculated to improve the prediction accuracy and stability, and through the time-distance relationship, the predicted tracking speed of the target can be accurately calculated; through geometric calculation, the system can accurately calculate the displacement ratio of the target; through the calculation of time difference and speed difference, the system can better adjust the tracking parameters and improve the tracking accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of a work clothes detection method combining yolov8 and target tracking in one embodiment of the present application; Figure 2 It is a flowchart of step S4 in a work clothes detection method combining yolov8 and target tracking in one embodiment of the present application; Figure 3 It is a schematic diagram of a device in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The present application is further described in detail below in conjunction with the accompanying drawings.

[0025] In one embodiment, if Figure 1As shown, the present application discloses a work clothes detection method combining yolov8 and target tracking, which specifically includes the following steps: S1: Obtain surveillance video data of the target surveillance area and perform data preprocessing.

[0026] In this embodiment, the target monitoring area refers to a specific area where work clothes inspection is required, such as a power construction site; data preprocessing includes operations such as denoising, normalization, and resolution adjustment of the monitoring video data.

[0027] S2: In the preset work clothes detection model, work clothes target detection is performed on the preprocessed surveillance video data to obtain the work clothes detection results; target tracking analysis is performed based on the work clothes detection results to obtain the work clothes tracking results of the continuous video stream; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm.

[0028] In this embodiment, the work clothes detection model is a model that combines the yolov8 algorithm and the target tracking algorithm, and is used to detect and track work clothes targets; work clothes target detection refers to the use of the yolov8 algorithm to perform work clothes target detection on the pre-processed monitoring video data, and identify people wearing safety helmets and specific electrical work clothes; the work clothes tracking result refers to the monitoring video data based on the specified frame extraction frequency, after frame processing, used to continuously track the detected target, and record the tracking data set of the target's application trajectory and state changes.

[0029] Specifically, the yolov8 algorithm is used to perform work clothes target detection on the preprocessed surveillance video data, identify people wearing safety helmets and specific electrical work clothes, and obtain work clothes detection results; the target tracking algorithm is used to continuously track the detected target, record the target's motion trajectory and state changes, and obtain work clothes tracking results.

[0030] S3: Generate defect detection marks based on the work clothes inspection results and trigger alarm instructions.

[0031] In this embodiment, the defect detection mark refers to the mark information generated when a person is detected who does not wear work clothes as required, and the alarm instruction refers to the warning notification sent by the system when a violation of work clothes is detected.

[0032] Specifically, when a person is detected who is not wearing work clothes as required, a defect detection mark is generated, including the time, location and type of work clothes violation, and the marked image is saved as evidence for subsequent on-site monitoring, record archiving and analysis. An alarm notification is sent to the management personnel through sound, light or network messages, and the alarm information and marked images are uploaded to the server to achieve information sharing and remote monitoring.

[0033] S4: Obtain geographic location information based on the work uniform tracking results, perform spatial matching analysis based on the geographic location information and the work uniform tracking results, and obtain safety target detection results for the corresponding target monitoring area.

[0034] In this embodiment, the geographic location information refers to the geographic location coordinates of the detection device (such as a camera) of the monitoring video data corresponding to the work clothes tracking results; spatial matching analysis refers to matching and analyzing the geographic location information with the work clothes tracking results to determine the actual location of the target.

[0035] Specifically, when the monitoring video data is framed, the linear interpolation method is used to locate the image coordinates of each frame of the monitoring image to obtain the frame image positioning information. Based on the plane rectangular coordinate system and the frame image positioning information, the geographic location information of the monitoring image of the work clothes tracking result is determined. The tracking and monitoring is based on the geographic location information of the same work clothes detection target in multiple work clothes tracking results in the continuous video stream to obtain the safety target detection result of the corresponding target monitoring area.

[0036] In one embodiment, in step S1, the surveillance video data of the target surveillance area is acquired and data preprocessing is performed, specifically including: S11: Perform frame processing on the surveillance video data of the target surveillance area to obtain multiple frames of continuous surveillance images to be determined.

[0037] In this embodiment, a video processing library (such as OpenCV) is used to segment the video data into multiple frame images.

[0038] In this embodiment, in step S2, in a preset work clothes detection model, work clothes target detection is performed on the preprocessed monitoring video data to obtain a work clothes detection result; target tracking analysis is performed based on the work clothes detection result to obtain a work clothes tracking result of a continuous video stream, including: S21: In the preset work clothes detection model, work clothes target detection is performed frame by frame on multiple frames of surveillance images to be judged based on the yolov8 algorithm to obtain initial work clothes detection results of the corresponding continuous multiple frames of surveillance images; the initial work clothes detection results include several work clothes detection targets.

[0039] Specifically, use the work clothes detection model, load the pre-trained weight file, perform target detection on each frame of the image, and output the detection box and category label.

[0040] S22: In a preset work clothes detection model, target tracking analysis is performed on several work clothes detection targets based on a target tracking algorithm and an initial attack detection result to obtain a work clothes tracking result of a continuous video stream.

[0041] In this embodiment, a target tracking algorithm (such as a Kalman filter or an optical flow method) is used to track and analyze several work clothes detection targets in the initial work clothes detection results, and the motion trajectory of each detection target is recorded, including position, speed and direction.

[0042] In one embodiment, if Figure 2 As shown, in step S4, the geographic location information is obtained based on the work uniform tracking result, and a spatial matching analysis is performed based on the geographic location information and the work uniform tracking result to obtain the safety target detection result of the corresponding target monitoring area, which specifically includes: S41: Obtain the geographical location coordinates of the detection device of the monitoring video data, and perform plane coordinate projection transformation on the geographical location coordinates to obtain plane rectangular coordinates.

[0043] Specifically, plane coordinate projection conversion refers to converting geographic coordinates (longitude and latitude) into coordinates in a plane rectangular coordinate system; the longitude and latitude coordinates of the camera are obtained through a built-in GPS module of the camera or other external positioning devices.

[0044] S42: Based on the plane rectangular coordinates, when performing frame processing on the monitoring video data, a linear interpolation method is used to locate the image coordinates of each frame of the monitoring image to obtain frame image positioning information.

[0045] Specifically, the framed image positioning information refers to the location information of the target in each frame of the image, and a map projection algorithm (such as UTM projection or Mercator projection) is used to convert the latitude and longitude coordinates into plane rectangular coordinates.

[0046] S43: Determine the geographic location information of the monitoring image of the work clothes tracking result based on the plane rectangular coordinate system and the frame image positioning information.

[0047] In this embodiment, the target position information in each frame of image is matched with the position information in the plane rectangular coordinate system to determine the actual geographical location of the target, and the geographical location information of each target at different time points is recorded.

[0048] S44: Tracking and monitoring is based on the geographic location information of the same work clothes detection target in multiple work clothes tracking results of the continuous video stream, and obtains the safety target detection result of the corresponding target monitoring area.

[0049] In this embodiment, tracking and monitoring is based on multiple work clothes tracking results of the same work clothes detection target in a continuous video stream, recording the target's movement trajectory, judging whether the target is in a safe area based on the target's geographic location information and movement trajectory, and generating a safe target detection result. If it is detected that the target has left the safe area or there are other safety hazards, an alarm notification is triggered.

[0050] In one embodiment, after step S1, the work clothes detection method combining yolov8 and target tracking further includes: S101: Determine, based on monitoring video data, a first predicted position of a work clothes detection target when it enters a monitoring area and a second predicted position of the work clothes detection target when it passes through a specific area.

[0051] In this embodiment, the monitoring video data includes the camera type, the camera installation height, the distance between the camera and the monitoring area, and the width and height of the monitoring area.

[0052] Specifically, the detection accuracy of the yolov8 algorithm, the tracking accuracy of the target tracking algorithm, and the minimum and maximum sizes of the work clothes detection target are obtained from the model training and experimental data. Using geometric calculation and target feature analysis, the position of the target when it enters the monitoring area is calculated according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, and the first predicted position is obtained. The camera type, the width and height of the monitoring area, the maximum size of the work clothes detection target and the tracking accuracy of the target tracking algorithm are used to calculate the position of the target when it passes through a specific area to obtain the second predicted position.

[0053] In this embodiment, judging the first predicted position of the work clothes detection target when it enters the monitoring area and the second predicted position of the work clothes detection target when it passes through the specific area according to the monitoring video data specifically includes: S1011: Obtain parameter information of the work clothes detection model, the parameter information includes the detection accuracy of the yolov8 algorithm, the tracking accuracy of the target tracking algorithm, and the minimum size and maximum size of the work clothes detection target.

[0054] S1012: Determine a first predicted position of the work clothes detection target when it enters the monitoring area according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target.

[0055] In this embodiment, the distance between the camera and the monitoring area refers to the straight-line distance between the camera and the center point of the monitoring area, and the minimum size of the work clothes detection target refers to the minimum visible size of the work clothes detection target in the image.

[0056] Example: The horizontal position of the target when it enters the monitoring area (the first predicted position at this time) is equal to the distance between the camera and the monitoring area multiplied by the minimum size of the work clothes detection target, and then divided by the camera installation height.

[0057] S1013: Determine a second predicted position of the work clothes detection target when it passes through a specific area according to the camera type, the width and height of the monitoring area, the maximum size of the work clothes detection target, and the tracking accuracy of the target tracking algorithm.

[0058] In this embodiment, the width and height of the monitoring area refer to the horizontal and vertical dimensions of the monitoring area; the maximum size of the work clothes detection target refers to the maximum visible size of the work clothes detection target in the image; and the tracking accuracy of the target tracking algorithm refers to the accuracy of the target tracking algorithm when tracking the work clothes target.

[0059] Example: The horizontal position of the target when it passes through a specific area (the second predicted position at this time) is equal to the width of the monitoring area multiplied by the maximum size of the work clothes detection target, divided by the tracking accuracy of the target tracking algorithm.

[0060] S102: Generate a detection target tracking comparison table for comparing and adjusting the work clothes detection target tracking accuracy according to the monitoring video data, the first predicted position and the second predicted position.

[0061] In this embodiment, a detection target tracking comparison table for comparing and adjusting the work clothes detection target tracking accuracy is generated according to the monitoring video data, the first predicted position and the second predicted position, specifically including: S1021: Obtain the predicted trajectory length of the work clothes detection target according to the width and height of the monitoring area, the first predicted position and the second predicted position.

[0062] Example: Predicted trajectory length for work clothes detection target (x1, y1) and (x2, y2) are the coordinates of the first predicted position and the second predicted position respectively. S1022: According to the detection accuracy of the yolov8 algorithm and the tracking accuracy of the target tracking algorithm, the predicted detection time and the predicted tracking time of the work clothes detection target are obtained.

[0063] In this embodiment, the predicted detection time and the predicted tracking time refer to the detection time of the yolov8 algorithm and the tracking time of the target tracking algorithm, respectively.

[0064] S1023: Obtain a predicted tracking speed of the work clothes detection target according to the predicted trajectory length, the predicted detection time, and the predicted tracking time of the work clothes detection target.

[0065] In this embodiment, the predicted tracking speed refers to the estimated moving speed of the work clothes detection target.

[0066] S1024: Calculate the displacement distance between the first predicted position and the second predicted position to obtain a predicted displacement ratio for predicting the actual displacement distance.

[0067] In this embodiment, the predicted displacement ratio refers to the displacement distance ratio between the first predicted position and the second predicted position.

[0068] S1025: Calculate the detection and tracking time difference between the predicted detection time and the predicted tracking time, and calculate the tracking speed difference between the predicted tracking speed and the actual tracking speed of the work clothes detection target.

[0069] In this embodiment, the detection tracking time difference and the tracking speed difference refer to the difference between the predicted detection time and the actual detection time, and the difference between the predicted tracking speed and the actual tracking speed, respectively.

[0070] S1026: Obtaining a predicted tracking time correspondence for determining an actual tracking speed of the work clothes detection target according to the detection tracking time difference and the tracking speed difference.

[0071] In this embodiment, based on the detection tracking time difference and the tracking speed difference, the predicted tracking time correspondence for judging the actual tracking speed of the work clothes detection target is obtained. In actual application, a linear regression or neural network model can be used to establish the relationship between the time difference and the speed difference based on historical data.

[0072] S1027: Generate a detection target tracking comparison table for comparing and adjusting the tracking accuracy of the work clothes detection target according to the corresponding relationship between the predicted displacement ratio and the predicted tracking speed time.

[0073] Specifically, according to the corresponding relationship between the predicted displacement ratio and the predicted tracking speed time, a comparison table is generated to record the predicted and actual data under different situations, so as to adjust the parameters of the tracking algorithm later.

[0074] S103: Obtain a target position change reference range representing a target position change threshold for work clothes detection, and perform adaptive parameter optimization on a target tracking algorithm according to the target position change reference range and a detection target tracking comparison table.

[0075] Specifically, the reference range of target position change refers to the reasonable range of target position change determined through experimental data and historical records; according to the reference range of target position change and the data in the comparison table, the parameters of the tracking algorithm are dynamically adjusted, such as the tracking window size, search range, update frequency, etc.

[0076] S104: Acquire position information of a first actual work clothes detection target, and input the position information of the first actual work clothes detection target into a preset work clothes detection model to adjust the tracking accuracy of the work clothes detection target.

[0077] Specifically, through real-time monitoring and target tracking algorithms, the precise location information of the current work clothes detection target is obtained; the location information of the first actual work clothes detection target is input into the preset work clothes detection model, and the parameters of the tracking algorithm are dynamically adjusted according to the actual location information and the parameters in the comparison table to ensure that the tracking accuracy is always in the optimal state.

[0078] In one embodiment, before step S1, the work clothes detection method combining yolov8 and target tracking further includes: S10: Obtain the camera adjustment angle, and determine the recognition accuracy of the work clothes detection target according to the camera installation height and the camera adjustment angle.

[0079] In this embodiment, the camera adjustment angle refers to the angle of the camera relative to the horizontal plane; the camera adjustment angle is read from the configuration file or metadata of the camera. The recognition accuracy refers to the camera's ability to recognize the work clothes detection target at a specific angle.

[0080] Specifically, the effective recognition area within the camera field of view is calculated based on the camera installation height and the camera adjustment angle, and the recognition accuracy at different adjustment angles is verified through experimental data and historical records.

[0081] S20: Obtaining a first coefficient for adjusting the first predicted position according to the recognition accuracy of the work clothes detection target.

[0082] Specifically, the first coefficient is calculated according to the recognition accuracy. The higher the recognition accuracy, the closer the first coefficient is to 1; the lower the recognition accuracy, the larger the first coefficient is, so as to compensate for the recognition error.

[0083] In this embodiment, according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, the first predicted position when the work clothes detection target enters the monitoring area is determined, specifically including: S100: Determine a first predicted position of the work clothes detection target entering the monitoring area according to the first coefficient, the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target.

[0084] Specifically, the prediction position is adjusted according to the first coefficient to improve the accuracy of the prediction.

[0085] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0086] In one embodiment, a work clothes detection system combining yolov8 and target tracking is provided, and the work clothes detection system combining yolov8 and target tracking corresponds to a work clothes detection method combining yolov8 and target tracking in the above-mentioned embodiment.

[0087] A work clothes detection system combining yolov8 and target tracking includes modules a, b, c and d. The detailed description of each functional module is as follows: A data acquisition module is used to acquire surveillance video data of the target surveillance area and perform data preprocessing; The work clothes detection module is used to perform work clothes target detection on the pre-processed monitoring video data in the preset work clothes detection model to obtain the work clothes detection results; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; The target tracking module is used to perform target tracking analysis based on the work clothes detection results to obtain the work clothes tracking results of the continuous video stream; the defect detection module is used to generate defect detection marks based on the work clothes detection results and trigger alarm instructions; The geographic location module is used to obtain geographic location information based on the work uniform tracking results, perform spatial matching analysis based on the geographic location information and the work uniform tracking results, and obtain the safety target detection results of the corresponding target monitoring area.

[0088] For the specific limitations of the work clothes detection system combined with yolov8 and target tracking, please refer to the limitations of the work clothes detection method combined with yolov8 and target tracking in the above text, which will not be repeated here; each module in the above-mentioned work clothes detection system combined with yolov8 and target tracking can be implemented in whole or in part by software, hardware and a combination thereof; each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0089] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store monitoring video data and work clothes detection models, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a work clothes detection method combining yolov8 and target tracking is implemented.

[0090] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1: Acquire surveillance video data of the target surveillance area and perform data preprocessing; S2: In the preset work clothes detection model, the pre-processed surveillance video data is subjected to work clothes target detection to obtain the work clothes detection result; based on the work clothes detection result, the target tracking analysis is performed to obtain the work clothes tracking result of the continuous video stream; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; S3: Generate defect detection marks based on the work clothes inspection results and trigger alarm instructions; S4: Obtain geographic location information based on the work uniform tracking results, perform spatial matching analysis based on the geographic location information and the work uniform tracking results, and obtain safety target detection results for the corresponding target monitoring area.

[0091] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: S1: Acquire surveillance video data of the target surveillance area and perform data preprocessing; S2: In the preset work clothes detection model, the pre-processed surveillance video data is subjected to work clothes target detection to obtain the work clothes detection result; based on the work clothes detection result, the target tracking analysis is performed to obtain the work clothes tracking result of the continuous video stream; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; S3: Generate defect detection marks based on the work clothes inspection results and trigger alarm instructions; S4: Obtain geographic location information based on the work uniform tracking results, perform spatial matching analysis based on the geographic location information and the work uniform tracking results, and obtain safety target detection results for the corresponding target monitoring area.

[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0093] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0094] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the features thereof may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A work clothes detection method combining yolov8 and target tracking, characterized in that: include: Obtain surveillance video data of the target surveillance area and perform data preprocessing; In the preset work clothes detection model, the work clothes target detection is performed on the pre-processed monitoring video data to obtain the work clothes detection result; Performing target tracking analysis based on the work clothes detection results to obtain work clothes tracking results of continuous video streams; The preset work clothes detection model is constructed by combining the yolov8 algorithm and the target tracking algorithm; Generate a defect detection mark based on the work clothes detection result and trigger an alarm instruction; The geographical location information is acquired based on the work uniform tracking result, and a spatial matching analysis is performed based on the geographical location information and the work uniform tracking result to obtain a safety target detection result of the corresponding target monitoring area.

2. A work clothes detection method combining yolov8 and target tracking according to claim 1, characterized in that: The obtaining of surveillance video data of the target surveillance area and performing data preprocessing specifically includes: Performing frame processing on the surveillance video data of the target surveillance area to obtain multiple frames of continuous surveillance images to be determined; In the preset work clothes detection model, work clothes target detection is performed on the pre-processed monitoring video data to obtain a work clothes detection result; target tracking analysis is performed based on the work clothes detection result to obtain a work clothes tracking result of a continuous video stream, including: In the preset work clothes detection model, work clothes target detection is performed frame by frame on multiple frames of the monitoring images to be determined based on the yolov8 algorithm to obtain the initial work clothes detection results of the corresponding continuous multiple frames of monitoring images; the initial work clothes detection results include several work clothes detection targets; In the preset work clothes detection model, target tracking analysis is performed on several work clothes detection targets based on the target tracking algorithm and the initial attack detection result to obtain the work clothes tracking result of the continuous video stream.

3. A work clothes detection method combining yolov8 and target tracking according to claim 2, characterized in that: The acquiring of geographic location information based on the work uniform tracking result, and performing spatial matching analysis based on the geographic location information and the work uniform tracking result to obtain a safety target detection result corresponding to the target monitoring area specifically includes: Obtaining the geographical location coordinates of the detection device of the monitoring video data, and performing plane coordinate projection transformation on the geographical location coordinates to obtain plane rectangular coordinates; Based on the plane rectangular coordinates, when the monitoring video data is framed, the image coordinates of each frame of the monitoring image are positioned by linear interpolation to obtain frame image positioning information; Determine the geographical location information of the monitoring image of the work clothes tracking result based on the plane rectangular coordinate system and the frame image positioning information; Tracking monitoring is based on the geographic location information of the same work clothes detection target in multiple work clothes tracking results of continuous video streams to obtain the safety target detection results of the corresponding target monitoring area.

4. A work clothes detection method combining yolov8 and target tracking according to claim 1, characterized in that: After acquiring the surveillance video data of the target surveillance area and performing data preprocessing, the method further includes: Determine, based on the monitoring video data, a first predicted position of the work clothes detection target when it enters the monitoring area and a second predicted position of the work clothes detection target when it passes through a specific area; Generating a detection target tracking comparison table for comparing and adjusting the work clothes detection target tracking accuracy according to the monitoring video data, the first predicted position and the second predicted position; Obtaining a target position change reference range representing a target position change threshold for work clothes detection, and performing adaptive parameter optimization on the target tracking algorithm according to the target position change reference range and the detection target tracking comparison table; The position information of the first actual work clothes detection target is obtained, and the position information of the first actual work clothes detection target is input into the preset work clothes detection model to adjust the tracking accuracy of the work clothes detection target.

5. A work clothes detection method combining yolov8 and target tracking according to claim 4, characterized in that: The monitoring video data includes the camera type, the camera installation height, the distance between the camera and the monitoring area, and the width and height of the monitoring area; Determining, according to the monitoring video data, a first predicted position of a work clothes detection target when it enters a monitoring area and a second predicted position of a work clothes detection target when it passes through a specific area specifically includes: Obtain parameter information of the work clothes detection model, the parameter information including the detection accuracy of the yolov8 algorithm, the tracking accuracy of the target tracking algorithm, and the minimum size and maximum size of the work clothes detection target; Determine a first predicted position of the work clothes detection target when it enters the monitoring area according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target; The second predicted position of the work clothes detection target when passing through a specific area is determined according to the camera type, the width and height of the monitoring area, the maximum size of the work clothes detection target and the tracking accuracy of the target tracking algorithm.

6. A work clothes detection method combining yolov8 and target tracking according to claim 4, characterized in that: The generating, according to the monitoring video data, the first predicted position and the second predicted position, a detection target tracking comparison table for comparing and adjusting the work clothes detection target tracking accuracy specifically includes: According to the width and height of the monitoring area, the first predicted position and the second predicted position, obtaining the predicted trajectory length of the work clothes detection target; According to the detection accuracy of the yolov8 algorithm and the tracking accuracy of the target tracking algorithm, the predicted detection time and the predicted tracking time of the work clothes detection target are obtained; Acquire a predicted tracking speed of the work clothes detection target according to the predicted trajectory length of the work clothes detection target, the predicted detection time, and the predicted tracking time; Calculating a displacement distance between the first predicted position and the second predicted position to obtain a predicted displacement ratio for predicting an actual displacement distance; Calculate the detection and tracking time difference between the predicted detection time and the predicted tracking time, and calculate the tracking speed difference between the predicted tracking speed and the actual tracking speed of the work clothes detection target; According to the detection tracking time difference and the tracking speed difference, a predicted tracking time correspondence relationship for determining an actual tracking speed of a work clothes detection target is obtained; According to the predicted displacement ratio and the predicted tracking speed-time correspondence, a detection target tracking comparison table for comparing and adjusting the tracking accuracy of the work clothes detection target is generated.

7. A work clothes detection method combining yolov8 and target tracking according to claim 5, characterized in that: Before determining the first predicted position of the work clothes detection target when it enters the monitoring area according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, the method further includes: Obtaining a camera adjustment angle, and determining the recognition accuracy of the work clothes detection target according to the camera installation height and the camera adjustment angle; Obtaining a first coefficient for adjusting a first predicted position according to the recognition accuracy of the work clothes detection target; The determining, according to the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target, of a first predicted position when the work clothes detection target enters the monitoring area specifically includes: The first predicted position of the work clothes detection target entering the monitoring area is determined according to the first coefficient, the camera installation height, the distance between the camera and the monitoring area, and the minimum size of the work clothes detection target.

8. A work clothes detection system combining yolov8 and target tracking, characterized in that: Applied to a work clothes detection method combining yolov8 and target tracking as described in any one of claims 1 to 7, the system comprises: A data acquisition module is used to acquire surveillance video data of the target surveillance area and perform data preprocessing; A work clothes detection module is used to perform work clothes target detection on the preprocessed monitoring video data in a preset work clothes detection model to obtain a work clothes detection result; the preset work clothes detection model is constructed in combination with the yolov8 algorithm and the target tracking algorithm; A target tracking module, used for performing target tracking analysis based on the work clothes detection result to obtain the work clothes tracking result of the continuous video stream; A defect detection module, used to generate a defect detection mark based on the work clothes detection result and trigger an alarm instruction; The geographic location module is used to obtain geographic location information based on the work uniform tracking result, perform spatial matching analysis based on the geographic location information and the work uniform tracking result, and obtain the safety target detection result of the corresponding target monitoring area.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a work clothes detection method combining yolov8 and target tracking as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a work clothes detection method combining yolov8 and target tracking as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Constructor safety helmet wearing condition real-time detection method

    CN110210345A

  • Multi-camera cooperative target tracking method based on deep learning

    CN111754552A

  • Work clothes wearing identification method and system

    CN114898400A

  • Human body work clothes identification method

    CN116935433A

  • Target detection tracking method and device and storage medium

    CN117455953A