Industrial hot work safety monitoring and early warning method and system
Patent Information
- Application Number
- CN202610696669.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]上述现有技术通常仅停留在“是否检测到目标”的静态单一目标识别层面,缺乏对现场多个目标实体之间物理空间关系的深入分析
通过将动火作业图像输入至目标检测模型,获取目标检测模型输出的动火作业图像中各监测目标的类别信息和检测框位置信息,其中目标检测模型是基于动火作业图像样本训练得到,从而实现了对动火现场复杂环境下各类目标实体及其所处空间位置的精确提取与定位识别,通过当识别出动火作业图像中存在至少两个监测目标的类别信息构成预设的风险类别组合时,根据风险类别组合内各监测目标的检测框位置信息,计算监测目标之间的实际间隔距离,从而将单一的静态目标识别拓展为对风险实体间动态空间距离的精准量化,通过当判定实际间隔距离小于风险类别组合对应的安全距离阈值时,生成预警信息,从而实现适应复杂环境、兼顾多目标检测与安全距离判断的智能监测预警,提高了动火作业过程中的安全监测能力。
Smart Images

Figure CN122906830A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial safety monitoring technology, and in particular to a method and system for monitoring and early warning of safety during industrial hot work operations. Background Technology
[0002] In industrial production processes, hot work sites are characterized by complex environments and frequent cross-operations between personnel and equipment, posing significant safety hazards. Therefore, continuous and effective intelligent monitoring of hot work sites to promptly identify potential risks and ensure production safety is a crucial macro-level need in this field.
[0003] Existing intelligent monitoring of industrial hot work operations mainly employs basic target detection technology. This technology typically involves capturing images using camera equipment deployed at the work site, and then inputting the captured images into a pre-trained target detection algorithm model. The model extracts image features to identify the presence of specific targets such as hot work points, operators, or related equipment in the image, and outputs the category information of these targets. This confirms the distribution of entities at the work site and completes basic safety inspections.
[0004] The aforementioned existing technologies typically only focus on static, single-target identification, determining whether a target has been detected, lacking in-depth analysis of the physical spatial relationships between multiple target entities on-site. Because they fail to accurately quantify the dynamic spatial distance between critical equipment and risky entities such as hot work points, existing technologies cannot comprehensively assess both multi-target detection and safe distances between entities, making them ill-suited for complex real-world operating environments and thus reducing the overall safety monitoring capability during hot work operations. Summary of the Invention
[0005] This invention provides a method and system for safety monitoring and early warning of industrial hot work operations, which addresses the shortcomings of existing technologies, enables intelligent monitoring and early warning that adapts to complex environments and balances multi-target detection and safe distance judgment, and improves the safety monitoring capabilities during hot work operations.
[0006] This invention provides a method for safety monitoring and early warning of industrial hot work operations, comprising the following steps: The hot work operation image is input into the target detection model to obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples; When it is identified that at least two of the monitored targets in the hot work operation image constitute a preset risk category combination, the actual distance between the monitored targets is calculated based on the detection frame position information of each monitored target within the risk category combination. When the actual interval distance is determined to be less than the safe distance threshold corresponding to the risk category combination, an early warning message is generated.
[0007] According to the present invention, a method for monitoring and early warning of industrial hot work safety includes calculating the actual interval distance between the monitoring targets based on the detection frame position information of each monitoring target within the risk category combination, comprising: Extract the pixel coordinates of the bottom midpoint of the detection frame position information of the monitored target, and use them as the grounding point coordinates of the monitored target; The ground point pixel coordinates of each monitoring target are mapped and transformed using a pre-established planar coordinate transformation matrix to obtain the true ground coordinates of each monitoring target in the world coordinate system of the ground plane; Based on the actual ground coordinates corresponding to each monitoring target, the planar Euclidean distance between the monitoring targets is calculated to obtain the actual interval distance.
[0008] According to the industrial hot work safety monitoring and early warning method provided by the present invention, before mapping and transforming the grounding point pixel coordinates of each monitoring target using a pre-established planar coordinate transformation matrix, the method further includes: The original projection matrix, which maps from the 3D world coordinate system to the pixel coordinate system, is obtained through a preset camera calibration process. Based on the prior physical condition that the monitoring targets are all placed on the ground plane, the height dimension parameter in the three-dimensional world coordinate system is set to zero. A simplified projection matrix is obtained by eliminating the matrix elements corresponding to the height dimension parameter in the original projection matrix through matrix dimensionality reduction operations. The simplified projection matrix is inverted to generate the planar coordinate transformation matrix that maps the pixel coordinate system to the ground plane world coordinate system.
[0009] According to the present invention, an industrial hot work safety monitoring and early warning method is provided, wherein the target detection model includes a backbone network, a neck network and a detection head network connected in sequence, and a global attention mechanism module is connected in series between the neck network and the detection head network; The step of inputting the hot work operation image into the target detection model and obtaining the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model includes: The hot work operation image is sequentially input into the backbone network and the neck network for feature extraction, and an intermediate feature map is output. The intermediate feature map is input into the global attention mechanism module, where channel-dimensional weight redistribution and spatial-dimensional focusing are performed sequentially to output an enhanced feature map. The enhanced feature map is input into the detection head network, and the category information and detection box position information of each monitored target are output.
[0010] According to the present invention, an industrial hot work safety monitoring and early warning method includes inputting the intermediate feature map into the global attention mechanism module, sequentially performing channel dimension weight redistribution and spatial dimension focusing processing, and outputting an enhanced feature map, comprising: The intermediate feature map is mapped by the multilayer perceptron in the global attention mechanism module to learn the weight distribution coefficients of each channel and generate a channel attention mapping matrix. The channel attention mapping matrix is multiplied element-wise with the intermediate feature map to obtain the channel weighted feature map; The channel-weighted feature map is input into two sequentially connected convolutional layers to extract spatial distribution information and generate a spatial attention mapping matrix. The enhanced feature map is obtained by multiplying the spatial attention mapping matrix element-wise with the channel weighted feature map.
[0011] According to the present invention, a method for safety monitoring and early warning of industrial hot work operations is provided, wherein the target detection model is trained through the following steps: The hot work operation image samples containing hot work point features and safety equipment features are input into the initial network model for prediction, and the output sample prediction classification probability is output. A dynamic adjustment factor is calculated based on the predicted classification probability of the sample, wherein the dynamic adjustment factor is negatively correlated with the predicted classification probability of the sample, so as to reduce the weight of easily classified negative background samples in the loss calculation and increase the weight of difficult-to-classify small target positive samples in the loss calculation. The dynamic adjustment factor is multiplied by the binary cross-entropy loss value to construct an improved focus loss function that includes a class balance term; The model loss value for the current training round is calculated based on the improved focus loss function, and the parameters of the initial network model are updated through backpropagation algorithm based on the model loss value until the initial network model meets the preset convergence condition, thus obtaining the target detection model.
[0012] According to the present invention, a method for safety monitoring and early warning of industrial hot work operations includes, before inputting the hot work operation image into the target detection model, the method further includes: Receive continuous video streams of hot work operations collected by inspection equipment, extract video frames from the continuous video stream at preset frame extraction intervals to obtain candidate image sequences; Calculate the inter-frame similarity between adjacent frames in the candidate image sequence one by one; Images with inter-frame similarity greater than a preset redundancy threshold are removed to obtain filtered images, which are then input into the target detection model as the hot work image.
[0013] This invention also provides an industrial hot work safety monitoring and early warning system, comprising the following modules: The target detection module is used to input hot work operation images into the target detection model and obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples; The distance calculation module is used to calculate the actual distance between monitoring targets when the category information of at least two monitoring targets in the hot work operation image constitutes a preset risk category combination, based on the detection frame position information of each monitoring target in the risk category combination. The early warning generation module is used to generate early warning information when the actual interval distance is determined to be less than the safe distance threshold corresponding to the risk category combination.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described industrial hot work safety monitoring and early warning methods.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described industrial hot work safety monitoring and early warning methods.
[0016] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-described industrial hot work safety monitoring and early warning methods.
[0017] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: By inputting hot work operation images into a target detection model, the model obtains the category information and detection box position information of each monitored target in the hot work operation image. The target detection model is trained based on hot work operation image samples, thereby achieving accurate extraction and positioning identification of various target entities and their spatial locations in complex hot work environments. When the category information of at least two monitored targets in the hot work operation image is identified as forming a preset risk category combination, the actual distance between the monitored targets is calculated based on the detection box position information of each monitored target within the risk category combination. This expands the identification of a single static target to the accurate quantification of the dynamic spatial distance between risk entities. When the actual distance is determined to be less than the safety distance threshold corresponding to the risk category combination, an early warning information is generated. This achieves intelligent monitoring and early warning that adapts to complex environments and takes into account both multi-target detection and safety distance judgment, thereby improving the safety monitoring capability during hot work operations. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the industrial hot work safety monitoring and early warning method provided by the present invention.
[0020] Figure 2 This is a schematic diagram of the global attention mechanism module provided by the present invention.
[0021] Figure 3 This is a trend chart comparing the average accuracy of different models provided by this invention across three hot work datasets.
[0022] Figure 4 This is a schematic diagram of the industrial hot work safety monitoring and early warning system provided by the present invention.
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] It should be noted that in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "upper," "lower," etc., indicating orientation or positional relationships according to the accompanying drawings, are only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the system or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0026] The terms "first," "second," etc., used in this invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects; for example, a first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0027] The following is combined Figures 1 to 5 This invention describes the industrial hot work safety monitoring and early warning method, system, electronic device, storage medium, and computer program product provided by this invention.
[0028] The implementing entity of this method can be any one of the following: an industrial hot work safety monitoring and early warning system, an edge computing box mounted on an inspection robot, or a stand-alone safety monitoring server. The following text will uniformly refer to the industrial hot work safety monitoring and early warning system (hereinafter referred to as the "system") as the implementing entity.
[0029] Reference Figure 1 , Figure 1 This is a flowchart illustrating the industrial hot work safety monitoring and early warning method provided by the present invention, as shown below. Figure 1 As shown, steps 110 to 130 are included: Step 110: Input the hot work operation image into the target detection model, and obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples.
[0030] Specifically, the images of hot work operations originate from industrial production sites, covering footage of hot work processes such as electric welding, gas welding, and mechanical cutting. In one implementation, the system uses cameras mounted on inspection robots to capture images of the hot work site and transmits these images to an edge computing box for processing. In another implementation, the images of hot work operations originate from video surveillance devices permanently deployed within the industrial park.
[0031] Furthermore, in one embodiment, before performing step 110, the system also performs the following image preprocessing steps: Receive the continuous video stream of the hot work site collected by the inspection equipment, extract video frames from the continuous video stream according to the preset frame extraction interval, and obtain candidate image sequence; Calculate the inter-frame similarity between adjacent frames in the candidate image sequence one by one; Images with inter-frame similarity greater than a preset redundancy threshold are removed to obtain filtered images, which are then used as hot work operation images and input into the target detection model.
[0032] Specifically, the system receives continuous video streams from the hot work site collected by inspection equipment via wired or wireless communication links. In one implementation, the inspection equipment includes one or more of an inspection robot, a drone-mounted platform, and a fixed monitoring camera. At the hot work site, the inspection robot moves along a preset inspection path and collects video footage from its onboard camera. The drone-mounted platform collects video footage of the hot work area from an aerial perspective. The collected video data is then wirelessly uploaded to an edge computing box for processing.
[0033] The edge computing box is a high-performance AI analysis device that integrates an NPU module and deep learning-based structured algorithms, featuring lightweight design, high performance, and low power consumption. Its main configuration includes an ARM hexa-core 64-bit processor, 4GB LPDDR4 memory, 32GB eMMC 5.1 storage, and supports up to 2TB of hard drive expansion. Functionally, it supports behavior detection, recognition, and analysis of multiple high-definition videos, while also featuring data encryption and multiple network interfaces to adapt to various application scenarios. This smart box is equipped with a domestically produced industrial-grade NPU, boasting up to 21TB of computing power, supporting conversion of various AI algorithm frameworks, and achieving high accuracy in algorithm models. Furthermore, it offers flexible optional features, such as WiFi, 4G, and 5G modules, as well as GPIO input / output, making it highly adaptable and capable of power-on self-starting and automatic recovery after power failure.
[0034] The system extracts video frames from a continuous video stream according to a preset frame extraction interval. In one implementation, the preset frame extraction interval is set to extract frames every 3 frames. The system then organizes the extracted video frames into a candidate image sequence in chronological order.
[0035] The system calculates the inter-frame similarity for each adjacent frame in the candidate image sequence. In one implementation, the inter-frame similarity is calculated using a structural similarity index, which comprehensively considers the differences in brightness, contrast, and structure between the two frames, outputting a similarity value between 0 and 1. In another implementation, the inter-frame similarity is calculated using a perceptual hashing algorithm. This algorithm first downsamples and grayscales the images, then extracts low-frequency features based on discrete cosine transform to generate hash values, and finally compares the Hamming distance between the hash values of the two frames to obtain the inter-frame similarity. In yet another implementation, the inter-frame similarity is calculated using image histogram similarity, which measures the similarity of the color or grayscale histogram distributions of the two frames.
[0036] The system compares the inter-frame similarity between each pair of adjacent frames with a preset redundancy threshold. When the inter-frame similarity is greater than the preset redundancy threshold, the system determines that there is excessive redundancy between the two frames and removes one frame from the candidate image sequence. When the inter-frame similarity is less than or equal to the preset redundancy threshold, the system retains both frames. Based on the removal of redundant frames, the system can further remove images that do not show flame features in the images before and after the hot work operation. After the above removal process, the system obtains the filtered images and inputs them as hot work operation images into the target detection model to execute step 110.
[0037] Through the above steps, while ensuring the continuity of image acquisition sequence, the system effectively eliminates highly redundant samples and samples unrelated to hot work in the video frame sequence. This avoids the problem of overfitting and artificially high training accuracy caused by a large number of similar images during the training or inference process of the target detection model. It also improves the diversity and representativeness of the input images, thereby further ensuring the detection stability and generalization ability of the target detection model at the hot work site.
[0038] Furthermore, the monitoring targets include two main categories: hot work sites and safety equipment. Hot work sites, depending on the type of hot work, include electric welding sites, gas welding sites, and mechanical cutting sites. Safety equipment includes, but is not limited to, face masks, fume collectors, fire extinguishers, water buckets, oxygen cylinders, and acetylene cylinders. In some implementation scenarios, the monitoring targets may also include personnel entering the hot work area.
[0039] The target detection model is trained on pre-collected and labeled hot work operation image samples. These images are labeled with the true category information of each monitored target and the corresponding true bounding box location information. During forward inference, the target detection model performs feature extraction and regression prediction on the input hot work operation images, outputting the category information and bounding box location information for each monitored target. The bounding box location information is represented in the form of a rectangle, including the pixel coordinates of the top-left and bottom-right corners of the rectangle, or the pixel coordinates of the center point, as well as the width and height of the rectangle.
[0040] Step 120: When it is identified that there are at least two monitoring targets in the hot work operation image that form a preset risk category combination, calculate the actual distance between the monitoring targets based on the detection frame position information of each monitoring target in the risk category combination.
[0041] A risk category combination is a pre-defined combination of two or more monitoring targets that have a safety risk correlation at the hot work site. In one implementation, risk category combinations include combinations of gas welding ignition points and oxygen cylinders, gas welding ignition points and acetylene cylinders, mechanical cutting ignition points and fire extinguishers, electric welding ignition points and fume collectors, and ignition points and personnel.
[0042] The system iterates through and compares the category information of all monitored targets output by the target detection model. When the category information of at least two monitored targets exactly matches any of the preset risk category combinations, the system proceeds to the actual interval distance calculation process.
[0043] The actual interval distance refers to the distance between different monitoring targets within a risk category combination in the real physical space of the industrial site. Based on the detection frame position information of each monitoring target within the risk category combination, and combined with the pre-established image-real space mapping relationship, the system converts the detection frame position information into position parameters in the real physical space, and calculates the actual interval distance between each pair of monitoring targets within the risk category combination.
[0044] Step 130: When the actual interval distance is determined to be less than the safe distance threshold corresponding to the risk category combination, an early warning message is generated.
[0045] Each risk category combination is configured with a corresponding safety distance threshold. In one implementation, the safety distance threshold for the combination of mechanical cutting ignition point and fire extinguisher is set to 1 meter, the safety distance threshold for the combination of gas welding ignition point and acetylene cylinder is set to 2 meters, and the safety distance threshold for the combination of gas welding ignition point and oxygen cylinder is set to 2 meters. The safety distance thresholds can be adjusted according to relevant national or industry safety regulations for hot work operations.
[0046] The system compares the calculated actual interval distance with the safety distance threshold for the corresponding risk category combination. When the actual interval distance is less than the corresponding safety distance threshold, the system generates a warning message. The warning message includes, but is not limited to, a visual alarm displaying "Warning!" overlaid on the detection box of the output image, sending alarm SMS, email or push notifications to safety management personnel, triggering on-site audible and visual alarm devices, and other forms.
[0047] Through the coordinated implementation of steps 110 to 130 above, the system can not only identify each monitoring target in the hot work operation image, but also proactively determine potential risks based on the safety correlation of risk category combinations, and promptly output early warning information when the safety distance requirements are not met. This overcomes the shortcomings of existing methods that only focus on "whether a target is detected" and lack target relationship analysis, and realizes the improvement from passive detection to proactive early warning, significantly enhancing the safety monitoring capabilities of industrial hot work sites.
[0048] In one embodiment, step 120, which calculates the actual distance between monitoring targets based on the detection frame location information of each monitoring target within the risk category combination, specifically includes the following steps: Step 210: Extract the pixel coordinates of the bottom midpoint of the detection frame position information of the monitored target, and use them as the grounding point coordinates of the monitored target.
[0049] For each monitored target within the risk category combination, the system obtains the coordinates of the two endpoints of the bottom edge of the detection box in the pixel coordinate system from the corresponding detection box position information, and takes the arithmetic mean of the two endpoint coordinates as the pixel coordinates of the midpoint of the bottom edge.
[0050] At the hot work site, all monitored targets, including gas welding ignition points, mechanical cutting ignition points, oxygen cylinders, acetylene cylinders, fire extinguishers, and water buckets, are placed on the ground. Therefore, the actual location corresponding to the pixel coordinates of the midpoint of the bottom edge of the detection frame is the grounding point where the monitored target contacts the ground. The system outputs the pixel coordinates of the midpoint of the bottom edge as the grounding point coordinates of the corresponding monitored target.
[0051] Step 220: Use the pre-established planar coordinate transformation matrix to map and transform the ground point pixel coordinates of each monitoring target to obtain the true ground coordinates of each monitoring target in the world coordinate system of the ground plane.
[0052] The planar coordinate transformation matrix is a transformation relationship established in advance through the camera calibration process, which maps two-dimensional coordinates in the pixel coordinate system to two-dimensional coordinates in the ground plane world coordinate system.
[0053] The system substitutes the grounding point coordinates of each monitored target into the plane coordinate transformation matrix and performs matrix multiplication to obtain the true ground coordinates of each monitored target in the world coordinate system. The true ground coordinates include lateral and longitudinal position parameters, reflecting the true spatial position of the monitored target on the industrial site's ground plane.
[0054] Step 230: Calculate the planar Euclidean distance between the monitoring targets based on the actual ground coordinates of each monitoring target to obtain the actual interval distance.
[0055] The system calculates the planar Euclidean distance between the ground coordinates of any two monitored targets within a risk category combination, in the world coordinate system on the ground plane.
[0056] The planar Euclidean distance is calculated as follows: The difference between the lateral position parameters of the two monitored targets is squared, and the difference between the longitudinal position parameters of the two monitored targets is squared. The two squared values are summed, and the square root of the sum is taken. The final square root value is the planar Euclidean distance. The system outputs the above planar Euclidean distance as the actual interval distance between monitored targets within the risk category combination to step 130 for subsequent comparison.
[0057] Through the implementation of steps 210 to 230, the system cleverly utilizes the objective prior condition that the monitoring targets at the hot work site are all placed on the ground, simplifying the original three-dimensional distance measurement problem into a two-dimensional Euclidean distance calculation problem on the ground plane. This avoids the complex modeling of the height position of the monitoring targets, significantly reduces the complexity of distance calculation and improves the stability of distance calculation, enabling accurate distance measurement even when using only a monocular camera.
[0058] Furthermore, in one embodiment, the planar coordinate transformation matrix used in step 220 is obtained through the following steps 310 to 340: Step 310: Obtain the original projection matrix mapped from the 3D world coordinate system to the pixel coordinate system through the preset camera calibration process.
[0059] The imaging process of a camera involves four coordinate systems: the world coordinate system, the camera coordinate system, the image coordinate system, and the pixel coordinate system. There are sequential linear mapping relationships between these coordinate systems.
[0060] The transformation relationship between image coordinate system and pixel coordinate system is as follows: the horizontal coordinate u in pixel coordinate system is equal to the horizontal coordinate x in image coordinate system divided by the physical distance per pixel on the image plane parallel to the horizontal axis. In addition, the horizontal coordinate of the origin of the image coordinate system in the pixel coordinate system The vertical coordinate v in the pixel coordinate system is equal to the vertical coordinate y in the image coordinate system divided by the physical distance per pixel parallel to the vertical axis on the image plane. In addition, the vertical coordinate of the image coordinate system origin in the pixel coordinate system ,Right now: ; in and These are equal to half the image length and half the image width, respectively. and The unit is millimeters per pixel.
[0061] The transformation relationship between the camera coordinate system and the image coordinate system is as follows: the horizontal coordinate x in the image coordinate system is equal to the focal length f and the horizontal coordinate in the camera coordinate system. The product divided by the depth coordinates in the camera coordinate system The vertical coordinate y in the image coordinate system is equal to the focal length f and the vertical coordinate in the camera coordinate system. The product divided by the depth coordinates in the camera coordinate system ,Right now: ; The transformation relationship between the world coordinate system and the camera coordinate system is as follows: Homogeneous coordinate vector in the camera coordinate system It is equal to a 4×4 extrinsic transformation matrix composed of a 3×3 rotation matrix R and a three-dimensional translation vector t. Left-multiply the homogeneous coordinate vector in the world coordinate system ,Right now: .
[0062] The system concatenates and combines the above three sets of transformation relationships to obtain the original projection matrix M, which maps the 3D world coordinate system to the pixel coordinate system. The original projection matrix M has a dimension of 3×4, and each element in the original projection matrix M is determined by both camera intrinsic and extrinsic parameters. The camera intrinsic parameters include the focal length f and the pixel physical size. and Image Center and The camera extrinsic parameters include the rotation matrix R and the translation vector t.
[0063] The system solves for the original projection matrix M through a camera calibration process. Specifically, the system selects four calibration points on the ground at the hot work site with known real-world distances, for example, the four vertices of a square with a side length of 2 meters. The system captures images containing these four calibration points using a camera and obtains the pixel coordinates corresponding to the four calibration points from the images. The system substitutes the world coordinates and corresponding pixel coordinates of the four calibration points into the mapping relationship of the original projection matrix M to construct a system of equations, and solves the system of equations to obtain all elements in the original projection matrix M.
[0064] Step 320: Based on the prior physical condition that all monitoring targets are placed on the ground plane, set the height dimension parameter in the three-dimensional world coordinate system to zero.
[0065] The system utilizes the objective prior conditions of the hot work site, namely that the grounding points of all monitored targets, such as gas welding ignition points, mechanical cutting ignition points, oxygen cylinders, acetylene cylinders, fire extinguishers, and water buckets, are all located above the industrial site's ground plane. The system uses the depth dimension parameter, representing the height direction, in a three-dimensional world coordinate system. By setting it directly to zero, the world coordinates of the monitored target are transformed from a three-dimensional form. Simplified to two-dimensional form .
[0066] Step 330: Eliminate the matrix elements corresponding to the height dimension parameter in the original projection matrix through matrix dimensionality reduction operation to obtain a simplified projection matrix.
[0067] Because step 320 involves the height dimension parameter in world coordinates Set to zero, in the original projection matrix M and The corresponding columns no longer contribute effectively in matrix multiplication. The system performs matrix dimensionality reduction on the original projection matrix M, removing parameters related to the height dimension from the original projection matrix M. The corresponding column elements retain the horizontal parameters. Longitudinal parameters And the column elements corresponding to the homogeneous terms, yielding a 3×3 simplified projection matrix. Simplify the projection matrix. The representation is based on pixel coordinates. with the world coordinates of the ground plane The direct mapping relationship between them is specifically represented as follows: ; in, , , , , , , , , is an element in matrix M.
[0068] Step 340: Perform an inversion operation on the simplified projection matrix to generate a planar coordinate transformation matrix that maps the pixel coordinate system to the ground plane world coordinate system.
[0069] The system simplifies the projection matrix. Performing matrix inversion yields the planar coordinate transformation matrix. The inverse matrix. The direction of action of the plane coordinate transformation matrix and the simplified projection matrix. Conversely, the planar coordinate transformation matrix realizes the transformation from two-dimensional coordinates in the pixel coordinate system. Two-dimensional coordinates in the world coordinate system on the ground plane The reverse mapping.
[0070] It should be noted that when the installation position or shooting angle of the camera changes, the system re-executes steps 310 to 340 to re-establish the planar coordinate transformation matrix corresponding to the new shooting angle, so as to ensure the accuracy of coordinate mapping.
[0071] Through the implementation of steps 310 to 340, the system makes full use of the physical prior condition that the monitoring targets at the hot work site are all located on the ground plane, reducing the complex coordinate mapping problem that originally needed to be performed in three-dimensional space to a two-dimensional mapping problem on the ground plane, simplifying the original 3×4 projection matrix into a 3×3 simplified projection matrix, greatly reducing the amount of calculation for coordinate transformation, reducing the complexity of camera calibration, and enabling stable and reliable distance measurement at the industrial hot work site using only a monocular camera.
[0072] Furthermore, in one embodiment, the target detection model used in step 110 includes a backbone network, a neck network, and a detection head network connected in sequence in terms of network structure, and a global attention mechanism module is connected in series between the neck network and the detection head network. The target detection model is based on the YOLOv5 detection framework and is constructed by embedding the global attention mechanism module before the detection head network.
[0073] Specifically, step 110 is broken down into the following steps: Step 410: Input the hot work operation image into the backbone network and neck network in sequence for feature extraction, and output the intermediate feature map.
[0074] The system uses hot work operation images as input to the target detection model. The backbone network is responsible for multi-scale feature extraction from the hot work operation images, outputting a preliminary feature map containing shallow detail information and deep semantic information. The neck network performs multi-scale feature fusion on the preliminary feature map output by the backbone network, integrating feature information from different levels, and outputting an intermediate feature map with uniform scale and rich semantics.
[0075] Step 420: Input the intermediate feature map into the global attention mechanism module, and perform channel dimension weight redistribution and spatial dimension focusing processing in sequence to output the enhanced feature map.
[0076] A global attention mechanism module is deployed between the neck network and the detection head network. This module performs two-dimensional attention enhancement on the intermediate feature map output by the neck network: First, it redistributes the weights of the feature responses of each channel, assigning higher weights to channels containing key semantics such as ignition points, flames, and safety equipment. Second, it focuses on different spatial locations in the image, assigning higher weights to spatial regions containing ignition points and small safety equipment. After these two stages of attention enhancement, the global attention mechanism module outputs an enhanced feature map.
[0077] Step 430: Input the enhanced feature map into the detection head network and output the category information and detection box position information of each monitored target.
[0078] The detection head network performs classification and regression predictions on the enhanced feature maps output by the global attention mechanism module. The classification prediction branch outputs the monitoring target category information corresponding to each candidate detection box, and the regression prediction branch outputs the position coordinate information of each candidate detection box. After post-processing operations such as non-maximum suppression, the detection head network finally outputs the category information and detection box position information of each monitoring target in the hot work operation image.
[0079] Through the implementation of steps 410 to 430, the system introduces a global attention mechanism module on the basis of the standard target detection network structure of backbone network-neck network-detection head network. This enables the feature map to fully enhance the feature response of key areas and key channels at the hot work site before being transmitted to the detection head network. This effectively alleviates problems such as complex backgrounds at the hot work site, free flames, high brightness during cutting, drastic changes in welding brightness, and missed detection of small targets, and significantly improves the model's detection accuracy for hot work points and small safety equipment.
[0080] In one embodiment, step 420, which involves inputting the intermediate feature map into the global attention mechanism module for sequential channel dimension weight reallocation and spatial dimension focusing, specifically includes the following steps: Step 510: The intermediate feature map is mapped using the multilayer perceptron in the global attention mechanism module to learn the weight distribution coefficients of each channel and generate the channel attention mapping matrix.
[0081] Reference Figure 2 , Figure 2 This is a schematic diagram of the global attention mechanism module provided by the present invention. Figure 2As shown, the global attention mechanism module comprises two sub-modules: a channel attention sub-module and a spatial attention sub-module. The core of the channel attention sub-module consists of a multi-layer perceptron. The system uses the intermediate feature map output by the neck network (denoted as the input feature map)... The input is fed into a multilayer perceptron for nonlinear mapping processing, and the multilayer perceptron learns the intermediate feature maps. The system calculates the statistical distribution characteristics along the channel dimension and outputs the weight distribution coefficients for each channel. The system then organizes the weight distribution coefficients of all channels into a channel attention mapping matrix. Channel attention mapping matrix This reflects the importance of each channel in the task of identifying hot work points and safety equipment.
[0082] Step 520: Multiply the channel attention mapping matrix element-wise with the intermediate feature map to obtain the channel weighted feature map.
[0083] The system will use the channel attention mapping matrix obtained in step 510. With intermediate feature map Perform element-wise multiplication at the corresponding channel positions to process the intermediate feature map. Feature responses on different channels are mapped according to the channel attention matrix. The weights in the graph are redistributed to obtain the channel-weighted feature map (denoted as the intermediate state feature). ).
[0084] Step 530: Input the channel-weighted feature map into two sequentially connected convolutional layers to extract spatial distribution information and generate a spatial attention mapping matrix.
[0085] The spatial attention submodule consists of two sequentially connected convolutional layers. In one implementation, the kernel size of both convolutional layers is set to 7×7. The system uses channel-weighted feature maps... The input is fed into two sequentially connected convolutional layers. The first convolutional layer weights the feature maps by channel. Feature aggregation is performed within the spatial neighborhood. The second convolutional layer further extracts spatial distribution information based on the output of the first convolutional layer. The two convolutional layers are cascaded to output a spatial attention mapping matrix. Spatial attention mapping matrix This reflects the importance of different spatial locations in the image for identifying ignition points and safety equipment.
[0086] Step 540: Multiply the spatial attention mapping matrix element-wise with the channel-weighted feature map to obtain the enhanced feature map.
[0087] The system will use the spatial attention mapping matrix obtained in step 530. Channel-weighted feature map Perform element-wise multiplication at the corresponding spatial locations to weight the channel feature map. Feature responses at different spatial locations according to the spatial attention mapping matrix The weights in the graph are redistributed to obtain the enhanced feature map (i.e., the output feature map). Enhanced feature map It includes both strengthening key semantic channels in the channel dimension and focusing on the areas where ignition points and safety equipment are located in the spatial dimension, thereby achieving cross-dimensional attention interaction between channels and space.
[0088] Through the implementation of steps 510 to 540, the global attention mechanism module enhances the intermediate feature map in a cascaded manner, first the channel and then the space, so that the target detection model can focus on both the key semantic channel and the key spatial region. This simulates the human eye's visual attention mechanism for key areas of the image, effectively solving the problems of small hot work targets, large changes in flame shape, and the susceptibility of small safety equipment such as masks and fire extinguishers to interference in complex backgrounds. It significantly enhances the feature extraction capability and detection accuracy of the target detection model in complex hot work scenarios.
[0089] Furthermore, in one embodiment, the target detection model used in step 110 is trained through the following steps 610 to 640: Step 610: Input the hot work operation image samples containing hot work point features and safety equipment features into the initial network model for prediction, and output the sample prediction classification probability.
[0090] The system pre-collects hot work operation image samples. Each hot work operation image sample is labeled with the true category information and true detection box location information of the monitoring targets such as the hot work point and safety equipment. The system inputs the hot work operation image samples in batches into the initial network model for forward inference. The initial network model outputs the predicted classification probability of each candidate detection box. Sample predicted classification probability It represents the confidence of the initial network model in that the target in the current candidate detection box belongs to the positive sample category.
[0091] Step 620: Calculate the dynamic adjustment factor based on the sample predicted classification probability. The dynamic adjustment factor is negatively correlated with the sample predicted classification probability to reduce the weight of easily classified negative background samples in the loss calculation and increase the weight of difficult-to-classify small target positive samples in the loss calculation.
[0092] In hot work operation image samples, due to the complex background, small targets such as safety shoes, masks, oxygen cylinders, and acetylene cylinders occupy a small area of the image, while the background area occupies most of the pixels, resulting in an extreme imbalance between positive and negative samples. If the traditional binary classification cross-entropy loss is used directly, a large number of easily classified negative background samples will dominate the loss calculation, causing the effective information contained in the positive samples to be buried.
[0093] To alleviate the above problems, the system predicts classification probabilities based on samples. Calculate the dynamic adjustment factor. The dynamic adjustment factor is calculated as follows: Where γ is an adjustable parameter ranging from [0,5]. When γ is zero, the dynamic adjustment factor degenerates into a constant 1, and the loss function degenerates into the standard cross-entropy loss. When the sample predicts the classification probability... When the value is close to 1, it indicates that the current sample is an easily classifiable sample, and the dynamic adjustment factor is... When the value approaches zero, the contribution of the corresponding sample to the loss calculation is suppressed; when the sample predicts the classification probability... A smaller value indicates that the current sample is difficult to classify; the dynamic adjustment factor... When the value approaches 1, the contribution of the corresponding sample in the loss calculation is retained. This achieves a negative correlation between the dynamic adjustment factor and the predicted classification probability of the sample, reducing the weight of easily classified negative background samples in the loss calculation and increasing the weight of difficult-to-classify small target positive samples in the loss calculation.
[0094] Step 630: Multiply the dynamic adjustment factor by the binary cross-entropy loss value to construct an improved focus loss function that includes a class balance term.
[0095] The system introduces a class balance factor based on the binary cross-entropy loss. Category balance factor The value range of is [0, 1], where positive samples are assigned a weight of α and negative samples are assigned a weight of 1-α. This constructs the weighted binary cross-entropy loss value, which is expressed as: .
[0096] The system further uses the dynamic adjustment factor obtained in step 620 Multiplying the weighted binary cross-entropy loss value by the weighted cross-entropy loss value, an improved focus loss function with a class balance term is constructed. The expression for the improved focus loss function is: Furthermore, by adding a class balance factor αt to the expression, a further balance between positive and negative samples is achieved. The improved focus loss function possesses both class balancing capability and dynamic adjustment capability for easy and difficult samples.
[0097] Step 640: Calculate the model loss value for the current training round based on the improved focus loss function, and update the parameters of the initial network model through the backpropagation algorithm based on the model loss value until the initial network model meets the preset convergence condition to obtain the object detection model.
[0098] The system calculates the loss value of the model for the current training round by summing or averaging the loss values of all candidate detection boxes according to the improved focus loss function constructed in step 630.
[0099] The system calculates the gradients corresponding to the parameters of each layer in the initial network model based on the model loss value using the backpropagation algorithm, and iteratively updates the parameters of the initial network model using parameter optimization algorithms such as stochastic gradient descent and Adam optimization. In one implementation, the system sets a preset convergence condition: the model loss value no longer decreases for several consecutive training rounds, or the number of training rounds reaches a preset maximum, such as 150 rounds. When the initial network model meets the preset convergence condition, the system saves the parameters of the current network model, resulting in a trained object detection model.
[0100] Through the implementation of steps 610 to 640, the system addresses the characteristics of extreme imbalance between positive and negative samples and the biased distribution of easy and difficult samples in hot work operation image samples. It constructs an improved focus loss function that simultaneously possesses class balancing ability and dynamic adjustment ability for easy and difficult samples. This effectively reduces the dominant effect of background negative samples on the training process and improves the model's ability to identify small targets such as hot work points, masks, and oxygen cylinders. As a result, it significantly improves the detection accuracy and robustness of the target detection model in complex hot work operation scenarios.
[0101] In one embodiment, the industrial hot work safety monitoring and early warning system performs the following steps to build the dataset required to train the target detection model: The system acquires raw image and video data of industrial hot work operations. The raw image data comes from 500 photographs taken on-site, and the raw video data comes from 142 minutes of on-site video footage. The industrial hot work safety monitoring and early warning system executes a video frame extraction program, extracting and saving the raw video data as consecutive frame images at a frequency of once every three frames.
[0102] Furthermore, the continuous frame images are filtered to remove redundant images with high similarity and invalid images that do not show flame characteristics before or after the hot work operation. After the filtering process, for cases where the number of oxygen cylinders, acetylene cylinders, and water buckets is less than the number of hot work points, the industrial hot work operation safety monitoring and early warning system acquires separately captured supplementary image data to increase the sample size of oxygen cylinders, acetylene cylinders, and water buckets, ensuring the balance of samples of each type in the dataset.
[0103] Furthermore, the filtered and supplemented images were organized into a hot work operation dataset. This dataset contains several images taken from actual scenes in the industrial park. All images are in JPG format and use RGB channels. Based on the different types of hot work operations, the industrial hot work operation safety monitoring and early warning system divides the dataset into three sub-datasets: electric welding hot work dataset, gas welding hot work dataset, and mechanical cutting hot work dataset. Within each sub-dataset, the system selects ten images as test set images to verify the training effect, and divides the remaining images into training and validation sets in a 6:1 ratio.
[0104] Next, the system receives a txt format annotation file generated after classifying and annotating the images in the hot work operation dataset using an image annotation tool. The txt format annotation file contains the category information and location coordinates of each monitored target, which the target detection model can read and use during network training. Depending on the specific task, the monitored targets detected in the electric welding hot work dataset include the welding ignition point, mask, and fume collector; the monitored targets detected in the mechanical cutting hot work dataset include the mechanical cutting ignition point, fire extinguisher, and water bucket; and the monitored targets detected in the gas welding hot work dataset include the gas welding ignition point, oxygen cylinder, and acetylene cylinder. The annotated subsets are then classified and statistically analyzed. The overall dataset after annotation is shown in Table 1, which is the dataset annotation table provided by this invention. Table 1:
[0105] In one embodiment, the industrial hot work safety monitoring and early warning system performs the following steps to verify and evaluate the performance of the trained target detection model: The industrial hot work safety monitoring and early warning system conducts performance evaluation and comparative testing on the trained target detection model. The system tests the detection accuracy of the first baseline network model, the second baseline network model, the second baseline network model incorporating the Global Attention (GAM) mechanism module, and the target detection model on electric welding hot work datasets, mechanical cutting hot work datasets, and gas welding hot work datasets. The first baseline network model uses the YOLOv7 network architecture, and the second baseline network model uses the YOLOv5 network architecture.
[0106] The industrial hot work safety monitoring and early warning system acquires and summarizes the mean average precision (mAP) evaluation results of different network models. Specific results are shown in Table 2. Table 2: In the electric welding hot work dataset, the average precision of the first baseline network model is 0.789, the average precision of the second baseline network model is 0.8, the average precision of the second baseline network model with the introduction of the global attention mechanism module is 0.855, and the average precision of the target detection model is the highest, reaching 0.885.
[0107] In the mechanical cutting hot work dataset, the mean accuracy of the first baseline network model is 0.84, the mean accuracy of the second baseline network model is 0.816, the mean accuracy of the second baseline network model with the introduction of the global attention mechanism module is 0.858, and the mean accuracy of the target detection model is significantly improved to 0.931.
[0108] In the gas welding ignition dataset, the mean accuracy of the first baseline network model is 0.738, the mean accuracy of the second baseline network model is 0.824, the mean accuracy of the second baseline network model with the introduction of the global attention mechanism module is 0.864, and the mean accuracy of the target detection model reaches 0.887.
[0109] Reference Figure 3 , Figure 3 This is a trend chart comparing the average accuracy of different models provided by this invention across three hot work datasets. (See attached image.) Figure 3 As shown, the target detection model provided in this application outperforms other models in terms of average accuracy across all specific monitoring target categories. Detailed data comparisons verify the significant performance advantages of the target detection model after integrating the global attention mechanism module and improving the focus loss function. The evaluation results objectively demonstrate that the target detection model not only achieves a leap in overall accuracy at the macro-scale dataset level, but also possesses extremely high accuracy in identifying small targets such as fire extinguishers, oxygen cylinders, and smoke collectors—critical safety equipment—providing a highly reliable visual perception foundation for subsequent safety distance warning determination.
[0110] Reference Figure 4 , Figure 4 This is a schematic diagram of the industrial hot work safety monitoring and early warning system provided by the present invention. The system includes: The target detection module is used to input hot work operation images into the target detection model and obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples; The distance calculation module is used to calculate the actual distance between monitoring targets when the category information of at least two monitoring targets in the hot work operation image constitutes a preset risk category combination, based on the detection frame position information of each monitoring target in the risk category combination. The early warning generation module is used to generate early warning information when the actual interval distance is determined to be less than the safe distance threshold corresponding to the risk category combination.
[0111] It should be noted that the industrial hot work safety monitoring and early warning system provided by the present invention can execute the industrial hot work safety monitoring and early warning method of any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0112] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute the industrial hot work safety monitoring and early warning method provided in the above embodiments.
[0113] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to execute the industrial hot work safety monitoring and early warning method provided in the above embodiments.
[0115] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the industrial hot work safety monitoring and early warning method provided in the above embodiments.
[0116] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for safety monitoring and early warning of industrial hot work operations, characterized in that, include: The hot work operation image is input into the target detection model to obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples; When it is identified that at least two of the monitored targets in the hot work operation image constitute a preset risk category combination, the actual distance between the monitored targets is calculated based on the detection frame position information of each monitored target within the risk category combination. When the actual interval distance is determined to be less than the safe distance threshold corresponding to the risk category combination, an early warning message is generated.
2. The industrial hot work safety monitoring and early warning method according to claim 1, characterized in that, The step of calculating the actual interval distance between the monitoring targets based on the detection frame position information of each monitoring target within the risk category combination includes: Extract the pixel coordinates of the bottom midpoint of the detection frame position information of the monitored target, and use them as the grounding point coordinates of the monitored target; The ground point pixel coordinates of each monitoring target are mapped and transformed using a pre-established planar coordinate transformation matrix to obtain the true ground coordinates of each monitoring target in the world coordinate system of the ground plane; Based on the actual ground coordinates corresponding to each monitoring target, the planar Euclidean distance between the monitoring targets is calculated to obtain the actual interval distance.
3. The industrial hot work safety monitoring and early warning method according to claim 2, characterized in that, Before mapping and transforming the grounding point pixel coordinates of each monitored target using a pre-established planar coordinate transformation matrix, the process also includes: The original projection matrix, which maps from the 3D world coordinate system to the pixel coordinate system, is obtained through a preset camera calibration process. Based on the prior physical condition that the monitoring targets are all placed on the ground plane, the height dimension parameter in the three-dimensional world coordinate system is set to zero. A simplified projection matrix is obtained by eliminating the matrix elements corresponding to the height dimension parameter in the original projection matrix through matrix dimensionality reduction operations. The simplified projection matrix is inverted to generate the planar coordinate transformation matrix that maps the pixel coordinate system to the ground plane world coordinate system.
4. The industrial hot work safety monitoring and early warning method according to claim 1, characterized in that, The target detection model includes a backbone network, a neck network, and a detection head network connected in sequence, and a global attention mechanism module is connected in series between the neck network and the detection head network. The step of inputting the hot work operation image into the target detection model and obtaining the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model includes: The hot work operation image is sequentially input into the backbone network and the neck network for feature extraction, and an intermediate feature map is output. The intermediate feature map is input into the global attention mechanism module, where channel-dimensional weight redistribution and spatial-dimensional focusing are performed sequentially to output an enhanced feature map. The enhanced feature map is input into the detection head network, and the category information and detection box position information of each monitored target are output.
5. The industrial hot work safety monitoring and early warning method according to claim 4, characterized in that, The process of inputting the intermediate feature map into the global attention mechanism module, sequentially performing channel-dimensional weight redistribution and spatial-dimensional focusing processing, and outputting an enhanced feature map includes: The intermediate feature map is mapped by the multilayer perceptron in the global attention mechanism module to learn the weight distribution coefficients of each channel and generate a channel attention mapping matrix. The channel attention mapping matrix is multiplied element-wise with the intermediate feature map to obtain the channel weighted feature map; The channel-weighted feature map is input into two sequentially connected convolutional layers to extract spatial distribution information and generate a spatial attention mapping matrix. The enhanced feature map is obtained by multiplying the spatial attention mapping matrix element-wise with the channel weighted feature map.
6. The industrial hot work safety monitoring and early warning method according to claim 1, characterized in that, The target detection model is trained through the following steps: The hot work operation image samples containing hot work point features and safety equipment features are input into the initial network model for prediction, and the output sample prediction classification probability is output. A dynamic adjustment factor is calculated based on the predicted classification probability of the sample, wherein the dynamic adjustment factor is negatively correlated with the predicted classification probability of the sample, so as to reduce the weight of easily classified negative background samples in the loss calculation and increase the weight of difficult-to-classify small target positive samples in the loss calculation. The dynamic adjustment factor is multiplied by the binary cross-entropy loss value to construct an improved focus loss function that includes a class balance term; The model loss value for the current training round is calculated based on the improved focus loss function, and the parameters of the initial network model are updated through backpropagation algorithm based on the model loss value until the initial network model meets the preset convergence condition, thus obtaining the target detection model.
7. The industrial hot work safety monitoring and early warning method according to claim 1, characterized in that, Before inputting the hot work operation image into the target detection model, the following steps are also included: Receive continuous video streams of hot work operations collected by inspection equipment, extract video frames from the continuous video stream at preset frame extraction intervals to obtain candidate image sequences; Calculate the inter-frame similarity between adjacent frames in the candidate image sequence one by one; Images with inter-frame similarity greater than a preset redundancy threshold are removed to obtain filtered images, which are then input into the target detection model as the hot work image.
8. An industrial hot work safety monitoring and early warning system, characterized in that, include: The target detection module is used to input the hot work operation image into the target detection model and obtain the category information and detection box position information of each monitored target in the hot work operation image output by the target detection model; wherein, the target detection model is trained based on hot work operation image samples; The distance calculation module is used to calculate the actual distance between the monitoring targets when it is identified that at least two of the monitoring targets in the hot work operation image have category information that constitute a preset risk category combination, based on the detection frame position information of each monitoring target in the risk category combination; The early warning generation module is used to generate early warning information when it is determined that the actual interval distance is less than the safe distance threshold corresponding to the risk category combination.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the industrial hot work safety monitoring and early warning method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the industrial hot work safety monitoring and early warning method as described in any one of claims 1 to 7.