Methods, devices, equipment, media, and products for detecting helmet occlusion.
By performing secondary verification on the safety helmet test results, the problem of inaccurate test results in the existing technology is solved, thereby improving the accuracy of safety helmet testing and avoiding erroneous alarms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2026-04-03
AI Technical Summary
Current helmet testing technologies often produce inaccurate results, which can easily lead to false alarms.
By acquiring video frames of the construction area and inputting them into a pre-trained safety helmet detection model, a preliminary detection is performed. The results of not wearing a safety helmet are then verified a second time. If the second verification result indicates that a safety helmet is being worn, the detection result is updated to indicate that a safety helmet is being worn but is being obscured.
This improves the accuracy of helmet testing, avoids false alarms, and ensures the accuracy of test results.
Smart Images

Figure CN120298946B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of target detection technology, and in particular to a method, apparatus, equipment, medium and product for detecting helmet obstruction. Background Technology
[0002] With the rapid development of artificial intelligence technology, its application in target detection research is becoming increasingly widespread.
[0003] Current safety helmet detection technology often uses pre-trained safety helmet detection models to detect video streams in construction areas, which results in inaccurate detection results and false alarms. Summary of the Invention
[0004] This disclosure provides a method, apparatus, equipment, medium, and product for detecting helmet obstruction, thereby improving the accuracy of detecting whether an object is wearing a helmet.
[0005] According to one aspect of this disclosure, a method for detecting helmet occlusion is provided, comprising:
[0006] Obtain video frames of the construction area at the current moment;
[0007] The video frame of the construction area at the current moment is input into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment;
[0008] If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, the helmet detection result at the current moment is verified a second time. If the second verification result indicates that the target object is wearing a helmet, the helmet detection result at the current moment is updated to indicate that the target object is wearing a helmet and the helmet is obscured.
[0009] According to another aspect of this disclosure, a helmet obstruction detection device is provided, comprising:
[0010] The current moment video frame acquisition module is used to acquire video frames of the construction area at the current moment;
[0011] The current moment safety helmet detection result prediction module is used to input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the current moment safety helmet detection result;
[0012] The current helmet detection result secondary verification module is used to perform secondary verification on the current helmet detection result when the target object is not wearing a helmet. If the secondary verification result is that the target object is wearing a helmet, the current helmet detection result is updated to show that the target object is wearing a helmet and the helmet is obscured.
[0013] According to another aspect of this disclosure, an electronic device is provided, the electronic device comprising:
[0014] At least one processor;
[0015] and a memory communicatively connected to the at least one processor;
[0016] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the helmet obstruction detection method according to any embodiment of this disclosure.
[0017] According to another aspect of this disclosure, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute and implement the helmet obstruction detection method according to any embodiment of this disclosure.
[0018] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the helmet obstruction detection method as described in any of the embodiments of this disclosure.
[0019] The technical solution of this disclosure involves acquiring video frames of the construction area at the current moment, and then inputting these video frames into a pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment. If the current safety helmet detection result indicates that the target object is not wearing a safety helmet, the current safety helmet detection result is then verified a second time. If the second verification result indicates that the target object is wearing a safety helmet, the current safety helmet detection result is updated to show that the target object is wearing a safety helmet, but the helmet is obscured. In the above technical solution, by performing a second verification of the detection result for the target object not wearing a safety helmet, the detection of a helmet being obscured is achieved, thereby improving the detection accuracy of whether the object is wearing a safety helmet and avoiding false alarms.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a helmet obstruction detection method provided according to an embodiment of the present disclosure;
[0023] Figure 2 This is a flowchart of another helmet obstruction detection method provided according to an embodiment of the present disclosure;
[0024] Figure 3 This is a flowchart of another helmet obstruction detection method provided according to an embodiment of this disclosure;
[0025] Figure 4 This is a flowchart of another helmet obstruction detection method provided according to an embodiment of this disclosure;
[0026] Figure 5 This is a flowchart of another helmet obstruction detection method provided according to an embodiment of this disclosure;
[0027] Figure 6 This is a flowchart of another helmet obstruction detection method provided according to an embodiment of the present disclosure;
[0028] Figure 7 This is a schematic diagram of a helmet obstruction detection device provided according to an embodiment of the present disclosure;
[0029] Figure 8 This is a schematic diagram of the structure of an electronic device that implements the helmet occlusion detection method of the present disclosure. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of terms can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. The acquisition, storage, use, and processing of data in the technical solutions of this disclosure comply with the relevant provisions of national laws and regulations.
[0032] Figure 1 This is a flowchart illustrating a method for detecting helmet occlusion provided in an embodiment of this disclosure. This embodiment is applicable to detecting whether construction workers are wearing helmets. The method can be executed by a helmet occlusion detection device, which can be implemented in hardware and / or software and can be configured in electronic devices such as terminals or servers. Figure 1 As shown, the method includes:
[0033] S110. Obtain video frames of the construction area at the current moment.
[0034] The construction area refers to a specific area or site where construction, repair, renovation, or other engineering activities are underway. Video frames can be captured by cameras installed in the construction area.
[0035] For example, a camera installed in the construction area can capture video frames of the construction area at the current moment, or the video frames of the construction area at the current moment can be read from a preset storage path of an electronic device.
[0036] S120. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0037] The safety helmet detection model can be a detection model trained based on YOLOV8 or an improved YOLOV8.
[0038] Specifically, the video frames of the construction area at the current moment are used as the input data of the model. The video frames of the construction area at the current moment are then input into the pre-trained safety helmet detection model. The safety helmet detection model outputs the safety helmet detection result at the current moment, which can be either the target object is not wearing a safety helmet or the target object is wearing a safety helmet.
[0039] S130. If the helmet detection result at the current moment is that the target object is not wearing a helmet, the helmet detection result at the current moment is verified a second time. If the second verification result is that the target object is wearing a helmet, the helmet detection result at the current moment is updated to show that the target object is wearing a helmet and the helmet is obscured.
[0040] It should be noted that the initial detection result indicated the target object was not wearing a safety helmet, but the secondary verification result showed the target object was wearing a safety helmet. This indicates that the target object's safety helmet was currently obscured. Therefore, the current helmet detection result was updated to indicate that the target object was wearing a safety helmet and that the helmet was obscured, in order to avoid false alarms and improve the detection accuracy of whether the object was wearing a safety helmet.
[0041] The technical solution of this disclosure involves acquiring video frames of the construction area at the current moment, and then inputting these video frames into a pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment. If the current safety helmet detection result indicates that the target object is not wearing a safety helmet, the current safety helmet detection result is then verified a second time. If the second verification result indicates that the target object is wearing a safety helmet, the current safety helmet detection result is updated to show that the target object is wearing a safety helmet, but the helmet is obscured. In the above technical solution, by performing a second verification of the detection result for the target object not wearing a safety helmet, the detection of a helmet being obscured is achieved, thereby improving the detection accuracy of whether the object is wearing a safety helmet and avoiding false alarms.
[0042] Figure 2 This is a flowchart of another helmet occlusion detection method provided in this embodiment. The method of this embodiment can be combined with various optional schemes in the helmet occlusion detection methods provided in the above embodiments. Based on the above embodiments, this embodiment further refines the secondary verification process.
[0043] like Figure 2 As shown, the method includes:
[0044] S210. Obtain video frames of the construction area at the current moment.
[0045] S220. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0046] S230. If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, acquire a preset number of video frames of the construction area prior to the current moment.
[0047] S240. Input the video frames of the construction area of the preset number of times before the current time into the pre-trained safety helmet detection model to obtain the safety helmet detection results of multiple historical times.
[0048] S250, if the helmet detection results at the multiple historical moments include the detection results of the target object wearing a helmet, determine the secondary verification result as the target object wearing a helmet.
[0049] S260. If the secondary verification result is that the target object is wearing a safety helmet, then the current safety helmet detection result is updated to "the target object is wearing a safety helmet and the safety helmet is obscured".
[0050] The preset quantity can be one, two, or more, and no specific limit is specified here.
[0051] For example, the video frame of the construction area at the current moment can be represented by P t This means that, with a preset quantity of 2, the video frames of the construction area prior to the current moment can be P. t-1 and P t-2 ; P t-1 and P t-2 The inputs are fed into a pre-trained helmet detection model to obtain P. t-1 The corresponding safety helmet test results and P t-2 The corresponding safety helmet test results, if P t-1 The corresponding safety helmet test results and P t-2 If the corresponding helmet detection results show that the target object is wearing a helmet, it indicates that the target object's helmet is currently obstructed. Therefore, P... t The corresponding helmet detection result is updated to indicate that the target object is wearing a helmet, but the helmet is obscured. If P t-1 The corresponding safety helmet test results and P t-2 If the corresponding helmet inspection results do not show any instance of the target object wearing a helmet, then P t The corresponding helmet test results remained unchanged.
[0052] The technical solution of this disclosure embodiment obtains a preset number of video frames of the construction area before the current time, and then inputs the preset number of video frames of the construction area before the current time into a pre-trained safety helmet detection model to obtain safety helmet detection results at multiple historical times. When the safety helmet detection results at multiple historical times include the detection results of the target object wearing a safety helmet, the secondary verification result is determined to be that the target object is wearing a safety helmet, thus realizing the secondary accurate verification of the safety helmet detection results.
[0053] Figure 3 This is a flowchart of another helmet occlusion detection method provided in this embodiment. The method of this embodiment can be combined with various optional schemes in the helmet occlusion detection methods provided in the above embodiments. Based on the above embodiments, this embodiment further refines the secondary verification process.
[0054] like Figure 3 As shown, the method includes:
[0055] S310. Obtain video frames of the construction area at the current moment.
[0056] S320. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0057] S330. If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, acquire a preset number of video frames of the construction area after the current moment.
[0058] S340. Input the video frames of a preset number of construction areas after the current time into the pre-trained safety helmet detection model to obtain safety helmet detection results for multiple future times.
[0059] S350, if the helmet detection results at multiple future moments include the detection results of the target object wearing a helmet, determine the secondary verification result as the target object wearing a helmet.
[0060] S360. If the secondary verification result is that the target object is wearing a safety helmet, then update the current safety helmet detection result to "the target object is wearing a safety helmet and the safety helmet is obscured".
[0061] The preset quantity can be one, two, or more, and no specific limit is specified here.
[0062] For example, the video frame of the construction area at the current moment can be represented by P t This indicates that, with a preset quantity of 2, the video frames of the construction area after the current moment can be P. t+1 and Pt+2 ; P t+1 and P t+2 The inputs are fed into a pre-trained helmet detection model to obtain P. t+1 The corresponding safety helmet test results and P t+2 The corresponding safety helmet test results, if P t+1 The corresponding safety helmet test results and P t+2 If the corresponding helmet detection results show that the target object is wearing a helmet, it indicates that the target object's helmet is currently obstructed. Therefore, P... t The corresponding helmet detection result is updated to indicate that the target object is wearing a helmet, but the helmet is obscured. If P t+1 The corresponding safety helmet test results and P t+2 If the corresponding helmet inspection results do not show any instance of the target object wearing a helmet, then P t The corresponding helmet test results remained unchanged.
[0063] The technical solution of this disclosure embodiment obtains a preset number of video frames of the construction area after the current time, and then inputs the preset number of video frames of the construction area after the current time into a pre-trained safety helmet detection model to obtain multiple future safety helmet detection results. Then, if the multiple future safety helmet detection results include the detection result of the target object wearing a safety helmet, the secondary verification result is determined to be that the target object is wearing a safety helmet, thus realizing the secondary accurate verification of the safety helmet detection result.
[0064] Figure 4 This is a flowchart of another helmet occlusion detection method provided in this embodiment. The method of this embodiment can be combined with various optional schemes in the helmet occlusion detection methods provided in the above embodiments. Based on the above embodiments, this embodiment further refines the secondary verification process.
[0065] like Figure 4 As shown, the method includes:
[0066] S410: Obtain video frames of the construction area at the current moment.
[0067] S420. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0068] S430. If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, obtain the camera identifier corresponding to the video frame of the construction area.
[0069] Among them, the camera identifier refers to the identifier of the camera used to capture the video frame, which is unique. For example, the camera identifier can be 0012 or 0015, etc.
[0070] For example, the camera identifier can be extracted from the name of the video frame file or the name of the folder where the video frames are stored.
[0071] S440. Increment the camera identifier by 1 to obtain the first associated view camera identifier, and obtain the video frame corresponding to the first associated view camera identifier; decrement the camera identifier by 1 to obtain the second associated view camera identifier, and obtain the video frame corresponding to the second associated view camera identifier.
[0072] In this embodiment of the disclosure, there may be multiple cameras with different shooting angles in the construction area. Adjacent cameras have overlapping fields of view, and the camera identifiers of adjacent cameras are also adjacent. In other words, video frames of related angles can be obtained based on the enlarged or reduced camera identifiers.
[0073] Specifically, by incrementing the camera identifier by 1, the identifier of the next adjacent camera, i.e., the identifier of the first associated view camera, can be obtained, and then the video frame corresponding to the identifier of the first associated view camera can be obtained; by decrementing the camera identifier by 1, the identifier of the previous adjacent camera, i.e., the identifier of the second associated view camera, can be obtained, and then the video frame corresponding to the identifier of the second associated view camera can be obtained.
[0074] S450. Input the video frames corresponding to the first associated viewpoint camera identifier and the video frames corresponding to the second associated viewpoint camera identifier into the pre-trained helmet detection model to obtain helmet detection results from multiple associated viewpoints.
[0075] S460. If the helmet detection results from the multiple associated perspectives include the detection results of the target object wearing a helmet, determine that the secondary verification result is that the target object is wearing a helmet.
[0076] S470. If the secondary verification result is that the target object is wearing a safety helmet, then the current safety helmet detection result is updated to "the target object is wearing a safety helmet and the safety helmet is obscured".
[0077] For example, the video frame corresponding to the first associated viewpoint camera identifier can be represented by P1, and the video frame corresponding to the second associated viewpoint camera identifier can be represented by P2. P1 and P2 are respectively input into a pre-trained helmet detection model to obtain the helmet detection results corresponding to P1 and P2. If either the helmet detection results corresponding to P1 or P2 show a detection result indicating that the target object is wearing a helmet, it indicates that the target object's helmet is occluded at the current moment. Therefore, the helmet detection result at the current moment is updated to indicate that the target object is wearing a helmet and that the helmet is occluded. If neither the helmet detection results corresponding to P1 or P2 show a detection result indicating that the target object is wearing a helmet, then the helmet detection result at the current moment remains unchanged.
[0078] The technical solution of this embodiment obtains the camera identifier corresponding to the video frame of the construction area, increments the camera identifier by 1 to obtain the first associated view camera identifier, and obtains the video frame corresponding to the first associated view camera identifier; decrements the camera identifier by 1 to obtain the second associated view camera identifier, and obtains the video frame corresponding to the second associated view camera identifier. Then, the video frames corresponding to the first associated view camera identifier and the second associated view camera identifier are respectively input into a pre-trained safety helmet detection model to obtain safety helmet detection results from multiple associated views. When the safety helmet detection results from multiple associated views include the detection result of the target object wearing a safety helmet, the secondary verification result is determined to be that the target object is wearing a safety helmet, thus achieving secondary accurate verification of the safety helmet detection result.
[0079] Figure 5 This is a flowchart of another helmet occlusion detection method provided in this embodiment. The method of this embodiment can be combined with various optional schemes in the helmet occlusion detection methods provided in the above embodiments. Based on the above embodiments, this embodiment further refines the secondary verification process.
[0080] like Figure 5 As shown, the method includes:
[0081] S510: Obtain video frames of the construction area at the current moment.
[0082] S520. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0083] S530. If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, obtain the camera identifier corresponding to the video frame of the construction area.
[0084] S540. Determine the location information of the construction area based on the camera identifier; send the location information of the construction area to the drone control terminal to control the drone to fly to the construction area.
[0085] The construction area location information refers to the map coordinates of the construction area where the camera is located.
[0086] Specifically, a mapping table between camera identifiers and map coordinates is pre-set. This table contains multiple camera identifiers and the coordinates of the corresponding camera installation locations. Furthermore, the camera identifiers corresponding to video frames in the construction area can be matched against the mapping table to obtain the location information of the construction area.
[0087] In this embodiment, the electronic device is communicatively connected to the drone control terminal. The electronic device can send the location information of the construction area to the drone control terminal, which then controls the drone to fly to the vicinity of the construction area based on the location information to track and photograph the target object, thereby obtaining video frames of the construction area captured by the drone. The drone control terminal can be a personal computer or a mobile terminal, etc., and is not specifically limited thereto.
[0088] S550: Receive video frames of the construction area collected by the drone; input the video frames of the construction area collected by the drone into the pre-trained safety helmet detection model to obtain the safety helmet detection results from the drone's perspective.
[0089] The number of video frames collected by the drone regarding the construction area can be one or more. If the number of video frames collected by the drone is multiple, the safety helmet detection model can predict the safety helmet detection results from multiple drone perspectives, and then determine the secondary verification results based on these multiple drone perspective safety helmet detection results.
[0090] S560. If the helmet detection results from the drone's perspective include the detection results of the target object wearing a helmet, determine that the secondary verification result is that the target object is wearing a helmet.
[0091] S570. If the secondary verification result is that the target object is wearing a safety helmet, then the current safety helmet detection result is updated to "the target object is wearing a safety helmet and the safety helmet is obscured".
[0092] For example, the video frames of the construction area captured by the drone can be represented by Pf. Pf is input into a pre-trained safety helmet detection model to obtain the corresponding safety helmet detection results. If the safety helmet detection results corresponding to Pf contain a detection result indicating that the target object is wearing a safety helmet, it means that the target object's safety helmet is currently occluded. Therefore, the current safety helmet detection result is updated to indicate that the target object is wearing a safety helmet and that the safety helmet is occluded. If the safety helmet detection results corresponding to Pf do not contain a detection result indicating that the target object is wearing a safety helmet, the current safety helmet detection result remains unchanged.
[0093] The technical solution of this disclosure embodiment obtains the camera identifier corresponding to the video frame of the construction area, and then determines the location information of the construction area based on the camera identifier. The location information of the construction area is sent to the UAV control terminal to control the UAV to fly to the construction area. Then, the video frame of the construction area collected by the UAV is received and input into the pre-trained safety helmet detection model to obtain the safety helmet detection result from the perspective of the UAV. If the safety helmet detection result from the perspective of the UAV includes the detection result of the target object wearing a safety helmet, the secondary verification result is determined to be that the target object is wearing a safety helmet, thus realizing the secondary accurate verification of the safety helmet detection result.
[0094] Figure 6 This is a flowchart of another helmet occlusion detection method provided in this embodiment. The method of this embodiment can be combined with various optional solutions in the helmet occlusion detection methods provided in the above embodiments. This embodiment adds a helmet-not-worn alarm step based on the above embodiments.
[0095] like Figure 6 As shown, the method includes:
[0096] S610: Obtain video frames of the construction area at the current moment.
[0097] S620. Input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment.
[0098] S630. If the helmet detection result at the current moment is that the target object is not wearing a helmet, the helmet detection result at the current moment is verified a second time. If the second verification result is that the target object is wearing a helmet, the helmet detection result at the current moment is updated to show that the target object is wearing a helmet and the helmet is obscured.
[0099] S640. If the secondary verification result indicates that the target object is not wearing a safety helmet, generate a safety helmet not wearing alarm message; obtain the camera identifier corresponding to the video frame of the construction area, and send the safety helmet not wearing alarm message to the player associated with the camera identifier to play the safety helmet not wearing alarm message.
[0100] The helmet-wearing alarm is used to alert personnel who are not wearing helmets. It can be a voice announcement such as "Please wear a helmet while working" or a warning sound such as "beep beep beep." The player can be a speaker or other voice player.
[0101] In this embodiment of the disclosure, each camera that captures a video frame integrates a player, or a player is placed near the camera, so as to provide targeted reminders or alarms to people who are not wearing safety helmets under the camera.
[0102] The technical solution of this disclosure embodiment obtains the camera identifier corresponding to the video frame of the construction area and sends the alarm information of not wearing a safety helmet to the player associated with the camera identifier to play the alarm information of not wearing a safety helmet. This realizes targeted alarm for the object not wearing a safety helmet and improves the accuracy of the alarm.
[0103] Figure 7 This is a schematic diagram of a helmet occlusion detection device provided in an embodiment of this disclosure. Figure 7 As shown, the device includes:
[0104] The current moment video frame acquisition module 710 is used to acquire the video frame of the construction area at the current moment;
[0105] The current moment safety helmet detection result prediction module 720 is used to input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the current moment safety helmet detection result;
[0106] The current helmet detection result secondary verification module 730 is used to perform secondary verification on the current helmet detection result when the target object is not wearing a helmet. If the secondary verification result is that the target object is wearing a helmet, the current helmet detection result is updated to show that the target object is wearing a helmet and the helmet is obscured.
[0107] The technical solution of this disclosure involves acquiring video frames of the construction area at the current moment, and then inputting these video frames into a pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment. If the current safety helmet detection result indicates that the target object is not wearing a safety helmet, the current safety helmet detection result is then verified a second time. If the second verification result indicates that the target object is wearing a safety helmet, the current safety helmet detection result is updated to show that the target object is wearing a safety helmet, but the helmet is obscured. In the above technical solution, by performing a second verification of the detection result for the target object not wearing a safety helmet, the detection of a helmet being obscured is achieved, thereby improving the detection accuracy of whether the object is wearing a safety helmet and avoiding false alarms.
[0108] Based on any optional technical solution in the embodiments of this disclosure, optionally, the secondary verification module 730 for the current helmet detection result includes:
[0109] The first and second verification units are used to acquire a preset number of video frames of the construction area before the current time; input the preset number of video frames of the construction area before the current time into the pre-trained safety helmet detection model to obtain safety helmet detection results at multiple historical times; if the safety helmet detection results at multiple historical times include the detection result of the target object wearing a safety helmet, the second verification result is determined to be that the target object is wearing a safety helmet.
[0110] Based on any optional technical solution in the embodiments of this disclosure, optionally, the secondary verification module 730 for the current helmet detection result includes:
[0111] The second verification unit is used to acquire a preset number of video frames of the construction area after the current time; input the preset number of video frames of the construction area after the current time into the pre-trained safety helmet detection model to obtain safety helmet detection results for multiple future times; if the safety helmet detection results for multiple future times include the detection result of the target object wearing a safety helmet, the second verification result is determined to be that the target object is wearing a safety helmet.
[0112] Based on any optional technical solution in the embodiments of this disclosure, optionally, the secondary verification module 730 for the current helmet detection result includes:
[0113] The third secondary verification unit is used to, when the helmet detection result at the current moment indicates that the target object is not wearing a helmet, obtain the camera identifier corresponding to the video frame of the construction area; increment the camera identifier by 1 to obtain the first associated view camera identifier, and obtain the video frame corresponding to the first associated view camera identifier; decrement the camera identifier by 1 to obtain the second associated view camera identifier, and obtain the video frame corresponding to the second associated view camera identifier; input the video frames corresponding to the first associated view camera identifier and the second associated view camera identifier into the pre-trained helmet detection model to obtain helmet detection results from multiple associated views; if the helmet detection results from multiple associated views include a detection result indicating that the target object is wearing a helmet, determine that the secondary verification result indicates that the target object is wearing a helmet.
[0114] Based on any optional technical solution in the embodiments of this disclosure, optionally, the secondary verification module 730 for the current helmet detection result includes:
[0115] The fourth secondary verification unit is used to: acquire the camera identifier corresponding to the video frame of the construction area when the helmet detection result at the current moment indicates that the target object is not wearing a helmet; determine the location information of the construction area based on the camera identifier; send the location information of the construction area to the UAV control terminal to control the UAV to fly to the construction area; receive the video frame of the construction area collected by the UAV; input the video frame of the construction area collected by the UAV into the pre-trained helmet detection model to obtain the helmet detection result from the perspective of the UAV; and determine the secondary verification result that the target object is wearing a helmet if the helmet detection result from the perspective of the UAV includes the detection result that the target object is wearing a helmet.
[0116] Based on any optional technical solution in the embodiments of this disclosure, the safety helmet obstruction detection device may optionally include:
[0117] The helmet-not-wearing alarm module is used to generate helmet-not-wearing alarm information if the secondary verification result shows that the target object is not wearing a helmet; obtain the camera identifier corresponding to the video frame of the construction area, and send the helmet-not-wearing alarm information to the player associated with the camera identifier to play the helmet-not-wearing alarm information.
[0118] The helmet obstruction detection device provided in this disclosure can execute the helmet obstruction detection method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0119] Figure 8A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0120] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An I / O interface 15 is also connected to the bus 14.
[0121] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0122] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a helmet occlusion detection method, which includes:
[0123] Obtain video frames of the construction area at the current moment;
[0124] The video frame of the construction area at the current moment is input into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment;
[0125] If the helmet detection result at the current moment indicates that the target object is not wearing a helmet, the helmet detection result at the current moment is verified a second time. If the second verification result indicates that the target object is wearing a helmet, the helmet detection result at the current moment is updated to indicate that the target object is wearing a helmet and the helmet is obscured.
[0126] In some embodiments, the helmet occlusion detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the helmet occlusion detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the helmet occlusion detection method by any other suitable means (e.g., by means of firmware).
[0127] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs used to implement the methods of this disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0131] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0132] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0133] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0134] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the helmet obstruction detection method as provided in any embodiment of this disclosure.
[0135] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0136] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0137] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for detecting helmet occlusion, characterized in that, include: Obtain video frames of the construction area at the current moment; The video frame of the construction area at the current moment is input into the pre-trained safety helmet detection model to obtain the safety helmet detection result at the current moment; If the helmet detection result at the current moment is that the target object is not wearing a helmet, the helmet detection result at the current moment is verified a second time. If the second verification result is that the target object is wearing a helmet, the helmet detection result at the current moment is updated to show that the target object is wearing a helmet and the helmet is obscured. The secondary verification of the helmet detection result at the current moment includes: Obtain a preset number of video frames from the construction area up to the current time. The video frames of a predetermined number of construction areas prior to the current moment are input into a pre-trained safety helmet detection model to obtain safety helmet detection results for multiple historical moments. If the helmet detection results at multiple historical moments include the detection results of the target object wearing a helmet, the secondary verification result is determined to be that the target object is wearing a helmet; The secondary verification of the helmet detection result at the current moment includes: Obtain a preset number of video frames of the construction area after the current moment; The video frames of a predetermined number of construction areas after the current time are input into the pre-trained safety helmet detection model to obtain safety helmet detection results for multiple future times. If the helmet detection results at multiple future time points include the detection results of the target object wearing a helmet, then the secondary verification result is determined to be that the target object is wearing a helmet; The secondary verification of the helmet detection result at the current moment includes: Obtain the camera identifiers corresponding to the video frames in the construction area; Increment the camera identifier by 1 to obtain the first associated viewpoint camera identifier, and obtain the video frame corresponding to the first associated viewpoint camera identifier; Subtract 1 from the camera identifier to obtain the second associated viewpoint camera identifier, and then obtain the video frame corresponding to the second associated viewpoint camera identifier; The video frames corresponding to the first associated viewpoint camera identifier and the video frames corresponding to the second associated viewpoint camera identifier are respectively input into the pre-trained helmet detection model to obtain helmet detection results from multiple associated viewpoints. If the helmet detection results from the multiple associated perspectives include the detection results of the target object wearing a helmet, then the secondary verification result is determined to be that the target object is wearing a helmet; The secondary verification of the helmet detection result at the current moment includes: Obtain the camera identifiers corresponding to the video frames in the construction area; The location information of the construction area is determined based on the camera identification; The location information of the construction area is sent to the UAV control terminal to control the UAV to fly to the construction area; Receive video frames of the construction area captured by the drone; The video frames of the construction area collected by the UAV are input into the pre-trained safety helmet detection model to obtain the safety helmet detection results from the perspective of the UAV. If the helmet detection results from the drone's perspective include the detection results of the target object wearing a helmet, then the secondary verification result is determined to be that the target object is wearing a helmet.
2. The method according to claim 1, characterized in that, After performing a secondary verification of the helmet detection results at the current moment, the process also includes: If the secondary verification result indicates that the target object is not wearing a safety helmet, an alarm message for not wearing a safety helmet will be generated. Obtain the camera identifier corresponding to the video frame of the construction area, and send the alarm information of not wearing a safety helmet to the player associated with the camera identifier to play the alarm information of not wearing a safety helmet.
3. A helmet obstruction detection device, characterized in that, include: The current moment video frame acquisition module is used to acquire video frames of the construction area at the current moment; The current moment safety helmet detection result prediction module is used to input the video frame of the construction area at the current moment into the pre-trained safety helmet detection model to obtain the current moment safety helmet detection result; The current helmet detection result secondary verification module is used to perform secondary verification on the current helmet detection result when the target object is not wearing a helmet. If the secondary verification result is that the target object is wearing a helmet, the current helmet detection result is updated to show that the target object is wearing a helmet and the helmet is covered. The secondary verification module for the current helmet detection result includes: The first and second verification units are used to acquire a preset number of video frames of the construction area before the current time; input the preset number of video frames of the construction area before the current time into the pre-trained safety helmet detection model to obtain safety helmet detection results at multiple historical times; if the safety helmet detection results at multiple historical times include the detection result of the target object wearing a safety helmet, the second verification result is determined to be that the target object is wearing a safety helmet. The secondary verification module for the current helmet detection result includes: The second verification unit is used to acquire a preset number of video frames of the construction area after the current time; input the preset number of video frames of the construction area after the current time into the pre-trained safety helmet detection model to obtain multiple safety helmet detection results at future times; if the multiple safety helmet detection results at future times include the detection result of the target object wearing a safety helmet, the second verification result is determined to be that the target object is wearing a safety helmet. The secondary verification module for the current helmet detection result includes: The third secondary verification unit is used to, when the helmet detection result at the current moment indicates that the target object is not wearing a helmet, obtain the camera identifier corresponding to the video frame of the construction area; increment the camera identifier by 1 to obtain the first associated view camera identifier, and obtain the video frame corresponding to the first associated view camera identifier; decrement the camera identifier by 1 to obtain the second associated view camera identifier, and obtain the video frame corresponding to the second associated view camera identifier; input the video frames corresponding to the first associated view camera identifier and the second associated view camera identifier into the pre-trained helmet detection model to obtain helmet detection results from multiple associated views; if the helmet detection results from multiple associated views include a detection result indicating that the target object is wearing a helmet, determine that the secondary verification result indicates that the target object is wearing a helmet. The secondary verification module for the current helmet detection result includes: The fourth secondary verification unit is used to: acquire the camera identifier corresponding to the video frame of the construction area when the helmet detection result at the current moment indicates that the target object is not wearing a helmet; determine the location information of the construction area based on the camera identifier; send the location information of the construction area to the UAV control terminal to control the UAV to fly to the construction area; receive the video frame of the construction area collected by the UAV; input the video frame of the construction area collected by the UAV into the pre-trained helmet detection model to obtain the helmet detection result from the perspective of the UAV; and determine the secondary verification result that the target object is wearing a helmet if the helmet detection result from the perspective of the UAV includes the detection result that the target object is wearing a helmet.
4. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the helmet obstruction detection method according to any one of claims 1-2.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the helmet obstruction detection method according to any one of claims 1-2.
6. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the helmet obstruction detection method according to any one of claims 1-2.
Citation Information
Patent Citations
Safety helmet detection tracking method and equipment based on triple network, and storage medium
CN116665133A
Safety helmet wearing detection method and system with dual detection and multi-stage early warning functions
CN116935443A