Safety helmet wearing detection method, device and equipment for ship-hoisting workshop and medium

CN122554731APending Publication Date: 2026-08-11COMMERCIAL AIRCRAFT CORP OF CHINA LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-11
Publication Date
2026-08-11

Smart Images

  • Figure CN122554731A_ABST
    Figure CN122554731A_ABST
Patent Text Reader

Abstract

This application discloses a method, device, equipment, and medium for detecting helmet wearing in an overhead crane lifting workshop. The method uses a laser rangefinder installed on the overhead crane, the hook translation drive motor, and the hook to acquire the hook coordinates in real time, as well as preset work position coordinates and the coordinates of pairs of pan-tilt cameras installed on both sides of the workshop. When the hook is determined to be in operation, the optimal target camera is dynamically determined based on the aforementioned coordinates. Subsequently, the target camera's focal length and rotation angle are calculated, and it is driven to adjust to the target position to align with the lifting operation area, capturing video frame images. Finally, a pre-trained helmet detection model is used to recognize the images, and the helmet wearing status is determined based on the recognition results. This technical solution, by combining a laser rangefinder and a pan-tilt camera, and using the real-time coordinates of the hook for dynamic angle and focal length adjustment of the camera, can effectively improve the real-time performance and accuracy of monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of safety monitoring technology, and in particular to a method, device, equipment and medium for detecting the wearing of safety helmets in a crane hoisting workshop. Background Technology

[0002] In current industrial manufacturing, especially in the final assembly workshops of large equipment such as aircraft, ships, and heavy machinery, overhead crane lifting operations are a critical production link, and the area under the hook is a high-risk area. To ensure personnel safety, industry standards mandate that workers in this area must wear safety helmets.

[0003] Currently, the industry largely relies on manual on-site supervision or manual video supervision. These methods suffer from problems such as multi-tasking interference, insufficient real-time performance, and personnel fatigue, making it difficult to guarantee comprehensive safety monitoring. Some rely on automated supervision using artificial intelligence, but existing computer vision-based safety helmet detection algorithms are mostly one-size-fits-all detections. Their logic is disconnected from actual hoisting operations, making it impossible to determine whether hoisting is in progress or to accurately define the scope of hazardous areas. This easily leads to false alarms or missed alarms, failing to meet the needs of precise on-site supervision of hoisting operations and thus lacking practicality. Summary of the Invention

[0004] This application provides a method, device, equipment, and medium for detecting helmet wearing in overhead crane lifting workshops. By combining a laser rangefinder and a pan-tilt camera, and utilizing the real-time coordinates of the hook to dynamically adjust the camera's viewing angle and focus, the real-time performance and accuracy of monitoring can be effectively improved. It overcomes the problems of insufficient real-time performance, difficulty in dynamic adjustment, need for manual intervention, integration complexity, and accuracy of early warnings in existing technologies. It provides a more efficient and intelligent solution, enabling real-time monitoring and automatic early warning of workers not wearing helmets while lifting overhead cranes, reducing accident risks, significantly improving workplace safety and management efficiency, and providing effective evidence chain support.

[0005] According to one aspect of this application, a method for detecting the wearing of safety helmets in an overhead crane hoisting workshop is provided, the method comprising: The coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera in the hoisting workshop are obtained. The coordinates of the hook are obtained by the crane, the hook translation drive motor, and the laser rangefinder installed on the hook in the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls on the left and right sides of the hoisting workshop, and each workstation is monitored by a pair of PTZ cameras. When it is determined that the hook is in operation, the target camera is determined based on the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera. Based on the coordinates of the hook and the coordinates of the target camera, the target focal length and rotation angle of the target camera are determined, and the target camera is controlled to adjust to the target position according to the target focal length and the rotation angle, and video frame images captured by the target camera at the target position are acquired. The video frame images are identified based on a pre-trained helmet detection model, and the helmet wearing status is determined based on the identification results.

[0006] According to another aspect of this application, a safety helmet wearing detection device is provided for a crane hoisting workshop, characterized in that the device comprises: The coordinate data acquisition module is used to acquire the coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera in the hoisting workshop. The coordinates of the hook are acquired by the crane, the hook translation drive motor, and the laser rangefinder installed on the hook in the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls on the left and right sides of the hoisting workshop, and each workstation is monitored by a pair of PTZ cameras. The camera determination module is used to determine the target camera based on the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera when it is determined that the hook is in operation. The camera adjustment module is used to determine the target focal length and rotation angle of the target camera based on the coordinates of the hook and the coordinates of the target camera, and to control the target camera to adjust to the target position according to the target focal length and the rotation angle, and to acquire the video frame image captured by the target camera at the target position; The helmet wearing detection module is used to identify the video frame image based on a pre-trained helmet detection model and determine the helmet wearing status based on the identification results.

[0007] According to another aspect of this application, an electronic device is provided, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the helmet-wearing detection method in a crane hoisting workshop according to any embodiment of this application.

[0008] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the safety helmet wearing detection method in the overhead crane hoisting workshop according to any embodiment of this application.

[0009] According to another aspect of this application, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the safety helmet wearing detection method in a crane hoisting workshop as described in any embodiment of this application.

[0010] The technical solution provided in this application acquires the hook coordinates in real time using a laser rangefinder installed on the overhead crane, the hook translation drive motor, and the hook itself. It also acquires preset workstation coordinates and the coordinates of paired pan-tilt cameras installed on both sides of the workshop. When the hook is determined to be in operation, the optimal target camera is dynamically determined based on these coordinates. Subsequently, the target camera's focal length and rotation angle are calculated, and it is driven to adjust to the target position to align with the lifting operation area, capturing video frames. Finally, a pre-trained safety helmet detection model is used to identify the images, and the helmet wearing status is determined based on the identification results. This technical solution, by combining a laser rangefinder and a pan-tilt camera, utilizes the real-time coordinates of the hook for dynamic adjustment of the camera's viewing angle and focal length, effectively improving the real-time performance and accuracy of monitoring.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, 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 application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a method for detecting the wearing of safety helmets in a crane hoisting workshop, provided in Embodiment 1 of this application.

[0014] Figure 2 This is a flowchart of a method for detecting the wearing of safety helmets in a crane hoisting workshop, provided in Embodiment 2 of this application.

[0015] Figure 3 This is a structural schematic diagram of a safety helmet wearing detection device in a crane hoisting workshop provided in Embodiment 3 of the present invention.

[0016] Figure 4 This is a schematic diagram of the structure of a device for detecting the wearing of safety helmets in a crane hoisting workshop, as described in an embodiment of this application. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0018] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application 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 apparatus 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 apparatus.

[0019] It should also be noted that the acquisition, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0020] Example 1 Figure 1 This is a flowchart illustrating a method for detecting helmet wearing in an overhead crane hoisting workshop, as provided in Embodiment 1 of this application. This embodiment is applicable to hoisting operations in assembly workshops for large equipment such as aircraft, ships, and heavy machinery. The method can be executed by a helmet wearing detection device in the overhead crane hoisting workshop. This device can be implemented in hardware and / or software and can be configured in equipment with data processing capabilities. Figure 1 As shown, the method includes the following steps.

[0021] S110. Obtain the coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera within the hoisting workshop. The coordinates of the hook are obtained through a laser rangefinder installed on the overhead crane, the hook translation drive motor, and the hook itself within the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls of opposite sides of the hoisting workshop, with each workstation monitored by a pair of PTZ cameras.

[0022] Taking an aircraft final assembly workshop as an example, a typical workshop is 280 meters long (north-south), 80 meters wide (east-west), and 30 meters high. Within the workshop, multiple work areas, or workstations, are pre-marked on the floor with yellow lines according to the aircraft assembly process and component dimensions. When hoisting large aircraft components, the overhead crane moves its hook above the target workstation, and workers then perform assembly and coordination at the corresponding ground workstation. In this operational mode, the area below the hook constitutes a safety risk zone, requiring real-time monitoring to ensure workers in this area are wearing safety helmets.

[0023] The overhead crane is mounted on the ceiling of the workshop and can move horizontally back and forth within the workshop via its tracks. The crane's hook can move left and right on the crane via a hook translation drive motor mounted on it, and it can also move vertically up and down within the workshop. Based on these movement characteristics, the hook can be positioned anywhere in the three-dimensional space of the workshop, allowing lifting operations to be performed anywhere within the workshop. According to the overhead crane management regulations in aircraft production workshops, after use, the crane hook must be retracted and returned to its original position on the north and south sides of the workshop. Furthermore, during lifting operations, workers within a certain range below the crane hook must wear safety helmets.

[0024] In this application, three laser rangefinders are installed at the hoisting site to obtain the three-dimensional coordinates of the hook. The three laser rangefinders are responsible for measuring the distances in the north-south direction (Y-axis), east-west direction (X-axis), and vertical height (Z-axis), respectively. The following are the key points for the installation of the three laser rangefinders.

[0025] 1. For north-south direction rangefinders (Y-axis).

[0026] Installation location: The laser rangefinder is installed in the middle of the overhead crane, with the installation direction being horizontal north-south. The laser rangefinder emits a laser beam to the south and receives the reflected signal to measure the distance between the overhead crane and the south wall of the hoisting workshop.

[0027] Purpose of installation: To determine the position of the gantry crane in the north-south direction (Y-axis).

[0028] Installation Requirements: The laser rangefinder should be fixed on the central axis of the aircraft structure, with the installation direction strictly parallel to the north-south direction. The rangefinder should have a sufficient measuring range; for example, within the aircraft assembly workshop, the measuring range should be greater than 280 meters to ensure coverage of the entire north-south span of the factory building.

[0029] 2. For east-west direction rangefinders (X-axis).

[0030] Installation location: The laser rangefinder is installed on the drive motor of the hook, with the installation direction being east-west. The laser rangefinder emits a laser beam to the west and receives the reflected signal to measure the distance of the hook relative to the west wall of the hoisting workshop.

[0031] Measure the left and right positions of the hook device on the overhead crane.

[0032] Installation purpose: Used to determine the position of the hook in the east-west direction (X-axis).

[0033] Installation Requirements: The laser rangefinder should be fixed to the side of the drive motor, with the installation direction parallel to the east-west direction. The range of motion of the hook must be considered during installation; for example, in an aircraft assembly workshop, the measurement range should be greater than 80 meters to ensure that the rangefinder's measurement range covers the entire movement path.

[0034] 3. For vertical height rangefinders (Z-axis).

[0035] Installation location: The laser rangefinder is installed on top of the hook device, with the installation direction vertically downward. The laser rangefinder emits a laser beam downward and receives the reflected signal to measure the distance between the hook and the overhead crane.

[0036] Installation purpose: Used to determine the height position of the hook device on the Z-axis (vertical direction).

[0037] Installation requirements: The laser rangefinder should be fixed at the top center of the hook assembly, directly facing the hook assembly. During installation, ensure the rangefinder is perpendicularly aligned with the hook to avoid measurement errors.

[0038] This application utilizes laser rangefinders for installation on existing vehicles, resulting in a simple and low-cost solution. Only three laser rangefinders need to be added to the existing vehicle structure, making hardware implementation relatively simple and the cost of laser rangefinders low. Furthermore, it offers high measurement accuracy, providing precise distance measurements, particularly in straight-line ranges, achieving millimeter-level precision.

[0039] In addition, in this application, several PTZ cameras are installed to acquire images of overhead crane hoisting operations. The following are the key points for installing the PTZ cameras.

[0040] Installation location: Install one high-definition PTZ camera on each of the middle pillars on both sides of the workstation, at a height of 1 / 3 to 1 / 2 of the workshop height (approximately 10-15 meters).

[0041] Camera type: Dome camera with rotation and zoom functions, supporting 360-degree horizontal rotation and vertical rotation within an appropriate range, and equipped with optical zoom to ensure flexible monitoring.

[0042] Camera resolution: 1920x1080 (2K) to ensure image clarity.

[0043] Installation requirements: Ensure that the combined field of view within the camera's rotation range covers one side of the aircraft, and that the worker on the ground partially or completely covers the field of view at the camera's maximum focal length.

[0044] Installation purpose: The camera is mainly used for daily monitoring of the workstation. When overhead crane lifting operations occur, it will cooperate with the warning system to collect relevant data on whether safety helmets are worn.

[0045] After the laser rangefinder and PTZ camera are installed according to the above requirements, the coordinates of the hook and the PTZ camera are determined. The following is the process of determining the coordinates.

[0046] First, a fixed and easily identifiable reference point is selected as the origin of the world coordinate system. This point can typically be a corner or pillar within the hoisting workshop. This application selects the southwest corner of the hoisting workshop as the origin of the world coordinate system. Second, coordinate axes are defined: the X-axis runs east-west (width direction) along the hoisting workshop, the Y-axis runs north-south (length direction) along the hoisting workshop, and the Z-axis is defined vertically (upward from the floor of the hoisting workshop). This coordinate system ensures that all measurements and calculations are performed based on a unified reference frame.

[0047] Assume the north-south span of the factory building is The east-west span is The crane is installed at a high position. The three-dimensional coordinates of the three laser rangefinders, hooks, and PTZ cameras in this coordinate system are determined sequentially.

[0048] 1. Determine the three-dimensional coordinates of the three laser rangefinders.

[0049] The coordinates of the north-south distance measuring instrument are: , where coordinates "Fixed" indicates the position of the rangefinder relative to the west wall of the factory building, and ;coordinate The distance value is obtained in real-time by a north-south direction rangefinder; coordinates Fixed, and .

[0050] The coordinates of the east-west distance measuring instrument are , where coordinates The distance values ​​are obtained in real time by an east-west distance measuring instrument; coordinates The distance value is obtained in real-time by a north-south direction rangefinder; coordinates Fixed, and .

[0051] The coordinates of the vertical height rangefinder are: , where coordinates The distance values ​​are obtained in real time by an east-west distance measuring instrument; coordinates The distance value is obtained in real-time by a north-south direction rangefinder; coordinates Fixed, and .

[0052] 2. Determine the three-dimensional coordinates of the hook.

[0053] The coordinates of the hook are , where coordinates The distance values ​​are obtained in real time by an east-west distance measuring instrument; coordinates The distance value is obtained in real-time by a north-south direction rangefinder; coordinates The height of the hook device can be measured in real time using a vertically positioned laser rangefinder, which is the distance from the vertically positioned laser rangefinder to the hook. ,but .

[0054] 3. Determine the three-dimensional coordinates of the PTZ camera.

[0055] Based on the installation positions of the PTZ cameras on the east and west walls of the hoisting workshop, the three-dimensional coordinates of each PTZ camera can be obtained. Specifically, for the same pair of PTZ cameras, the coordinates of the PTZ camera installed on the east wall are: The coordinates of the west wall are .in, , , and This is a fixed value, obtained from the installation height of the PTZ camera and its length in the hoisting workshop. This indicates the PTZ camera number.

[0056] Furthermore, the positions of each workstation within the hoisting workshop are typically fixed; therefore, the coordinates of each workstation can be determined through the hoisting workshop... S120. When it is determined that the hook is in operation, the target camera is determined according to the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera.

[0057] The hook being in operation refers to the stage where the hook has been lowered to the work area and is performing or preparing to perform lifting operations. Specifically, this can be determined by checking whether the hook target is detected in the work area within the images captured by each pan-tilt-zoom (PTZ) camera. Alternatively, it can be determined by receiving work commands from the hook operation system; if a start command is received, the hook is confirmed to be in operation.

[0058] In some embodiments, optionally, determining that the hook is in a working state includes: determining the height of the hook above the ground based on the coordinates of the hook; if the height is less than a first preset threshold and the change in height within a preset time period is less than a second preset threshold, then determining that the hook is in a working state.

[0059] Based on the actual lifting operation, the hook will be lowered to a certain distance above the ground, and the overhead crane and hook device will not move significantly. Therefore, the following judgment conditions can be obtained: 1) Z-axis coordinate of the hook If the value is less than the first preset threshold, it means that the hook is close to the ground and may be ready for lifting. 2) If the position change of the hook within the preset time period is less than the second preset threshold, it indicates that the hook is in a stable state.

[0060] If both of the above conditions are met simultaneously, the hook is considered to be in operation.

[0061] The first and second preset thresholds can be set according to the on-site usage rules. Taking the aircraft final assembly workshop provided in this application as an example, the first preset threshold can be 4 meters, the second preset threshold can be 0.5 meters, and the preset time period can be 1 minute.

[0062] After confirming that the hook is in operation, it is necessary to determine which pan-tilt camera to use for dynamic adjustment based on the hook's coordinates.

[0063] In this application, the working area can be determined first based on the coordinates of the hook, and then the workstations within that working area can be determined based on the coordinates of each workstation and the coordinates of the working area. The area where these workstations are located then becomes a safety risk area, requiring real-time monitoring to ensure workers in that area are wearing safety helmets, thus guaranteeing production safety.

[0064] In the hoisting workshop, each workstation is monitored by a pair of PTZ cameras. Therefore, both PTZ cameras corresponding to that workstation can be used as target cameras, or the PTZ camera closest to the workstation in that pair can be used as the target camera.

[0065] S130. Based on the coordinates of the hook and the coordinates of the target camera, determine the target focal length and rotation angle of the target camera, and control the target camera to adjust to the target position according to the target focal length and the rotation angle, and acquire the video frame image captured by the target camera at the target position.

[0066] When the hook is not in operation, each pan-tilt camera in the hoisting workshop is used for daily monitoring. The pan-tilt cameras are in preset positions, which include the focal length and orientation parameters of the pan-tilt cameras.

[0067] When the hook is in operation, in order to facilitate subsequent helmet wearing recognition based on the image frames captured by the target camera, the selected target camera needs to point its image at the hook operation area as much as possible to improve the accuracy of helmet wearing recognition.

[0068] In this application, the horizontal and vertical angles between the target camera and the hook can be determined based on the coordinates of the hook and the target camera, and the target camera can be controlled to rotate to the target position according to the horizontal and vertical angles so that the target camera is directly facing the hook.

[0069] Specifically, let's assume the coordinates of the hook at this moment are... The coordinates of the target camera are Then the horizontal angle between the target camera and the hook is: ; The angle between the target camera and the vertical direction of the hook is: .

[0070] Furthermore, based on the distance of the target area in the target camera from the boundary of the captured image, the magnification factor required for the target area to be close to the boundary of the captured image can be determined, thereby determining the target focal length of the target camera.

[0071] In some embodiments, optionally, determining the target focal length of the target camera based on the coordinates of the hook and the target camera includes: determining the spatial straight-line distance between the hook and the target camera based on the coordinates of the hook and the target camera; and determining the target focal length of the target camera based on the spatial straight-line distance, the image sensor size of the target camera, and a preset imaging target height.

[0072] The straight-line distance between the hook and the target camera is: .

[0073] The image sensor size of the target camera, also known as the target surface size, is a key parameter that determines the camera's image quality, low-light performance, and applicable scenarios. Common image sensor sizes include 1 / 4 inch, 1 / 3 inch, 1 / 2.8 inch, 1 / 1.8 inch, and 1 inch. In this application, the unit (in millimeters) can be found in the technical specifications of the target camera's instruction manual.

[0074] The preset imaging target height is the actual size of the target object that is desired to be presented in the image. In overhead crane lifting operations, the hook is usually located at a high position, while the workers may be distributed near the ground. The following two scenarios can be considered.

[0075] 1. Prioritize full-body coverage of the worker. If the monitoring needs of the worker are the primary consideration, the preset imaging target height can be set according to the worker's height range, such as... Meters, this ensures that workers are clearly visible in the camera image.

[0076] 2. Consider both the hook and the worker. If you want to cover the worker without ignoring the hook, you can set the preset imaging target height to be slightly larger, such as... Meters, which allows the worker and the area below the hook to appear in the frame simultaneously.

[0077] In practical use, the target size needs to be adjusted according to the specific scenario. The above is only the choice made in the implementation of this application.

[0078] Furthermore, based on the spatial straight-line distance, the image sensor size of the target camera, and the preset imaging target height, the target focal length of the target camera can be determined using the following formula: ; In the formula, Indicates the target focal length. Represents linear distance in space. Indicates the image sensor size of the target camera. This indicates the preset imaging target height.

[0079] For example, the straight-line distance between the target camera and the hook is 50 meters, the image sensor size is 5.2 mm, and the preset imaging target height is 1.8 meters. Substituting these parameters into the above formula yields... .

[0080] Among them, the calculated This is the theoretical optical focal length. In practice, the zoom range and zoom accuracy of the target camera, as well as their correspondence with the actual focal length, can be determined by consulting the target camera's instruction manual. If the target camera's control module SDK provides a function to convert focal length to control levels, this function can be directly called to determine the target camera's zoom ratio; otherwise, calculations are performed based on the found information and the target focal length.

[0081] After adjusting the target camera to the target position according to the target focal length and rotation angle, video frame images can be obtained from the video stream captured by the target camera using the "VideoCapture" class of "OpenCV" to facilitate subsequent image recognition. After acquiring the video frame images, the target camera can be controlled to return from the target position to the preset position.

[0082] S140. The video frame image is identified based on a pre-trained helmet detection model, and the helmet wearing status is determined based on the identification results.

[0083] The safety helmet detection model uses an image set from overhead crane hoisting sites as its training set during pre-training. Each image is labeled with the head regions of workers wearing safety helmets and those not wearing them. The model is then iteratively trained to directly output whether a worker is not wearing a safety helmet in the image.

[0084] In this application, video frame images are input into a pre-trained helmet detection model to obtain output results, and the helmet wearing status is determined based on the output results.

[0085] In some embodiments, optionally, the video frame image is identified based on a pre-trained safety helmet detection model, and the safety helmet wearing status is determined based on the identification result, including: identifying the video frame image based on the pre-trained safety helmet detection model, and determining a first target box and a second target box in the video frame image; wherein, the first target box is the region box where the worker's head is located, and the second target box is the region box where the safety helmet is located; and determining the safety helmet wearing status based on the relative position of the first target box and the second target box.

[0086] Specifically, the safety helmet detection model can be a model trained on a YOLOv8 model using a training set. In the training set, each image has its worker's head region and safety helmet region labeled separately, so that the trained safety helmet detection model can output both the worker's head detection box and the safety helmet detection box.

[0087] If the worker's head area is detected, and a safety helmet is also detected within this area, it proves that the worker was wearing a safety helmet correctly during the overhead crane lifting operation, and no warning is needed. If the worker's head area is detected, but a safety helmet is not detected within this area, it proves that the worker was not wearing a safety helmet during the overhead crane lifting operation, and a warning signal is required, which should be sent out. Simultaneously, the person's head will be marked with a rectangle on this video frame image, and then this video frame image will be saved as part of the chain of evidence.

[0088] The above technical solution enables real-time monitoring and automatic early warning of overhead crane operators not wearing safety helmets, reducing accident risks and significantly improving the safety and management efficiency of overhead crane operation sites, while also providing effective evidence chain support.

[0089] This invention provides a method for detecting helmet wearing in an overhead crane lifting workshop. The method uses a laser rangefinder mounted on the overhead crane, the hook translation drive motor, and the hook to acquire the hook coordinates in real time, as well as preset work position coordinates and the coordinates of pairs of pan-tilt cameras mounted on both sides of the workshop. When the hook is determined to be in operation, the optimal target camera is dynamically determined based on the aforementioned coordinates. Subsequently, the target camera's focal length and rotation angle are calculated, and it is driven to adjust to the target position to align with the lifting operation area, capturing video frames. Finally, a pre-trained helmet detection model is used to identify the images, and the helmet wearing status is determined based on the identification results. This technical solution, by combining a laser rangefinder and a pan-tilt camera, and using the real-time coordinates of the hook for dynamic angle and focal length adjustment of the cameras, can effectively improve the real-time performance and accuracy of monitoring.

[0090] Example 2 Figure 2 This is a flowchart illustrating a method for detecting the wearing of safety helmets in an overhead crane hoisting workshop, provided in Embodiment 2 of this application. This embodiment is an optimization based on the above embodiment, specifically optimizing the process for determining the target camera. Figure 2 As shown, the method in this embodiment specifically includes the following steps.

[0091] S210. Obtain the coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera within the hoisting workshop. The coordinates of the hook are obtained through a laser rangefinder installed on the overhead crane, the hook translation drive motor, and the hook itself within the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls of opposite sides of the hoisting workshop, with each workstation monitored by a pair of PTZ cameras.

[0092] S220. When it is determined that the hook is in operation, the work station closest to the hook is determined as the target work station based on the coordinates of the hook and the coordinates of each work station, and the first camera and the second camera corresponding to the target work station are determined.

[0093] In this application, the coordinates of the hook at this time can be used. This determines which workstation's coverage area it belongs to, thus identifying the pair of PTZ cameras monitoring that workstation as the first camera and the second camera, respectively.

[0094] For example, the workstations in the aircraft final assembly workshop are distributed along the north-south direction (Y-axis) of the workshop, which can be determined by the Y-axis coordinate of the hook. Determine the coverage area of ​​the workstation where the hook is located. First, calculate the Y-axis coordinate of the hook. Y-axis coordinates of the center points of each workstation The distance, i.e. Then, the workstation with the shortest distance is selected as the target workstation, and the pair of PTZ cameras monitoring that workstation are designated as the first camera and the second camera, respectively.

[0095] S230. Determine the target camera based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera.

[0096] After determining the work position of the hook, a target camera needs to be selected from the pair of cameras corresponding to that work position. The selection criteria for the target camera can be its distance from the hook or its deviation angle relative to the hook.

[0097] For example, if the selection criterion for the target camera is its distance from the hook, then the distances from the hook to the first and second cameras are determined based on the coordinates of the hook, the first camera, and the second camera, respectively. The camera with the shortest distance is selected as the target camera. It is understandable that the closer the distance to the hook, the more pixels the hook and worker occupy on the image sensor, resulting in richer details. Furthermore, a shorter object distance helps reduce image geometric distortion caused by wide-angle or lens perspective.

[0098] For example, if the selection criterion for the target camera is its deviation angle relative to the hook, then based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera, the horizontal and vertical deviation angles of the hook relative to the current field of view centers of the first and second cameras are determined respectively. The camera with the smaller horizontal and vertical deviation angles is selected as the target camera. It is understandable that optical lenses have the highest resolution and the least distortion in the central region of the field of view; and selecting a camera whose hook is closer to its current field of view center means that the subsequent pan-tilt rotation angle needs to be adjusted less, the alignment speed is faster, and mechanical errors that may be introduced by large adjustments can be avoided.

[0099] In some embodiments, optionally, the target camera is determined based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera, including but not limited to the following steps S231 to S233: S231. Determine the first spatial relationship parameters between the hook and the first camera based on the coordinates of the hook and the coordinates of the first camera; wherein the first spatial relationship parameters include a first distance, a first horizontal deviation angle and a first vertical deviation angle.

[0100] The first distance refers to the straight-line distance between the first camera and the hook in space; the first horizontal deviation angle refers to the angle between the orientation of the first camera and the hook in the horizontal direction; and the first vertical deviation angle refers to the angle between the orientation of the first camera and the hook in the vertical direction.

[0101] Assume the coordinates of the hook at this moment are The coordinates of the first camera are The horizontal rotation angle of the first camera's orientation. for Vertical rotation angle for The orientation of the camera can be obtained in real time from the camera control module's SDK, or it can be obtained from the preset position parameters when the camera is being monitored daily.

[0102] The first horizontal distance (XY plane) of the hook relative to the first camera: ; The first vertical distance (Z-axis) of the hook relative to the first camera: ; The first distance between the hook and the first camera: ; The first horizontal angle between the hook and the first camera: ; The first horizontal deviation angle of the hook relative to the first camera: ; The first vertical angle between the hook and the first camera: ; The first vertical offset angle of the hook relative to the first camera: .

[0103] S232. Determine the second spatial relationship parameters between the hook and the second camera based on the coordinates of the hook and the second camera; wherein the second spatial relationship parameters include a second distance, a second horizontal deviation angle and a second vertical deviation angle.

[0104] The second distance refers to the straight-line distance between the second camera and the hook. The second horizontal deviation angle refers to the angle between the orientation of the second camera and the hook in the horizontal direction. The second vertical deviation angle refers to the angle between the orientation of the second camera and the hook in the vertical direction.

[0105] Assume the coordinates of the hook at this moment are The coordinates of the second camera are The horizontal rotation angle of the second camera's orientation. for Vertical rotation angle for The orientation of the camera can be obtained in real time from the camera control module's SDK, or it can be obtained from the preset position parameters when the camera is being monitored daily.

[0106] The second horizontal distance (XY plane) of the hook relative to the second camera: ; The second vertical distance (Z-axis) of the hook relative to the second camera: ; The second distance between the hook and the second camera: ; The second horizontal angle between the hook and the second camera: ; The second horizontal offset angle of the hook relative to the second camera: ; The second vertical angle between the hook and the second camera: ; The second vertical offset angle of the hook relative to the second camera: .

[0107] S233. Determine the target camera based on the first spatial relationship parameter and the second spatial relationship parameter.

[0108] In this application, the first spatial relationship parameter and the second spatial relationship parameter are first subtracted to determine the distance difference and the deviation angle difference. Based on the pre-set distance advantage threshold and angle advantage threshold, if the distance difference is greater than the distance advantage threshold, the distance difference is determined to be significant, and the camera with the closer distance is selected as the target camera. If the deviation angle difference is greater than the angle advantage threshold, the deviation angle difference is determined to be significant, and the camera with the smaller deviation angle is selected as the target camera. If the distance difference is less than the distance advantage threshold and the deviation angle difference is less than the angle advantage threshold, the corresponding camera is determined as the target camera according to the default rule. If the distance difference is greater than the distance advantage threshold and the deviation angle difference is greater than the angle advantage threshold, the target camera is determined according to the significant advantage priority.

[0109] In some embodiments, optionally, determining the target camera based on the first spatial relationship parameter and the second spatial relationship parameter includes: determining whether the hook is within the field of view of the first camera based on the first horizontal deviation angle and the first vertical deviation angle; determining whether the hook is within the field of view of the second camera based on the second horizontal deviation angle and the second vertical deviation angle; if the hook is within both the field of view of the first camera and the field of view of the second camera, then determining a first score based on the first spatial relationship parameter, and determining a second score based on the second spatial relationship parameter, and determining the target camera based on the first score and the second score.

[0110] The horizontal and vertical field of view of a camera determine its visible area; therefore, it is necessary to ensure that the hook is within the camera's field of view. In this application, it can be determined whether the hook is within the camera's field of view by comparing the horizontal deviation angle and the horizontal field of view, as well as the vertical deviation angle and the vertical field of view.

[0111] Specifically, according to the instruction manuals for both the first and second cameras, they have the same specifications and model, and their horizontal field of view is [missing information]. The vertical field of view is .

[0112] The conditions under which the hook is within the horizontal field of view of the camera are: The condition for the hook to be within the vertical field of view of the camera is: .

[0113] If the first horizontal deviation angle and the first vertical deviation angle If the above conditions are met simultaneously, it indicates that the hook is within the field of view of the first camera; if the second horizontal deviation angle Second vertical deviation angle If the above conditions are met simultaneously, it indicates that the hook is within the field of view of the second camera.

[0114] If only one of the first and second cameras satisfies the condition that the hook is within its field of view, then that camera is selected as the target camera; if both cameras satisfy the condition that the hook is within its field of view, then the selection is made according to the following method.

[0115] Specifically, considering the need for the camera to capture clear images of the hoisting operation, and to position the hook as centrally as possible in the image, this application selects a weighted average of the following two indicators for evaluation: 1. Choose the distance from the hook to the camera as an evaluation factor. Because a closer distance means that the hook occupies a larger proportion of the camera's field of view, resulting in a clearer image with more detail; at the same time, a closer distance can reduce the distortion of the viewpoint and avoid distortion in the edge areas.

[0116] 2. Select the deviation angle between the hook position and the camera's field of view center as an evaluation factor. Because cameras with hook positions closer to the camera's field of view center generally produce images with higher resolution and less distortion compared to cameras with hook positions located at the edge of the field of view.

[0117] The target camera is determined by weighting and scoring the above factors. The scoring formula is as follows: ; In the formula, and It is a weighting factor, which is adjusted according to the relative importance of the two factors on site. In this application, it is set to 0.5. It can be the sum of the horizontal and vertical deviation angles, or it can be either the horizontal or vertical deviation angle.

[0118] Ultimately, the camera with the highest score was selected as the target camera for monitoring.

[0119] S240. Based on the coordinates of the hook and the coordinates of the target camera, determine the target focal length and rotation angle of the target camera, and control the target camera to adjust to the target position according to the target focal length and the rotation angle, and acquire the video frame image captured by the target camera at the target position.

[0120] S250. The video frame image is identified based on a pre-trained helmet detection model, and the helmet wearing status is determined based on the identification results.

[0121] This invention provides a method for detecting the wearing of safety helmets in a crane hoisting workshop. This method introduces the closest spatial distance as the core correlation criterion, constructing a logically concise, efficient, and robust technical path. This significantly reduces the complexity of the initial screening and enhances the determinism, laying a clear and reliable foundation for the subsequent precise scheduling of monitoring resources.

[0122] Example 3 Figure 3 This is a schematic diagram of a safety helmet wearing detection device in an overhead crane hoisting workshop, provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: The coordinate data acquisition module 310 is used to acquire the coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera in the hoisting workshop. The coordinates of the hook are acquired by the crane, the hook translation drive motor, and the laser rangefinder installed on the hook in the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls on the left and right sides of the hoisting workshop, and each workstation is monitored by a pair of PTZ cameras. The camera determination module 320 is used to determine the target camera based on the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera when it is determined that the hook is in operation. The camera adjustment module 330 is used to determine the target focal length and rotation angle of the target camera according to the coordinates of the hook and the coordinates of the target camera, and to control the target camera to adjust to the target position according to the target focal length and the rotation angle, and to acquire the video frame image captured by the target camera at the target position; The helmet wearing detection module 340 is used to identify the video frame image based on a pre-trained helmet detection model and determine the helmet wearing status based on the identification results.

[0123] The helmet-wearing detection device for overhead crane hoisting workshops provided in this invention uses a laser rangefinder installed on the overhead crane, the hook translation drive motor, and the hook to acquire the hook coordinates in real time, as well as preset work position coordinates and the coordinates of pairs of pan-tilt cameras installed on both sides of the workshop. When the hook is determined to be in operation, the optimal target camera is dynamically determined based on the aforementioned coordinates. Then, the target camera's focal length and rotation angle are calculated, and it is driven to adjust to the target position to align with the hoisting operation area, capturing video frame images. Finally, a pre-trained helmet detection model is used to recognize the images, and the helmet-wearing status is determined based on the recognition results. This technical solution, by combining a laser rangefinder and a pan-tilt camera, and using the real-time coordinates of the hook to dynamically adjust the camera's viewing angle and focal length, can effectively improve the real-time performance and accuracy of monitoring.

[0124] Furthermore, the camera determination module 320 includes: The hook height determination unit is used to determine the height of the hook from the ground based on the coordinates of the hook. The operation status determination unit is used to determine that the hook is in operation if the height is less than a first preset threshold and the change in height within a preset time period is less than a second preset threshold.

[0125] Furthermore, the camera determination module 320 includes: The candidate camera determination unit is used to determine the workstation closest to the hook as the target workstation based on the coordinates of the hook and the coordinates of each workstation, and to determine the first camera and the second camera corresponding to the target workstation. The target camera determination unit is used to determine the target camera based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera.

[0126] Furthermore, the target camera determining unit includes: The first spatial relationship determination subunit is used to determine the first spatial relationship parameters between the hook and the first camera based on the coordinates of the hook and the coordinates of the first camera; wherein the first spatial relationship parameters include a first distance, a first horizontal deviation angle and a first vertical deviation angle; The second spatial relationship determination subunit is used to determine the second spatial relationship parameters between the hook and the second camera based on the coordinates of the hook and the coordinates of the second camera; wherein the second spatial relationship parameters include a second distance, a second horizontal deviation angle and a second vertical deviation angle; The target camera determination subunit is used to determine the target camera based on the first spatial relationship parameter and the second spatial relationship parameter.

[0127] Furthermore, the target camera determining subunit is specifically used for: Based on the first horizontal deviation angle and the first vertical deviation angle, determine whether the hook is within the field of view of the first camera; Based on the second horizontal deviation angle and the second vertical deviation angle, determine whether the hook is within the field of view of the second camera; If the hook is within the field of view of the first camera and the field of view of the second camera, then a first score value is determined based on the first spatial relationship parameter, and a second score value is determined based on the second spatial relationship parameter, and the target camera is determined based on the first score value and the second score value.

[0128] Furthermore, the camera adjustment module 330 includes: A relative position determination unit is used to determine the spatial straight-line distance between the hook and the target camera based on the coordinates of the hook and the coordinates of the target camera; The target focal length determination unit is used to determine the target focal length of the target camera based on the spatial straight-line distance, the image sensor size of the target camera, and the preset imaging target height.

[0129] Furthermore, the helmet wearing detection module 340 includes: The target bounding box detection unit is used to identify the video frame image based on a pre-trained safety helmet detection model, and determine the first target bounding box and the second target bounding box in the video frame image; wherein, the first target bounding box is the region bounding box where the worker's head is located, and the second target bounding box is the region bounding box where the safety helmet is located; The helmet wearing recognition unit is used to determine the helmet wearing status based on the relative positions of the first target frame and the second target frame.

[0130] The helmet-wearing detection device for overhead crane hoisting workshops provided in this embodiment of the invention can execute the helmet-wearing detection method for overhead crane hoisting workshops provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0131] Example 4 Figure 4 A schematic diagram of the structure of a device 10 that can be used to implement embodiments of this application is shown. The 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 device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as 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 application described and / or claimed herein.

[0132] like Figure 4 As shown, device 10 includes at least one processor 11 and a memory, such as read-only memory (ROM) 12, random access memory (RAM) 13, etc., communicatively connected to at least one processor 11. The memory stores computer programs executable by 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 may also store various programs and data required for the operation of device 10. The processor 11, ROM 12, and RAM 13 are interconnected via bus 14. Input / output (I / O) interface 15 is also connected to bus 14.

[0133] Multiple components in 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 monitors, 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 device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0134] 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, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the helmet-wearing detection method in an overhead crane hoisting workshop.

[0135] In some embodiments, the helmet-wearing detection method in an overhead crane lifting workshop can 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 can be loaded and / or installed on 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-wearing detection method in an overhead crane lifting workshop described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the helmet-wearing detection method in an overhead crane lifting workshop by any other suitable means (e.g., by means of firmware).

[0136] 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), systems-on-a-chip (SoCs), payload-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.

[0137] Computer programs used to implement the methods of this application 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 device, 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.

[0138] In the context of this application, 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.

[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on a 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 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).

[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or 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.

[0141] 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.

[0142] 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.

[0143] 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 application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. 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 application should be included within the scope of protection of this application.

Claims

1. A method for detecting the wearing of safety helmets in an overhead crane hoisting workshop, characterized in that, The method includes: The coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera in the hoisting workshop are obtained. The coordinates of the hook are obtained by the crane, the hook translation drive motor, and the laser rangefinder installed on the hook in the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls on the left and right sides of the hoisting workshop, and each workstation is monitored by a pair of PTZ cameras. When it is determined that the hook is in operation, the target camera is determined based on the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera. Based on the coordinates of the hook and the coordinates of the target camera, the target focal length and rotation angle of the target camera are determined, and the target camera is controlled to adjust to the target position according to the target focal length and the rotation angle, and video frame images captured by the target camera at the target position are acquired. The video frame images are identified based on a pre-trained helmet detection model, and the helmet wearing status is determined based on the identification results.

2. The method according to claim 1, characterized in that, Determining that the hook is in operation includes: Determine the height of the hook from the ground based on the coordinates of the hook; If the height is less than a first preset threshold and the change in height within a preset time period is less than a second preset threshold, then the hook is determined to be in operation.

3. The method according to claim 1, characterized in that, Determining the target camera based on the coordinates of the hook, the coordinates of each workstation, and the coordinates of each pan-tilt camera includes: Based on the coordinates of the hook and the coordinates of each workstation, the workstation closest to the hook is determined as the target workstation, and the first camera and the second camera corresponding to the target workstation are determined. The target camera is determined based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera.

4. The method according to claim 3, characterized in that, Determining the target camera based on the coordinates of the hook, the coordinates of the first camera, and the coordinates of the second camera includes: Based on the coordinates of the hook and the coordinates of the first camera, a first spatial relationship parameter between the hook and the first camera is determined; wherein, the first spatial relationship parameter includes a first distance, a first horizontal deviation angle, and a first vertical deviation angle; Based on the coordinates of the hook and the coordinates of the second camera, a second spatial relationship parameter between the hook and the second camera is determined; wherein, the second spatial relationship parameter includes a second distance, a second horizontal deviation angle, and a second vertical deviation angle; The target camera is determined based on the first spatial relationship parameter and the second spatial relationship parameter.

5. The method according to claim 4, characterized in that, Determining the target camera based on the first spatial relationship parameter and the second spatial relationship parameter includes: Based on the first horizontal deviation angle and the first vertical deviation angle, determine whether the hook is within the field of view of the first camera; Based on the second horizontal deviation angle and the second vertical deviation angle, determine whether the hook is within the field of view of the second camera; If the hook is within the field of view of the first camera and the field of view of the second camera, then a first score value is determined based on the first spatial relationship parameter, and a second score value is determined based on the second spatial relationship parameter, and the target camera is determined based on the first score value and the second score value.

6. The method according to claim 1, characterized in that, Determining the target focal length of the target camera based on the coordinates of the hook and the coordinates of the target camera includes: Based on the coordinates of the hook and the coordinates of the target camera, determine the straight-line distance between the hook and the target camera. The target focal length of the target camera is determined based on the spatial straight-line distance, the image sensor size of the target camera, and the preset imaging target height.

7. The method according to claim 1, characterized in that, The video frame images are identified based on a pre-trained helmet detection model, and the helmet wearing status is determined based on the identification results, including: The video frame image is identified based on a pre-trained safety helmet detection model to determine a first target box and a second target box in the video frame image; wherein, the first target box is the region where the worker's head is located, and the second target box is the region where the safety helmet is located. The helmet wearing status is determined based on the relative positions of the first target box and the second target box.

8. A safety helmet wearing detection device for a crane hoisting workshop, characterized in that, The device includes: The coordinate data acquisition module is used to acquire the coordinates of the hook, the coordinates of each workstation, and the coordinates of each PTZ camera in the hoisting workshop. The coordinates of the hook are acquired by the crane, the hook translation drive motor, and the laser rangefinder installed on the hook in the hoisting workshop. The PTZ cameras are installed in pairs at preset intervals on the walls on the left and right sides of the hoisting workshop, and each workstation is monitored by a pair of PTZ cameras. The camera determination module is used to determine the target camera based on the coordinates of the hook, the coordinates of each work station, and the coordinates of each pan-tilt camera when it is determined that the hook is in operation. The camera adjustment module is used to determine the target focal length and rotation angle of the target camera based on the coordinates of the hook and the coordinates of the target camera, and to control the target camera to adjust to the target position according to the target focal length and the rotation angle, and to acquire the video frame image captured by the target camera at the target position; The helmet wearing detection module is used to identify the video frame image based on a pre-trained helmet detection model and determine the helmet wearing status based on the identification results.

9. An electronic device, characterized in that, The device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the helmet-wearing detection method for overhead crane hoisting workshops as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the safety helmet wearing detection method in the overhead crane hoisting workshop as described in any one of claims 1-7.