CN-122023863-A - YOLO 11-based gas safety hidden danger detection method and system
Abstract
The embodiment of the specification discloses a method and a system for detecting potential safety hazards based on YOLO11, wherein the method for detecting the potential safety hazards comprises the steps of obtaining a gas safety inspection image with potential safety hazards and carrying out data labeling to obtain a model training data set, training a potential safety hazard detection model to be trained based on the model training data set, optimizing model parameters through a loss function to obtain a trained potential safety hazard detection model, wherein the potential safety hazard detection model to be trained adopts an improved YOLO11, and comprises a corrosion perception module, a regression decoupling head, a category decoupling head and an attribute decoupling head, wherein the corrosion perception module is arranged between a backbone network and a neck structure and used for enhancing corrosion high-frequency texture characteristic response, the regression decoupling head, the category decoupling head and the attribute decoupling head are arranged in a detection head, and detecting the gas safety inspection image to be detected based on the trained potential safety hazard detection model and outputting detection results. The problem of current degree of depth learning model exist when being applied to gas potential safety hazard detection accuracy and practicality poor is solved.
Inventors
- LI JUN
- Zhu Shenbin
- Shi Pengzhe
- ZHOU WEI
- SHEN WEICHENG
- ZHU NING
- WANG XIAOYUN
- TONG DA
- WEN TAO
- LI SHUO
Assignees
- 杭州缥缈峰科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251208
Claims (10)
- 1. The method for detecting the potential safety hazard of the fuel gas based on the YOLO11 is characterized by comprising the following steps of: Acquiring a gas security inspection image with potential safety hazards and performing data annotation to obtain a model training data set, wherein the potential safety hazards comprise equipment corrosion hidden hazards and standard hidden hazards; training a hidden danger detection model to be trained based on a model training data set, and optimizing model parameters through a loss function to obtain a trained hidden danger detection model; The hidden danger detection model to be trained adopts an improved YOLO11, and comprises a corrosion sensing module, a regression decoupling head, a category decoupling head and an attribute decoupling head, wherein the corrosion sensing module is arranged between a backbone network and a neck structure and used for enhancing corrosion high-frequency texture characteristic response; and detecting the gas security inspection image to be detected based on the trained hidden danger detection model, and outputting a detection result.
- 2. The YOLO 11-based gas safety hazard detection method according to claim 1, wherein the corrosion sensing module comprises a shallow corrosion response unit, a middle frequency domain enhancement unit and a deep fusion unit; the shallow corrosion response unit adopts convolution kernels with various different scales to respectively extract the spatial characteristics of local corrosion textures; The middle-layer frequency domain enhancement unit converts the spatial characteristics of the local corrosion texture into a frequency domain through fast Fourier transform, adopts a self-adaptive high-pass filter function to strengthen high-frequency components in the spatial characteristics, and then maps the high-frequency components back to the spatial domain through inverse fast Fourier transform to obtain the frequency domain characteristics of the local corrosion texture; the deep fusion unit performs channel attention and spatial attention joint screening on the multi-scale spatial features and the multi-scale frequency domain features; And the shallow corrosion response unit, the middle-layer frequency domain enhancement unit and the deep fusion unit are connected through residual errors to form a cross-layer channel fusion path.
- 3. The YOLO 11-based gas safety hidden danger detection method according to claim 1, wherein the attribute loss corresponding to the attribute decoupling head adopts a multi-tag binary cross entropy loss function including all equipment safety states.
- 4. The method for detecting the potential safety hazard of the fuel gas based on the YOLO11, which is characterized in that the attribute decoupling head adopts a conditional modulation mechanism comprising a category embedded vector and an attribute embedded vector, wherein the attribute loss corresponding to the attribute decoupling head further comprises a regularization constraint item for minimizing mutual information of the category embedded vector and the attribute embedded vector; The category embedded vectors correspond to different device types, and the attribute embedded vectors correspond to different device security states.
- 5. The method for detecting the potential safety hazard of the gas based on the YOLO11 is characterized in that the attribute loss corresponding to the attribute decoupling head further comprises a balance coefficient for balancing a multi-label binary cross entropy loss function and a regularization constraint term, and the balance coefficient of the potential safety hazard detection model to be trained is increased along with a training period in the training process.
- 6. The YOLO 11-based gas safety hazard detection method of claim 4, wherein the potential hazard detection model to be trained employs a joint loss function comprising category loss, position loss and attribute loss during training.
- 7. The method for detecting the potential safety hazard of the fuel gas based on the YOLO11 is characterized by further comprising the step of preprocessing a fuel gas security inspection image, wherein the preprocessing comprises geometric correction, denoising and equalization.
- 8. The utility model provides a gas potential safety hazard detecting system based on YOLO11 which is characterized in that includes image acquisition module, data preprocessing module, model training module and hidden danger detection module: the image acquisition module acquires a gas security inspection image with potential safety hazards, wherein the potential safety hazards comprise equipment corrosion hidden hazards and standard hidden hazards; The data preprocessing module is used for marking data to obtain a model training data set; The hidden danger detection model to be trained adopts an improved YOLO11, and comprises a corrosion sensing module, a regression decoupling head, a class decoupling head and an attribute decoupling head, wherein the corrosion sensing module is arranged between a backbone network and a neck structure and used for enhancing corrosion high-frequency texture characteristic response; The hidden danger detection module is used for detecting the gas security inspection image to be detected based on the trained hidden danger detection model and outputting a detection result.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-7 when the computer program is executed.
- 10. A computer readable storage medium having stored thereon a computer program having instructions stored therein, which when run on a computer or processor, cause the computer or processor to perform the steps of the method according to any of claims 1-7.
Description
YOLO 11-based gas safety hidden danger detection method and system Technical Field Embodiments of the present disclosure relate to the field of gas safety detection technology, and in particular, to a method for detecting a gas safety hazard through image recognition. Background Gas safety is the important importance of urban infrastructure operation, and is directly related to life and property safety of people and social stability. With the continuous increase of industrial and commercial fuel gas demands, the equipment diversity and the use environment complexity of the industrial and commercial fuel gas are remarkably improved. At present, the gas safety hidden trouble mainly depends on a manual door-opening security check mode, so that the efficiency is low, the cost is high, and the gas safety hidden trouble is influenced by personnel experience and subjective factors, so that the checking accuracy and coverage rate are difficult to guarantee. In recent years, a deep learning technology based on computer vision provides a new idea for detecting potential safety hazards of fuel gas. The target detection algorithm can directly locate and identify hidden danger targets from the image, such as detecting rusted areas through texture features. The YOLO series model is used as a representative of a one-stage detection algorithm, and is widely applied to industrial vision tasks with high-efficiency detection speed and good precision. The method extracts the characteristics through the backbone network, combines the characteristic pyramid to realize multi-scale fusion, gives consideration to speed and precision, and provides a feasible scheme for automatic detection of gas hidden danger. However, the application of the latest generation YOLO11 model directly to gas safety hazard detection still has obvious defects. Firstly, the backbone network design is biased to extract global semantic features, response to high-frequency local texture features is insufficient, and small targets are missed, secondly, the standard detection head only supports category and position output, and the same type of equipment in a gas scene possibly has different attribute states, and attribute discrimination interference exists in single category output. These problems limit their accuracy and practicality in gas specific scenarios. Disclosure of Invention The embodiment of the specification provides a method and a system for detecting potential safety hazards of fuel gas based on YOLO11, which solve the problems of poor accuracy and poor practicability of the existing deep learning model when the model is applied to detecting the potential safety hazards of fuel gas. The corrosion sensing module enhances the identification capability of small targets such as corrosion and the like, realizes high-precision detection, and the attribute decoupling head further outputs the compliance attribute discrimination result of the equipment on the basis of realizing target category identification and position regression, thereby improving the practicability and the interpretation of the detection result. The method avoids the remarkable increase of the depth and the width of the network, and is suitable for the deployment of edge equipment in a gas safety hidden danger detection scene. The technical scheme is as follows: In a first aspect, an embodiment of the present disclosure provides a method for detecting a gas safety hazard based on YOLO11, including the following steps: Acquiring a gas security inspection image with potential safety hazards and performing data annotation to obtain a model training data set, wherein the potential safety hazards comprise equipment corrosion hidden hazards and standard hidden hazards; training a hidden danger detection model to be trained based on a model training data set, and optimizing model parameters through a loss function to obtain a trained hidden danger detection model; The hidden danger detection model to be trained adopts an improved YOLO11, and comprises a corrosion sensing module, a regression decoupling head, a category decoupling head and an attribute decoupling head, wherein the corrosion sensing module is arranged between a backbone network and a neck structure and used for enhancing corrosion high-frequency texture characteristic response; and detecting the gas security inspection image to be detected based on the trained hidden danger detection model, and outputting a detection result. As a preferable scheme, the corrosion sensing module comprises a shallow corrosion response unit, a middle-layer frequency domain enhancement unit and a deep fusion unit; the shallow corrosion response unit adopts convolution kernels with various different scales to respectively extract the spatial characteristics of local corrosion textures; The middle-layer frequency domain enhancement unit converts the spatial characteristics of the local corrosion texture into a frequency domain through fast Fourier tr