CN-121982403-A - Power distribution cabinet button state identification method with lamp based on twin network
Abstract
The invention relates to the technical field of recognition of buttons with lamps and discloses a method for recognizing states of the buttons with lamps of a power distribution cabinet based on a twin network, which comprises the steps of S1 and a training flow of a model, wherein S1 comprises S11 and data preparation and preprocessing, S11 comprises S111, collecting original images, collecting a large number of images with the buttons with lamps under different illumination conditions, different shooting angles and different background environments by using an industrial camera or other image collecting equipment to form an original data set, and the method for recognizing the states of the buttons with lamps of the power distribution cabinet based on the twin network adopts a scheme of automatically extracting features and recognizing three states of the buttons with lamps by adopting a neural network classification method, respectively carries out depth feature extraction and recognition, introduces an uncertainty weighting loss function, automatically adjusts loss weights according to task learning errors, and realizes more accurate and fine classification of the buttons with lamps.
Inventors
- LIU PENG
- GU YULONG
- TIAN ZIHAO
Assignees
- 河南超维智能科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260126
Claims (6)
- 1. The method for identifying the button state of the switch board with the lamp based on the twin network is characterized by comprising the following steps: S1, training process of a model, wherein the S1 comprises the following steps: s11, data preparation and preprocessing, wherein the S11 comprises the following steps: S111, acquiring an original image, namely acquiring a large number of images with lamp buttons under different illumination conditions, different shooting angles and different background environments by using an industrial camera or other image acquisition equipment to form an original data set; S112, labeling three types of labels, namely, carrying out fine labeling on the collected original image, namely, a bright/dark state label, a color state label and a button/lamp type label; S113, data enhancement and division, namely scaling the image to 224x224 pixels and carrying out normalization processing; S12, constructing a multi-branch neural network model, namely taking RepVGG networks as a deep feature map extracted by a trunk of feature extraction, and connecting three independent classification heads in parallel after the trunk networks; s13, defining an adaptive weighted loss function, namely introducing a learnable uncertainty parameter to construct a multi-task loss function by an adaptive weighting mechanism; S14, model iterative training; S15, re-parameterizing and storing the model structure, namely after the structure re-parameterization and the conversion convergence are introduced, fusing the multi-branch structure in each RepVGG Block into a single 3x3 convolution layer in a mathematical equivalent way, and storing; s2, a model identification flow, wherein the S2 comprises the following steps: S21, loading the re-parameterized inference model, and loading the lightweight inference model subjected to the structure re-parameterization stored in S15 on edge computing equipment; S22, capturing an image of the button to be detected in real time through a field camera, and preprocessing the image of the button to be detected; s23, model forward reasoning, namely inputting the preprocessed image tensor into a loaded model, and outputting original predicted values corresponding to the three branch heads; S24, carrying out post-processing and analysis on the result, namely analyzing the original output of the three branches; S25, outputting and applying, namely integrating the analyzed three-dimensional state information and outputting the integrated three-dimensional state information to the inspection platform.
- 2. The method for identifying the button state of the switch board with lamp based on the twinning network according to claim 1, wherein the step S14 comprises: S141, inputting data; s142, forward propagation; s143, calculating total loss; S144, back propagation; S145, updating network weight and uncertainty parameters; s146, verifying whether training is converged.
- 3. The method for identifying the button state of the power distribution cabinet with the lamp based on the twinning network according to claim 2, wherein if the verification result in the step S146 is yes, the step S15 is executed downwards, otherwise, the step S141 is executed again.
- 4. The method for identifying the state of the switch board with the lamp button based on the twinning network according to claim 3, wherein the on/off state label and the button/lamp type label are both classified labels, and the color state label is a multi-classified label.
- 5. The method for recognizing the button state of the power distribution cabinet with the lamp based on the twinning network according to claim 4, wherein the preprocessing in S22 performs the same processing operations as S112 and S113, and performs size scaling and normalization on the acquired pictures.
- 6. The method for recognizing the button-on-lamp state of a power distribution cabinet based on a twin network according to claim 5, wherein the three classification heads are an on/off state branching head, a color state branching head and a button/lamp type branching head, respectively.
Description
Power distribution cabinet button state identification method with lamp based on twin network Technical Field The invention relates to the technical field of button identification with a lamp, in particular to a method for identifying the state of a button with a lamp of a power distribution cabinet based on a twin network. Background The existing automatic feature extraction and classification method based on the neural network only uses a network with one prediction branch to perform single state identification, and cannot process the on-off state and color of a button with a lamp and the identification of the button/indicator lamp at the same time. Moreover, the field samples often have the problem of uneven distribution, and three states of color, on-off, button/indicator lamps are bound with a certain priori, so that the network learns wrong associated information. In this regard, the invention provides a method for identifying the state of the button with the lamp of the power distribution cabinet based on the twin network, which adopts a multi-classification branch twin neural network classification method, can finely identify various characteristics and can effectively avoid the problem that the training effect is influenced due to strong binding among the characteristics caused by uneven data distribution. Disclosure of Invention 1. Technical problem to be solved Aiming at the defects of the prior art, the invention provides a method for identifying the state of the switch board with the lamp button based on the twin network, which has the advantage of precisely identifying various characteristics and solves the problem that the training effect is influenced by strong binding among the characteristics caused by uneven data distribution. (II) technical scheme In order to achieve the purpose of finely identifying various characteristics, the invention provides the following technical scheme: a method for identifying the state of a button with a lamp of a power distribution cabinet based on a twin network comprises the following steps: S1, training process of a model, wherein the S1 comprises the following steps: s11, data preparation and preprocessing, wherein the S11 comprises the following steps: S111, acquiring an original image, namely acquiring a large number of images with lamp buttons under different illumination conditions, different shooting angles and different background environments by using an industrial camera or other image acquisition equipment to form an original data set; S112, labeling three types of labels, namely, carrying out fine labeling on the collected original image, namely, a bright/dark state label, a color state label and a button/lamp type label; S113, data enhancement and division, namely scaling the image to 224x224 pixels and carrying out normalization processing; S12, constructing a multi-branch neural network model, namely taking RepVGG networks as a deep feature map extracted by a trunk of feature extraction, and connecting three independent classification heads in parallel after the trunk networks; s13, defining an adaptive weighted loss function, namely introducing a learnable uncertainty parameter to construct a multi-task loss function by an adaptive weighting mechanism; S14, model iterative training; S15, re-parameterizing and storing the model structure, namely after the structure re-parameterization and the conversion convergence are introduced, fusing the multi-branch structure in each RepVGG Block into a single 3x3 convolution layer in a mathematical equivalent way, and storing; s2, a model identification flow, wherein the S2 comprises the following steps: S21, loading the re-parameterized inference model, and loading the lightweight inference model subjected to the structure re-parameterization stored in S15 on edge computing equipment; S22, capturing an image of the button to be detected in real time through a field camera, and preprocessing the image of the button to be detected; s23, model forward reasoning, namely inputting the preprocessed image tensor into a loaded model, and outputting original predicted values corresponding to the three branch heads; S24, carrying out post-processing and analysis on the result, namely analyzing the original output of the three branches; S25, outputting and applying, namely integrating the analyzed three-dimensional state information and outputting the integrated three-dimensional state information to the inspection platform. Preferably, the step S14 includes: S141, inputting data; s142, forward propagation; s143, calculating total loss; S144, back propagation; S145, updating network weight and uncertainty parameters; s146, verifying whether training is converged. Preferably, if the verification result in S146 is yes, S15 is executed downwards, otherwise S141 is executed again. Preferably, the on/off state label and the button/lamp type label are both classified labels, and the color state label is a multi-classif