Method and device for detecting state of trench personnel

By using YOLOv8 identification network and BoT-SORT target tracking technology in the trench environment, the limitations of personnel status detection in the trench environment in the prior art are solved, high-precision and high-real-time detection are achieved, and the safety and efficiency of trench operations are improved.

CN119851339APending Publication Date: 2025-04-18SHENHUA RAIL & FREIGHT WAGONS TRANSPORT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411787731.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art has limitations in detecting abnormalities in personnel status in trench environments, especially the camera angle limitation and high-precision neural network requirements are difficult to meet, resulting in insufficient detection accuracy and real-time performance, and it is difficult to detect and deal with abnormal situations in a timely manner.

Method used

The YOLOv8 recognition network is used to train and detect gutter images, and personnel tracking is carried out in combination with BoT-SORT target tracking technology. Through the analysis of the movement status and rest time of the personnel, it is determined whether there are abnormal personnel status situations.

Benefits of technology

It improves the accuracy and real-time detection of personnel in the trench, can promptly detect and deal with abnormal situations, and improves the safety and efficiency of trench operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851339A_ABST
    Figure CN119851339A_ABST
Patent Text Reader

Abstract

The invention provides a trench personnel state detection method and device. The method comprises the following steps: acquiring historical trench image data; the historical trench image data comprises a historical trench image and an image label thereof; based on the historical trench image and the image tag, training the constructed YOLOv8 identification network to obtain a target YOLOv8 identification network; inputting an on-site trench image collected in real time into the target YOLOv8 identification network to obtain a personnel detection result; performing personnel tracking based on the personnel detection result, and determining the motion state of the personnel; and when the motion state is a static state, determining whether a personnel state abnormal condition exists or not according to the static duration. The accuracy and the real-time performance of personnel detection are improved, abnormal conditions can be found and processed in time, and the safety and the efficiency of trench operation are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a method and device for detecting the status of a trench worker. Background Art

[0002] As a semi-enclosed environment, it is difficult for outsiders to monitor the working status inside the trench in real time when there is a shield above the trench. In order to ensure the safety of people in the trench, we consider installing security cameras inside the trench and using machine vision and deep learning technology for real-time monitoring to detect and warn of abnormal conditions of people (such as falling and fainting) in time.

[0003] At present, the abnormal state of personnel in the trench mainly depends on the judgment of their colleagues working at the same time. However, this method has certain limitations. For example, if the judgment is not timely or forgotten, it may cause personnel to faint during work and cannot be discovered in time, which may lead to major safety accidents.

[0004] To address this problem, existing solutions attempt to identify falls through the "aspect ratio of the person detection frame" in visual detection. However, this method requires the camera to be facing the person, which has strict restrictions on the camera angle and is difficult to apply to shooting environments with different angles.

[0005] Another solution is to directly use neural networks for classification and train neural networks to distinguish between falling and standing states. Although this method is feasible in theory, it requires high-precision neural networks and high-quality data sets. In practical applications, only small data sets are available, and the final detection results must meet the accuracy standards. Therefore, this solution is difficult to deploy directly in actual production environments.

[0006] In summary, the current detection scheme has many limitations in its application in the trench environment and needs further improvement and optimization. Summary of the invention

[0007] The present invention provides a method and device for detecting the status of personnel in a trench, which are used to judge whether an abnormal status of personnel occurs through visual detection instead of manual supervision based on collected on-site trench images.

[0008] In a first aspect, the present invention provides a method for detecting the status of a trench person, comprising:

[0009] Acquire historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0010] Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network;

[0011] Input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain the personnel detection result;

[0012] Tracking a person based on the person detection result and determining the movement status of the person;

[0013] When the motion state is a static state, whether there is an abnormal state of the person is determined according to the static time.

[0014] Optionally, based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network, including:

[0015] Input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result;

[0016] The target YOLOv8 recognition network is obtained according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0017] Optionally, obtaining the target YOLOv8 recognition network according to the historical personnel prediction results and the image labels corresponding to the historical ditch images includes:

[0018] Determining a training error according to the historical personnel prediction results and the image labels corresponding to the historical trench images;

[0019] Based on the training error, adjusting the network parameters of the YOLOv8 recognition network by back propagation algorithm to obtain optimal network parameters;

[0020] The target YOLOv8 recognition network is generated using the optimal network parameters.

[0021] Optionally, tracking a person based on the person detection result and determining the movement state of the person includes:

[0022] Using BoT-SORT target tracking technology to track the personnel related to the personnel detection results;

[0023] The movement state of the person is determined by the movement amplitude of the person.

[0024] Optionally, when the motion state is a static state, determining whether there is an abnormal state of the person according to the static time includes:

[0025] When the motion state is a stationary state, counting the stationary time of the stationary person;

[0026] It is determined whether the static time reaches a static time threshold; if so, it is determined that an abnormal personnel situation exists.

[0027] In a second aspect, the present invention provides a device for detecting the status of a trench person, comprising:

[0028] An acquisition module, used for acquiring historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0029] A training module, used for training the constructed YOLOv8 recognition network based on the historical ditch image and the image label to obtain a target YOLOv8 recognition network;

[0030] A prediction module, used to input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain a personnel detection result;

[0031] A tracking module, used to track people based on the person detection result and determine the movement status of the people;

[0032] The personnel status determination module is used to determine whether there is an abnormal personnel status according to the static time when the motion state is a static state.

[0033] Optionally, the training module includes:

[0034] A training prediction submodule is used to input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction results;

[0035] The training submodule is used to obtain the target YOLOv8 recognition network according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0036] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.

[0037] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, runs the steps of the method provided in the first aspect.

[0038] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.

[0039] It can be seen from the above technical solutions that the present invention has the following advantages:

[0040] The present invention provides a method and device for detecting the status of personnel in a ditch, the method comprising: obtaining historical ditch image data; the historical ditch image data comprising: historical ditch images and image labels thereof; based on the historical ditch images and the image labels, training the constructed YOLOv8 recognition network to obtain a target YOLOv8 recognition network; inputting the real-time collected on-site ditch images into the target YOLOv8 recognition network to obtain a personnel detection result; tracking personnel based on the personnel detection result, and determining the motion state of the personnel; when the motion state is a stationary state, determining whether there is an abnormality in the personnel status according to the stationary duration. Through the target YOLOv8 recognition network, the personnel information in the ditch is accurately detected, and when the personnel is in a stationary state, determining whether there is an abnormality in the personnel status according to the stationary duration, not only the accuracy and real-time performance of personnel detection are improved, but also abnormal situations can be discovered and handled in a timely manner, greatly improving the safety and efficiency of ditch operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 A flowchart of a method for detecting the status of a trench person according to a first embodiment of the present invention;

[0043] Figure 2 A flowchart of a second embodiment of a method for detecting the status of a trench worker according to the present invention;

[0044] Figure 3 A schematic diagram of the installation of a trench camera for fitting crack boundary points in Embodiment 2 of a trench personnel status detection method of the present invention;

[0045] Figure 4 The present invention is a structural block diagram of an embodiment of a device for detecting the status of a trench person according to the present invention. DETAILED DESCRIPTION

[0046] The embodiments of the present invention provide a method and device for determining the width of a crack, which are used to increase the minimum identifiable crack width to obtain a more accurate crack disease width detection result.

[0047] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below 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.

[0048] For example, see Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for detecting the status of a trench person of the present invention, the method comprising:

[0049] Step S101, obtaining historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0050] In an embodiment of the present application, historical trench image data are collected and organized, and the image data include images of different situations in the trench, and each image has a corresponding label (such as "personnel", "no personnel", "personnel stationary", "personnel moving", etc.).

[0051] Step S102, based on the historical ditch image and the image label, training the constructed YOLOv8 recognition network to obtain a target YOLOv8 recognition network;

[0052] In an embodiment of the present application, the constructed initial YOLOv8 model is selected and loaded, and then trained using the sorted historical ditch image data.

[0053] During the training process, image labels are used to guide the model to learn how to accurately identify people in the ditch. By optimizing model parameters and hyperparameters (such as learning rate, batch size, etc.), we ensure that the model can accurately identify and distinguish people and motion states in the ditch.

[0054] Step S103, inputting the on-site ditch image collected in real time into the target YOLOv8 recognition network to obtain a personnel detection result;

[0055] In an embodiment of the present application, a camera or other image acquisition device is used to capture the on-site ditch image in real time and input it into the target YOLOv8 recognition network to obtain the personnel detection result.

[0056] Step S104, tracking a person based on the person detection result, and determining the movement state of the person;

[0057] In an embodiment of the present application, the position and number of people in the ditch are obtained according to the output of the target YOLOv8 recognition network, and the detected people are tracked using a tracking algorithm (such as Kalman filtering, SORT, etc.) to determine their motion trajectory, and then the motion trajectory is analyzed to determine the motion state (moving, stationary) of the people.

[0058] Step S105, when the motion state is a static state, determine whether there is an abnormal state of the person according to the static time.

[0059] In an embodiment of the present application, when the motion state of a single person is detected to be stationary, it is determined whether there is an abnormal state of the person based on the length of time the person is stationary, and corresponding emergency measures are taken.

[0060] The embodiment of the present invention provides a method for detecting the status of trench personnel, including: obtaining historical trench image data; the historical trench image data includes: historical trench images and image labels thereof; based on the historical trench images and the image labels, training the constructed YOLOv8 recognition network to obtain a target YOLOv8 recognition network; inputting the real-time collected on-site trench images into the target YOLOv8 recognition network to obtain a personnel detection result; tracking personnel based on the personnel detection result, and determining the movement state of the personnel; when the movement state is a stationary state, determining whether there is an abnormal situation of the personnel status according to the stationary duration. Through the target YOLOv8 recognition network, the personnel information in the trench is accurately detected, and when the personnel is in a stationary state, it is determined whether there is an abnormal situation of the personnel status according to the stationary duration, which not only improves the accuracy and real-time performance of personnel detection, but also can timely discover and handle abnormal situations, greatly improving the safety and efficiency of trench operations.

[0061] For example 2, please refer to Figure 2 , Figure 2 This is a flow chart of a second embodiment of a method for detecting the status of a trench person of the present invention, the steps comprising:

[0062] Step S201, obtaining historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0063] Step S202, inputting the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result;

[0064] It should be noted that the YOLO (You Only Look Once) series of models are very good in detection speed and also have relatively good detection accuracy, so the YOLO network model is widely used in the industrial field. However, since the initial YOLO model is trained on a large multi-category data set, in the actual production process, it is necessary to use field data for transfer learning to conform to the actual situation. Moreover, in actual detection, only people need to be detected, and people are very prominent in real images. Detecting only people reduces the difficulty of training and ensures that the final result can be stable.

[0065] Step S203, obtaining the target YOLOv8 recognition network according to the historical personnel prediction results and the image labels corresponding to the historical ditch images;

[0066] In an embodiment of the present application, a training error is determined based on the historical personnel prediction results and the image label corresponding to the historical ditch image; based on the training error, the network parameters of the YOLOv8 recognition network are adjusted through a back propagation algorithm to obtain optimal network parameters; and the target YOLOv8 recognition network is generated using the optimal network parameters.

[0067] Step S204, inputting the on-site ditch image collected in real time into the target YOLOv8 recognition network to obtain a personnel detection result;

[0068] See also Figure 3 , Figure 3 This is a schematic diagram of the installation of a trench camera for fitting crack boundary points in Example 2 of a method for detecting the status of trench personnel of the present invention. The embodiment of the present application uses a security camera installed at the lower trench step to collect images. The camera at this position can ensure the field of view of the trench when there is a large object blocking the trench above.

[0069] Step S205, using BoT-SORT target tracking technology to track the personnel related to the personnel detection result;

[0070] It should be noted that the basic idea of ​​BoT-SORT target tracking technology is to use the target position of the previous frame to predict the position of the target in the next frame through Kalman filtering, and compare it with the new detection result to obtain the same objects in the two frames, thereby achieving the effect of target tracking.

[0071] Step S206, determining the movement state of the person according to the movement amplitude of the person;

[0072] In an embodiment of the present application, during the target tracking process, it is possible to determine whether the ditch person moves between two frames based on the target moving distance between the two frames. If the ditch person's inter-frame moving distance is too small or there is no movement, the ditch person's movement state is considered to be static.

[0073] Step S207, when the motion state is a stationary state, counting the stationary time of the stationary personnel;

[0074] Step S208, determining whether the static time reaches a static time threshold; if so, determining that there is an abnormal personnel situation.

[0075] In an embodiment of the present application, if it is detected that the movement state of the person in the ditch is a stationary state, the number of stationary frames of the person will be continuously counted to determine the stationary time, and then through the relationship between the stationary time and the preset stationary time threshold, it is judged whether the person has fainted or other abnormal conditions.

[0076] A method for detecting the status of a trench person disclosed in an embodiment of the present invention comprises: obtaining historical trench image data; the historical trench image data comprises: historical trench images and image labels thereof; based on the historical trench images and the image labels, training the constructed YOLOv8 recognition network to obtain a target YOLOv8 recognition network; inputting the real-time collected on-site trench images into the target YOLOv8 recognition network to obtain a personnel detection result; tracking personnel based on the personnel detection result, and determining the motion state of the personnel; when the motion state is a static state, determining whether there is an abnormality in the personnel state according to the static duration. Through the target YOLOv8 recognition network, the personnel information in the trench is accurately detected, and based on the personnel detection result, the BoT-SORT target tracking technology is adopted to effectively monitor the personnel information in a complex trench environment, and when the personnel is in a static state, it is determined whether there is an abnormality in the personnel state according to the static duration, which not only improves the accuracy and real-time performance of personnel detection, but also can timely discover and handle abnormal situations, greatly improving the safety and efficiency of trench operations. At the same time, during the training process of the YOLOv8 recognition network, the network parameters are optimized through the back-propagation algorithm to improve the recognition accuracy and robustness of the model.

[0077] For example 3, please refer to Figure 4 , Figure 4 This is a structural block diagram of an embodiment of a ditch personnel status detection device of the present invention, the device includes:

[0078] The acquisition module 301 is used to acquire historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0079] A training module 302 is used to train the constructed YOLOv8 recognition network based on the historical ditch image and the image label to obtain a target YOLOv8 recognition network;

[0080] Prediction module 303, used for inputting the on-site ditch image collected in real time into the target YOLOv8 recognition network to obtain a personnel detection result;

[0081] A tracking module 304, configured to track a person based on the person detection result and determine the movement state of the person;

[0082] The personnel status determination module 305 is used to determine whether there is an abnormal personnel status according to the static time when the motion state is a static state.

[0083] In an optional embodiment, the training module 302 includes:

[0084] A training prediction submodule is used to input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction results;

[0085] The training submodule is used to obtain the target YOLOv8 recognition network according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0086] In an optional embodiment, the training submodule includes:

[0087] A training error determination unit, configured to determine a training error according to the historical personnel prediction result and the image label corresponding to the historical trench image;

[0088] A parameter adjustment unit, configured to adjust the network parameters of the YOLOv8 recognition network through a back propagation algorithm based on the training error to obtain optimal network parameters;

[0089] A network generation unit is used to generate the target YOLOv8 recognition network using the optimal network parameters.

[0090] In an optional embodiment, the tracking module 304 includes:

[0091] A tracking submodule, for tracking the personnel related to the personnel detection result by using BoT-SORT target tracking technology;

[0092] The motion state determination submodule is used to determine the motion state of a person according to the motion amplitude of the person.

[0093] In an optional embodiment, the personnel status determination module 305 includes:

[0094] A stationary time statistics submodule, used for counting the stationary time of the stationary personnel when the motion state is a stationary state;

[0095] The judgment submodule is used to judge whether the static time length has reached the static time length threshold; if so, it is determined that there is an abnormal situation of personnel.

[0096] Embodiment 4, the embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a method for detecting the status of a trench person in any embodiment, including:

[0097] Acquire historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0098] Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network;

[0099] Input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain a personnel detection result;

[0100] Tracking a person based on the person detection result and determining the movement status of the person;

[0101] When the motion state is a static state, whether there is an abnormal state of the person is determined according to the static time.

[0102] In an optional embodiment, based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network, including:

[0103] Input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result;

[0104] The target YOLOv8 recognition network is obtained according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0105] In an optional embodiment, the target YOLOv8 recognition network is obtained according to the historical personnel prediction result and the image label corresponding to the historical ditch image, including:

[0106] Determining a training error according to the historical personnel prediction results and the image labels corresponding to the historical trench images;

[0107] Based on the training error, adjusting the network parameters of the YOLOv8 recognition network by back propagation algorithm to obtain optimal network parameters;

[0108] The target YOLOv8 recognition network is generated using the optimal network parameters.

[0109] In an optional embodiment, tracking a person based on the person detection result and determining the movement state of the person include:

[0110] Using BoT-SORT target tracking technology to track the personnel related to the personnel detection results;

[0111] The movement state of the person is determined by the movement amplitude of the person.

[0112] In an optional embodiment, when the motion state is a static state, determining whether there is an abnormal state of the person according to the static time includes:

[0113] When the motion state is a stationary state, counting the stationary time of the stationary person;

[0114] It is determined whether the static time reaches a static time threshold; if so, it is determined that an abnormal personnel situation exists.

[0115] Embodiment 5, the embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by the processor, the steps of implementing a method for detecting the status of a trench person in any embodiment include:

[0116] Acquire historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0117] Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network;

[0118] Input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain the personnel detection result;

[0119] Tracking a person based on the person detection result and determining the movement status of the person;

[0120] When the motion state is a static state, whether there is an abnormal state of the person is determined according to the static time.

[0121] In an optional embodiment, based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network, including:

[0122] Input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result;

[0123] The target YOLOv8 recognition network is obtained according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0124] In an optional embodiment, the target YOLOv8 recognition network is obtained according to the historical personnel prediction result and the image label corresponding to the historical ditch image, including:

[0125] Determining a training error according to the historical personnel prediction results and the image labels corresponding to the historical trench images;

[0126] Based on the training error, adjusting the network parameters of the YOLOv8 recognition network by back propagation algorithm to obtain optimal network parameters;

[0127] The target YOLOv8 recognition network is generated using the optimal network parameters.

[0128] In an optional embodiment, tracking a person based on the person detection result and determining the movement state of the person include:

[0129] Using BoT-SORT target tracking technology to track the personnel related to the personnel detection results;

[0130] The movement state of the person is determined by the movement amplitude of the person.

[0131] In an optional embodiment, when the motion state is a static state, determining whether there is an abnormal state of the person according to the static time includes:

[0132] When the motion state is a stationary state, counting the stationary time of the stationary person;

[0133] It is determined whether the static time reaches a static time threshold; if so, it is determined that an abnormal personnel situation exists.

[0134] Embodiment 6. The embodiment of the present invention further provides a computer program product, on which a computer program is stored. When the computer program is executed by the processor, the steps of implementing a method for detecting the status of a trench person in any embodiment include:

[0135] Acquire historical ditch image data; the historical ditch image data includes: historical ditch images and image labels thereof;

[0136] Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network;

[0137] Input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain the personnel detection result;

[0138] Tracking a person based on the person detection result and determining the movement status of the person;

[0139] When the motion state is a static state, whether there is an abnormal state of the person is determined according to the static time.

[0140] In an optional embodiment, based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network, including:

[0141] Input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result;

[0142] The target YOLOv8 recognition network is obtained according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

[0143] In an optional embodiment, the target YOLOv8 recognition network is obtained according to the historical personnel prediction result and the image label corresponding to the historical ditch image, including:

[0144] Determining a training error according to the historical personnel prediction results and the image labels corresponding to the historical trench images;

[0145] Based on the training error, adjusting the network parameters of the YOLOv8 recognition network by back propagation algorithm to obtain optimal network parameters;

[0146] The target YOLOv8 recognition network is generated using the optimal network parameters.

[0147] In an optional embodiment, tracking a person based on the person detection result and determining the movement state of the person include:

[0148] Using BoT-SORT target tracking technology to track the personnel related to the personnel detection results;

[0149] The movement state of the person is determined by the movement amplitude of the person.

[0150] In an optional embodiment, when the motion state is a static state, determining whether there is an abnormal state of the person according to the static time includes:

[0151] When the motion state is a stationary state, counting the stationary time of the stationary person;

[0152] It is determined whether the static time reaches a static time threshold; if so, it is determined that an abnormal personnel situation exists.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0154] In the several embodiments provided in the present application, it should be understood that the methods, devices, electronic devices and storage media disclosed in the present invention can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0158] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these 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 invention.

Claims

1. A method for detecting the status of a trench worker, characterized in that: include: Obtain historical trench image data; The historical ditch image data includes: historical ditch images and image labels thereof; Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network; Input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain the personnel detection result; Tracking a person based on the person detection result and determining the movement status of the person; When the motion state is a static state, whether there is an abnormal state of the person is determined according to the static time.

2. The method for detecting the status of a trench worker according to claim 1, characterized in that: Based on the historical ditch image and the image label, the constructed YOLOv8 recognition network is trained to obtain a target YOLOv8 recognition network, including: Input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction result; The target YOLOv8 recognition network is obtained according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

3. The method for detecting the status of trench personnel according to claim 2, characterized in that: According to the historical personnel prediction results and the image labels corresponding to the historical ditch images, the target YOLOv8 recognition network is obtained, including: Determining a training error according to the historical personnel prediction results and the image labels corresponding to the historical trench images; Based on the training error, adjusting the network parameters of the YOLOv8 recognition network by back propagation algorithm to obtain optimal network parameters; The target YOLOv8 recognition network is generated using the optimal network parameters.

4. The method for detecting the status of a trench worker according to claim 1, characterized in that: Based on the personnel detection result, personnel tracking is performed and the movement state of the personnel is determined, including: Using BoT-SORT target tracking technology to track the personnel related to the personnel detection results; The movement state of the person is determined by the movement amplitude of the person.

5. The method for detecting the status of a trench worker according to claim 1 or 4, characterized in that: When the motion state is a static state, determining whether there is an abnormal state of the person according to the static time includes: When the motion state is a stationary state, counting the stationary time of the stationary person; It is determined whether the static time reaches a static time threshold; if so, it is determined that an abnormal personnel situation exists.

6. A device for detecting the status of a trench worker, characterized in that: include: An acquisition module, used to acquire historical trench image data; The historical ditch image data includes: historical ditch images and image labels thereof; A training module, used for training the constructed YOLOv8 recognition network based on the historical ditch image and the image label to obtain a target YOLOv8 recognition network; A prediction module, used to input the real-time collected on-site ditch image into the target YOLOv8 recognition network to obtain a personnel detection result; A tracking module, used to track people based on the person detection result and determine the movement status of the people; The personnel status determination module is used to determine whether there is an abnormal personnel status according to the static time when the motion state is a static state.

7. The device for detecting the status of a person in a trench according to claim 6, characterized in that: The training module includes: A training prediction submodule is used to input the historical ditch image into the YOLOv8 recognition network to obtain the corresponding historical personnel prediction results; The training submodule is used to obtain the target YOLOv8 recognition network according to the historical personnel prediction results and the image labels corresponding to the historical ditch images.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 5 is executed.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is performed.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.