An intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism

By using the intelligent video image retrieval method of neural network self-review and knowledge transmission mechanism and depth gamma correction module in the underground environment, the problem of insufficient robustness of the underground image retrieval algorithm to extreme environments and uneven illumination is solved, and efficient , accurate image retrieval.

CN114647760BActive Publication Date: 2024-09-24CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210037094.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-13
Publication Date
2024-09-24
Estimated Expiration
2042-01-13

AI Technical Summary

Technical Problem

In the underground environment, existing image retrieval algorithms are difficult to cope with extreme environments, have poor real-time performance, and lack robustness to uneven lighting conditions, making it difficult to balance retrieval accuracy and computational complexity.

Method used

An intelligent video image retrieval method based on the neural network's self-review and knowledge transmission mechanism is used to reconstruct the lighting conditions of the image through the deep gamma correction module. It combines the feature extraction and knowledge transmission of the teacher and student models to achieve robustness to uneven lighting. performance and real-time performance.

Benefits of technology

It improves the accuracy and efficiency of image retrieval, realizes efficient foreign object image retrieval in underground environments, enhances robustness to uneven lighting environments, and reduces time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647760B
    Figure CN114647760B
Patent Text Reader

Abstract

An intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism improves the retrieval accuracy of small models while ensuring the real-time performance of the model, and achieves a balance between accuracy and efficiency as much as possible; a gamma correction module is set to achieve robustness to uneven lighting, improve detail discernibility, avoid high-frequency noise, and have strong universality through local adjustment of the image; a self-review mechanism is established to allow local self-supervision of the neural network, continuous reflection and adjustment of learning parameters, fully learn the deep semantic information of the image, achieve rapid convergence of the neural network, and improve retrieval accuracy; a knowledge transmission mechanism is adopted to improve model accuracy, reduce model latency, and compress network parameters, and finally obtain a student model with strong performance and high accuracy; shallow feature knowledge is used as a learning target through the transmission mechanism, and a VAE variational autoencoder model is used to reconstruct deep features to generate learning results, and the learning results are measured with the targets to complete the learning tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image retrieval, specifically relating to an intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanisms. Background Technology

[0002] Image retrieval involves quantitative analysis of images to achieve accurate image interpretation. Some scholars have applied it to mineral processing and underground image retrieval. However, with the surge in data volume, algorithms based on Support Vector Machines (SVMs) and linear classification are limited by data representation capabilities, resulting in less than ideal retrieval performance. Some research combines SVMs with neural networks to replace the softmax layer for image prediction. However, SVMs require finding suitable spatial parameters in high-dimensional data to generate effective margin classification layers, thus increasing the learning burden on neural networks and making it difficult to embed them into end-to-end training. In the mining industry, the technological sophistication of mineral processing and image retrieval is still insufficient, currently relying mainly on manual inspection for identification. This is because deep learning-based underground deployment is difficult, has high operating time costs, and its real-time performance needs improvement.

[0003] With the widespread adoption of GPUs, researchers proposed the VGG Net deep neural network to reduce the number of parameters, improving network performance while maintaining stability. However, the performance of the model degraded when directly stacking conventional networks. Subsequently, scholars proposed the ResNet deep residual network, which maintains model performance by learning the identity mapping of features. With the advent of intelligent coal mines, researchers began to apply deep neural network algorithms to anomaly retrieval in underground working faces. Neural networks are used for feature extraction and training of mineral resources to achieve analysis and retrieval identification of ore and rock. For the problem of manually retrieving ore block size, a backbone feature extraction network composed of residual neural network structures is used to achieve automatic ore block size retrieval. For the retrieval of foreign objects in coal mine conveyor belts, histogram homogenization is used to handle uneven lighting, and Faster R-CNN is used as the backbone extraction algorithm to extract features from the image, thus achieving accurate image retrieval.

[0004] However, the proposed retrieval methods still have the following problems:

[0005] 1. The downhole environment is complex, and even high-performance surface algorithms struggle to cope with its extreme conditions. Therefore, deploying some deep neural network-based retrieval algorithms or traditional algorithms downhole is relatively difficult.

[0006] 2. Deep learning based on neural networks has achieved great success, but due to the large number of parameters, the real-time performance needs to be improved. The real-time requirements for foreign object retrieval on downhole conveyor belts are high. Although the Faster R-CNN-based method mentioned above meets the accuracy requirements for downhole foreign object retrieval, its real-time performance needs to be improved.

[0007] 3. For uneven lighting conditions underground, current algorithms often employ histogram-based image enhancement methods. This achieves uniform illumination by adjusting the brightness distribution. The histogram provides a uniform probability density for grayscale levels, expanding the dynamic range of pixel values ​​but reducing the number of grayscale levels. However, the histogram's brightness distribution relies on prior knowledge, lacks universality, and damages locally bright areas and discernible image details.

[0008] 4. Current algorithms have not found a balance between accuracy and computational complexity. Accuracy refers to the robustness of retrieval under special conditions. Summary of the Invention

[0009] To address the problems existing in the aforementioned background technologies, this invention proposes an intelligent video image retrieval method based on a neural network self-learning and knowledge transfer mechanism. For the complex environment of uneven lighting in underground mines, this invention proposes a deep gamma correction module, which improves detail discernibility and achieves robustness against uneven lighting by learning knowledge of the local brightness and darkness distribution of the image. Addressing the poor real-time performance of deep learning algorithms commonly found in underground mines, a lightweight network is employed to achieve efficient retrieval of foreign object images while ensuring low time costs. A self-learning and knowledge transfer mechanism is proposed, using a large model to teach knowledge and improve the robustness of the lightweight network.

[0010] A smart video image retrieval method based on neural network self-review and knowledge transfer mechanisms, characterized in that:

[0011] The method is implemented based on an image correction module, a feature extraction module, a transmission module, and a self-correction module;

[0012] The image correction module reconstructs the lighting conditions of the image based on a gamma correction network, uses a multi-layer neural network to fit the correction parameters, and evaluates and reconstructs the image using a block-based approach.

[0013] The feature extraction module is divided into two parts: a teacher model and a student model. The teacher model provides deep feature knowledge to the student model, and the student model uses a lightweight model to run on the terminal device. The two models work together to complete the feature extraction of the corrected image.

[0014] In the knowledge transfer module, a teacher model is first pre-trained. Then, when training the student model, the acquired teacher model is used for supervised training to achieve knowledge transfer. Specifically, the student model learns the intrinsic feature representation of the image on its own, and the shallow feature information of the teacher model is used to supervise the deeper feature information of the student model, thereby gradually improving the generalization ability of the student model.

[0015] The self-review module is set in the student model, which takes the student model’s previous learning experience as old knowledge. While reviewing old knowledge, it deeply integrates new knowledge from the next stage with old knowledge to achieve self-monitoring and self-review. In the previous stage, the student model learns a set of features based on its previous learning experience. The features learned in the first stage are integrated with the output features of the current stage as old knowledge, thereby realizing the self-review mechanism of the student model.

[0016] In this method, the teacher module trains the student module, and image features are extracted and clustered through the teacher and student modules. In the retrieval stage, the image to be queried and the image database are sent to the student module, and the image retrieval function is completed by measurement and sorting.

[0017] Furthermore, in the correction module, gamma correction is defined as:

[0018] C = r * I 1 / η (1)

[0019] In the formula, C is the corrected image; r is the correction constant, set between (0,1); I is the original image; 1 / η is the gamma value, which is changed to achieve correction.

[0020] The gamma correction process is as follows:

[0021] Step a: The image to be reconstructed is segmented into blocks. Due to the presence of uneven illumination, block segmentation is performed to preserve normal areas and use them as the target for reconstruction under illumination conditions.

[0022] Step b: The features of the blocks are extracted by a fully connected neural network, with the block to be reconstructed serving as the driving data and the other blocks serving as the reconstruction targets.

[0023] Step c: Freeze the neuron weights in some regions, so that they only participate in the calculation and not in gradient propagation, while the weights in the remaining regions are linear combinations of the parameter 1 / η.

[0024] Step d: The reconstruction prediction is completed using the Loss function, and parameter 1 is updated via backpropagation. η A linear combination of, where:

[0025]

[0026] The gradient update method is as follows:

[0027]

[0028] Among them, X i To drive the data queue and avoid network overconfidence, a penalty term γ is set as a regularization term; L represents Gamma Loss; λ is the learning rate, set to 0.00001.

[0029] Furthermore, the transmission module includes a knowledge reconstruction model based on VAE variational autoencoder, which achieves the performance of the teacher model by mimicking the output features of the teacher model at each stage. The VAE variational autoencoder describes the observation of the latent space in a probabilistic manner, and the Gaussian distribution is obtained based on the data. The Gaussian distribution of the teacher model is regarded as the real distribution. By continuously approximating the data features of the teacher model, the generalization ability of the student model is improved.

[0030] Furthermore, in the knowledge reconstruction model based on VAE variational autoencoders, the network input is defined as X. i , i∈[1,M]; correspondingly, the sum of the information entropy of the network input is: (where p in the formula) θ What does it represent?

[0031]

[0032] In the formula, p θ (X (i) ) is X (i) The probability distribution;

[0033] KL divergence measures the difference between two probability distributions p and q, also known as relative entropy, and is defined as:

[0034]

[0035] Rewrite the KL divergence as its mathematical expectation:

[0036] D KL (p||q)=E[[log p(X (i) )-log q(X (i) (6)

[0037] The VAE model makes generated data approximate real data. During computation, it doesn't explicitly calculate the specific parameters of data features; instead, it approximates the posterior probability, i.e., the probability distribution of the real data, through the probability distribution of the generated model. It uses KL divergence to measure the degree of similarity.

[0038]

[0039] In the formula, X s(i) It's student data, X t (i) It's teacher data, q φ (Z S |X s (i) ) is the student model distribution, p θ (Z T |X t (i) Z is the posterior distribution of the teacher model, E is the expectation, and Z is the expected value. T Z S It follows a Gaussian distribution N(0,1);

[0040] The posterior distribution reflects the true distribution of the data and is obtained from the joint probability distribution:

[0041]

[0042] Substituting equation (8) into equation (7), we get:

[0043]

[0044] because With logp θ (X t (i) It is irrelevant, so

[0045]

[0046] Among them, KL(q) φ (Z S |X s (i) )||p θ (Z T |X t (i) )) indicates the reconstruction of Loss.

[0047] Furthermore, in the transmission module, the training process is as follows:

[0048] Step i: Pre-train a complex teacher model. Train the teacher network in a fully supervised manner. During the training process, training samples X and labels Y are trained in pairs, where Y is a hard label [0,1,0,0].

[0049] Step ii: Calculate the soft label using the trained large model. Perform a softmaxR transformation on the predicted output of the teacher network to obtain a probability distribution with a relatively gentle value distribution, i.e., the soft label [0.1, 0.7, 0.1, 0.1].

[0050] Step iii: Train the student model and add an additional soft-label loss function on top of the student model. The weight of the two loss functions is adjusted by the scaling parameter α.

[0051] Step iv: The student model learns to reconstruct the features, approximates the posterior probability by imitating the teacher model, and uses KL divergence to measure the reconstruction effect.

[0052] The final loss is set as follows:

[0053] Loss=αHard loss+(1-α)KL loss+Soft loss (11)

[0054] In the formula, Hard loss is the loss function of the student model, Soft loss is the loss function of the teacher model, that is, the loss function of the additional soft labels, and α is the scaling parameter.

[0055] in:

[0056]

[0057] Hard loss=cross_entropy(output S ,Y i ),Y i ∈Y H (13)

[0058] In the formula, cross_entropy is the cross-entropy, and output is the cross-entropy. S This is the output of the student model. T It is the output of the teacher model, Y i Y H These are tags and tag sets, respectively.

[0059] Furthermore, in the self-review module, the input consists of old knowledge and new knowledge from the current stage. First, the input features pass through an activation layer. Because the old and new knowledge have different dimensions, they are converted into features of the same dimension before participating in the computation. The activation layer converts the old and new knowledge into features of the same dimension and activates these features, resulting in three convolutional feature blocks. Next, the convolutional features are compressed. Finally, the features are aggregated, and this aggregated feature is the final output of the self-review model. Ag To evaluate the learning performance of the self-review model, a self-review loss function was designed:

[0060] revision loss=cross_entropy(softmax(output Ag ),Y i )+β (14)

[0061] To prevent the model from overfitting, β is set as a regularization parameter.

[0062] Furthermore, this method includes the following process steps:

[0063] Step 1: First, divide the training image with uneven lighting into blocks, and then calculate the gamma value of each block through the image correction module. The gamma value is a linear combination of these blocks. Evaluate the correction quality, then backpropagate to update the network parameters and output the best correction result. This result is used as the training data for the subsequent lightweight retrieval network.

[0064] Step 2: Train the student model, i.e., the lightweight retrieval network. The teacher model is a pre-trained model that does not participate in updating network parameters and only serves as the backbone network for feature extraction. Training samples are fed into both the teacher model and the student model. The shallow feature information of the teacher model supervises the deeper feature information generated by the student model. Then, in the next stage, the deeper feature information of the teacher model is used to supervise the deeper feature information of the student model.

[0065] Step 3: Train the self-review module. The inputs to this module are old knowledge and new knowledge at the current stage. First, the input new and old knowledge are passed through the activation layer to convert the new and old knowledge into features of the same dimension, and then participate in the calculation. Finally, an aggregated feature vector is constructed.

[0066] Step 4: In the transmission module, the final output of the teacher model and the student model uses the soft loss function to measure the student model in the current training process, and the hard loss is used to check the gap between the current state of the student model and the label. The network backpropagates the gradients of each loss to update the parameters. In the self-review module, the revision loss is used to evaluate the gap with the label. Through backpropagation, the parameters are updated to narrow the gap.

[0067] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0068] (1) The image retrieval method based on neural network self-review and knowledge transfer mechanism proposed in this invention improves the retrieval accuracy of small models while ensuring the real-time performance of the models through neural network self-review and the mechanism of large models tutoring small models. It achieves a balance between accuracy and efficiency as much as possible.

[0069] (2) This invention proposes a deep gamma correction network, which can achieve robustness to uneven illumination, improve detail discernibility, avoid high-frequency noise, and has strong universality by adjusting the local supervision of the image.

[0070] (3) This invention proposes a self-review mechanism, which allows the neural network to perform local self-supervision, continuously reflect on and adjust the learning parameters, fully learn the deep semantic information of the image, realize the rapid convergence of the neural network, and improve the retrieval accuracy.

[0071] (4) The knowledge transfer mechanism adopted in this invention aims to enable the student to learn the teacher's generalization ability, improve model accuracy, reduce model latency, compress network parameters, and finally obtain a student model with strong performance and high accuracy.

[0072] (5) The transmission mechanism proposed in this invention takes the shallow feature knowledge of the teacher as the learning target. Unlike the traditional learning method, this invention uses the VAE variational autoencoder model to reconstruct the deep features of the student, thereby generating the learning result. The learning result is then measured against the target to complete the learning task. Attached Figure Description

[0073] Figure 1 This is an overall framework diagram of the intelligent video image retrieval method described in this embodiment of the invention.

[0074] Figure 2 This is a schematic diagram of the image correction module described in an embodiment of the present invention.

[0075] Figure 3 This is a schematic diagram of the feature extraction module described in an embodiment of the present invention.

[0076] Figure 4 This is a schematic diagram of the conduction module described in an embodiment of the present invention.

[0077] Figure 5 This is a schematic diagram of the knowledge reconstruction model described in an embodiment of the present invention.

[0078] Figure 6 This is a schematic diagram of the self-remembering model described in an embodiment of the present invention.

[0079] Figure 7 This is a flowchart illustrating the image retrieval method described in an embodiment of the present invention. Detailed Implementation

[0080] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings.

[0081] This invention proposes an image retrieval method based on neural network self-review and knowledge transfer mechanisms, aiming to achieve a simple, efficient, high-precision, good generalization, and robust retrieval model. The algorithm comprises the following parts: 1. Image correction module; 2. Feature extraction module; 3. Transfer module; 4. Self-review module, such as... Figure 1 As shown.

[0082] Due to the influence of factors such as the underground environment and lighting equipment, images are affected by uneven illumination, which can easily lead to retrieval errors. Therefore, this invention proposes a gamma correction module to achieve the purpose of image illumination condition reconstruction. Unlike traditional algorithms such as bilinear filtering, median filtering, and histogram homogenization, which adjust the brightness distribution of the entire image, this invention proposes a gamma correction network that evaluates and reconstructs the image using a block-based approach and employs a multi-layer neural network to fit the correction parameters. Therefore, it is more robust and universal than traditional algorithms. Gamma correction is a non-linear operation method that conforms to the characteristics of human vision and saves coding space. Gamma correction is defined as:

[0083] C = r * I 1 / η (1)

[0084] In the formula, C is the corrected image; r is the correction constant, set between (0,1); I is the original image; 1 / η is the gamma value, which is changed to achieve correction.

[0085] Based on the above principles, this invention proposes a gamma correction neural network to realize the illumination conditions for reconstructing images, and its structure diagram is shown below. Figure 2 As shown.

[0086] The process of gamma correction neural network is as follows:

[0087] 1. First, the image to be reconstructed is segmented into blocks. Due to the existence of uneven lighting, block segmentation can effectively preserve normal areas and use them as the target for reconstruction under different lighting conditions.

[0088] 2. Next, features are extracted from the four blocks using a fully connected neural network, with the block to be reconstructed serving as the driving data and the other blocks serving as the reconstruction targets.

[0089] 3. Next, to reduce the difficulty of fitting, this invention freezes the neuron weights in the three regions outlined in the bounding box, allowing them to participate only in calculations and not in gradient propagation. The regions not outlined in the bounding box are linear combinations of the parameter 1 / η.

[0090] 4. Finally, the reconstructed prediction is completed using the Loss function, and the linear combination of parameters 1 / η is updated via backpropagation. Where:

[0091]

[0092] The gradient update method is as follows:

[0093]

[0094] Among them, X iTo drive the data queue and prevent the network from becoming overconfident, a penalty term γ is set as a regularization term; L represents Gamma Loss; λ is the learning rate, set to 0.00001.

[0095] The feature extraction module is divided into two parts: a teacher model and a student model. The teacher model is generally a large model with strong expressive and generalization capabilities, providing deep feature knowledge to improve the student model. Thanks to the rapid development of deep learning, many excellent algorithm models offer extremely high accuracy. However, to improve the model's representational power, the model's depth and width are further increased, often resulting in very large teacher models that are difficult to deploy in the ground. The student model is generally a lightweight neural network with a significantly reduced number of parameters compared to the teacher model, thus offering high efficiency and commonly used in mobile terminal devices. Therefore, lightweight models meet the requirements of the ground implementation environment, making ground deployment more reliable. However, lightweight models have poorer generalization capabilities compared to large models. In the feature extraction part, there are no specific selection requirements for the teacher and student models in this invention. Therefore, the image retrieval algorithm proposed in this invention is highly flexible and offers a wide range of choices. Figure 3 The left half represents the student model, and the right half represents the teacher model.

[0096] As can be seen from the figure, the spatial resolution of VGGNet's feature maps monotonically decreases while the number of channels monotonically increases. The input image has dimensions of HxWx3 (color image) or HxWx1 (grayscale image), and the output of the final fully connected layer is a 1x1xC vector, where C equals the number of classification categories.

[0097] The image is processed through a series of convolutional layers, which use very small 3x3 convolutional kernels, while some convolutional layers use 1x1 convolutional kernels.

[0098] The stride of the convolutional layers is set to 1 pixel, and the padding of the 3x3 convolutional layers is set to 1 pixel. Max pooling is used in 5 layers. After a portion of the convolutional layers, the max-pooling window is 2x2, and the stride is set to 2.

[0099] Following the convolutional layer are three fully-connected layers (FC). The first two fully-connected layers each have 4096 channels, and the third fully-connected layer has 1000 channels, used for classification (this can be adjusted as needed). The configuration of the fully-connected layers is the same for all networks.

[0100] After the fully connected layer comes the Softmax layer, used for classification, outputting the probability value for each class. The output of the last four pooling layers can be used to train the student model.

[0101] Inception is divided into four branches in each Inception module. The outputs of all branches are concatenated, and the dimension of the concatenated output is consistent with the teacher model. Each branch has a different structure, mainly in terms of branch depth and convolutional kernels. The last three branches can be used for self-review, and can also be used to train the teacher model.

[0102] In the previous section, this invention introduced both the teacher model and the student model. The teacher model teaches student modules, thereby improving the generalization ability of the student model. This strategy of training models through a teaching-based approach is called knowledge transfer. First, a teacher model is pre-trained. Then, when training the student model, the acquired teacher model is used for supervised training to achieve the purpose of knowledge transfer. For example... Figure 1 As shown, the present invention proposes a transmission strategy that first allows the student model to learn the intrinsic feature representation of the image on its own, and then uses the shallow feature information of the teacher model to supervise the deeper feature information of the student model. Based on the concept of "haste makes waste", the teacher model gradually improves the generalization performance of the student model by progressing from shallow to deep and from simple to difficult. Figure 4 The diagram shown is a schematic of the conduction model.

[0103] In the transmission module, this invention proposes knowledge reconstruction based on VAE variational autoencoders. By mimicking the output features of the teacher network at each stage, it achieves the performance of the teacher network. VAE variational autoencoders describe observations of the latent space probabilistically, thus having excellent applications in data generation. By simulating real data features through VAE-encoded data features, it achieves the goal of 'deceptively realistic' representation. In fact, in the field of knowledge distillation, the data trained by the student model is a knowledge simulation of the data trained by the teacher model. Here, the data trained by the teacher model can be considered real data. Unlike traditional VAE models, this invention does not explicitly generate data but instead obtains a Gaussian distribution, treating the Gaussian distribution of the teacher model as the real distribution. This invention utilizes the idea of ​​VAE variational autoencoders to reconstruct data features, thereby improving the generalization ability of the student model by continuously approximating the data features of the teacher network. The VAE knowledge reconstruction model is as follows: Figure 5 As shown.

[0104] Define the network input as X i , i∈[1,M]; correspondingly, the sum of the information entropy of the network input is:

[0105]

[0106] In the formula, p θ (X (i) ) is X (i) The probability distribution.

[0107] KL divergence measures the difference between two probability distributions P and Q, also known as relative entropy, and is defined as:

[0108]

[0109] For convenience, the KL divergence is rewritten as the mathematical expectation:

[0110] D KL (p||q)=E[[log p(X (i) )-log q(X (i) (6)

[0111] As mentioned above, the VAE model aims to approximate real data with generated data. During computation, it avoids explicitly calculating the specific parameters of data features; instead, it approximates the posterior probability, i.e., the probability distribution of the real data, through the probability distribution of the generated model. This invention uses KL divergence to measure similarity.

[0112]

[0113] In the formula, X s (i) It's student data, X t (i) It's teacher data, q φ (Z S |X s (i) ) is the student model distribution, p θ (Z T |X t (i) Z is the posterior distribution of the teacher model, E is the expectation, and Z is the expected value. T Z S It follows a Gaussian distribution N(0,1).

[0114] The posterior distribution reflects the true distribution of the data and can be obtained from the joint probability distribution:

[0115]

[0116] Substituting equation (8) into equation (7), we get:

[0117]

[0118] because With logp θ (X t (i) It is irrelevant, so

[0119]

[0120] Among them, KL(q) φ (Z S |X s (i) )||p θ (Z T |X t (i) )) indicates the reconstruction of Loss.

[0121] The training process is as follows:

[0122] 1. Pre-train a complex teacher network using a fully supervised training method. During training, training samples X and labels Y are trained in pairs, where Y is a hard label [0,1,0,0].

[0123] 2. Next, the trained large model is used to calculate the soft label. The predicted output of the teacher network is then subjected to a softmax R-transform to obtain a probability distribution with a relatively gentle value distribution, namely the soft label [0.1, 0.7, 0.1, 0.1].

[0124] 3. Then train the student model, and add an additional soft-label loss function on the basis of the student model. Adjust the weight of the two loss functions by using a scaling parameter.

[0125] 4. At the same time, the student model learns to reconstruct features, approximates the posterior probability by imitating the teacher model, and uses KL divergence to measure the reconstruction effect.

[0126] The final loss is set as follows:

[0127] Loss=αHard loss+(1-α)KL loss+Soft loss (11)

[0128] In the formula, Hard loss is the loss function of the student model, Soft loss is the loss function of the teacher model, that is, the loss function of the additional soft label is also a relatively mild loss function, and α is the scaling parameter.

[0129] in:

[0130]

[0131] Hard loss=cross_entropy(output S ,Y i ),Y i ∈Y H (13)

[0132] In the formula, cross_entropy is the cross-entropy, and output is the cross-entropy. SThis is the output of the student model. T It is the output of the teacher model, Y i Y H These are tags and tag sets, respectively.

[0133] Knowledge transfer based on teacher-model training of student models can improve the generalization ability of student models and effectively improve retrieval accuracy. However, small models may forget previously learned knowledge during training. As shown by the Ebbinghaus forgetting curve, human memory of knowledge decays over time. Without timely self-review, learned knowledge will eventually be forgotten. Therefore, this invention proposes a self-review module. Through the self-review mechanism of the student model, it continuously reviews learned knowledge. While reviewing old knowledge, it deeply integrates new knowledge from the next stage with old knowledge, achieving self-monitoring and self-review. Old knowledge not only represents the student model's past learning experience (such as pre-trained student models) but can also represent the current cognitive state, serving as old knowledge for the next stage. This invention uses the student model's past learning experience as old knowledge, which has the advantage of facilitating the rapid absorption of new knowledge. Figure 1 The diagram shows that in the first stage, the student model learns a set of features based on its previous learning experience. The features learned in the first stage are then fused with the output features of the current stage (such as the second stage) as old knowledge, thereby realizing the self-review mechanism of the student model. Figure 6 This is a network model with a self-remembering mechanism.

[0134] The inputs to this module are old knowledge and new knowledge from the current stage. First, the input features pass through an activation layer. Since the old and new knowledge have different dimensions, they need to be converted into features of the same dimension before participating in the computation. The activation layer's role is to convert the old and new knowledge into features of the same dimension and activate these features, resulting in three convolutional feature blocks. Next, the convolutional features are compressed (average pooling), as shown in the diagram above. Finally, the features are aggregated, and this aggregated feature is the final output of the self-review model. Ag To evaluate the learning performance of the self-review model, this invention designs a self-review loss function:

[0135] revision loss=cross_entropy(softmax(output Ag ),Y i )+β (14)

[0136] To prevent the model from overfitting, this invention sets β as a regularization parameter.

[0137] Compared with existing image retrieval methods, this invention has the following innovative features:

[0138] First, this invention proposes a gamma correction network that can solve the high-frequency noise introduced by traditional histogram equalization. After equalization, the grayscale of the image decreases sharply, causing some details to disappear. The deep learning-based gamma correction network requires no prior knowledge, has strong universality, and avoids the problem of detail blurring caused by equalization.

[0139] Secondly, the transmission module proposed in this invention uses the acquired teacher model for supervised training to achieve the purpose of transmission. The proposed transmission strategy uses the shallow feature information of the teacher to supervise the deeper feature information of the student model, and then uses the deeper feature information of the teacher model to supervise the even deeper feature information of the student model. From shallow to deep, from simple to difficult, the generalization performance of the student model is gradually improved.

[0140] Third, the VAE variational autoencoder knowledge reconstruction proposed in this invention uses the concept of generating data from the VAE model to approximate real data. It treats the features extracted by the teacher model as real data, but the VAE neural network model does not explicitly calculate the generated data. Instead, it obtains the feature distribution of the student model and uses KL divergence to measure the reconstruction loss.

[0141] Fourth, the knowledge transfer mechanism based on the teacher model training the student model can improve the generalization of the student model, but the small model may forget the knowledge it has learned before during the training process. Therefore, the self-review module proposed in this invention continuously reviews the learned knowledge through the self-review mechanism of the student model. While reviewing old knowledge, it deeply integrates new knowledge from the next stage with old knowledge to achieve self-monitoring and self-review.

[0142] The implementation steps of this method are as follows:

[0143] 1) First, divide the training image with uneven lighting into blocks, typically 2 blocks. r (r∈Z), and then the gamma value of each block is calculated through a gamma correction network. This gamma value is a linear combination, in other words, 1 / η=w11 / η1+w21 / η2+…+w i 1 / η i Then, Gamma Loss is used to evaluate the correction quality, followed by backpropagation to update the network parameters. Finally, the best correction result is output and used as training data for subsequent lightweight retrieval networks.

[0144] 2) The next step is the training of the lightweight retrieval network. Since the teacher model is a pre-trained model, it does not participate in updating the network parameters but only serves as a powerful feature extraction backbone network. Training samples are fed into both the teacher and student models. The shallow feature information of the teacher model supervises the deeper feature information generated by the student model. Then, the next stage of the network uses the deeper feature information of the teacher model to supervise the deeper feature information of the student model.

[0145] 3) Next is the training of the self-review module. The inputs to this module are old knowledge and new knowledge from the current stage. First, the input features pass through the activation layer. Since the old and new knowledge have different dimensions, they need to be converted into features of the same dimension before participating in the calculation, and finally an aggregated feature vector is constructed.

[0146] 4) Sections 2) and 3) outline the implementation process of this invention. In the final stage of the transmission module, the final outputs of the teacher and student models use a soft loss function to measure the current training progress of the student model, while a hard loss function is used to examine the gap between the current state of the student model and the label. The network backpropagates the gradients of each loss to update the parameters. In the self-revision module, a revision loss is used to assess the gap with the label, and the gap is narrowed through backpropagation and parameter updates.

[0147] Reference Figure 7 The teacher module has high accuracy, but the model is large and cannot be deployed; the student module has a small model and is easy to deploy, but its accuracy is low and does not meet the requirements for downhole operation; therefore, the teacher module needs to be used to train the student module.

[0148] Both the teacher module and the student module are used to extract image features. For example, if there are 10 types of images, and each type of image has a certain number of samples, the ten types of images are sent to the model, and the model will extract features and cluster the features, grouping images of the same type together.

[0149] For a discussion of the student model, see [link / reference]. Figure 7 Because the teacher module has high accuracy, it is used to train the student module to achieve the same performance as the teacher module while maintaining good efficiency. Finally, the student module is used to complete the retrieval function. In the retrieval phase, some images to be queried are first given, and then the images to be queried and the image database are fed into the student model. The images are then measured and sorted to complete the image retrieval function.

[0150] The above description is only a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. Any equivalent modifications or changes made by those skilled in the art based on the content disclosed in the present invention should be included within the scope of protection set forth in the claims.

Claims

1. An intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism, characterized by: The method is implemented based on an image correction module, a feature extraction module, a conduction module and a self-warming module; The image correction module reconstructs the illumination conditions of the image based on the gamma correction network, uses a multi-layer neural network to fit the correction parameters, and uses a block approach to evaluate and reconstruct the image; In the correction module, gamma correction is defined as: C=r*I 1 / η (1) Where C is the corrected image; r is the correction constant, which is set between (0,1); I is the original image; 1 / η is the gamma value, which is changed to achieve correction; The gamma correction process is as follows: Step a, segmenting the image to be reconstructed into blocks. Due to the existence of uneven illumination, segmentation is performed to retain the normal area and use it as the target for illumination condition reconstruction; Step b, extracting features from each block through a fully connected neural network, where the block to be reconstructed is used as driving data and other blocks are used as reconstruction targets; Step c, freeze the weights of neurons in some areas, which only participate in calculation but not in gradient propagation, and the rest of the area is a linear combination of the parameter 1 / η; Step d, complete the reconstructed prediction through the Loss function, and back-propagate the linear combination of the updated parameters 1 / η, where: The gradient update method is: Among them, X i To drive the data queue and avoid overconfidence of the network, the penalty term γ is set as the regularization term; L represents GammaLoss; λ is the learning rate, which is set to 0.00001; The feature extraction module is divided into two parts, including the teacher model and the student model. The teacher model provides deep feature knowledge for the student model, and the student model uses a lightweight model to run on the terminal device. The two models work together to complete the feature extraction of the corrected image. In the transmission module, a teacher model is first pre-trained, and then when the student model is trained, the obtained teacher model is used for supervised training to realize knowledge transmission; the student model is allowed to self-learn the intrinsic feature expression of the image, and the shallow feature information of the teacher model is used to supervise the deeper feature information of the student model, gradually improving the generalization ability of the student model; The self-review module is set in the student model, and the previous learning experience of the student model is regarded as old knowledge. While reviewing the old knowledge, the new knowledge from the next stage is deeply integrated with the old knowledge to achieve self-supervision and self-review. In the previous stage, the student model learns a set of features based on the previous learning experience, and the features learned in the first stage are taken as old knowledge and integrated with the output features of the current stage, so as to realize the self-review mechanism of the student model. The student module is trained through the teacher module, and image features are extracted and clustered through the teacher module and the student module; in the retrieval stage, the image to be queried and the image database are sent to the student module, and the image retrieval function is completed through measurement and then sorting.

2. The intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism according to claim 1 is characterized by: The conduction module includes a knowledge reconstruction model based on VAE variational autoencoder, which achieves the performance of the teacher model by imitating the output features of each stage of the teacher model. The observation of the latent space is described in a probabilistic manner through VAE variational autoencoder, and the Gaussian distribution is obtained according to the data. The Gaussian distribution of the teacher model is regarded as the true distribution. By continuously approximating the data features of the teacher model, the generalization ability of the student model is improved.

3. The intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism according to claim 1 is characterized by: In the knowledge reconstruction model based on VAE variational autoencoder, the network input is defined as X i , i∈[1,M]; accordingly, the information entropy of the network input is: In the formula, p θ (X (i) ) is X (i) The probability distribution of KL divergence measures the difference between two probability distributions p and q, also known as relative entropy, and is defined as: Rewriting the KL divergence as mathematical expectation: D KL (p||q)=E[[logp(X (i) )-logq(X (i) )] (6) The VAE model allows the generated data to approach the real data. During the calculation process, the specific parameters of the data features do not need to be explicitly calculated. The distribution probability of the generated model is used to approximate the posterior probability, that is, the probability distribution of the real data; the KL divergence is used to measure the degree of similarity: Where, X s (i) is the student data, X t (i) is the teacher data, q φ (Z S |X s (i) ) is the student model distribution, p θ (Z T |X t (i) ) is the posterior distribution of the teacher model, E is the expectation, Z T ,Z S Obey Gaussian distribution N(0,1); The posterior distribution reflects the true distribution of the data, which is obtained from the joint probability distribution: Substituting formula (8) into formula (7), we get: because With logp θ (X t (i) ) is irrelevant, so Among them, KL(q φ (Z S |X s (i) )||p θ (Z T |X t (i) )) is represented as reconstruction Loss.

4. The intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism according to claim 2 is characterized by: In the conduction module, the training process is as follows: Step i, pre-train a complex teacher model and train the teacher network in a fully supervised manner. During the training process, the training sample X is trained in pairs with the label Y, where Y is a hard label [0, 1, 0, 0]; Step ii, use the trained large model to calculate the soft label, the prediction output of the teacher network, and perform softmax R transformation to obtain a probability distribution with a relatively moderate value distribution, that is, the soft label [0.1, 0.7, 0.1, 0.1]; Step iii: train the student model, add an additional soft label loss function based on the student model, and adjust the proportion of the two loss functions through the ratio parameter α; Step iv, the student model learns to reconstruct the features, approximates the posterior probability by imitating the teacher model, and uses KL divergence to measure the reconstruction effect; The final loss is set to: Loss=αHard loss+(1-α)KL loss+Soft loss (11) Where Hard loss is the loss function of the student model, Soft loss is the loss function of the teacher model, that is, the loss function of the additional soft label, and α is the scale parameter; in: Hard loss=cross_entropy(output S ,Y i ) , Y i ∈Y H (13) In the formula, cross_entropy is the cross entropy, output S is the output of the student model, output T is the output of the teacher model, Y i , Y H They are tags and tag collections respectively.

5. The intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism according to claim 1 is characterized by: In the self-review module, the input is the old knowledge and the new knowledge of the current stage; first, the input features pass through the activation layer; due to the different dimensions of the new and old knowledge, they are converted into features of the same dimension and then participate in the operation; the new and old knowledge are converted into features of the same dimension through the activation layer, and the features are activated to obtain three convolution feature blocks respectively; then the convolution features are compressed; finally, the features are aggregated, and the aggregated features are the final output of the self-review model Ag ; In order to evaluate the learning effect of the self-refresher model, a self-refresher loss function is designed: revision loss=cross_entropy(softmax(output Ag ),Y i ) +β (14) In order to prevent the model from overfitting, β is set as the regularization parameter.

6. The intelligent video image retrieval method based on neural network self-review and knowledge transmission mechanism according to claim 1 is characterized by: This method includes the following process steps: Step 1: First, divide the training image with uneven illumination into blocks, and then calculate the gamma value of each block through the image correction module. The gamma value is a set of linear combinations; evaluate the correction quality, then back-propagate, update the network parameters, output the best correction result, and use the result as the subsequent lightweight retrieval network training data; Step 2: Train the student model, i.e., the lightweight retrieval network. The teacher model is a pre-trained model that does not participate in the update of network parameters and only serves as the feature extraction backbone network. The training samples are sent to the teacher model and the student model at the same time. The shallow feature information of the teacher model supervises the deeper feature information generated by the student model. Then, in the next stage, the deeper feature information of the teacher model is used to supervise the deeper feature information of the student model. Step 3: Train the self-review module. The input of this module is the old knowledge and the new knowledge of the current stage. First, the new and old knowledge are input through the activation layer to convert the new and old knowledge into features of the same dimension, and then participate in the calculation, and finally construct an aggregated feature vector. Step 4: In the conduction module, the final output of the teacher model and the student model uses the soft loss function to measure the student model of the current training process, and uses the hard loss function to test the gap between the current state of the student model and the label. The network back-propagates the gradients of each loss to update the parameters; in the self-review module, the revision loss is used to evaluate the gap with the label, and the gap is narrowed through back-propagation and parameter update.