CN115294385A - Sample labeling method and device, electronic equipment and computer-readable storage medium - Google Patents

Sample labeling method and device, electronic equipment and computer-readable storage medium Download PDF

Info

Publication number
CN115294385A
CN115294385A CN202210792189.7A CN202210792189A CN115294385A CN 115294385 A CN115294385 A CN 115294385A CN 202210792189 A CN202210792189 A CN 202210792189A CN 115294385 A CN115294385 A CN 115294385A
Authority
CN
China
Prior art keywords
sample
value
training
inclusion
unknown new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210792189.7A
Other languages
Chinese (zh)
Inventor
党思航
冯晓毅
蒋晓悦
夏召强
李会方
何贵青
谢红梅
吴俊�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN202210792189.7A priority Critical patent/CN115294385A/en
Publication of CN115294385A publication Critical patent/CN115294385A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a sample labeling method and device, electronic equipment and a computer readable storage medium. Compared with the existing automatic target identification method, the method has the capability of evaluating the prediction reliability of the unknown new sample in the open environment, can find a prediction error sample and the unknown new sample in time, and updates the identification model through an efficient label updating mechanism. By the method and the device, the technical problems that the existing automatic target identification method is low in identification reliability and updating efficiency of the incremental sample are solved, and the technical effects of improving the identification reliability of the incremental sample and the updating efficiency of the unknown new sample in an open environment are achieved.

Description

Sample labeling method and device, electronic equipment and computer-readable storage medium
Technical Field
The present invention relates to the field of target identification technologies, and in particular, to a method and an apparatus for labeling a sample, an electronic device, and a computer-readable storage medium.
Background
The automatic target identification realizes the judgment of attributes such as target types and types by utilizing image information acquired by a remote sensing sensor, and has clear application requirements in military fields such as battlefield reconnaissance, accurate striking and the like. The current state-of-the-art machine learning methods are able to achieve high recognition accuracy in automatic target recognition systems, provided by strongly supervised training data and stable deployment environments.
However, in an open dynamic environment, as the sensor continuously acquires new data, the number and types of the captured target samples are gradually increased, and the unknown new samples cannot be accurately predicted by the existing recognition model due to the insufficient priori knowledge. In order to increase the level of intelligence of the target recognition system in the open world, it is necessary to reliably recognize a newly captured target and update a new sample in time to obtain new recognition capability. The open-set incremental learning scenario mainly includes three tasks: (1) identifying new samples (containing untrained new classes); (2) marking a new sample needing to be updated; and (3) updating the recognition model.
The processing problem of incremental data in an open environment mainly comprises two aspects of identification reliability and updating efficiency. In the field of machine learning and computer vision, a plurality of computation models and sample updating frameworks for incremental learning are provided. For example, in the aspect of identifying the model, the incremental learning method not only converts the traditional batch-type calculation method into an incremental updating mode, but also applies model improvement methods such as knowledge distillation and gradient preservation. Aiming at the problem of unknown new identification, research on distribution difference evaluation is widely concerned, and open set identification methods including probability attenuation models, abnormal distribution detection and the like are provided. For another example, in the aspect of the update mechanism, new samples with high update identification uncertainty should be preferentially labeled. And a plurality of indexes for evaluating the identification uncertainty of the new sample are provided for the closed set classification model, such as the prediction error magnitude, the model confidence output, the distance from the sample to the classification surface and the like. However, since the closed set model only considers that the existing class data is used for dividing an infinite data space, the possibility that a new sample belongs to an unknown new class cannot be evaluated, and a new type high-value target can be lost in the updating process.
Therefore, the problems of low reliability and low updating efficiency of incremental sample identification exist in the existing automatic target identification method under the open environment.
An effective solution to the above problems has not been proposed.
Disclosure of Invention
The embodiment of the invention provides a sample labeling method, a sample labeling device, electronic equipment and a computer readable storage medium, which at least solve the technical problems of low reliability and low updating efficiency of incremental sample identification by the existing automatic target identification method.
According to an aspect of the embodiments of the present invention, there is provided a sample labeling method, including: training an inclusion decision model by using training samples of a target, determining a probability attenuation model of unknown new samples contained in the training samples by the inclusion decision model, calculating the probability of the test samples contained in the category of each training sample, and taking the training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the inclusion decision model comprises a probability attenuation model corresponding to each training sample; calculating an inclusion consistency value of an unknown new sample, wherein if the inclusion consistency value is greater than or equal to an inclusion consistency threshold, the unknown new sample is updated with the label of the classification and used for updating the inclusion decision model; if the inclusion consistency value is smaller than the inclusion consistency threshold, calculating a spatial consistency value of the unknown new sample, wherein if the spatial consistency value is larger than or equal to the spatial consistency threshold, manually labeling the unknown new sample and updating an inclusion decision model; and if the spatial consistency value is smaller than the spatial consistency threshold value, saving the unknown new sample into a label-free sample library for waiting accumulation.
Optionally, training a decision-containing model using a training sample of a target, and determining, by the decision-containing model, a probability attenuation model of unknown new samples contained in the training sample, includes: calculating the distance values from the training sample to other samples, sequencing all the distance values, screening out a preset number of distance values, and fitting a parameter kappa of a Weibull probability density function by using a maximum likelihood estimation method based on the preset number of distance values i And λ i i Wherein the Weibull probability density function is as follows:
Figure BDA0003734277590000021
the probability attenuation model of the unknown new sample contained in the training sample is as follows: Ψ i =1-F(||x′-x i ||;κ i ,λ i ) Where F is the cumulative distribution function of F, x i For the training sample, x' is the unknown new sample.
Optionally, the expression used for calculating the probability that the test sample is included by each of the classes of the training samples is as follows:
Figure BDA0003734277590000022
wherein l is the class of the training sample, score l () Probability, y, of the class l of the test sample contained in the training sample i Labeling the training sample.
Optionally, the expression used to calculate the inclusive consistency value of the unknown new sample is as follows:
Figure BDA0003734277590000023
wherein, score 1 Contains the maximum of the probability for all classes of training samples, score 2 Including a maximum value of probability, δ, for all classes of training samples except the predicted class of the unknown new sample 1 Is a first constant, δ 2 Is a second constant.
Optionally, calculating a spatial consistency value of the unknown new sample comprises: representing the unknown new sample using k-neighbor radii of the unknown new sampleA spatial congruency value, wherein the k neighbor radius is expressed as follows:
Figure BDA0003734277590000031
wherein m =1 m Representing the containing consistency of the m-th neighbor sample of the unknown new sample x' in the unknown new sample set, with alpha epsilon [0,1 ∈]To contain the constraint coefficients, X represents the unknown new sample set, B represents the closed sphere, and r is the radius of the closed sphere.
Optionally, the method further comprises: determining a suggested value of the spatial consistency threshold, wherein the suggested value of the spatial consistency threshold is a mean of k neighbor radii of a training sample set.
Optionally, the expression of the suggested value of the spatial consistency threshold is as follows:
Figure BDA0003734277590000032
wherein,
Figure BDA0003734277590000033
is a suggested value of the spatial consistency threshold, B represents a closed sphere, r is the radius of the closed sphere, X 1 Represents the set of training samples, x' is a training sample in the set of training samples, m = 1.
According to another aspect of the embodiments of the present invention, there is also provided a sample labeling apparatus, including: the system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for training an inclusion decision model by using training samples of a target, determining a probability attenuation model of unknown new samples contained in the training samples by the inclusion decision model, calculating the probability that a test sample is contained by each class of the training samples, and taking a training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the inclusion decision model comprises one probability attenuation model corresponding to each training sample; the second processing module is used for calculating an inclusion consistency value of the unknown new sample, wherein if the inclusion consistency value is greater than or equal to an inclusion consistency threshold value, the classification label is used for performing label updating on the unknown new sample, and the inclusion decision model is updated; a third processing module, configured to calculate a spatial consistency value of the unknown new sample if the inclusion consistency value is smaller than the inclusion consistency threshold, where the unknown new sample is manually labeled and used to update the inclusion decision model if the spatial consistency value is greater than or equal to the spatial consistency threshold; and the fourth processing module is used for saving the unknown new sample into the unlabeled sample library for waiting accumulation under the condition that the spatial consistency value is smaller than the spatial consistency threshold.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the sample annotation method of any of the above.
According to another aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, a device on which the computer-readable storage medium is located is controlled to execute the sample labeling method described in any one of the above.
In the embodiment of the invention, a decision-containing model is trained by using a training sample of a target, a probability attenuation model of unknown new samples contained in the training sample is determined by the decision-containing model, the probability of the test sample contained by the category of each training sample is calculated, and the maximum probability value is used as a classification label of the test sample, wherein the decision-containing model comprises a probability attenuation model corresponding to each training sample; calculating an inclusion consistency value of the unknown new sample, wherein under the condition that the inclusion consistency value is greater than or equal to an inclusion consistency threshold, the unknown new sample is labeled and updated by using the classification label and is used for updating an inclusion decision model; under the condition that the contained consistency value is smaller than the contained consistency threshold value, calculating a spatial consistency value of the unknown new sample, wherein under the condition that the spatial consistency value is larger than or equal to the spatial consistency threshold value, manually marking the unknown new sample and updating the contained decision model; and under the condition that the space consistency value is smaller than the space consistency threshold value, storing the unknown new sample into the unlabeled sample library for waiting accumulation. That is to say, compared with the existing automatic target identification method, the embodiment of the invention has the capability of evaluating the prediction reliability of the unknown new sample in the open environment, can find a prediction error sample and the unknown new sample in time, and updates the identification model through an efficient label updating mechanism, thereby solving the technical problem that the existing automatic target identification method is low in identification reliability and updating efficiency of the incremental sample, and achieving the technical effect of improving the identification reliability of the incremental sample and the updating efficiency of the unknown new sample in the open environment.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flowchart of a sample annotation method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a flow chart of an incremental update mechanism provided in an alternative embodiment of the present invention;
FIG. 3 (a) is a schematic illustration of an optical photograph of BMP2, BTR70, T72, BTR60, and 2S1 provided in accordance with an alternative embodiment of the present invention;
FIG. 3 (b) is a schematic illustration of an optical photograph of BRDM2, D7, T62, ZIL131 and ZSU23/4 according to an alternative embodiment of the present invention;
fig. 3 (c) is a schematic diagram of SAR images of BMP2, BTR70, T72, BTR60, and 2S1 provided by an alternative embodiment of the present invention;
FIG. 3 (D) is a schematic diagram of SAR images of BRDM2, D7, T62, ZIL131 and ZSU23/4 provided by an alternative embodiment of the present invention;
FIG. 4 (a) is a schematic diagram illustrating a change of the recognition rate with an increase of the number of labels of the training samples according to an alternative embodiment of the present invention;
FIG. 4 (b) is a schematic diagram illustrating an enlarged portion of a curve corresponding to a change in recognition rate with an increase in the number of labels of training samples according to an alternative embodiment of the present invention;
fig. 5 is a schematic diagram of a sample labeling apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first", "second", and the like in the description and claims of the present invention and the drawings are used for distinguishing different objects, and are not used for limiting a specific order.
In accordance with one aspect of embodiments of the present invention, there is provided a sample labeling method, noting that the steps illustrated in the flowchart of the figure can be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described can be performed in an order different than here.
Fig. 1 is a flowchart of a sample labeling method according to an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step S102, training an inclusion decision model by using a training sample of a target, determining a probability attenuation model of unknown new samples contained in the training sample by using the inclusion decision model, calculating the probability of the test sample contained in the category of each training sample, and taking a training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the inclusion decision model comprises a probability attenuation model corresponding to each training sample;
step S104, calculating an inclusion consistency value of the unknown new sample, wherein the classification label is used for labeling and updating the unknown new sample and updating an inclusion decision model when the inclusion consistency value is greater than or equal to an inclusion consistency threshold;
step S106, under the condition that the contained consistency value is smaller than the contained consistency threshold value, calculating the space consistency value of the unknown new sample, wherein under the condition that the space consistency value is larger than or equal to the space consistency threshold value, manually marking the unknown new sample and updating the contained decision model;
and step S108, under the condition that the space consistency value is smaller than the space consistency threshold value, storing unknown new samples into the unlabeled sample library for waiting accumulation.
It should be noted that the consistency threshold and the spatial consistency threshold may be flexibly set according to the needs of the application scenario, and are not described in detail herein.
In the embodiment of the invention, a decision-containing model is trained by using a training sample of a target, a probability attenuation model of unknown new samples contained in the training sample is determined by the decision-containing model, the probability of the test sample contained by the category of each training sample is calculated, and the training sample label corresponding to the maximum probability value is used as a classification label of the test sample, wherein the decision-containing model comprises a probability attenuation model corresponding to each training sample; calculating an inclusion consistency value of the unknown new sample, wherein under the condition that the inclusion consistency value is greater than or equal to an inclusion consistency threshold, the classification label is used for carrying out labeling updating on the unknown new sample, and an inclusion decision model is updated; under the condition that the contained consistency value is smaller than the contained consistency threshold value, calculating a spatial consistency value of the unknown new sample, wherein under the condition that the spatial consistency value is larger than or equal to the spatial consistency threshold value, manually marking the unknown new sample and updating the contained decision model; and under the condition that the spatial consistency value is smaller than the spatial consistency threshold value, storing the unknown new sample into the unlabeled sample library for waiting accumulation. That is to say, compared with the existing automatic target identification method, the embodiment of the invention has the capability of evaluating the prediction reliability of the unknown new sample in the open environment, can find a prediction error sample and the unknown new sample in time, and updates the identification model through an efficient label updating mechanism, thereby solving the technical problem that the existing automatic target identification method is low in identification reliability and updating efficiency of the incremental sample, and achieving the technical effect of improving the identification reliability of the incremental sample and the updating efficiency of the unknown new sample in the open environment.
It should be noted that application scenarios of the above method include, but are not limited to, radar image automatic target recognition in an open environment, and the like. By plasticizing the inclusion decision model, a reliable decision and efficient updating mechanism of an unknown new sample can be established in the process of gradually capturing the target sample, and the expansion of new target attributes and classes is completed.
In an alternative embodiment, training a probabilistic decay model that includes a decision model using a training sample of a target and determines from the inclusion decision model that an unknown new sample is included in the training sample, comprises: calculating the distance values from the training sample to other samples, sequencing all the distance values, screening out a predetermined number of distance values, and fitting a parameter kappa of a Weibull probability density function by using a maximum likelihood estimation method based on the predetermined number of distance values i And λ i Wherein the Weibull probability density function is as follows:
Figure BDA0003734277590000061
then the probability attenuation model for unknown new samples contained in the training samples is as follows:
Ψ i =1-F(||x′-x i ||;κ i ,λ i )
wherein F is the cumulative distribution function of F, x i To train a sample, x' is an unknown new sample.
The predetermined number may be determined according to the number of samples in other categories, for example, the predetermined number may be one tenth of the number of samples in other categories, and so on.
In an alternative embodiment, the expression used to calculate the probability that a test sample is contained by the class of each training sample is as follows:
Figure BDA0003734277590000071
where l is the class of the training sample, score l () Probability, y, of the class l of the test sample contained in the training sample i To train sample labels.
In an alternative embodiment, the expression used to compute the inclusive consistency value for the unknown new sample is as follows:
Figure BDA0003734277590000072
wherein, score 1 Contains the maximum of the probability for all classes of training samples, score 2 Containing the maximum value of the probability, δ, for all classes of training samples except the predicted class of unknown new sample 1 Is a first constant, δ 2 Is a second constant.
The first constant and the second constant have different values.
In an alternative embodiment, calculating a spatial consistency value for an unknown new sample comprises: expressing the spatial consistency value by using the k neighbor radius of the unknown new sample, wherein the expression of the k neighbor radius is as follows:
Figure BDA0003734277590000073
wherein m = 1.. K, inclu m Representing the containing consistency of the m-th neighbor sample of the unknown new sample x' in the unknown new sample set, and the alpha is [0,1 ]]To contain the constraint coefficients, X represents the unknown new sample set, B represents the closed sphere, r is the radius of the closed sphere, ρ Representing the k neighbor radius.
In an optional embodiment, the method further comprises: determining a suggested value of a spatial consistency threshold, wherein the suggested value of the spatial consistency threshold is a mean of k neighbor radii of the training sample set.
In an alternative embodiment, the suggested value of the spatial consistency threshold is expressed as follows:
Figure BDA0003734277590000074
wherein,
Figure BDA0003734277590000075
is a suggested value of the spatial consistency threshold, B represents a closed sphere, r is the radius of the closed sphere, X 1 Represents a set of training samples, x' 1 For the training samples in the set of training samples, m = 1.
The incremental learning method based on model containment extension according to the alternative embodiment of the present invention is described in detail below.
Fig. 2 is a flow chart of an incremental update mechanism according to an alternative embodiment of the present invention, and as shown in fig. 2, the incremental update mechanism includes a basic incremental identification model of which a decision model is an alternative embodiment of the present invention, and is updated with the update of a new sample. The output index generated by the method calculates unknown new samples and comprises consistency scores, the scores are high and are automatically labeled by using predictive labels, and the scores are low and correspond to classification error samples and unknown new samples. After the spatial consistency is evaluated, manual labeling is carried out on the samples with high spatial consistency, and the corresponding unknown isolated distribution samples with low spatial consistency are sent to a label-free sample library for waiting for accumulation.
Further, the incremental learning method based on model containment extension provided by the invention comprises the following specific implementation steps:
step 1, training a decision-containing model by using initial training samples, wherein the decision-containing model is integrated by integrating each training sample corresponding to one probability attenuation model, and the modeling process of each training sample after feature extraction is as follows.
For training sample x i Label y i Calculating the distance values from the sample to other classes, and ranking the distance valuesTaking the minimum tau distance values, wherein tau is usually one tenth of the number of samples in other categories, taking the tau distance values as carriers, and fitting a parameter kappa of a Weibull probability density function by using a maximum likelihood estimation method i And λ i The Weibull probability density function is as follows:
Figure BDA0003734277590000081
then unknown new sample x' is included in x i The probability attenuation model of (a) is:
Ψ i =1-F(||x′-x i ||;κ i ,λ i )
where F is the cumulative distribution function of F. The probability that the test sample is included in class i of the training sample is expressed as follows:
Figure BDA0003734277590000082
in the testing process, the probability of the testing sample contained by the category of each training sample is calculated, and the category label corresponding to the maximum probability value is the classification label of the testing sample.
And 2, calculating the inclusion consistency value of the unknown new sample. Let l p For the prediction class of unknown new sample x', the calculation formula including consistency Inclu is as follows:
Figure BDA0003734277590000083
Figure BDA0003734277590000084
Figure BDA0003734277590000085
Figure BDA0003734277590000086
wherein, score 1 The class representing all training samples contains the maximum value of the probability, score 2 The class representing all training samples except the prediction class contains the maximum value of the probability. Delta. For the preparation of a coating 1 And delta 2 Is a constant number, δ 1 The inclusion consistency of a new sample with too low inclusion probability can be set to 0, δ, by taking 0.001 2 Score can be avoided by taking 0.01 1 And Score 2 Inclusion consistency calculations that are made with values that are too small and orders of magnitude different are not reasonable. In actual operation, samples with higher consistency values correspond to samples with high reliability of identification results, and the classification labels are suggested to be directly labeled and updated.
Step 3, the space consistency value of the unknown new sample cannot be directly calculated, and the k neighbor radius rho of the unknown new sample is calculated Indirectly representing a spatial congruency value, p The larger the spatial consistency value, the smaller the calculation formula is as follows:
Figure BDA0003734277590000091
wherein m =1 m Denotes the value of x' containing the consistency of the mth neighbor sample in the unknown new sample set, α ∈ [0,1 ]]To contain the constraint coefficients, X represents the unknown new sample set. B represents a closed sphere, and the expression of the closed sphere is as follows:
B(z,r)={z′:|z-z′|≤r}
when a new sample is manually marked, in order to generalize the updating performance, a randomization operation is introduced, namely, the new sample with higher spatial consistency is randomly selected for manual marking. The suggested value of the spatial consistency threshold may be determined by the k nearest neighbor radius ρ of the training sample set t Given, for example, the mean value of k neighbor radii of training samples, ρ t The calculation formula is as follows:
Figure BDA0003734277590000092
therefore, a prediction label of an unknown new sample is obtained, the consistency and the space consistency are included, and the two consistency indexes can be separately used in practical application because the inclusion consistency has a constraint effect on the space consistency. Application scenarios requiring evaluation of recognition reliability are evaluated using containment consistency. And when a new sample needs to be selected for manual annotation updating, selecting an unknown sample by using spatial consistency calculation.
In summary, compared with the existing automatic target identification method, the method has the capability of evaluating the prediction reliability of the unknown new sample in the open environment, can find the prediction error sample and the unknown new sample in time, and updates the identification model through an efficient label updating mechanism.
The optional embodiment of the invention is explained in detail by taking MSTAR ten types of target data as an example and simulating an identification scene and an incremental learning scene in an open environment.
The samples used in the experiment are MSTAR ten-class target slices, the training samples are targets with a pitch angle of 17 degrees, the test samples are targets with a pitch angle of 15 degrees, and the number of the used MSTAR target samples and the slice size are shown in Table 1. Fig. 3 (a) is a schematic diagram of an optical photograph of BMP2, BTR70, T72, BTR60, and 2S1 provided in an alternative embodiment of the present invention, which is an optical photograph of BMP2, BTR70, T72, BTR60, and 2S1 sequentially from left to right as shown in fig. 3 (a); fig. 3 (b) is a schematic diagram of an optical photograph of BRDM2, D7, T62, ZIL131 and ZSU23/4 according to an alternative embodiment of the present invention, as shown in fig. 3 (b), the optical photograph of BRDM2, D7, T62, ZIL131 and ZSU23/4 is shown from left to right; fig. 3 (c) is a schematic diagram of the SAR images of BMP2, BTR70, T72, BTR60, and 2S1 provided by the alternative embodiment of the present invention, as shown in fig. 3 (c), the SAR images of BMP2, BTR70, T72, BTR60, and 2S1 are sequentially from left to right; fig. 3 (D) is a schematic diagram of the SAR images of BRDM2, D7, T62, ZIL131 and ZSU23/4 according to an alternative embodiment of the present invention, and as shown in fig. 3 (D), the SAR images of BRDM2, D7, T62, ZIL131 and ZSU23/4 are sequentially arranged from left to right. The target slice reading image and the corresponding optical photograph are shown in 3 (a), 3 (b), 3 (c) and 3 (d), all slices are cut from the center by 128 × 128, and the feature extraction method used is non-negative matrix factorization.
Table 1 MSTAR target sample number and slice size used
Figure BDA0003734277590000101
The setup of recognition scenes in an open environment is first simulated as shown in table 2. And (3) partial training samples of the three types of targets participate in training, the consistency is calculated for all ten types of test samples, and the recognition reliability is evaluated. And (3) sequencing the inclusion consistency of all the new samples from large to small, then dividing all the sequences into 10 sequencing intervals, calculating the true value correct classification and the true value as the proportion of the unknown new class in each interval, and remaining undisplayed classes as the proportion of the classification errors of the existing classes. As shown in table 3, it can be seen that most of the regions containing high consistency are classified correctly samples, and most of the new class samples and the classified incorrectly samples are located in the regions containing low consistency. Thus, the automatic target identification system can identify unknown new classes by automatically labeling new samples including consistency assessments.
TABLE 2 settings to simulate recognition scenarios in an open environment
Figure BDA0003734277590000102
Table 3 identification reliability evaluation performance after merging result repetition intervals
Figure BDA0003734277590000103
And then, an incremental learning experiment under an open environment is set in the text to verify the performance of the updating efficiency of the label, the first three types of 40% training samples are initial samples, the spatial consistency value of the rest training samples is calculated after the training comprises a decision model, and half of the mean value of the adjacent radii of the initial samples k is set as an artificial labeling reference value. The classification performance of the ten types of test samples changes as the number of manually labeled samples increases. FIG. 4 (a) is a schematic diagram of the change of the recognition rate with the increase of the number of labels of the training samples according to the alternative embodiment of the present invention, as shown in FIG. 4 (a); fig. 4 (b) is a schematic diagram showing an enlarged portion of a curve corresponding to a change situation of the recognition rate with an increase in the number of labels of the training samples according to an alternative embodiment of the present invention, as shown in fig. 4 (b). The comparison method is a confidence score method and a random selection method, and it can be seen that the proposed method IEosIL obtains the optimal recognition performance.
According to another aspect of the embodiment of the present invention, there is also provided a sample labeling apparatus, fig. 5 is a schematic diagram of the sample labeling apparatus provided in the embodiment of the present invention, as shown in fig. 5, the sample labeling apparatus includes: a first processing module 52, a second processing module 54, a third processing module 56, and a fourth processing module 58. The sample labeling apparatus will be described in detail below.
The first processing module 52 is configured to train an inclusion decision model using training samples of a target, determine, by the inclusion decision model, a probability attenuation model in which an unknown new sample is included in the training samples, calculate a probability that a test sample is included in a category of each training sample, and use a training sample label corresponding to a maximum probability value as a classification label of the test sample, where the inclusion decision model includes one probability attenuation model corresponding to each training sample;
a second processing module 54, connected to the first processing module 52, for calculating an inclusion consistency value of the unknown new sample, wherein if the inclusion consistency value is greater than or equal to the inclusion consistency threshold, the class label is used to label and update the unknown new sample, and the inclusion decision model is updated;
a third processing module 56, connected to the second processing module 54, configured to calculate a spatial consistency value of the unknown new sample if the inclusion consistency value is smaller than the inclusion consistency threshold, where, if the spatial consistency value is greater than or equal to the spatial consistency threshold, the unknown new sample is manually labeled and the inclusion decision model is updated;
and a fourth processing module 58, connected to the third processing module 56, for saving the unknown new sample in the unlabeled sample library for accumulation if the spatial consistency value is smaller than the spatial consistency threshold.
In the embodiment of the invention, the sample labeling device trains an inclusion decision model by using a training sample of a target, determines a probability attenuation model of unknown new samples contained in the training sample by the inclusion decision model, calculates the probability of the test sample contained by the category of each training sample, and takes a training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the inclusion decision model comprises a probability attenuation model corresponding to each training sample; calculating an inclusion consistency value of the unknown new sample, wherein under the condition that the inclusion consistency value is greater than or equal to an inclusion consistency threshold, the unknown new sample is labeled and updated by using the classification label and is used for updating an inclusion decision model; under the condition that the contained consistency value is smaller than the contained consistency threshold value, calculating a spatial consistency value of the unknown new sample, wherein under the condition that the spatial consistency value is larger than or equal to the spatial consistency threshold value, manually marking the unknown new sample and updating the contained decision model; and under the condition that the space consistency value is smaller than the space consistency threshold value, storing the unknown new sample into the unlabeled sample library for waiting accumulation. That is to say, compared with the existing automatic target identification method, the embodiment of the invention has the capability of evaluating the prediction reliability of the unknown new sample in the open environment, can timely find a prediction error sample and the unknown new sample, and updates the identification model through an efficient labeling updating mechanism, thereby solving the technical problem that the existing automatic target identification method has low identification reliability and updating efficiency of the incremental sample, and achieving the technical effect of improving the identification reliability of the incremental sample and the updating efficiency of the unknown new sample in the open environment.
It should be noted here that the first processing module 52, the second processing module 54, the third processing module 56, and the fourth processing module 58 correspond to steps S102 to S108 in the method embodiment, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in the method embodiment.
In an alternative embodiment, the first processing module 52 includes: a first processing subunit, configured to calculate distance values from the training samples to other class samples, sort all the distance values, screen out a predetermined number of distance values, and fit a parameter κ of a weibull probability density function using a maximum likelihood estimation method based on the predetermined number of distance values i And λ i Wherein the Weibull probability density function is as follows:
Figure BDA0003734277590000121
then the probability attenuation model for unknown new samples contained in the training samples is as follows:
Ψ i =1-F(||x′-x i ||;κ i ,λ i )
wherein F is the cumulative distribution function of F, x i To train a sample, x' is an unknown new sample.
In an alternative embodiment, the first processing module 52 includes: a second processing subunit, configured to calculate an expression used by the test sample for the probability included in the category of each training sample, as follows:
Figure BDA0003734277590000122
where l is the class of training sample, score l () Probability, y, of the class l of the test sample contained in the training sample i To train the sample labels.
In an alternative embodiment, the second processing module 54 includes: a third processing subunit, configured to calculate an expression used by the unknown new sample including the consistency value, as follows:
Figure BDA0003734277590000123
wherein, score 1 Contains the maximum of the probability for all classes of training samples, score 2 Containing the maximum value of the probability, δ, for all classes of training samples except the predicted class of unknown new sample 1 Is a first constant, δ 2 Is a second constant.
In an alternative embodiment, the third processing module 56 includes: a fourth processing subunit, configured to represent the spatial congruency value using a k-neighbor radius of the unknown new sample, where the k-neighbor radius is expressed as follows:
Figure BDA0003734277590000131
wherein m =1 m Representing the containing consistency of the m-th neighbor sample of the unknown new sample x' in the unknown new sample set, and the alpha is [0,1 ]]To contain the constraint coefficients, X represents the unknown new sample set, B represents the closed sphere, and r is the radius of the closed sphere.
In an optional embodiment, the apparatus further comprises: and the determining module is used for determining a suggested value of the spatial consistency threshold, wherein the suggested value of the spatial consistency threshold is a mean value of k adjacent radii of the training sample set.
In an alternative embodiment, the suggested value of the spatial consistency threshold is expressed as follows:
Figure BDA0003734277590000132
wherein,
Figure BDA0003734277590000133
is a suggested value of the spatial consistency threshold, B represents the closed sphere, r is the radius of the closed sphere, X 1 Represents a set of training samples, x' 1 For the training samples in the set of training samples, m = 1.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the sample annotation method of any of the above.
According to another aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium including a stored program, where the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the sample labeling method of any one of the above.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. A method for annotating a sample, comprising:
training a contained decision model by using training samples of a target, determining a probability attenuation model of unknown new samples contained in the training samples by the contained decision model, calculating the probability of the test samples contained by the category of each training sample, and taking the training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the contained decision model comprises a probability attenuation model corresponding to each training sample;
calculating an inclusion consistency value of an unknown new sample, wherein in case the inclusion consistency value is greater than or equal to an inclusion consistency threshold value, the unknown new sample is updated with the label using the classification tag and used to update the inclusion decision model;
if the inclusion consistency value is less than the inclusion consistency threshold, calculating a spatial consistency value of the unknown new sample, wherein if the spatial consistency value is greater than or equal to the spatial consistency threshold, manually labeling the unknown new sample and updating the inclusion decision model;
and if the spatial consistency value is smaller than the spatial consistency threshold value, storing the unknown new sample into a label-free sample library for waiting accumulation.
2. The method of claim 1, wherein training an inclusion decision model using training samples of a target and determining from the inclusion decision model a probability attenuation model for unknown new samples included in the training samples comprises:
calculating the distance values from the training sample to other samples, sequencing all the distance values, screening out a preset number of distance values, and fitting a parameter kappa of a Weibull probability density function by using a maximum likelihood estimation method based on the preset number of distance values i And λ i Wherein the Weibull probability density function is as follows:
Figure FDA0003734277580000011
the probability attenuation model of the unknown new sample contained in the training sample is as follows:
Ψ i =1-F(||x′-x i ||;κ i ,λ i )
wherein F is the cumulative distribution function of F, x i For the training sample, x' is the unknown new sample.
3. The method of claim 1, wherein the expression used to calculate the probability of a test sample being included in each of the classes of training samples is as follows:
Figure FDA0003734277580000012
wherein l is the class of the training sample, score l () Probability, y, of the class l of the test sample contained in the training sample l Labeling the training sample.
4. The method of claim 1, wherein the computation of the inclusive consistency value for the unknown new sample is expressed as follows:
Figure FDA0003734277580000021
wherein, score 1 Contains the maximum of the probability for all classes of training samples, score 2 Including a maximum value of probability, δ, for all classes of training samples except the predicted class of the unknown new sample 1 Is a first constant, δ 2 Is a second constant.
5. The method of claim 1, wherein computing the spatial congruency value for the unknown new sample comprises:
representing the spatial congruency value using k-neighbor radii of the unknown new sample, wherein the k-neighbor radii are expressed as follows:
Figure FDA0003734277580000022
wherein m = 1.. K, inclu m Representing the containing consistency of the m-th neighbor sample of the unknown new sample x' in the unknown new sample set, with alpha epsilon [0,1 ∈]To contain the constraint coefficients, X represents the unknown new sample set, B represents the closed sphere, and r is the radius of the closed sphere.
6. The method according to any one of claims 1 to 5, further comprising:
determining a suggested value of the spatial congruency threshold, wherein the suggested value of the spatial congruency threshold is a mean of k nearest neighbor radii of a set of training samples.
7. The method of claim 6, wherein the expression of the suggested value of the spatial congruency threshold is as follows:
Figure FDA0003734277580000023
wherein,
Figure FDA0003734277580000024
is a suggested value of the spatial consistency threshold, B represents a closed sphere, r is the radius of the closed sphere, X 1 Representing the set of training samples, x' 1 For training samples in the set of training samples, m = 1.
8. A sample annotation device, comprising:
the system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for training an inclusion decision model by using training samples of a target, determining a probability attenuation model of unknown new samples contained in the training samples by the inclusion decision model, calculating the probability that a test sample is contained by each class of the training samples, and taking a training sample label corresponding to the maximum probability value as a classification label of the test sample, wherein the inclusion decision model comprises one probability attenuation model corresponding to each training sample;
a second processing module, configured to calculate an inclusion consistency value of an unknown new sample, wherein, in a case that the inclusion consistency value is greater than or equal to an inclusion consistency threshold, the classification label is used to perform label update on the unknown new sample, and the classification label is used to update the inclusion decision model;
a third processing module, configured to calculate a spatial consistency value of the unknown new sample if the inclusion consistency value is smaller than the inclusion consistency threshold, wherein the unknown new sample is manually labeled and used to update the inclusion decision model if the spatial consistency value is greater than or equal to a spatial consistency threshold;
and the fourth processing module is used for saving the unknown new sample into the unlabeled sample library for waiting accumulation under the condition that the spatial consistency value is smaller than the spatial consistency threshold.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the sample annotation method of any one of claims 1 to 7.
10. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the sample annotation method according to any one of claims 1 to 7.
CN202210792189.7A 2022-07-07 2022-07-07 Sample labeling method and device, electronic equipment and computer-readable storage medium Pending CN115294385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210792189.7A CN115294385A (en) 2022-07-07 2022-07-07 Sample labeling method and device, electronic equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210792189.7A CN115294385A (en) 2022-07-07 2022-07-07 Sample labeling method and device, electronic equipment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115294385A true CN115294385A (en) 2022-11-04

Family

ID=83821772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210792189.7A Pending CN115294385A (en) 2022-07-07 2022-07-07 Sample labeling method and device, electronic equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115294385A (en)

Similar Documents

Publication Publication Date Title
CN113269073B (en) Ship multi-target tracking method based on YOLO V5 algorithm
CN111353549B (en) Image label verification method and device, electronic equipment and storage medium
CN113516650B (en) Circuit board hole plugging defect detection method and device based on deep learning
CN103080975A (en) Face image registration device and method
CN112669275A (en) PCB surface defect detection method and device based on YOLOv3 algorithm
CN112766170B (en) Self-adaptive segmentation detection method and device based on cluster unmanned aerial vehicle image
CN114494780A (en) Semi-supervised industrial defect detection method and system based on feature comparison
CN112115996B (en) Image data processing method, device, equipment and storage medium
CN114913923A (en) Cell type identification method aiming at open sequencing data of single cell chromatin
CN116977710A (en) Remote sensing image long tail distribution target semi-supervised detection method
CN115690514A (en) Image recognition method and related equipment
CN116964588A (en) Target detection method, target detection model training method and device
CN111414930B (en) Deep learning model training method and device, electronic equipment and storage medium
CN114882204A (en) Automatic ship name recognition method
CN114549513A (en) Part identification method, part identification device, quality inspection method, electronic device, and storage medium
CN114565803A (en) Method, device and mechanical equipment for extracting difficult sample
CN112446428B (en) Image data processing method and device
CN112464966B (en) Robustness estimating method, data processing method, and information processing apparatus
CN116863145A (en) Remote sensing image aircraft target detection model for improving YOLOv5 and method thereof
CN115527083B (en) Image annotation method and device and electronic equipment
CN115294385A (en) Sample labeling method and device, electronic equipment and computer-readable storage medium
CN116958031A (en) Defect detection method and related device
CN114005017A (en) Target detection method and device, electronic equipment and storage medium
CN113837220A (en) Robot target identification method, system and equipment based on online continuous learning
CN113192106A (en) Livestock tracking method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination