Focal tank bottom gate monitoring method based on ConvNeXt-Tiny and related products
Patent Information
- Application Number
- CN202611206139.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-27
AI Technical Summary
[0019]通过如上所提供的一种基于ConvNeXt-Tiny的焦罐底部闸门监测方法,本披露实施例通过根据焦罐底部闸门的图像数据进行数据增强得到增强训练样本,有效扩充了训练样本的规模和多样性,使模型在训练阶段即能接触模拟工业极端环境下的图像,提升了模型对复杂工业干扰的鲁棒性,缓解了因标注数据稀缺导致的过拟合问题;通过使用增强训练样本对以ConvNeXt-Tiny为主干网络、加载有ImageNet数据集预训练权重的初始模型进行训练,且将输入层、第一阶段、第二阶段和第三阶段设置为不可训练状态,仅训练第四阶段和分类头,复用了预训练模型学到的通用视觉特征,使得仅需少量焦罐闸门样本即可完成模型训练,大幅降低了训练数据需求;通过在模型训练中采用加权损失函数,为异常样本分配大于正常样本的损失权重,使模型在正常样本远多于异常样本的不平衡条件下,仍能重点关注异常样本的学习,有效保障了异常检测的召回率,减少了漏检风险。
Smart Images

Figure CN122990620A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of coke tank unloading technology. More specifically, this disclosure relates to a method and related products for monitoring the bottom gate of a coke tank based on ConvNeXt-Tiny. Background Technology
[0002] Throughout the history of coking plant development, "safety" has always been the lifeline. In the dry quenching coke production process, the coke can flows through several steps: receiving coke, lifting, alignment, unloading coke, closing the gate, and returning. The closing of the bottom gate of the coke can after unloading is controlled by the system, but currently there is no monitoring method to monitor the effectiveness of the control system's execution, i.e., whether the bottom gate of the coke can is completely closed. Currently, after the final step of returning the empty coke can to the tank car, a person manually judges whether the bottom gate of the coke can is completely closed. If it is not completely closed, the process cycle repeats until the bottom gate of the coke can is manually judged to be completely closed, at which point the process cycle ends. Compared to the previous method of manually judging whether the bottom gate of the coke can is completely closed on the tank car, the coke can bottom gate monitoring method based on ConvNeXt-Tiny has now become an important way for the coking industry to reduce costs and increase efficiency.
[0003] The long-term stable operation and inherent safety level of coking plant units largely depend on the safe and stable operation of the quenching system. In the dry quenching system, accurately determining the closing status of the bottom gate of the coke tank after unloading can effectively prevent red-hot coke from falling due to improper gate closure, coke jamming, or coke leakage, and avoid high-temperature flue gas spraying outwards and burning cables, steel structures, and conveyor belts. This eliminates safety hazards such as burns, fires, and equipment damage at the source, ensuring the personal safety of on-site personnel. It also prevents unplanned shutdowns caused by coke leakage, malfunctions, and emergency handling, ensuring smooth operation of the entire process of coke receiving, hoisting, unloading, and return, maintaining the matching of dry quenching with the coke oven production rhythm, ensuring efficient and continuous operation of the unit, and stabilizing coke production and waste heat recovery efficiency. Furthermore, it avoids deformation and damage to key components such as gates, sealing surfaces, cylinders, connecting rods, and pins caused by forced gate closure or material compression, reducing equipment failure frequency, extending the service life of the coke tank and loading equipment, and significantly reducing spare parts consumption, maintenance workload, and repair costs. Preventing coke spillage and leakage due to improperly closed gates is crucial for stabilizing material levels and distribution within the dry quenching furnace, ensuring uniform coke discharge and stable heat exchange, improving dry quenching efficiency and steam recovery, and directly enhancing the overall economic benefits of the unit. Therefore, accurately monitoring whether the bottom gate of the coke tank is completely closed after coke unloading has become a critical and urgent problem to be solved in the coking industry.
[0004] Patent (Patent Publication No. CN201990396U) proposes a method for monitoring contact-type limit switches and mechanical linkage. Specifically, it involves a coke tank gate locking information feedback device installed at the bottom of the hoist. A sensor is mounted on the base plate of the support frame, and a signal plug is positioned above the sensor. The signal plug is connected to a connecting rod, which in turn connects to the bottom gate of the hoist. The signal plug moves back and forth as the bottom gate opens and closes, providing accurate and timely signal feedback. However, due to inherent defects in the core mechanical structure of this invention, the transmission synchronization is poor, resulting in significant deviations in the accuracy of the monitored coke tank bottom status data. A similar patent (Patent Publication No. CN217811784U) proposes a structure linking a counterweight arm and a connecting rod. This relocates the bottom gate's opening and closing limit switches to a non-high-temperature, non-collision area, and sets independent limit opening and closing switches to achieve stable detection of the bottom gate's full stroke status. The mechanical transmission chain of this invention has a core defect: the connecting rod structure is prone to deformation and jamming, the transmission synchronization is poor, the signal detection does not meet industry safety standards, the single detection principle has no redundant design, and it violates mandatory safety production standards.
[0005] The patent (patent publication number CN114806610A) proposes a method combining machine vision and infrared monitoring. It designs a system that uses infrared thermal imaging technology to collect the temperature distribution at the bottom of the coke can. By identifying areas of abnormal temperature, it detects leakage of red-hot coke heat radiation caused by an improperly closed bottom door, achieving non-contact monitoring when the bottom door is closed. This overcomes the limitations of visible light vision in high-dust environments. However, this invention suffers from inherent flaws in its core principle and temperature measurement mechanism. It cannot accurately determine the true state of the hot coke, has a large blind spot in its detection coverage, and lacks protection against core high-temperature conditions.
[0006] In view of this, there is an urgent need to provide a monitoring solution for the bottom gate of coke oven based on ConvNeXt-Tiny, so as to accurately detect the closing gap and locking mechanism status of the bottom gate of coke oven under high dust and strong light interference. Summary of the Invention
[0007] In order to at least address one or more of the technical issues mentioned above, this disclosure proposes a coke oven bottom gate monitoring scheme based on ConvNeXt-Tiny in several aspects.
[0008] In a first aspect, this disclosure provides a method for monitoring the bottom gate of a coke oven based on ConvNeXt-Tiny, comprising:
[0009] Data augmentation is performed on the image data of the valve at the bottom of the coke oven to obtain augmented training samples. These augmented training samples are then used to train an initial model with ConvNeXt-Tiny as the backbone network, resulting in the original model. The initial model also includes a classification head. The backbone network is loaded with weights pre-trained on the ImageNet dataset and consists of an input layer, a first stage, a second stage, a third stage, and a fourth stage. The input layer, the first stage, the second stage, and the third stage are set to an untrainable state during model training. A weighted loss function is used during training, with the loss weights assigned to abnormal samples being greater than those assigned to normal samples. The original model is then validated and fine-tuned to obtain the target model. The image data to be detected is then input into the target model to obtain the gate status recognition result.
[0010] In some embodiments, loading the backbone network with weights pre-trained on the ImageNet dataset includes: obtaining the weights pre-trained on the ImageNet dataset; and loading the weights onto each layer of the backbone network without modifying the structure of the backbone network.
[0011] In some embodiments, the first stage, the second stage, the third stage, and the fourth stage are composed of multiple ConvNeXt modules, and loading weights for each layer of the backbone network includes: loading corresponding weights for the input layer, and loading corresponding weights for each ConvNeXt module in the first stage, the second stage, the third stage, and the fourth stage respectively.
[0012] In some embodiments, setting the input layer, the first stage, the second stage, and the third stage to an untrainable state during model training includes: setting the input layer, the first stage, the second stage, and the third stage to an untrainable state and setting the fourth stage and the classification head to a trainable state in a first training stage of model training; and setting the input layer, the first stage, the second stage, and the third stage to a trainable state in a second training stage of model training, wherein the second training stage follows the first training stage and the learning rate of the second training stage is lower than that of the first training stage.
[0013] In some embodiments, after the first training phase, the effectiveness of the first training phase is verified by the gradients of the parameters in the input layer, the first phase, the second phase, and the third phase.
[0014] In some embodiments, the classification head includes a global average pooling layer, a layer normalization layer, a linear layer, and an activation function. The method further includes: setting the input dimension of the linear layer to be the same as the output dimension of the fourth stage, and setting the output dimension of the linear layer to 2; and initializing the parameters of the linear layer using a random normal distribution.
[0015] In some embodiments, data enhancement based on image data of the bottom valve of the coke oven includes: adjusting the brightness of the image data; adjusting the contrast of the image data; superimposing Gaussian noise into the image data; setting the pixel values of random regions of the image data to preset values; mixing any two images in the image data according to a preset distribution coefficient to obtain a mixed image; and flipping the image data according to a preset probability.
[0016] In some embodiments, assigning a greater loss weight to abnormal samples than to normal samples in the weighted loss function includes: assigning a greater class weight to abnormal samples than to normal samples; and setting a focusing parameter such that the loss weight of abnormal, difficult-to-classify samples is greater than that of normal, easy-to-classify samples.
[0017] In a second aspect, this disclosure provides an electronic device including: a processor; and a memory storing computer instructions for monitoring the bottom gate of a coke oven based on ConvNeXt-Tiny, which, when executed by the processor, cause the method in the first aspect described above to be implemented.
[0018] In a third aspect, this disclosure provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the methods and various implementation schemes described in the first aspect above.
[0019] The present embodiment of the coke oven bottom gate monitoring method based on ConvNeXt-Tiny, as described above, effectively expands the scale and diversity of training samples by augmenting the image data of the coke oven bottom gate. This allows the model to be exposed to images simulating extreme industrial environments during the training phase, improving the model's robustness to complex industrial disturbances and alleviating the overfitting problem caused by the scarcity of labeled data. By using augmented training samples to train the initial model with ConvNeXt-Tiny as the backbone network and loaded with ImageNet dataset pre-trained weights, and setting the input layer, first stage, second stage, and third stage to an untrainable state, training only the fourth stage and the classification head, the general visual features learned by the pre-trained model are reused. This allows the model to be trained with only a small number of coke oven gate samples, significantly reducing the training data requirements. By using a weighted loss function in the model training, assigning a greater loss weight to abnormal samples than to normal samples, the model can still focus on learning abnormal samples even under imbalanced conditions where normal samples far outnumber abnormal samples, effectively ensuring the recall rate of anomaly detection and reducing the risk of missed detections. Attached Figure Description
[0020] The above and other objects, features, and advantages of exemplary embodiments of this disclosure will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this disclosure are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 An exemplary flowchart of a coke oven bottom gate monitoring method 100 based on ConvNeXt-Tiny, according to an embodiment of this disclosure, is shown. Figure 2 An exemplary flowchart illustrating data augmentation based on image data of a valve at the bottom of a coke tank, according to an embodiment of this disclosure, is shown. Figure 3 An exemplary flowchart illustrating the allocation of loss weights in the weighted loss function of this disclosure embodiment is shown; Figure 4 An exemplary structural block diagram of an electronic device 400 according to an embodiment of this disclosure is shown. Detailed Implementation
[0021] The technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, not all of them. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0022] It should be understood that the terms “comprising” and “including” used in this disclosure and claims indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0023] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. As used in this disclosure and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this disclosure and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0024] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0025] The specific embodiments disclosed herein will now be described in detail with reference to the accompanying drawings.
[0026] Figure 1 This is an exemplary flowchart of a ConvNeXt-Tiny-based method for monitoring the bottom gate of a coke oven, according to an embodiment of this disclosure.
[0027] like Figure 1 As shown, method 100 may include: S101: performing data augmentation based on the image data of the valve at the bottom of the coke tank to obtain augmented training samples; S102: loading the weights pre-trained from the ImageNet dataset onto the backbone network of the initial model; S103: setting the input layer, first stage, second stage, and third stage in the backbone network to an untrainable state, and using the augmented training samples to train the initial model with ConvNeXt-Tiny as the backbone network to obtain the original model; S104: validating and fine-tuning the original model to obtain the target model, and inputting the image data to be detected into the target model to obtain the recognition result of the gate state.
[0028] In some embodiments, before executing S101, image data of the bottom valve of the coke quencher is acquired. For the extreme environment of the dry quenching site, image data covering all operating conditions is collected, including normal state samples, abnormal state samples, and environmental interference samples. The data is labeled and divided into training sets, validation sets, and test sets. As an example, the image data of the bottom valve of the coke quencher can be historical image data stored in the equipment, or it can be based on image data acquired in real time by the acquisition equipment; no specific limitation is made here.
[0029] Figure 2 This is an exemplary flowchart illustrating data augmentation based on image data of the bottom valve of the coke oven, as disclosed in this embodiment. Figure 2 As shown, S101 includes at least the following steps: S201: Adjusting the brightness of the image data; S202: Adjusting the contrast of the image data; S203: Adding Gaussian noise to the image data; S204: Setting the pixel values of random regions of the image data to preset values; S205: Mixing any two images in the image data according to a preset distribution coefficient to obtain a mixed image; S206: Flipping the image data according to a preset probability.
[0030] In some embodiments, S201 specifically includes, given that the environmental interference type is drastic day-night changes in illumination or direct strong light, a coefficient between 0.7 and 1.3 is randomly generated for each image in the image data. Then, each pixel value of the image is multiplied by the coefficient to achieve random adjustment of the brightness of each image. It is important to note that during the adjustment process, the pixel value must remain within the range of 0 to 255; pixel values outside this range (0, minimum value) or 255, maximum value, are cropped.
[0031] In some embodiments, S202 specifically includes: when the environmental interference type is drastic day-night changes in illumination or direct strong light; calculating the mean value of all pixels in the image data; and randomly generating a coefficient between 0.7 and 1.3 for each image in the image data. Then, adjusting the pixel values of each image data according to the mean value and the coefficient corresponding to each image to enhance the difference between bright and dark areas in the image. It should be noted that the pixel value ranges from 0 to 255.
[0032] In some embodiments, S203 specifically includes generating Gaussian noise that follows a standard normal distribution, where the environmental interference type is high-temperature thermal noise or camera sensor noise. This Gaussian noise is then multiplied by the noise intensity σ and superimposed onto each pixel of the image data. The value of σ is adjusted according to the actual noise level of the image to avoid excessive noise causing feature blurring.
[0033] In some embodiments, S204 specifically includes an environmental interference type of high dust local occlusion and coke powder adhesion. A rectangular region R is randomly selected in the image, and all pixel values within the region are set to 0 to simulate a scenario where coke powder occludes the local structure of the gate. Each enhancement only occludes one region, and the occluded region does not exceed 20% of the total image area.
[0034] In some embodiments, S205 specifically includes: when the interference type is data scarcity and insufficient sample quantity, randomly selecting two images from the training set (I1 is a normal sample, I2 is an abnormal sample), randomly generating a coefficient λ that follows a β distribution, and mixing the pixel values and labels of the two images. The mixed image I' retains the features of the two images, and the label y' is the weighted sum of the labels of the two images.
[0035] In some embodiments, S206 specifically includes, where the environmental interference type is shooting angle deviation or slight shaking of the coke pot, each image in the training set can be horizontally flipped with a 50% probability, and the label of the image remains unchanged after flipping.
[0036] In some embodiments, the initial model consists of a backbone network and a classification head. The architecture of the backbone network is ConvNeXt-Tiny, which is composed of Stem layer (input layer), Stage 1 (first stage), Stage 2 (second stage), Stage 3 (third stage) and Stage 4 (fourth stage). Stage 1-4 are composed of multiple ConvNeXt modules (anti-bottleneck structures).
[0037] In some embodiments, the internal calculation process of the ConvNeXt module specifically includes: (1) in, The original input feature map of the residual connection branch is saved. A complete copy of the original input feature map before entering the ConvNeXt module is saved for the residual addition operation in the subsequent formula (7), so as to retain the original feature information and avoid the gradient vanishing problem in deep network training.
[0038] (2) Here, LayerNorm represents the layer normalization operation. Before the convolution operation, the input feature map is first subjected to layer normalization to adjust the feature distribution to a stable range, accelerate model training convergence, and improve the stability of features to disturbances such as changes in illumination.
[0039] (3) in, This indicates a depthwise separable convolution with a kernel size of 7×7, a stride of 1, and padding of 3. Large kernel depthwise separable convolution extracts spatial features from images. The large 7×7 kernel captures a wider range of neighborhood information, which is beneficial for extracting local details such as the outline of the locking mechanism of the coke oven gate and the gaps in the liner. At the same time, depthwise separable convolution significantly reduces the number of parameters and computational cost, balancing accuracy and efficiency. The stride of 1 and padding of 3 ensure that the output feature map size remains consistent with the input, avoiding the loss of spatial information.
[0040] (4) Here, Linear represents a 1×1 point convolution operation; C is the number of input channels of the ConvNeXt module, which varies with different stages of the backbone network; the more channels, the stronger the feature representation capability; 4C is the number of channels after dimensionality enhancement. By expanding the number of channels to four times the number of input channels through 1×1 point convolution, an anti-bottleneck design is adopted, first enhancing feature representation in high-dimensional space, enabling the network to capture subtle feature differences in industrial images.
[0041] (5) in, , The cumulative distribution function is the standard normal distribution. A nonlinear transformation is performed using the GELU activation function. Compared to the traditional ReLU activation function, GELU is smoother and has a gradual response to negative values, preserving subtle feature information in industrial images and helping to capture inconspicuous anomalies such as minor gap changes caused by slight focus jamming of gates.
[0042] (6) Here, Linear represents a 1×1 point convolution operation; C is the original number of input channels of the ConvNeXt module. By using 1×1 point convolution, the number of feature channels after dimensionality enhancement is restored to the original number of input channels C, reducing the computational load of subsequent modules, keeping the number of input and output channels of the modules consistent, and facilitating the stacking of multiple ConvNeXt modules.
[0043] (7) in, is the original input feature map saved by formula (1), and x is the dimensionality-reduced feature map output by formula (6). The original input feature map is added element-wise to the new feature map after a series of processing such as normalization, convolution, dimensionality increase, activation, and dimensionality reduction. The shallow original detail information and the deep extracted enhanced features are fused to obtain the final output feature map of the ConvNeXt module, realizing the inheritance and enhancement of features.
[0044] In some embodiments, the backbone network can input an image of the bottom gate of a coke oven with a size of 224×224×3, and the dimensional changes of each layer are as follows: Input layer (Stem): (8) in, This indicates a convolution operation with a kernel size of 4×4 and a stride of 4. The large stride convolution rapidly downsamples the input image, compressing the resolution from 224×224 to 56×56, while simultaneously increasing the number of channels from 3 (RGB three channels) to 96. This process initially extracts the basic features of the image (such as edges and colors), providing a compact initial feature map for subsequent stages.
[0045] Stage 1: (9) in, This represents stacking three ConvNeXt modules. While maintaining high resolution, the input features are refined using three ConvNeXt modules, enhancing the extraction capability of low-level visual features such as surface texture and fine edges of the focusing tank gate, while keeping the output size and number of channels unchanged.
[0046] Stage 2: (10) in, This indicates a downsampling convolution operation with a kernel size of 2×2 and a stride of 2. First, the resolution is halved to 28×28 and the number of channels is doubled to 192 through a convolution with a stride of 2. Then, it is further processed by 3 ConvNeXt modules to start combining local features, which can express medium-scale structural information such as liner gaps and local deformations.
[0047] Stage 3: (11) Nine ConvNeXt modules are stacked, making it the deepest stage in the entire backbone network. Further downsampling is used to reduce resolution and increase the number of channels. Deep feature extraction is performed using up to nine ConvNeXt modules, further expanding the receptive field and enabling the capture of component-level semantic information such as whether the locking mechanism is properly engaged and whether there is significant misalignment of the gate.
[0048] Stage 4: (12) A final downsampling step reduces the resolution to 7×7, increasing the number of channels to 768. Each feature point corresponds to a large area of the original image, possessing the strongest global semantic information, which can be directly used to determine the overall closure or misalignment status of the gate at the bottom of the coke oven. The 7×7×768 feature map output at this stage is the final output of the backbone network, which is then input into the classification head for binary classification.
[0049] In some embodiments, S102 specifically includes: obtaining the weights pre-trained on the ImageNet dataset; and loading the weights onto each layer of the backbone network without modifying the structure of the backbone network. The ImageNet dataset can contain up to one thousand categories. During the loading process, no structure of the backbone network is modified; only the original pre-trained network layers and weight parameters are retained to ensure that the general feature extraction capability is not affected. In some embodiments, loading the weights onto each layer of the backbone network includes: loading the corresponding weights for the input layer, and loading the corresponding weights for each ConvNeXt module in the first, second, third, and fourth stages. After loading the weights, a consistency check is performed between the weights loaded onto each layer of the backbone network and the corresponding pre-trained weights on the ImageNet dataset, and the mean value of the weights loaded onto each layer of the backbone network is verified to deviate from a preset random value range.
[0050] In some embodiments, the ConvNeXt-Tiny original classifier head is designed for a 1000-class classification task on the ImageNet dataset, and its structure is as follows: Global Average Pooling (GAP) → LayerNorm layer → Linear layer (output dimension 1000). The mathematical expressions for Global Average Pooling (GAP) and LayerNorm layer are as follows: GAP: (13) The 7×7×768 feature map output by Stage 4 is aggregated into a 1×1×768 feature vector, eliminating spatial dimensionality, preserving global features, and avoiding overfitting. Here, H=7 and W=7 represent the height and width of the Stage 4 output feature map. This is the feature vector of the (i, j)th pixel in the feature map. By averaging the feature vectors of all pixels, we obtain the aggregated global feature vector. It can effectively capture the overall closed state characteristics of the gate. LayerNorm: (14) Normalization is performed on the aggregated feature vectors to accelerate training convergence, improve model stability, and prevent excessively large or small feature values from affecting classification performance. : The mean of the feature dimensions, where D=768 is the dimension of the feature vector; : represents the variance of the feature dimension; Learnable scaling and offset parameters are used to adjust the normalized feature distribution to adapt to binary classification tasks.
[0051] The linear layer designed for a 1000-class classification task will be modified by replacing the original linear layer with an output dimension of 1000 with a linear layer with an output dimension of 2, while keeping the input dimension of the linear layer unchanged at 768 (consistent with the dimension of the feature vector after GAP aggregation). After the replacement, the structure of the classification head becomes: Global Average Pooling (GAP) → LayerNorm layer → Linear layer (768→2) → Softmax function → Output the probabilities of the two classes. During the replacement process, it is necessary to ensure that the weights of the linear layer are initialized reasonably (using random normal initialization) to avoid the initial weights being too large or too small, which would affect training.
[0052] In some embodiments, the replaced linear layer needs to be parameter initialized to avoid training instability caused by random initialization: the weights are initialized using a random normal distribution (mean 0, standard deviation 0.01), and the biases are initialized using a constant 0. After initialization, the rationality of the initialization can be verified by calculating the mean and variance of the linear layer weights, ensuring uniform weight distribution and avoiding extreme values.
[0053] In some embodiments, after the replacement is completed, it is necessary to verify whether the output of the classification head meets the binary classification requirements: Input a 224×224×3 image of a coke oven gate, after feature extraction by the backbone network, input the modified classification head, and observe the output results. Scheme 1 should output two probability values (summing up to 1), and Scheme 2 should output a probability value between 0 and 1. If the output dimension or range does not meet the requirements, it is necessary to check whether the input and output dimensions of the linear layer and the addition of the activation function are correct to ensure that the classification head can output binary classification results normally.
[0054] In some embodiments, S103 specifically includes training the initial model using a "two-stage layered freezing" strategy. Here, "freezing" means that the weight parameters of the "frozen" layers are not updated during the model training phase; it can also be called an untrainable state. Specifically, in the first training phase of training the initial model, the input layer, the first stage, the second stage, and the third stage are set to an untrainable state, while the fourth stage is set to a trainable state. The purpose of this training phase is to: protect the ImageNet pre-trained general visual features already loaded in the shallow layers of the backbone network from being destroyed, avoiding overfitting due to the limited number of samples of the coke can gate; and simultaneously, only the fourth stage and the classification head are trained, enabling them to learn the high-level semantic information specific to the coke can gate based on the general features, establishing a mapping ability from general features to the normal / abnormal binary classification results of the gate.
[0055] In the second training phase of training the initial model, the input layer, the first stage, the second stage, and the third stage are set to trainable states. The second training phase follows the first training phase, and its learning rate is lower than that of the first training phase. The purpose of this phase is to allow for minor updates to the shallow network parameters through a very small learning rate, while protecting the pre-trained general features from significant degradation. This fine-tunes the feature distribution, which is adapted to natural images, to a feature distribution more suited to the industrial environment of coking tanks (such as high temperature and red heat, metallic reflection, dust cover, etc.), thereby further improving the model's recognition accuracy and robustness in extreme industrial environments. After inputting the enhanced training samples into the initial model and training it according to the above two training phases, the original model is obtained.
[0056] In some embodiments, after the first training phase, the effectiveness of the first training phase is verified by the gradients of the parameters in the input layer, the first phase, the second phase, and the third phase. Specifically, the gradient changes of the parameters of each layer are observed during training; the gradient of the frozen layer should be 0, while the gradient of the trainable layer should not be 0. After training, the frozen layer and the pre-trained weights are compared to ensure that the parameters remain unchanged, while the parameters of the trainable layer are significantly updated, proving that the freezing strategy is effective.
[0057] In some embodiments, such as Figure 3As shown, in model training, a weighted loss function is used, in which the loss weight assigned to abnormal samples is greater than the loss weight assigned to normal samples. Specifically, this includes: S301: assigning a greater class weight to abnormal samples than to normal samples; S302: setting a focusing parameter so that the loss weight of abnormal, difficult-to-classify samples is greater than that of normal, easy-to-classify samples.
[0058] In some embodiments, S301 first counts the number of normal and abnormal samples in the training set, calculates the weights of the two classes (the weight of the abnormal class is usually 3 to 5 times that of the normal class; for the coking tank scenario, it is recommended to set the weight of the abnormal class to 5 and the weight of the normal class to 1); substitutes the weights into the loss function. During training, the model automatically assigns a higher loss weight to abnormal samples, making the model pay more attention to the identification of abnormal samples and reducing the false negative rate. The loss function is as follows: (15) Where N is the total number of training samples; The weights of the k-th class samples are... The number of samples in the k-th class is given. The abnormal class (k=2) has a higher weight than the normal class (k=1) to alleviate sample imbalance. The true label of the nth sample (1 represents this class, 0 represents other classes); Let be the probability that the nth sample is predicted to be of class k.
[0059] In some embodiments, S302 sets the focus parameters. Category Balance Weights (0.8 for abnormal classes, 0.2 for normal classes), substitute into the loss function. This method is suitable for scenarios with a large number of easily classifiable normal samples and a small number of difficult-to-classify abnormal samples (such as slightly out-of-focus or severely occluded abnormal samples). It allows the model to focus on learning the difficult-to-classify samples, further improving the recall rate of abnormal samples. The core formula for adapting to difficult-to-classify samples is as follows: (16) in, To balance the weights across categories, consistent with the weighting effect of weighted cross-entropy, the weights for the coke tank scenario are set as follows: 0.8 for abnormal classes and 0.2 for normal classes. To focus the parameters, the coke pot scenario is set to 2, through... This item reduces the loss weight of easily classified samples (normal samples) and amplifies the loss weight of difficult-to-classify samples (abnormal samples).
[0060] In some embodiments, before training begins, the parameters of all trainable layers are passed to the AdamW optimizer, and the aforementioned quantization parameters are set. During training, the optimizer automatically updates the parameters of the trainable layers based on the loss gradient of each training iteration, and simultaneously performs regularization on the parameters through weight decay to suppress overfitting. After the first stage of training, the initial learning rate needs to be adjusted to 1e-5 before starting the second stage of full-thaw fine-tuning, ensuring that the pre-trained features are not destroyed during the fine-tuning process. The core function of choosing the AdamW optimizer is to accelerate training convergence while suppressing overfitting, adapting to the training requirements of the coke can gate binary classification task.
[0061] In some embodiments, this is implemented during the Warmup phase: the first 3 epochs constitute the Warmup phase, and the learning rate for each iteration increases linearly according to a formula, gradually increasing from 0 to the initial learning rate (1e-4 in the first phase, 1e-5 in the second phase). The core formula is: (17) t is the current iteration step. The initial learning rate is set to 0, and the learning rate increases linearly to the initial learning rate to avoid the initial learning rate being too large and damaging the pre-trained weights.
[0062] During the cosine annealing phase: After the Warmup phase, the cosine annealing phase begins, with the learning rate gradually decreasing according to the cosine curve until training ends, ultimately reaching a learning rate of 1e-6. During training, the learning rate must be monitored in real-time to ensure it updates according to the set curve and to avoid sudden changes. During phase switching: After the first phase (frozen backbone), the initial learning rate is adjusted to 1e-5, and the Warmup (still for 3 epochs) and cosine annealing processes are restarted to ensure the stability of the second phase's full-thaw fine-tuning. The core formula is: (18) (Minimum learning rate), T is the total number of iterations for cosine annealing (17 epochs for the first stage and 30 epochs for the second stage). The learning rate gradually decreases with the number of iterations according to the cosine curve, eventually reaching the minimum learning rate, thus improving the model's convergence accuracy.
[0063] In some embodiments, before training begins, the following steps are included: initializing the optimal F1 score to 0.0 and the early stopping count to 0; after each epoch of training, calculating the F1 score of the validation set and comparing it with the current optimal F1 score; if the current F1 score is higher than the optimal F1 score, updating the optimal F1 score, resetting the early stopping count to 0, and saving the current model weights; if the current F1 score is lower than or equal to the optimal F1 score, incrementing the early stopping count by 1; when the early stopping count reaches 10, immediately stopping training, calling the saved optimal model weights as the final model, and avoiding overfitting caused by continued training.
[0064] In some embodiments, after obtaining the original model, S104 validates the original model based on the validation set in the image data. Specifically, the original model is input into the coke oven gate image in the validation set, and the model outputs the prediction result for each image, i.e., normal or abnormal. The prediction result is compared with the true label of the validation set, and performance indicators such as accuracy, recall and F1 score are calculated to evaluate the generalization ability of the original model on unseen data.
[0065] When the validation results do not meet the preset conditions, such as the recall rate of abnormal samples being lower than the preset threshold or the F1 score not meeting the standard, S104 fine-tunes the original model. Fine-tuning methods include at least one of the following: adjusting hyperparameters and continuing training, adjusting class weights or focusing parameters in the loss function and continuing training, or adjusting data augmentation strategies and retraining. After fine-tuning, the validation set is used again for validation, and the validation and fine-tuning process is repeated until the validation results meet the preset conditions. The model at this point is then used as the target model.
[0066] In some embodiments, S104 can input the image data to be detected into the target model to obtain the gate status recognition result. Specifically, an industrial camera installed at the corresponding position at the bottom of the coke tank acquires an image of the gate area, which is then scaled to 224×224 pixels before being input into the target model. The backbone network of the target model performs multi-scale feature extraction on the input image. The shallow layer extracts local detail features such as the engagement state of the locking mechanism and the gaps in the liner, while the deep layer extracts global semantic features of the overall closure or misalignment of the gate. After global average pooling aggregation, the extracted features are processed sequentially through layer normalization, linear layers, and the Softmax function, outputting probability values for two categories: normal and abnormal. The category corresponding to the higher probability is taken as the final gate status recognition result. If the recognition result is abnormal, the staff is prompted to check; if it is normal, the coke tank can continue to perform subsequent operations.
[0067] This disclosure utilizes data augmentation based on image data of the bottom gate of a coke oven to obtain enhanced training samples, effectively expanding the scale and diversity of training samples. This allows the model to be exposed to images simulating extreme industrial environments during the training phase, improving the model's robustness to complex industrial disturbances and mitigating overfitting issues caused by scarce labeled data. By using enhanced training samples to train an initial model with ConvNeXt-Tiny as the backbone network and pre-trained weights from the ImageNet dataset, and setting the input layer, first stage, second stage, and third stage to an untrainable state, training only the fourth stage and the classification head, the general visual features learned by the pre-trained model are reused. This allows the model to be trained with only a small number of coke oven gate samples, significantly reducing the training data requirements. By employing a weighted loss function during model training, assigning greater loss weights to abnormal samples than to normal samples, the model can still focus on learning abnormal samples even under imbalanced conditions where normal samples far outnumber abnormal samples, effectively ensuring the recall rate of anomaly detection and reducing the risk of missed detections.
[0068] In some embodiments, this disclosure provides an electronic device, such as Figure 4 An exemplary structural block diagram of an electronic device 400 according to an embodiment of this disclosure is shown.
[0069] like Figure 4 As shown, the electronic device 400 may include a processor 401 and a memory 402. The processor 401 may include, for example, a general-purpose processor (“CPU”) or a dedicated graphics processor (“GPU”), and the memory 402 stores program instructions executable on the processor. In some embodiments, the memory 402 may include, but is not limited to, resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), and enhanced dynamic random access memory (EDRAM).
[0070] Furthermore, the aforementioned memory 402 may store program instructions for low-voltage distribution area energy dispatching. When the program instructions are executed by the processor, the electronic device 400 performs the aforementioned actions. Figure 1 The method for monitoring the bottom gate of coke ovens based on ConvNeXt-Tiny is described in the paper.
[0071] Based on the foregoing description in conjunction with the accompanying drawings, those skilled in the art will understand that the embodiments disclosed herein can also be implemented by software programs. Therefore, this disclosure also provides a computer-readable storage medium storing computer-readable instructions for low-voltage distribution area energy dispatching, which, when executed by one or more processors, can be used to implement the embodiments of this disclosure in conjunction with the accompanying drawings. Figure 1 The described method is a coke oven bottom gate monitoring method based on ConvNeXt-Tiny.
[0072] It should be noted that although the operations of the disclosed method are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0073] It should be understood that when the terms “first,” “second,” “third,” and “fourth,” etc., are used in the claims of this disclosure, in the specification, and in the drawings, they are used only to distinguish different objects and not to describe a specific order.
[0074] While numerous embodiments of this disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and intent of this disclosure. It should be understood that various alternatives to the embodiments of this disclosure described herein may be employed in the practice of this disclosure. The appended claims are intended to define the scope of this disclosure and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for monitoring the bottom gate of a coke oven based on ConvNeXt-Tiny, comprising: Data augmentation is performed based on the image data of the valve at the bottom of the coke tank to obtain augmented training samples; The enhanced training samples are used to train the initial model with the ConvNeXt-Tiny backbone network to obtain the original model. The initial model also includes a classification head. The backbone network is loaded with weights pre-trained on the ImageNet dataset and consists of an input layer, a first stage, a second stage, a third stage, and a fourth stage. The input layer, the first stage, the second stage, and the third stage are set to an untrainable state during model training. In model training, a weighted loss function is used, in which the loss weights assigned to abnormal samples are greater than the loss weights assigned to normal samples. as well as The original model is verified and fine-tuned to obtain the target model, and the image data to be detected is input into the target model to obtain the gate state recognition result.
2. The method according to claim 1, wherein the backbone network loaded with weights pre-trained on the ImageNet dataset includes: Obtain the pre-trained weights of the ImageNet dataset; as well as The weights are loaded onto each layer of the backbone network without modifying its structure.
3. The method according to claim 2, wherein the first stage, the second stage, the third stage, and the fourth stage are composed of multiple ConvNeXt modules, and loading the weights for each layer of the backbone network includes: The corresponding weights are loaded for the input layer, and the corresponding weights are loaded for each ConvNeXt module in the first, second, third and fourth stages respectively.
4. The method according to claim 1, wherein the input layer, the first stage, the second stage, and the third stage are set to an untrainable state during model training, comprising: In the first training phase of model training, the input layer, the first phase, the second phase and the third phase are set to an untrainable state, while the fourth phase and the classification head are set to a trainable state. as well as In the second training phase of model training, the input layer, the first phase, the second phase, and the third phase are set to trainable state. The second training phase follows the first training phase, and the learning rate of the second training phase is less than that of the first training phase.
5. The method according to claim 4, further comprising: After the first training phase, the effectiveness of the first training phase is verified by the gradients of the parameters in the input layer, the first phase, the second phase, and the third phase.
6. The method according to claim 1, wherein the classification head comprises a global average pooling layer, a layer normalization layer, a linear layer, and an activation function, and the method further comprises: Set the input dimension of the linear layer to be the same as the output dimension of the fourth stage, and set the output dimension of the linear layer to 2; as well as The parameters of the linear layer are initialized using a random normal distribution.
7. The method of claim 1, wherein the data enhancement based on the image data of the bottom valve of the coke oven comprises: Adjust the brightness of the image data; Adjust the contrast of the image data; Gaussian noise is superimposed onto the image data; Set the pixel values of random regions in the image data to preset values; Any two images from the image data are mixed according to a preset distribution coefficient to obtain a mixed image; as well as The image data is flipped according to a preset probability.
8. The method according to claim 1, wherein the loss weight assigned to abnormal samples in the weighted loss function is greater than the loss weight assigned to normal samples, comprising: The class weights of the abnormal samples are assigned to be greater than those of the normal samples; as well as Set the focus parameter so that the loss weight of abnormally difficult-to-classify samples is greater than that of normal easily-classified samples.
9. An electronic device, comprising: processor; as well as A memory storing computer instructions for monitoring the bottom gate of a coke oven based on ConvNeXt-Tiny, which, when executed by a processor, cause the method according to any one of claims 1-8 to be implemented.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in claims 1 to 8.
Citation Information
Patent Citations
Coke pot hot coke state detection system and rotation interlocking control method thereof
CN114806610A
Bottom gate interlocking information feedback device for coke dry quenching hoister
CN201990396U
Expansion joint structure of outer vertical face of glass curtain wall
CN217811784U