Petrochemical device fire identification model training method and system

By adopting the fire recognition model training method based on Faster R-CNN and ResNet-50 in the fire monitoring scenario of petrochemical equipment, the problem of poor micro-target monitoring accuracy in the existing technology is solved, and high-precision fire recognition and monitoring is achieved, supporting the production safety and accident prevention of petrochemical enterprises.

CN119863640APending Publication Date: 2025-04-22CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311370422.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The existing image recognition scheme has the problem of poor micro-target monitoring accuracy in petrochemical device fire monitoring scenarios.

Method used

A fire recognition model training method for petrochemical device is adopted. By collecting and preprocessing the historical image information of the fire scene of petrochemical device, a fire recognition model based on Faster R-CNN and ResNet-50 is constructed, and through the anchor box setting of the RPN module and the multi-scale fusion of the FPN network, the training network is optimized to improve the recognition accuracy.

Benefits of technology

It has achieved the improvement of micro-target identification accuracy in petrochemical equipment fire monitoring scenarios, and has the advantages of wide detection range, strong applicability, short response time, high recognition rate of small and micro-targets and low maintenance costs. It can effectively support petrochemical enterprises' production safety monitoring and accident prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863640A_ABST
    Figure CN119863640A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a petrochemical device fire identification model training method and system, and belongs to the technical field of image processing. The method comprises the following steps: collecting historical image information of a fire scene of the petrochemical device, and preprocessing the historical image information to obtain an image sample set; performing reference network replacement in the selected basic neural network framework to obtain a first candidate network; performing RPN module construction in the first candidate network to obtain a training network; wherein the anchor frame setting of the RPN module is realized based on a K-means + + algorithm; taking the image sample set as a training sample, and performing model training based on the training network to obtain a fire identification initial model; and testing the initial fire recognition model based on a preset test set, and outputting the fire recognition model when the accuracy rate and the recall rate synchronously reach expectations. According to the scheme of the invention, accurate identification of the micro-fire target in the petrochemical scene is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a petrochemical device fire recognition model training method and a petrochemical device fire recognition model training system. Background Art

[0002] The production process of petrochemical equipment is characterized by high temperature and high pressure, and the media involved are flammable and explosive, with a high risk of fire and explosion. In recent years, fire and explosion accidents in the petrochemical industry still occur from time to time. The accidents are characterized by high danger, strong destructive power, and a wide range of impact, posing a great threat to the safety of life and property of employees and nearby residents. Moreover, with the increase in the operating life of production equipment, the frequency of medium leakage, inspection and maintenance fire operations caused by corrosion and aging of equipment and facilities has gradually increased, which has significantly increased the risk of leakage, fire, and explosion in petrochemical equipment, and further increased the difficulty of safety management.

[0003] At present, petrochemical enterprises mainly rely on a combination of external inspection and internal monitoring to monitor the production and operation status of equipment. Among them, external inspection is mainly responsible for on-site inspection at fixed times and fixed routes, while internal inspection uses DCS system, combustible gas concentration monitoring data and plant area monitoring to evaluate and judge the operation status of equipment. However, this method is affected by many factors such as personnel ability, mental state, time and space constraints, and it is difficult to ensure that abnormalities and accident signs are discovered in the first time.

[0004] In the field of computer vision, designing more efficient artificial recognition features through prior knowledge is an effective means of research in this field. Commonly used image features include: color features, texture features, shape features, spatial relationship features, etc.; Bohush et al. proposed to segment color flame images according to color features and use gray-level co-occurrence matrix to obtain the texture features of flames; Chai Qian et al. proposed an image-based flame recognition algorithm combining hidden Markov model and support vector machine to solve the problem of high false alarm rate of single hidden Markov model in image-based fire detection. In addition, some scholars have coupled the multi-frame dynamic feature detection of the target to image feature recognition, thereby obtaining a higher recognition accuracy. Commonly used image classification methods include random forest algorithm, support vector machine (SVM), Adaboost cascade classifier, artificial neural network, etc.

[0005] In recent years, algorithms based on deep neural networks have comprehensively surpassed traditional methods in large image databases such as ImageNet, PASCAL VOC, and MS COCO. Among them, a variety of efficient image recognition methods have been developed based on convolutional neural networks, including detection networks based on region proposals represented by the R-CNN series and detection networks based on regression represented by the YOLO series. Among them, region proposal algorithms have high accuracy and relatively slow detection speed, such as Faster R-CNN, MaskR-CNN, Casecade R-CNN, and HTC, while regression algorithms have fast detection speed and good performance in global information extraction, such as YOLOv1-v7, SSD, etc., but this type of algorithm performs relatively poorly in the detection of small and micro targets. In view of the problem of poor micro-target monitoring accuracy in existing image recognition schemes, it is necessary to create a new image target recognition scheme suitable for petrochemical fire monitoring scenarios. Summary of the invention

[0006] The purpose of the embodiments of the present invention is to provide a petrochemical plant fire recognition model training method and system to at least solve the problem of poor micro-target monitoring accuracy in existing image recognition solutions.

[0007] In order to achieve the above-mentioned purpose, the first aspect of the present invention provides a method for solving the problem of poor micro-target monitoring accuracy in existing image recognition schemes, and the method comprises: collecting historical image information of petrochemical plant fire scenes, and preprocessing the historical image information to obtain an image sample set; in a selected basic neural network framework, replacing the baseline network to obtain a first candidate network; constructing an RPN module in the first candidate network to obtain a training network; wherein the anchor frame setting of the RPN module is implemented based on the K-means++ algorithm; using the image sample set as a training sample, performing model training based on the training network to obtain an initial model for fire recognition; testing the initial model for fire recognition based on a preset test set, and outputting a fire recognition model when the precision and recall rates reach expectations simultaneously.

[0008] Optionally, the historical image information of the petrochemical plant fire scene includes: performing petrochemical plant fire scene image recognition and collection based on an open knowledge base to obtain an initial set of historical images; determining whether the number of images in the initial set of historical images reaches a preset number of historical images; if the number of images in the initial set of historical images does not reach the preset number of historical images, adaptively simulating the fire scene, and collecting image information of the simulated fire scene, and incorporating the image information of the simulated fire scene into the initial set of historical images until the number of images in the initial set of historical images reaches the preset number of historical images.

[0009] Optionally, the preprocessing of the historical image information to obtain an image sample set includes: performing data enhancement processing on each historical image information to obtain an intermediate image set; and annotating flame features on each image in the intermediate image set to obtain an image sample set.

[0010] Optionally, the data enhancement processing includes: one or more of image rotation processing, scaling processing, and Gaussian noise processing.

[0011] Optionally, the basic neural network framework is a Faster R-CNN network.

[0012] Optionally, the replaced baseline network is: a ResNet-50 network based on a residual structure.

[0013] Optionally, the loss function of the ResNet-50 network based on the residual structure is:

[0014]

[0015]

[0016]

[0017]

[0018] Among them, L cls is the classification loss function; L reg is the position regression loss function; p i is the probability of the predicted category, is the probability of the label category; t i To predict the location of the target, is the position of the label target; λ is the preset weight balance coefficient.

[0019] Optionally, the constructing of the RPN module in the first candidate network includes: constructing an anchor frame setting scheme for the RPN module based on the K-means++ algorithm; the anchor frame setting scheme is: performing cluster analysis based on image features to obtain feature clusters; constructing an optimization algorithm with the reduction of the sum of square errors within the feature clusters as the optimization goal, and performing anchor frame setting based on the optimization algorithm.

[0020] Optionally, the optimization algorithm is expressed as:

[0021]

[0022]

[0023] Among them, x, y are sample vectors; m is the vector dimension; n is the number of clusters; Ci is the data set of the i-th cluster; μ(i) is the center point vector of cluster Ci.

[0024] Optionally, after the RPN module is constructed, the method further includes: optimizing the FPN network of the training network by adopting a recursive loop strategy, so as to form a new image enhancement feature by superimposing the multi-scale fused features on the initial feature map of the corresponding scale; wherein the new image enhancement feature output rule is:

[0025]

[0026] in, t represents the number of iterations; B i represents the i-th stage of feature extraction of the benchmark network; F i represents the i-th feature fusion operation; the FPN network will output a set of feature maps {f i |i=1,…,S}, where S is the number of stages.

[0027] Optionally, the training network also includes: multiple model stages, each model stage includes multiple convolutional layers and multiple pooling layers; an FPN module, used to perform multi-scale fusion of image features; a RoI Pooling module, used to perform image scale conversion; and an output layer, used to output a fire image annotated with a target monitoring frame.

[0028] Optionally, the fire recognition initial model is tested based on a preset test set, and the fire recognition model is output when the precision and recall rates simultaneously reach expectations, including: taking the test set as a model input parameter, training the initial model, and obtaining a training result; obtaining the number of true targets determined by the model and the number of true targets correctly detected based on the training result; obtaining the number of all annotated true targets based on the test set; calculating the precision and recall rates based on the number of true targets determined by the model, the number of true targets correctly detected, and all true target data in the test set; when the precision is greater than a preset precision threshold, and the recall rate is also greater than a preset recall threshold, determining that the initial model meets expectations; if the precision is not greater than a preset precision threshold, or the recall rate is not greater than a preset recall threshold, determining that the initial model does not meet expectations, then re-determining the training samples, and performing correction training on the initial model until a model having a precision greater than a preset precision threshold and a recall greater than a preset recall threshold is obtained as the fire recognition model.

[0029] Optionally, the calculation rules of the precision and the recall are respectively:

[0030]

[0031]

[0032] The second aspect of the present invention provides a petrochemical plant fire recognition model training system, the system comprising: an acquisition unit, used to acquire historical image information of petrochemical plant fire scenes, and preprocess the historical image information to obtain an image sample set; a network replacement unit, used to replace the baseline network in a selected basic neural network framework to obtain a first candidate network; a module construction unit, used to construct an RPN module in the first candidate network to obtain a training network; wherein the anchor frame setting of the RPN module is implemented based on the K-means++ algorithm; a training unit, used to use the image sample set as a training sample, perform model training based on the training network, and obtain a fire recognition initial model; a testing unit, used to test the fire recognition initial model based on a preset test set, and output a fire recognition model when the precision and recall rates reach expectations simultaneously.

[0033] A third aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, enables the computer to execute the above-mentioned petrochemical plant fire identification model training method.

[0034] A third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned petrochemical plant fire identification model training method when executing the computer program.

[0035] Through the above technical solution, the scheme of the present invention has established an image recognition method for characteristic targets such as open flames and smoke that is suitable for petrochemical plant installation scenes. Compared with traditional fire detection technology, this detection technology has the advantages of wide detection range, strong applicability, short response time, high recognition rate of small and micro targets, and low maintenance cost. Relying on the automated information alarm system of industrial monitoring, it can effectively provide enterprises with more reliable and rapid feedback on key accident information, and provide favorable support for petrochemical enterprises' production safety monitoring, accident prevention and initial emergency response.

[0036] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0038] Figure 1 It is a flowchart of the steps of a petrochemical plant fire identification model training method provided by one embodiment of the present invention;

[0039] Figure 2 It is a system structure diagram of a petrochemical plant fire identification model training system provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0040] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0041] The production process of petrochemical equipment is characterized by high temperature and high pressure, and the media involved are flammable and explosive, with a high risk of fire and explosion. In recent years, fire and explosion accidents in the petrochemical industry still occur from time to time. The accidents are characterized by high danger, strong destructive power, and a wide range of impact, posing a great threat to the safety of life and property of employees and nearby residents. Moreover, with the increase in the operating life of production equipment, the frequency of medium leakage, inspection and maintenance fire operations caused by corrosion and aging of equipment and facilities has gradually increased, which has significantly increased the risk of leakage, fire, and explosion in petrochemical equipment, and further increased the difficulty of safety management.

[0042] At present, petrochemical enterprises mainly rely on a combination of external inspection and internal monitoring to monitor the production and operation status of equipment. Among them, external inspection is mainly responsible for on-site inspection at fixed times and fixed routes, while internal inspection uses DCS system, combustible gas concentration monitoring data and plant area monitoring to evaluate and judge the operation status of equipment. However, this method is affected by many factors such as personnel ability, mental state, time and space constraints, and it is difficult to ensure that abnormalities and accident signs are discovered in the first time.

[0043] In the field of computer vision, designing more efficient artificial recognition features through prior knowledge is an effective means of research in this field. Commonly used image features include: color features, texture features, shape features, spatial relationship features, etc.; Bohush et al. proposed to segment color flame images according to color features and use gray-level co-occurrence matrix to obtain the texture features of flames; Chai Qian et al. proposed an image-based flame recognition algorithm combining hidden Markov model and support vector machine to solve the problem of high false alarm rate of single hidden Markov model in image-based fire detection. In addition, some scholars have coupled the multi-frame dynamic feature detection of the target to image feature recognition, thereby obtaining a higher recognition accuracy. Commonly used image classification methods include random forest algorithm, support vector machine (SVM), Adaboost cascade classifier, artificial neural network, etc.

[0044] In recent years, algorithms based on deep neural networks have comprehensively surpassed traditional methods in large image databases such as ImageNet, PASCAL VOC, and MS COCO. Among them, a variety of efficient image recognition methods have been developed based on convolutional neural networks, including detection networks based on region proposals represented by the R-CNN series and detection networks based on regression represented by the YOLO series. Among them, region proposal algorithms have high accuracy and relatively slow detection speed, such as Faster R-CNN, MaskR-CNN, Casecade R-CNN, and HTC, while regression algorithms have fast detection speed and good performance in global information extraction, such as YOLOv1-v7, SSD, etc., but this type of algorithm performs relatively poorly in the detection of small and micro targets.

[0045] In view of the problem of poor micro-target monitoring accuracy in existing image recognition solutions, the present invention proposes a new petrochemical device fire recognition model training method. The scheme of the present invention builds an image recognition method for characteristic targets such as open flames and smoke that is suitable for petrochemical plant device scenes. Compared with traditional fire detection technology, this detection technology has the advantages of wide detection range, strong applicability, short response time, high recognition rate of small and micro targets, and low maintenance cost. Relying on the automated information alarm system of industrial monitoring, it can effectively provide enterprises with more reliable and rapid feedback on key accident information, and provide favorable support for petrochemical enterprises' production safety monitoring, accident prevention and initial emergency response.

[0046] Figure 1 FIG. 1 is a flow chart of a method for training a petrochemical plant fire identification model according to an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a petrochemical device fire identification model training method, the method comprising:

[0047] Step S10: collecting historical image information of petrochemical plant fire scenes, and preprocessing the historical image information to obtain an image sample set.

[0048] Specifically, petrochemical plant fire scene image recognition and collection are performed based on an open knowledge base to obtain an initial set of historical images; it is determined whether the number of images in the initial set of historical images reaches a preset number of historical images; if the number of images in the initial set of historical images does not reach the preset number of historical images, the fire scene is adaptively simulated, and image information of the simulated fire scene is collected, and the image information of the simulated fire scene is incorporated into the initial set of historical images until the number of images in the initial set of historical images reaches the preset number of historical images.

[0049] Furthermore, the preprocessing of the historical image information to obtain an image sample set includes: performing data enhancement processing on each historical image information to obtain an intermediate image set; and performing flame feature labeling on each image in the intermediate image set to obtain an image sample set.

[0050] Preferably, the data enhancement processing includes: one or more of image rotation processing, scaling processing, and Gaussian noise processing.

[0051] Embodiment 1:

[0052] Search for public data sets related to recognition target images related to petrochemical plant fires. If the public data sets cannot meet the training requirements, it is necessary to independently collect or shoot relevant recognition target images and typical interference images, and obtain image augmentation data sets by adding rotation, scaling, and Gaussian noise. Allocate the training sample set and test sample set of the recognition network in a certain ratio, use image annotation software to annotate, and set labels for each training sample in the training sample set.

[0053] Step S20: In the selected basic neural network framework, replace the benchmark network to obtain a first candidate network.

[0054] Specifically, the basic neural network framework is a Faster R-CNN network.

[0055] Preferably, the replaced benchmark network is: a ResNet-50 network based on a residual structure.

[0056] Preferably, the loss function of the ResNet-50 network based on the residual structure is:

[0057]

[0058]

[0059]

[0060]

[0061] Among them, L cls is the classification loss function; L reg is the position regression loss function; p i is the probability of the predicted category, is the probability of the label category; t i To predict the location of the target, is the position of the label target; λ is the preset weight balance coefficient.

[0062] Embodiment 2:

[0063] In addition, a recursive loop strategy was adopted to optimize the pyramid FPN network, which significantly improved the algorithm's ability to recognize small targets.

[0064] The output feature of the FPN network is f i Defined by:

[0065] f i =F i (f i+1 ,x i ),x i =B i (x i-1 )

[0066] In the formula, B i represents the i-th stage of feature extraction of the benchmark network, F i represents the i-th feature fusion operation. The FPN network will output a set of feature maps {f i |i=1,…,S}, where S is the number of stages, and S=4 in the figure.

[0067] The solution of the present invention adopts a recursive strategy, that is, the multi-scale fused features are superimposed on the initial feature map of the corresponding scale to form a new image enhancement feature. Experimental results show that this method can effectively enhance the target feature extraction capability and improve the algorithm recognition performance. The new network output feature is shown in the following formula:

[0068]

[0069] In the formula, t represents the number of iterations, and t is the best result for the data set in this paper when t=2.

[0070] Step S30: constructing an RPN module in the first candidate network to obtain a training network.

[0071] Specifically, an anchor frame setting scheme of the RPN module is constructed based on the K-means++ algorithm; the anchor frame setting scheme is: cluster analysis is performed based on image features to obtain feature clusters; an optimization algorithm is constructed with the reduction of the sum of square errors within the feature clusters as the optimization goal, and anchor frame setting is performed based on the optimization algorithm.

[0072] Embodiment three:

[0073] The anchor frame is an important target for the regional candidate network. The solution of the present invention uses the K-means++ algorithm to perform cluster analysis on the size characteristics of open flames and smoke in the data set, and optimizes the anchor frame settings based on the analysis results. Compared with the K-means clustering method, it optimizes the initial cluster center selection method through probability analysis, so that the algorithm has better robustness. The anchor frame obtained by cluster analysis can not only better adapt to the characteristics of different open flames and smoke, but also reduce the impact of unreasonable manual design on the detection results to a certain extent. Among them, the similarity of the measurement object is defined as the inverse of the distance, the Euclidean distance d is used as the measurement distance, and the optimization goal is to reduce the sum of squared errors (SSE) within the cluster.

[0074] Furthermore, in addition to constructing the RPN module, the training network also includes: multiple model stages, each of which includes multiple convolutional layers and multiple pooling layers; an FPN module for performing multi-scale fusion of image features; a RoIPooling module for performing image scale conversion; and an output layer for outputting a fire image annotated with a target monitoring frame. Based on this, it is also necessary to construct these modules accordingly.

[0075] Embodiment 4:

[0076] 1) Construct the 0th stage of the training network, wherein the 0th stage comprises 2 layers, the first layer comprises convolution conv, batch normalization bn, and rectified linear unit ReLU: the convolution kernel size is 64*7*7*3, stride=2, and the input image is downsampled by 1 / 2 after convolution at the first stage; the second layer comprises a maximum pooling layer MaxPooling: the kernel size is 64*3*3*64, stride=2, and the image is downsampled by 1 / 2.

[0077] 2) Construct the first stage of the training network, the first stage contains 3 Bottlenecks, the first Bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, and rectified linear unit ReLU: first pass through a 1*1 volume, where the convolution kernel size is 64*1*1*64, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 64*3*3*64, stride=1, and finally pass through a 1×1 convolution, where the convolution kernel size is 256*1*1*64, stride=1, followed by bn and ReLU layers, Identity Block after the convolution network convolution operation, the output channel number of the 0th stage is changed to 256, where the convolution kernel size is 256*1*1*64, stride=1, and Conv The second Bottleneck has the same Conv Block as the first one, and the Identity Block directly adds the input to the final 1×1 convolution output without dimensionality reduction through the convolutional network. The third Bottleneck is exactly the same as the second Bottleneck.

[0078] 3) Construct the second stage of the training network, the second stage contains 4 bottles, the first bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 128*1*1*256, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 128*3*3*128, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 512*1*1*128, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the first stage is changed to 512, where the convolution kernel size is 512*1*1*256, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third and fourth Bottleneck are exactly the same as the second Bottleneck.

[0079] 4) Construct the third stage of the training network, the third stage contains 6 bottles, the first bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolution conv, batch normalization bn, rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 256*1*1*512, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 256*3*3*256, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 1024*1*1*256, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the second stage is changed to 1024, where the convolution kernel size is 1024*1*1*512, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third, fourth, fifth and sixth Bottleneck are exactly the same as the second Bottleneck.

[0080] 5) Construct the 4th stage of the training network, the 4th stage includes 3 Bottlenecks, the 1st Bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, and rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 512*1*1*1024, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 512*3*3*512, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 2048*1*1*512, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the second stage is changed to 2048, where the convolution kernel size is 2048*1*1*1024, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third Bottleneck is exactly the same as the second Bottleneck.

[0081] 6) Construct the FPN module of the training network, use the natural feature pyramid characteristics of the CNN network, simulate the image pyramid function, so that RPN and Fast RCNN can predict objects of different sizes on feature maps at multiple scale levels, and fuse the feature maps of different layers in the form of top-down and lateral connection. Among them, the top-down process simply uses the nearest neighbor interpolation to upsample the low-resolution feature map to the same size as the lower-level feature map to be fused with it (the size is upsampled to 2 times), and the lateral connection first scales the convolution used by the lower-level feature map to the same number of channels as the upper-level feature map to be fused with it (reducing the amount of calculation), and then performs pixel-level addition.

[0082] 7) Construct the RPN module of the training network. RPN performs a 3*3 convolution operation on the feature map generated by FPN, where the convolution kernel output channel is 256 and the input channel is the corresponding FPN output channel. After the convolution operation, it will be divided into two sub-networks, one for box regression and the other for category regression. The kernel size of the regression sub-network is 36*1*1*256, stride=1, and the kernel size of the classification sub-network is 36*1*1*256, stride=1.

[0083] 8) Construct the RoIPooling module of the training network. Since the proposal corresponds to the image scale, the spatial_scale parameter is first used to map it back to the feature map scale of (M / 32)x(N / 32). Then, the feature map area corresponding to each proposal is horizontally divided into 7*7 grids, and each part of the grid is maxpooled.

[0084] 9) Construct the output layer of the training network, obtain the 7x7=49 size proposal feature maps from RoIPooling, and send them to the output network. The classification branch calculates the specific category of each proposal through the full connect layer and softmax, and outputs the cls_prob probability vector, where the kernel size is 3*49 and there is a background category; at the same time, the bounding box regression is used again to obtain the position offset bbox_pred of each proposal, which is used to regress a more accurate target detection box, where the kernel size is 8*49.

[0085] Step S40: using the image sample set as training samples, performing model training based on the training network, and obtaining an initial model for fire recognition.

[0086] Specifically, after obtaining the training samples and the training network, model training can be performed in the training network based on the training samples to obtain an initial model.

[0087] Step S50: testing the fire recognition initial model based on a preset test set, and outputting the fire recognition model when the precision and recall rates reach expectations simultaneously.

[0088] Specifically, the test set is used as a model input parameter to perform the initial model training and obtain the training results; based on the training results, the number of true targets determined by the model and the number of true targets correctly detected are obtained; based on the test set, the number of all annotated true targets is obtained; based on the number of true targets determined by the model, the number of true targets correctly detected and all true target data in the test set, the precision and recall are respectively calculated; when the precision is greater than a preset precision threshold and the recall is also greater than a preset recall threshold, it is determined that the initial model meets expectations; if the precision is not greater than the preset precision threshold, or the recall is not greater than the preset recall threshold, it is determined that the initial model does not meet expectations, then the training samples are re-determined, and the initial model is corrected and trained until a model with a precision greater than the preset precision threshold and a recall greater than the preset recall threshold is obtained as a fire recognition model.

[0089] Preferably, the calculation rules of the precision and the recall are respectively:

[0090]

[0091]

[0092] Preferably, when the model is subsequently applied, the original image to be identified is confirmed, and then the sample is input into the trained optimal convolutional neural network model to perform chemical plant fire image recognition and obtain the recognition results of petrochemical plant fire characteristics.

[0093] Figure 2 FIG. 1 is a system structure diagram of a petrochemical plant fire identification model training system provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides a petrochemical device fire identification model training system, the system comprising:

[0094] The acquisition unit is used to acquire historical image information of a petrochemical device fire scene and preprocess the historical image information to obtain an image sample set.

[0095] Specifically, petrochemical plant fire scene image recognition and collection are performed based on an open knowledge base to obtain an initial set of historical images; it is determined whether the number of images in the initial set of historical images reaches a preset number of historical images; if the number of images in the initial set of historical images does not reach the preset number of historical images, the fire scene is adaptively simulated, and image information of the simulated fire scene is collected, and the image information of the simulated fire scene is incorporated into the initial set of historical images until the number of images in the initial set of historical images reaches the preset number of historical images.

[0096] Furthermore, the preprocessing of the historical image information to obtain an image sample set includes: performing data enhancement processing on each historical image information to obtain an intermediate image set; and performing flame feature labeling on each image in the intermediate image set to obtain an image sample set.

[0097] Preferably, the data enhancement processing includes: one or more of image rotation processing, scaling processing, and Gaussian noise processing.

[0098] Search for public data sets related to recognition target images related to petrochemical plant fires. If the public data sets cannot meet the training requirements, it is necessary to independently collect or shoot relevant recognition target images and typical interference images, and obtain image augmentation data sets by adding rotation, scaling, and Gaussian noise. Allocate the training sample set and test sample set of the recognition network in a certain ratio, use image annotation software to annotate, and set labels for each training sample in the training sample set.

[0099] The network replacement unit is used to replace the baseline network in the selected basic neural network framework to obtain the first candidate network.

[0100] Specifically, the basic neural network framework is a Faster R-CNN network.

[0101] Preferably, the replaced benchmark network is: a ResNet-50 network based on a residual structure.

[0102] Preferably, the loss function of the ResNet-50 network based on the residual structure is:

[0103]

[0104]

[0105]

[0106]

[0107] Among them, L cls is the classification loss function; L reg is the position regression loss function; p i is the probability of the predicted category, is the probability of the label category; t i To predict the location of the target, is the position of the label target; λ is the preset weight balance coefficient.

[0108] Embodiment 2:

[0109] In addition, a recursive loop strategy was adopted to optimize the pyramid FPN network, which significantly improved the algorithm's ability to recognize small targets.

[0110] The output feature of the FPN network is f i Defined by:

[0111] f i =F i (f i+1 ,x i ),x i =B i (x i-1 )

[0112] In the formula, B i represents the i-th stage of feature extraction of the benchmark network, F i represents the i-th feature fusion operation. The FPN network will output a set of feature maps {f i |i=1,…,S}, where S is the number of stages, and S=4 in the figure.

[0113] The solution of the present invention adopts a recursive strategy, that is, the multi-scale fused features are superimposed on the initial feature map of the corresponding scale to form a new image enhancement feature. Experimental results show that this method can effectively enhance the target feature extraction capability and improve the algorithm recognition performance. The new network output feature is shown in the following formula:

[0114]

[0115] In the formula, t represents the number of iterations, and t is the best result for the data set in this paper when t=2.

[0116] A module construction unit is used to construct an RPN module in the first candidate network to obtain a training network; wherein the anchor frame setting of the RPN module is implemented based on the K-means++ algorithm.

[0117] Specifically, an anchor frame setting scheme of the RPN module is constructed based on the K-means++ algorithm; the anchor frame setting scheme is: cluster analysis is performed based on image features to obtain feature clusters; an optimization algorithm is constructed with the reduction of the sum of square errors within the feature clusters as the optimization goal, and anchor frame setting is performed based on the optimization algorithm.

[0118] The anchor frame is an important target for the regional candidate network. The solution of the present invention uses the K-means++ algorithm to perform cluster analysis on the size characteristics of open flames and smoke in the data set, and optimizes the anchor frame settings based on the analysis results. Compared with the K-means clustering method, it optimizes the initial cluster center selection method through probability analysis, so that the algorithm has better robustness. The anchor frame obtained by cluster analysis can not only better adapt to the characteristics of different open flames and smoke, but also reduce the impact of unreasonable manual design on the detection results to a certain extent. Among them, the similarity of the measurement object is defined as the inverse of the distance, the Euclidean distance d is used as the measurement distance, and the optimization goal is to reduce the sum of squared errors (SSE) within the cluster.

[0119] Furthermore, in addition to constructing the RPN module, the training network also includes: multiple model stages, each of which includes multiple convolutional layers and multiple pooling layers; an FPN module for performing multi-scale fusion of image features; a RoIPooling module for performing image scale conversion; and an output layer for outputting a fire image annotated with a target monitoring frame. Based on this, it is also necessary to construct these modules accordingly.

[0120] 1) Construct the 0th stage of the training network, wherein the 0th stage comprises 2 layers, the first layer comprises convolution conv, batch normalization bn, and rectified linear unit ReLU: the convolution kernel size is 64*7*7*3, stride=2, and the input image is downsampled by 1 / 2 after convolution at the first stage; the second layer comprises a maximum pooling layer MaxPooling: the kernel size is 64*3*3*64, stride=2, and the image is downsampled by 1 / 2.

[0121] 2) Construct the first stage of the training network, the first stage contains 3 Bottlenecks, the first Bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, and rectified linear unit ReLU: first pass through a 1*1 volume, where the convolution kernel size is 64*1*1*64, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 64*3*3*64, stride=1, and finally pass through a 1×1 convolution, where the convolution kernel size is 256*1*1*64, stride=1, followed by bn and ReLU layers, Identity Block after the convolution network convolution operation, the output channel number of the 0th stage is changed to 256, where the convolution kernel size is 256*1*1*64, stride=1, and Conv The second Bottleneck has the same Conv Block as the first one, and the Identity Block directly adds the input to the final 1×1 convolution output without dimensionality reduction through the convolutional network. The third Bottleneck is exactly the same as the second Bottleneck.

[0122] 3) Construct the second stage of the training network, the second stage contains 4 bottles, the first bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 128*1*1*256, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 128*3*3*128, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 512*1*1*128, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the first stage is changed to 512, where the convolution kernel size is 512*1*1*256, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third and fourth Bottleneck are exactly the same as the second Bottleneck.

[0123] 4) Construct the third stage of the training network, the third stage contains 6 bottles, the first bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolution conv, batch normalization bn, rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 256*1*1*512, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 256*3*3*256, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 1024*1*1*256, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the second stage is changed to 1024, where the convolution kernel size is 1024*1*1*512, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third, fourth, fifth and sixth Bottleneck are exactly the same as the second Bottleneck.

[0124] 5) Construct the 4th stage of the training network, the 4th stage includes 3 Bottlenecks, the 1st Bottleneck includes Conv Block and Identity Block, Conv Block includes 3 convolutions conv, batch normalization bn, and rectified linear unit ReLU: first reduce the dimension of the feature map channel number by 1*1 convolution, where the convolution kernel size is 512*1*1*1024, stride=1, then do a 3*3 convolution operation, where the convolution kernel size is 512*3*3*512, stride=2, the image is downsampled by 1 / 2, and finally restore the dimension by 1×1 convolution, where the convolution kernel size is 2048*1*1*512, stride=1, followed by bn and ReLU layers, Identity After the convolution operation of the convolutional network, the number of output channels of the second stage is changed to 2048, where the convolution kernel size is 2048*1*1*1024, stride=2, and the Conv Block and the output are added. At this time, the image is downsampled by 1 / 2; the Conv Block of the second Bottleneck is the same as the first Bottleneck. The Identity Block does not undergo dimensionality reduction through the convolutional network, and directly adds the input to the final 1×1 convolution output; the third Bottleneck is exactly the same as the second Bottleneck.

[0125] 6) Construct the FPN module of the training network, use the natural feature pyramid characteristics of the CNN network, simulate the image pyramid function, so that RPN and Fast RCNN can predict objects of different sizes on feature maps at multiple scale levels, and fuse the feature maps of different layers in the form of top-down and lateral connection. Among them, the top-down process simply uses the nearest neighbor interpolation to upsample the low-resolution feature map to the same size as the lower-level feature map to be fused with it (the size is upsampled to 2 times), and the lateral connection first scales the convolution used by the lower-level feature map to the same number of channels as the upper-level feature map to be fused with it (reducing the amount of calculation), and then performs pixel-level addition.

[0126] 7) Construct the RPN module of the training network. RPN performs a 3*3 convolution operation on the feature map generated by FPN, where the convolution kernel output channel is 256 and the input channel is the corresponding FPN output channel. After the convolution operation, it will be divided into two sub-networks, one for box regression and the other for category regression. The kernel size of the regression sub-network is 36*1*1*256, stride=1, and the kernel size of the classification sub-network is 36*1*1*256, stride=1.

[0127] 8) Construct the RoIPooling module of the training network. Since the proposal corresponds to the image scale, the spatial_scale parameter is first used to map it back to the feature map scale of (M / 32)x(N / 32). Then, the feature map area corresponding to each proposal is horizontally divided into 7*7 grids, and each part of the grid is maxpooled.

[0128] 9) Construct the output layer of the training network, obtain the 7x7=49 size proposal feature maps from RoIPooling, and send them to the output network. The classification branch calculates the specific category of each proposal through the full connect layer and softmax, and outputs the cls_prob probability vector, where the kernel size is 3*49 and there is a background category; at the same time, the bounding box regression is used again to obtain the position offset bbox_pred of each proposal, which is used to regress a more accurate target detection box, where the kernel size is 8*49.

[0129] The training unit is used to use the image sample set as training samples, perform model training based on the training network, and obtain an initial model for fire recognition.

[0130] Specifically, after obtaining the training samples and the training network, model training can be performed in the training network based on the training samples to obtain an initial model.

[0131] The testing unit is used to test the initial fire recognition model based on a preset test set, and output the fire recognition model when the precision rate and the recall rate reach expectations simultaneously.

[0132] Specifically, the test set is used as a model input parameter to perform the initial model training and obtain the training results; based on the training results, the number of true targets determined by the model and the number of true targets correctly detected are obtained; based on the test set, the number of all annotated true targets is obtained; based on the number of true targets determined by the model, the number of true targets correctly detected and all true target data in the test set, the precision and recall are respectively calculated; when the precision is greater than a preset precision threshold and the recall is also greater than a preset recall threshold, it is determined that the initial model meets expectations; if the precision is not greater than the preset precision threshold, or the recall is not greater than the preset recall threshold, it is determined that the initial model does not meet expectations, then the training samples are re-determined, and the initial model is corrected and trained until a model with a precision greater than the preset precision threshold and a recall greater than the preset recall threshold is obtained as a fire recognition model.

[0133] Preferably, the calculation rules of the precision and the recall are respectively:

[0134]

[0135]

[0136] The embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned petrochemical plant fire identification model training method.

[0137] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions for making a single-chip microcomputer, a chip or a processor (processor) perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0138] The optional embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept of the embodiments of the present invention, the technical scheme of the embodiments of the present invention can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.

[0139] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.

Claims

1. A petrochemical plant fire identification model training method, characterized in that: The method comprises: Collecting historical image information of a petrochemical device fire scene, and preprocessing the historical image information to obtain an image sample set; In the selected basic neural network framework, the benchmark network is replaced to obtain the first candidate network; In the first candidate network, an RPN module is constructed to obtain a training network; wherein, The anchor frame setting of the RPN module is implemented based on the K-means++ algorithm; Using the image sample set as training samples, performing model training based on the training network to obtain an initial model for fire recognition; The fire recognition initial model is tested based on a preset test set, and the fire recognition model is output when the precision and recall rates simultaneously reach expectations.

2. The method according to claim 1, characterized in that The petrochemical plant fire scene historical image information includes: Based on the open knowledge base, the images of petrochemical plant fire scenes were recognized and collected to obtain the initial set of historical images; Determining whether the number of images in the initial set of historical images reaches a preset number of historical images; If the number of images in the initial set of historical images does not reach the preset number of historical images, a fire scene is adaptively simulated, and image information of the simulated fire scene is collected, and the image information of the simulated fire scene is incorporated into the initial set of historical images until the number of images in the initial set of historical images reaches the preset number of historical images.

3. The method according to claim 1, characterized in that The preprocessing of the historical image information to obtain an image sample set includes: Perform data enhancement processing on each historical image information to obtain an intermediate image set; Each image in the intermediate image set is annotated with flame features to obtain an image sample set.

4. The method according to claim 3, characterized in that: The data enhancement process includes: One or more of image rotation processing, scaling processing, and Gaussian noise processing.

5. The method according to claim 1, characterized in that The basic neural network framework is the Faster R-CNN network.

6. The method according to claim 1, characterized in that The replaced baseline network is: ResNet-50 network based on residual structure.

7. The method according to claim 6, characterized in that The loss function of the ResNet-50 network based on the residual structure is: Among them, L cls is the classification loss function; L reg is the position regression loss function; p i is the probability of the predicted category, is the probability of the label category; t i To predict the location of the target, is the location of the label target; λ is the preset weight balancing coefficient.

8. The method according to claim 1, characterized in that The constructing the RPN module in the first candidate network includes: Construct the anchor frame setting scheme of the RPN module based on the K-means++ algorithm; The anchor frame setting scheme is: Perform cluster analysis based on image features to obtain feature clusters; An optimization algorithm is constructed with the reduction of the sum of square errors within the feature cluster as the optimization goal, and anchor frame setting is performed based on the optimization algorithm.

9. The method according to claim 8, characterized in that The optimization algorithm is expressed as: Among them, x, y are sample vectors; m is the vector dimension; n is the number of clusters; Ci is the data set of the i-th cluster; μ (i) is the center point vector of cluster Ci.

10. The method according to claim 8, characterized in that After the RPN module is constructed, the method further includes: A recursive loop strategy is adopted to optimize the FPN network of the training network, so as to use the multi-scale fused features to be superimposed on the initial feature map of the corresponding scale to form a new image enhancement feature; wherein the new image enhancement feature output rule is: in, t represents the number of iterations; B i represents the i-th stage of feature extraction of the baseline network; F i represents the i-th feature fusion operation; The FPN network will output a set of feature maps {f i |i=1,…,S}, where S is the number of stages.

11. The method according to claim 1, characterized in that: The training network also includes: Multiple model stages, each of which includes multiple convolutional layers and multiple pooling layers; FPN module, used to perform multi-scale fusion of image features; RoIPooling module, used to perform image scale conversion; The output layer is used to output the fire image marked with the target monitoring frame.

12. The method according to claim 1, characterized in that The testing of the fire recognition initial model based on a preset test set and outputting the fire recognition model when the precision rate and the recall rate simultaneously reach expectations include: Using the test set as a model input parameter, performing the initial model training, and obtaining a training result; Based on the training results, the number of true targets determined by the model and the number of true targets correctly detected are obtained; Obtaining the number of all true targets marked based on the test set; Calculate the precision and recall based on the number of true targets determined by the model, the number of true targets correctly detected, and all true target data in the test set; When the precision is greater than a preset precision threshold, and the recall is also greater than a preset recall threshold, it is determined that the initial model meets expectations; If the precision is not greater than the preset precision threshold, or the recall is not greater than the preset recall threshold, it is determined that the initial model does not meet expectations, and the training samples are re-determined, and the initial model is corrected and trained until a model with a precision greater than the preset precision threshold and a recall greater than the preset recall threshold is obtained as a fire recognition model.

13. The method according to claim 12, characterized in that The calculation rules of the precision and the recall are respectively:

14. A petrochemical plant fire identification model training system, characterized in that: The system comprises: A collection unit, used to collect historical image information of a petrochemical device fire scene, and pre-process the historical image information to obtain an image sample set; A network replacement unit, used to replace the baseline network in the selected basic neural network framework to obtain a first candidate network; A module construction unit is used to construct an RPN module in the first candidate network to obtain a training network; wherein, The anchor frame setting of the RPN module is implemented based on the K-means++ algorithm; A training unit, used to use the image sample set as training samples, perform model training based on the training network, and obtain an initial model for fire recognition; The testing unit is used to test the fire recognition initial model based on a preset test set, and output the fire recognition model when the precision rate and the recall rate reach expectations simultaneously.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the petrochemical plant fire identification model training method described in any one of claims 1 to 13.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the petrochemical plant fire identification model training method described in any one of claims 1 to 13 is implemented.

Citation Information

Cited By

  • Rock failure short-term and temporary early warning method and device based on acoustic emission clustering analysis

    CN120468296A