CN-115439681-B - Image multi-classification system and training method based on feature remapping
Abstract
The invention discloses an image multi-classification system based on feature remapping and a training method, wherein during the training of the multi-classification system, samples are simultaneously input into a multi-classification network to be trained and a trained two-classification network, and the classification result output by the multi-classification network is corrected by utilizing the classification result output by the two-classification network, so that the normal class probability output by the multi-classification network during the training is approximate to the normal class probability output by the two-classification network, and the feature remapping is realized. The normal sample class result of the multi-class network is corrected through the trained two-class network, so that the recognition accuracy of the multi-class network to the normal class sample can be improved, and particularly under the condition that the normal sample is fewer, the multi-class system with higher recognition accuracy to the normal class sample can be obtained.
Inventors
- ZOU LAMEI
- LI GUANGLEI
- LIAN ZHIXIANG
- WANG HAO
- XIE JIA
- ZHONG SHENG
Assignees
- 华中科技大学
- 华中科技大学
Dates
- Publication Date
- 20260421
- Application Date
- 20220816
- Priority Date
- 20220816
Claims (8)
- 1. An image multi-classification system based on feature remapping, comprising: the multi-classification network is realized after samples input into the multi-classification network sequentially pass through a convolution layer, a full connection layer and a softmax layer Sorting the seeds and outputting a sorting result , wherein, Represents the normal class probability, the rest represent different defect probabilities, n=m-1, ≥3; The sample input into the two-class network sequentially passes through the convolution layer, the full connection layer and the softmax layer to realize 2 classes of classification, and the classification result is output , wherein, Representing defect class probability and normal class probability respectively; A feature remapping network for correcting the classification result output by the multi-classification network according to the classification result output by the classification network, so that the multi-classification network outputs normal class probability during training The probability of approaching the normal class output by the two-class network Feature remapping is achieved; the loss calculation module is used for calculating training loss and reversely adjusting parameters of the multi-classification network so as to enable the loss to be converged; the feature remapping network includes: The weight parameter adjusting module is used for obtaining the output result of the multi-classification network full-connection layer And output results of the full connection layer of the two classification networks After splicing, the weight parameters are output through the full connection layer ; A normal class probability correction module for using the weight parameters Probability of normal category Corrected to , wherein, ; The loss calculation module comprises a characteristic difference loss module and a classification loss module, wherein the characteristic difference loss module is used for calculating characteristic difference loss between input characteristics of a multi-classification network full-connection layer and input characteristics of a two-classification network full-connection layer, the classification loss module is used for calculating classification loss of the multi-classification network after characteristic remapping, and the loss calculation module takes the sum of the classification loss and the characteristic difference loss as training loss.
- 2. The feature remapping-based image multi-classification system of claim 1, wherein the classification network and multi-classification network share a sample input.
- 3. The feature remapping-based image multi-classification system of claim 1, wherein the multi-classification network includes a backbone network and a feature delivery enhancement module coupled to the backbone network, the backbone network including a plurality of convolution layers, full connection layers, and softmax layers coupled in sequence, the feature delivery enhancement module comprising: The middle-high frequency characteristic transmission enhancement module is used for extracting shallow edge and texture information, is bridged at two ends of a front end convolution layer J Front part of a main network and comprises a 1X 1 convolution layer, a middle-high frequency domain channel attention module and a first cross attention module, the characteristics in the main network are divided into three paths when reaching the input end of the middle-high frequency characteristic transmission enhancement module, the first path continuously transmits forwards through the front end convolution layer J Front part , the second path sequentially passes through the 1X 1 convolution layer, the middle-high frequency domain channel attention module and the 1X 1 convolution layer to extract high frequency information of an image and then is converged into a main road, and the third path sequentially passes through the 1X 1 convolution layer, the first cross attention module and the 1X 1 convolution layer to extract long-distance dependency relations among pixels at different positions and then is converged into the main road; The middle-low frequency characteristic transmission enhancement module is used for extracting deep semantic information, is bridged at two ends of a rear end convolution layer J Rear part (S) of a main network and comprises a 1X 1 convolution layer, a middle-low frequency domain channel attention module and a second cross attention module, the characteristics in the main network are divided into three paths when reaching the input end of the middle-low frequency characteristic transmission enhancement module, the first path continues to transmit forwards through the rear end convolution layer J Rear part (S) , the second path sequentially passes through the 1X 1 convolution layer, the middle-low frequency domain channel attention module and the 1X 1 convolution layer to extract low frequency information of an image and then is imported into a main road, and the third path sequentially passes through the 1X 1 convolution layer, the second cross attention module and the 1X 1 convolution layer to extract long-distance dependency relations among pixels at different positions and then is imported into the main road.
- 4. The feature remapping-based image multi-classification system of claim 1, further comprising a feature remapping control module for determining a normal class probability Whether or not is larger than a preset value, when the normal class probability is When the access characteristic remapping network is larger than a preset value, the access characteristic remapping network performs characteristic remapping, when normal class probability And when the value is not greater than the preset value, cutting off the characteristic remapping network and not carrying out characteristic remapping.
- 5. An image multi-classification system training method based on feature remapping, which is characterized by comprising the following steps: inputting samples into a multi-classification network to train the multi-classification network, the multi-classification network implementing Sorting the seeds, and outputting a sorting result after being processed by a multi-sorting network softmax layer , wherein, Represents the normal class probability, the rest represent different defect probabilities, n=m-1, ≥3; Inputting the same sample into a trained classification network, and outputting classification results after passing through a classification network softmax layer , wherein, Representing defect class probability and normal class probability respectively; Correcting the classification result output by the multi-classification network by using the classification result output by the classification network to ensure that the multi-classification network outputs normal class probability in the training period The probability of approaching the normal class output by the two-class network Feature remapping is achieved; calculating training loss, reversely adjusting parameters of the multi-classification network, continuously training until the loss is converged in an expected range, and ending the training; correcting the classification result output by the multi-classification network by using the classification result output by the classification network, comprising: Obtaining output results of all connection layers of multi-classification network And output results of the full connection layer of the two classification networks After splicing, the weight parameters are output through the full connection layer ; Using weight parameters Probability of normal category Corrected to , wherein, ; Calculating training loss, comprising: And calculating the characteristic difference loss between the input characteristics of the multi-classification network full-connection layer and the input characteristics of the two-classification network full-connection layer, and the classification loss of the multi-classification network after the characteristic remapping, and ending training after the sum of the classification loss and the characteristic difference loss is converged within an expected range.
- 6. The method of claim 5, wherein the normal class probability is determined before the classification result output by the multi-classification network is corrected by the classification result output by the classification network Whether or not is larger than a preset value, when the normal class probability is When the value is larger than the preset value, performing feature remapping, when normal class probability And when the characteristic is not larger than the preset value, the characteristic remapping is not carried out.
- 7. The feature remapping-based image multi-classification system training method of claim 6, wherein the preset value is 0.9.
- 8. A method of multi-classification of images, comprising: inputting the images into a trained multi-classification system to obtain classification results, wherein the multi-classification system is trained according to the image multi-classification system training method based on feature remapping as claimed in any one of claims 5 to 7.
Description
Image multi-classification system and training method based on feature remapping Technical Field The invention belongs to the technical field of computer vision deep learning, and particularly relates to an image multi-classification system based on feature remapping and a training method. Background In recent years, as cities are continuously built, the detection task of the underground drainage pipeline is becoming heavy. Conventional subsurface drain pipe detection requires a significant amount of labor to accomplish, which is not only time-critical, but also efficiency-critical. The method for detecting the drainage pipeline through deep learning improves efficiency and saves labor cost. In normal drain pipe detection, one is mainly concerned with the accuracy of the defective class sample, while neglecting the accuracy of the normal class sample, resulting in false detection of a large number of normal samples as defective samples. This is because the industry is concerned with the class of defects when collecting drain line data, resulting in more defective samples during training and insufficient collection of normal class samples, and the collection of data is not done a priori, so it is considered to solve this problem from the deep learning network perspective. Because the 2-class network has simple task, only two categories of normal and defect are needed to be judged, when the network with the same complexity is used, the simpler the task is, the stronger the information extraction capability of the network is, and the more accurate the result is. Therefore, in the conventional technology, in order to improve accuracy, two networks are usually trained separately, a 2-classification network is trained first, a defect sample is extracted, and then a sample determined to be defective by the 2-classification network is input into a multi-classification network, and specifically predicted as a specific defect type. Although the accuracy of the normal class sample can be improved by using the 2-class network, the accuracy of the 2-class network cannot be ensured to reach 100%, so that a mode of passing through the two classification networks sequentially can generate larger accumulated errors. Disclosure of Invention Aiming at the defects or improvement demands of the prior art, the invention provides an image multi-classification system based on feature remapping and a training method, and aims to correct a multi-classification network by utilizing a two-classification network when the multi-classification network is trained, so that the accuracy of the multi-classification network on normal sample identification is improved. To achieve the above object, according to one aspect of the present invention, there is provided an image multi-classification system based on feature remapping, comprising: the multi-classification network is realized after samples input into the multi-classification network sequentially pass through a convolution layer, a full connection layer and a softmax layer Sorting the seeds and outputting a sorting result, wherein,Represents the normal class probability, the rest represent different defect probabilities, n=m-1,≥3; The sample input into the two-class network sequentially passes through the convolution layer, the full connection layer and the softmax layer to realize 2 classes of classification, and the classification result is output, wherein,Representing defect class probability and normal class probability respectively; A feature remapping network for correcting the classification result output by the multi-classification network according to the classification result output by the classification network, so that the multi-classification network outputs normal class probability during training The probability of approaching the normal class output by the two-class networkFeature remapping is achieved; And the loss calculation module is used for calculating training loss and reversely adjusting parameters of the multi-classification network to enable the loss to be converged. In one embodiment, the two-class network and the multi-class network share a sample input. In one embodiment, the feature remapping network comprises: The weight parameter adjusting module is used for obtaining the output result of the multi-classification network full-connection layer And output results of the full connection layer of the two classification networksAfter splicing, the weight parameters are output through the full connection layer; A normal class probability correction module for using the weight parametersProbability of normal categoryCorrected to, wherein, ; The loss calculation module comprises a characteristic difference loss module and a classification loss module, wherein the characteristic difference loss module is used for calculating characteristic difference loss between input characteristics of a multi-classification network full-connection layer and input characteristic