CN117253095B - Image classification system and method based on biased shortest distance criterion - Google Patents
Image classification system and method based on biased shortest distance criterion Download PDFInfo
- Publication number
- CN117253095B CN117253095B CN202311523857.7A CN202311523857A CN117253095B CN 117253095 B CN117253095 B CN 117253095B CN 202311523857 A CN202311523857 A CN 202311523857A CN 117253095 B CN117253095 B CN 117253095B
- Authority
- CN
- China
- Prior art keywords
- class
- category
- shortest distance
- classified
- sample
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000013145 classification model Methods 0.000 claims abstract description 20
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 12
- 238000012360 testing method Methods 0.000 claims description 12
- 238000010276 construction Methods 0.000 claims description 4
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000012549 training Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 4
- 238000010606 normalization Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 208000008558 Osteophyte Diseases 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 206010003246 arthritis Diseases 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000008034 disappearance Effects 0.000 description 2
- 201000010934 exostosis Diseases 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000004880 explosion Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 210000005065 subchondral bone plate Anatomy 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/03—Recognition of patterns in medical or anatomical images
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses an image classification system and method based on a biased shortest distance criterion, and belongs to the technical field of image classification of artificial intelligence. The method comprises the following steps: s1, acquiring an image to be classified, and pre-classifying the image to be classified to obtain a sample class; the sample categories include: a first category and a second category; s2, constructing an image classification model, and reclassifying the sample category based on the image classification model to obtain a prediction category. According to the invention, the bad performances of the minority class in the image classification task are deeply analyzed from a new angle of the depth characteristic, a deflection shortest distance criterion is provided, a larger decision area is mapped for the minority class, and the classification accuracy of the minority class is improved.
Description
Technical Field
The invention belongs to the technical field of image classification of artificial intelligence, and particularly relates to an image classification system and method based on a biased shortest distance criterion.
Background
In the image classification task, the quality and characteristics of data used for training play a vital role in classification results, and unbalanced data used for training a neural network model can cause deviation of the final effect of the model and even failure in training. In recent years, various approaches have emerged to address the problem of balancing the characteristic information of unbalanced samples to alleviate the problem of data imbalance, including adding duplicate samples to minority classes, assigning more weights to minority classes during the training phase, and nesting collaborative learning to cooperatively train multiple experts to process representation and classifier learning simultaneously, etc. However, the previous methods tend to ignore the effect of the spatial information of the features on the image classification results, and we observe that in the test stage or practical application, the features of a few classes are sparsely mapped and assigned small decision regions in the training stage, and the sparsity of these classes makes it more difficult for their features to fall into the correct small regions, so they easily cross the boundaries and are misclassified. But despite crossing decision boundaries, many few features are still closer to the cluster centroid in their space.
In general, for the problem of unbalanced training data in the picture classification, not only more feature information of a minority class needs to be fully mined to relieve the dominant position of a majority class, but also the influence of space information of deep features on the problem needs to be focused. How to use the spatial information of the features to optimize the feature decision boundary so that a good image classification effect can still be achieved even under unbalanced data is of great importance.
Disclosure of Invention
The invention aims to solve the defects of the prior art, and provides an image classification system and method based on a biased shortest distance criterion, which are used for improving the accuracy of minority class data in classification results by utilizing spatial information of image features based on the Biased Shortest Distance (BSDC) criterion.
In order to achieve the above object, the present invention provides the following solutions: an image classification system based on biased shortest distance criteria, comprising: the model building module is used for building a model;
the pre-classifying module is used for collecting images to be classified and pre-classifying the images to be classified to obtain sample types; the sample categories include: a first category and a second category;
the model construction module is used for constructing an image classification model, and reclassifying the sample category based on the image classification model to obtain a prediction category.
Further preferably, the method for obtaining the sample category by the pre-classification module includes:
classifying the images to be classified based on a deep neural network, setting a probability threshold, and setting the images to be classified as the first category if the probability threshold is higher than the probability threshold; and below the probability threshold, the second category.
Further preferably, the image classification model adopts a depth residual network as a backbone network and a linear classifier, a bias shortest distance criterion is inserted after the full connection layer, prediction probability and characteristics are received from the BN layer, and the prediction class is output.
Further preferably, the model building module includes: a first calculation unit and a second calculation unit;
the first computing unit adopts a backbone network to extract the characteristics of the images to be classified and computes the mass center;
the second calculation unit is used for calculating the distance between the feature and the centroid, and obtaining the prediction class according to the shortest distance.
The invention also provides an image classification method based on the biased shortest distance criterion, which is applied to the classification system and comprises the following steps:
s1, acquiring an image to be classified, and pre-classifying the image to be classified to obtain a sample class; the sample categories include: a first category and a second category;
s2, constructing an image classification model, and reclassifying the sample category based on the image classification model to obtain a prediction category.
Further preferably, the method for obtaining the sample class includes:
classifying the images to be classified based on a deep neural network, setting a probability threshold, and setting the images to be classified as the first category if the probability threshold is higher than the probability threshold; and below the probability threshold, the second category.
Further preferably, the image classification model adopts a depth residual network as a backbone network and a linear classifier, a bias shortest distance criterion is inserted after the full connection layer, prediction probability and characteristics are received from the BN layer, and the prediction class is output.
Further preferably, the S2 includes:
s21, extracting the characteristics of the image to be classified by adopting a backbone network, and calculating the mass center;
s22, calculating the distance between the feature and the mass center, and obtaining the prediction class according to the shortest distance.
Compared with the prior art, the invention has the beneficial effects that:
according to the invention, the bad performances of the minority class in the image classification task are deeply analyzed from a new angle of the depth characteristic, a deflection shortest distance criterion is provided, a larger decision area is mapped for the minority class, and the classification accuracy of the minority class is improved. The invention can be easily combined with the method in the current popular image classification task and further improve the performance of the model.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the embodiments are briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an image classification method based on a biased shortest distance criterion according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating classification of samples by decision boundaries according to an embodiment of the present invention;
fig. 3 is a diagram showing the effect of the embodiment of the present invention in practical application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Embodiment one:
the embodiment provides an image classification system based on a biased shortest distance criterion, which comprises: the model building module is used for building a model;
the pre-classification module is used for collecting images to be classified and pre-classifying the images to be classified to obtain sample categories; sample categories include: a first category and a second category.
In this embodiment, the first class is a majority class, and the second class is a minority class. Since there is a large difference in the number of sample data of different categories in different data sets, it is often not confident for a few categories for deep learning networks, which tends to result in a lower prediction probability. Therefore, it is necessary to estimate the minority class sample threshold by pre-classification first to determine which test samples belong to minority classes.
In the embodiment, the deep neural network is adopted to classify the images to be classified, and on the basis, a probability threshold value is set(/>A comparison value for determining whether the sample belongs to a minority class), above a probability threshold, being a first class; below the probability threshold, is the second category. The probability distribution of the minority class samples is different for different data sets, the set probability threshold +.>And also different.
The model construction module is used for constructing an image classification model, and reclassifying sample categories based on the image classification model to obtain prediction categories.
In this embodiment, the image classification model uses a depth residual network as a backbone network and a linear classifier, and a shortest distance deviation criterion is inserted after the full connection layer, and the prediction probability and the characteristics are received from the BN layer, and the prediction class is output. The new prediction class is partitioned by calculating the shortest distance between the feature point and each class centroid.
Specifically, the model building module includes: a first calculation unit and a second calculation unit;
the first computing unit extracts the characteristics of the image to be classified by adopting a backbone network and computes the mass center.
The centroid calculation method is as follows:
,
in the method, in the process of the invention,indicate->Centroid of class->Is->Sample number of class, ++>Is->The samples are in class->Obtained from the last layer of the backbone network.
The second calculation unit is used for calculating the distance between the feature and the mass center, and obtaining the prediction class according to the shortest distance.
Features and classesDistance between centroids->The calculation method of (2) is as follows:
,
in the method, in the process of the invention,indicating that the probability of the test sample is less than +.>Is characterized by (3).
Determining a new prediction class P according to the shortest distance:
,
where N represents the number of classes.
Taking binary classification as an example, the Shortest Distance Criterion (SDC) can be expressed as determining two given pointsAnd->Which of (the centroids of the two classes) is closer to an arbitrary point in space +.>(characteristics of the test sample) as shown in fig. 2 (a). When the point is->Is positioned at->And->It is equidistant from the perpendicular bisectors of (a). If the point is located on one side of the perpendicular bisector, it is close to a given point on that side. The perpendicular bisector serves as a new decision boundary for sample classification and divides the space into equal decision regions of the two classes. Compared with the original area drawn by the fully-connected network, the method increases the decision area of a minority classDomains so that their features more easily fall within the correct region during the test phase.
Considering that the number of minority samples is not limited in practical application, the number may be close to or even equal to the number of majority samples, which may cause minority features to occupy a larger area in space due to sparsity, and thus the present embodiment proposes a Biased Shortest Distance Criterion (BSDC), as shown in fig. 2 (b), to bias the perpendicular bisector to move toward the majority, and provide a larger decision area for minority.
The principle of the Biased Shortest Distance Criterion (BSDC) will be described below in connection with a simple example: assume that there is one feature point A (from a minority class) and two given centroids in two dimensionsAnd->(from the majority class and minority class, respectively) as shown in fig. 2 (c). Because of the sparse mapping, point a falls to the left of the perpendicular bisector and is misclassified by SDC. However, if the perpendicular bisector can be transferred to most classes, point a will enter its decision area. Therefore, will->And->Multiplied by the same factor (less than 1) and then the centroids are scaled to the origin (point O in fig. 2 (c)) and to the new position +.>And. Thus, the perpendicular bisector of the new centroid moves toward most classes as compared to the original centroid. In the BSDC proposed by the present invention, the features of each sample are considered as a point in M-dimensional space, where M is a parameter in the feature, each parameter representing oneDimension.
The present invention multiplies the centroid by a factor in calculating the distance between two classes of features and the centroid from the SDC(/>For controlling the direction and distance of movement of the decision boundary) to achieve a movement of the perpendicular bisector, defined as follows:
,
where i ε {1,2} (i represents the identity of two points in FIG. 2), and δ <1.
The above example contains an implicit assumption, namely the origin (point) More approximate->If the origin is closer ++>When the centroid is multiplied by a factor->In this case, the perpendicular bisector will be oriented +>Moving as shown in fig. 2 (d). This contradicts the original intent of BSDC. To solve this problem, the present invention determines the distance between the centroid and the origin before multiplication. If the centroid of most classes is closer to the origin, +.>The assignment is less than 1. Conversely, let->Greater than 1, which results in the centroid being far from the origin, saggingThe straight bisector continues to track the majority class as shown in fig. 2 (e). Factor->The following can be defined:
,
in the method, in the process of the invention,is a superparameter controlling the shift,/->And->Representing the distances of the centroids of the majority class and minority class, respectively, from the origin.
For multi-class tasks, to reduce computational complexity, the shortest distance is calculated using the Top-n prediction class of the deep neural network as a candidate class for BSDC, since Top-n (e.g., n=3) predictions typically cover the correct class.
BSDC is focused on improving the performance of a minority class during the test phase, without conflicting with other modules, such as loss functions and sampling strategies. It can thus be combined with existing long tail methods and further boost them. In order to conveniently apply the invention, a heat exchange mechanism is designed for BSDC. That is, inserting BSDC after fully connected layer and receiving prediction probability and feature from BN layer (Batch Normalization, data normalization method, used before activating layer in deep neural network) can accelerate convergence speed in model training, make model training process more stable, avoid gradient explosion or gradient disappearance), then output new prediction probability, wherein BSDC replaces original probability with one-hot vector generated by reclassifying. This operation does not change the dimension of the original prediction probabilities and allows them to work normally in subsequent tasks.
Embodiment two:
as shown in fig. 1, the present embodiment provides an image classification method based on a biased shortest distance criterion, which includes the following steps:
s1, acquiring an image to be classified, and pre-classifying the image to be classified to obtain a sample class; sample categories include: a first category and a second category.
In this embodiment, the first class is a majority class, and the second class is a minority class. Since there is a large difference in the number of sample data of different categories in different data sets, it is often not confident for a few categories for deep learning networks, which tends to result in a lower prediction probability. Therefore, it is necessary to estimate the minority class sample threshold by pre-classification first to determine which test samples belong to minority classes.
In the embodiment, the deep neural network is adopted to classify the images to be classified, and on the basis, a probability threshold value is set(/>A comparison value for determining whether the sample belongs to a minority class), above a probability threshold, being a first class; below the probability threshold, is the second category. The probability distribution of the minority class samples is different for different data sets, the set probability threshold +.>And also different.
S2, constructing an image classification model, and reclassifying sample categories based on the image classification model to obtain prediction categories.
In this embodiment, the image classification model uses a depth residual network as a backbone network and a linear classifier, and a shortest distance deviation criterion is inserted after the full connection layer, and the prediction probability and the characteristics are received from the BN layer, and the prediction class is output. The new prediction class is partitioned by calculating the shortest distance between the feature point and each class centroid.
Specifically, S2 includes:
s21, extracting the characteristics of the image to be classified by adopting a backbone network, and calculating the mass center.
The centroid calculation method is as follows:
,
in the method, in the process of the invention,indicate->Centroid of class->Is->Sample number of class, ++>Is->The samples are in class->Obtained from the last layer of the backbone network.
S22, calculating the distance between the feature and the mass center, and obtaining a prediction class according to the shortest distance.
Features and classesDistance between centroids->The calculation method of (2) is as follows:
,
in the method, in the process of the invention,representing a test sample profileThe rate is less than->Is characterized by (3).
Determining a new prediction class P according to the shortest distance:
,
where N represents the number of classes.
Taking binary classification as an example, the Shortest Distance Criterion (SDC) can be expressed as determining two given pointsAnd->Which of (the centroids of the two classes) is closer to an arbitrary point in space +.>(characteristics of the test sample) as shown in fig. 2 (a). When the point is->Is positioned at->And->It is equidistant from the perpendicular bisectors of (a). If the point is located on one side of the perpendicular bisector, it is close to a given point on that side. The perpendicular bisector serves as a new decision boundary for sample classification and divides the space into equal decision regions of the two classes. This approach adds a minority class of decision regions compared to the original region of the fully connected network rendering, making their features easier to fall within the correct region during the test phase.
Considering that the number of minority samples is not limited in practical application, the number may be close to or even equal to the number of majority samples, which may cause minority features to occupy a larger area in space due to sparsity, and thus the present embodiment proposes a Biased Shortest Distance Criterion (BSDC), as shown in fig. 2 (b), to bias the perpendicular bisector to move toward the majority, and provide a larger decision area for minority.
The principle of the Biased Shortest Distance Criterion (BSDC) will be described below in connection with a simple example: assume that there is one feature point A (from a minority class) and two given centroids in two dimensionsAnd->(from the majority class and minority class, respectively) as shown in fig. 2 (c). Because of the sparse mapping, point a falls to the left of the perpendicular bisector and is misclassified by SDC. However, if the perpendicular bisector can be transferred to most classes, point a will enter its decision area. Therefore, will->And->Multiplied by the same factor (less than 1) and then the centroids are scaled to the origin (point O in fig. 2 (c)) and to the new position +.>And. Thus, the perpendicular bisector of the new centroid moves toward most classes as compared to the original centroid. In the BSDC proposed by the present invention, the feature of each sample is regarded as a point in M-dimensional space, where M is a parameter in the feature, each parameter representing a dimension. In calculating the distance between two types of features and the centroid from SDC, the present invention multiplies the centroid by a factor +.>(/>For controlling the direction and distance of movement of the decision boundary) to achieve a movement of the perpendicular bisector, defined as follows:
,
where i ε {1,2} (i represents the identity of two points in FIG. 2), and δ <1.
The above example contains an implicit assumption, namely the origin (point) More approximate->If the origin is closer ++>When the centroid is multiplied by a factor->In this case, the perpendicular bisector will be oriented +>Moving as shown in fig. 2 (d). This contradicts the original intent of BSDC. To solve this problem, the present invention determines the distance between the centroid and the origin before multiplication. If the centroid of most classes is closer to the origin, +.>The assignment is less than 1. Conversely, let->Above 1, this results in the centroid being away from the origin, with the perpendicular bisector continuing toward the majority class of trajectories, as shown in FIG. 2 (e). Factor->The following can be defined:
,
in the method, in the process of the invention,is a superparameter controlling the shift,/->And->Representing the distances of the centroids of the majority class and minority class, respectively, from the origin.
For multi-class tasks, to reduce computational complexity, the shortest distance is calculated using the Top-n prediction class of the deep neural network as a candidate class for BSDC, since Top-n (e.g., n=3) predictions typically cover the correct class.
BSDC is focused on improving the performance of a minority class during the test phase, without conflicting with other modules, such as loss functions and sampling strategies. It can thus be combined with existing long tail methods and further boost them. In order to conveniently apply the invention, a heat exchange mechanism is designed for BSDC. That is, inserting BSDC after fully connected layer and receiving prediction probability and feature from BN layer (Batch Normalization, data normalization method, used before activating layer in deep neural network) can accelerate convergence speed in model training, make model training process more stable, avoid gradient explosion or gradient disappearance), then output new prediction probability, wherein BSDC replaces original probability with one-hot vector generated by reclassifying. This operation does not change the dimension of the original prediction probabilities and allows them to work normally in subsequent tasks.
Embodiment III:
as shown in tables 1 and 2, the comparison of the method of the present invention with several of the most advanced comparison methods shows that the performance of the present invention is excellent.
Table 1 shows the highest accuracy comparison of the inventive method with the original method on the ImageNet-LT and iNaturalist 2018 datasets. Table 2 shows the highest accuracy of the invention on CIFAR long tail data set compared to the original method.
TABLE 1
TABLE 2
。
Embodiment four:
in the medical field, doctors often analyze the severity of arthritis from a patient's knee image and are classified as 5 according to the Kellgren & Lawrence classification criteria:
grade 0, no change;
grade I, slight osteophyte;
stage II, obvious osteophyte, but without affecting joint clearance;
III, moderately narrowing joint space;
grade IV, the joint space is obviously narrowed, and the subchondral bone is hardened.
But in real life the number of data samples collected from the patient varies greatly from one class of sample data to another. When medical images are classified through artificial intelligence, unbalanced data sets can cause trouble to the model, so that the accuracy of the final classification result is low.
The total amount of medical image data collected in the actual scene reaches 6300, wherein the IV-level patient case samples are few, the case images are often misclassified during recognition, and the method provided by the invention can optimize the problem.
Firstly, the probability of the existing deep neural network prediction sample is used for roughly determining the sample category through pre-experiment processing, and on the basis, the invention sets an initial threshold value after the collected medical image dataset is subjected to pre-experimentWhen the probability of the sample is less than +.0.5 =>When it is identified as a minority class. According to the invention, the sample pictures are mapped into the feature space, each sample is mapped into a point, the Euclidean distance is used for calculating the distance between the feature point and the mass centers of various samples, and the new prediction class is re-divided. By biasing the decision boundary, the decision boundary is adjusted, adding a minority of larger decision areas. In order to reduce the calculation complexity, the invention performs experimental comparison on n different values when using Top-n prediction class of the deep neural network as candidate class of BSDC to calculate the shortest distance. The accuracy is highest when n=4 is selected for the present dataset. As shown in fig. 3, the method of the present invention was used to classify as class IV arthritis samples, but the images were incorrectly classified as class ii cases by the existing optimal model.
The above embodiments are merely illustrative of the preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but various modifications and improvements made by those skilled in the art to which the present invention pertains are made without departing from the spirit of the present invention, and all modifications and improvements fall within the scope of the present invention as defined in the appended claims.
Claims (6)
1. An image classification system based on a biased shortest distance criterion, comprising: the model building module is used for building a model;
the pre-classifying module is used for collecting images to be classified and pre-classifying the images to be classified to obtain sample types; the sample categories include: a first category and a second category;
the model construction module is used for constructing an image classification model, and reclassifying the sample category based on the image classification model to obtain a prediction category; the image classification model adopts a depth residual error network as a backbone network and a linear classifier, a deviation shortest distance criterion is inserted after a full-connection layer, prediction probability and characteristics are received from a BN layer, and the prediction class is output;
the model construction module comprises: a first calculation unit and a second calculation unit;
the first computing unit adopts a backbone network to extract the characteristics of the images to be classified and computes the mass center;
the centroid calculation method comprises the following steps:
,
in the method, in the process of the invention,indicate->Centroid of class->Is->Sample number of class, ++>Is->The samples are in class->Features of (a);
the second computing unit is used for computing the distance between the characteristics of the image to be classified extracted by the backbone network and the centroid, and obtaining the prediction class according to the shortest distance;
the distance calculation method between the characteristics of the image to be classified extracted by the backbone network and the centroid comprises the following steps:
,
in the method, in the process of the invention,indicating that the probability of the test sample is less than +.>Is characterized by (2);
the method for obtaining the prediction class according to the shortest distance comprises the following steps:
,
wherein N represents the number of classes;
the biased shortest distance criterion shifts the centroids proportionally by multiplying the centroids from the majority class and minority class by the same factor delta, shifting the perpendicular bisector of the new centroids toward the majority class; before multiplication, determining the distance between the centroid and the origin, and when the centroids of most classes are closer to the origin, delta <1; when the centroid of the minority class is closer to the origin, delta >1; the factor delta is defined as:
,
in the method, in the process of the invention,is a superparameter controlling the shift,/->And->Representing the distances of the centroids of the majority class and minority class, respectively, from the origin.
2. The image classification system based on the biased shortest distance criterion of claim 1, wherein the method of the pre-classification module to obtain the sample class comprises:
classifying the images to be classified based on a deep neural network, setting a probability threshold, and setting the images to be classified as the first category if the probability threshold is higher than the probability threshold; and below the probability threshold, the second category.
3. An image classification method based on a biased shortest distance criterion, the classification method being applied to the classification system of any one of claims 1-2, comprising the steps of:
s1, acquiring an image to be classified, and pre-classifying the image to be classified to obtain a sample class; the sample categories include: a first category and a second category;
s2, constructing an image classification model, and reclassifying the sample category based on the image classification model to obtain a prediction category.
4. A method of classifying images based on a biased shortest distance criterion as claimed in claim 3, wherein the method of deriving said sample class comprises:
classifying the images to be classified based on a deep neural network, setting a probability threshold, and setting the images to be classified as the first category if the probability threshold is higher than the probability threshold; and below the probability threshold, the second category.
5. A method of classifying images based on a biased shortest distance criterion according to claim 3, wherein the image classification model uses a depth residual network as a backbone network and a linear classifier, and a biased shortest distance criterion is inserted after the fully connected layer, and the prediction probability and the characteristics are received from the BN layer, and the prediction class is output.
6. The method for classifying images based on the biased shortest distance criterion as claimed in claim 5, wherein said S2 comprises:
s21, extracting the characteristics of the image to be classified by adopting a backbone network, and calculating the mass center;
s22, calculating the distance between the feature of the image to be classified extracted by the backbone network and the centroid, and obtaining the prediction class according to the shortest distance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311523857.7A CN117253095B (en) | 2023-11-16 | 2023-11-16 | Image classification system and method based on biased shortest distance criterion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311523857.7A CN117253095B (en) | 2023-11-16 | 2023-11-16 | Image classification system and method based on biased shortest distance criterion |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117253095A CN117253095A (en) | 2023-12-19 |
CN117253095B true CN117253095B (en) | 2024-01-30 |
Family
ID=89131678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311523857.7A Active CN117253095B (en) | 2023-11-16 | 2023-11-16 | Image classification system and method based on biased shortest distance criterion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117253095B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110309302A (en) * | 2019-05-17 | 2019-10-08 | 江苏大学 | A kind of uneven file classification method and system of combination SVM and semi-supervised clustering |
CN112085046A (en) * | 2019-06-13 | 2020-12-15 | 中国科学院计算机网络信息中心 | Intrusion detection method and system based on sampling and feature reduction for unbalanced data set conversion |
CN113657678A (en) * | 2021-08-23 | 2021-11-16 | 国网安徽省电力有限公司电力科学研究院 | Power grid power data prediction method based on information freshness |
CN113989519A (en) * | 2021-12-28 | 2022-01-28 | 中科视语(北京)科技有限公司 | Long-tail target detection method and system |
CN114387478A (en) * | 2022-01-20 | 2022-04-22 | 中山大学 | Class imbalance image classification method and device based on double-end deep learning |
CN115051828A (en) * | 2022-04-22 | 2022-09-13 | 江苏科技大学 | SSL VPN encryption flow identification and classification method facing to category imbalance |
WO2022233916A1 (en) * | 2021-05-05 | 2022-11-10 | The Institute Of Cancer Research: Royal Cancer Hospital | Analysis of histopathology samples |
CN116030287A (en) * | 2021-12-16 | 2023-04-28 | 国网江苏省电力有限公司电力科学研究院 | Insulator detection method based on unbalanced deep learning |
CN116129215A (en) * | 2022-12-26 | 2023-05-16 | 郑州大学 | Long-tail target detection method based on deep learning |
CN117059268A (en) * | 2023-08-02 | 2023-11-14 | 西安邮电大学 | LACC patient lymph node metastasis prediction method based on CT and unbalanced data learning |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8306942B2 (en) * | 2008-05-06 | 2012-11-06 | Lawrence Livermore National Security, Llc | Discriminant forest classification method and system |
US9916538B2 (en) * | 2012-09-15 | 2018-03-13 | Z Advanced Computing, Inc. | Method and system for feature detection |
-
2023
- 2023-11-16 CN CN202311523857.7A patent/CN117253095B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110309302A (en) * | 2019-05-17 | 2019-10-08 | 江苏大学 | A kind of uneven file classification method and system of combination SVM and semi-supervised clustering |
CN112085046A (en) * | 2019-06-13 | 2020-12-15 | 中国科学院计算机网络信息中心 | Intrusion detection method and system based on sampling and feature reduction for unbalanced data set conversion |
WO2022233916A1 (en) * | 2021-05-05 | 2022-11-10 | The Institute Of Cancer Research: Royal Cancer Hospital | Analysis of histopathology samples |
CN113657678A (en) * | 2021-08-23 | 2021-11-16 | 国网安徽省电力有限公司电力科学研究院 | Power grid power data prediction method based on information freshness |
CN116030287A (en) * | 2021-12-16 | 2023-04-28 | 国网江苏省电力有限公司电力科学研究院 | Insulator detection method based on unbalanced deep learning |
CN113989519A (en) * | 2021-12-28 | 2022-01-28 | 中科视语(北京)科技有限公司 | Long-tail target detection method and system |
CN114387478A (en) * | 2022-01-20 | 2022-04-22 | 中山大学 | Class imbalance image classification method and device based on double-end deep learning |
CN115051828A (en) * | 2022-04-22 | 2022-09-13 | 江苏科技大学 | SSL VPN encryption flow identification and classification method facing to category imbalance |
CN116129215A (en) * | 2022-12-26 | 2023-05-16 | 郑州大学 | Long-tail target detection method based on deep learning |
CN117059268A (en) * | 2023-08-02 | 2023-11-14 | 西安邮电大学 | LACC patient lymph node metastasis prediction method based on CT and unbalanced data learning |
Non-Patent Citations (2)
Title |
---|
"Contrastive Learning Based Hybrid Networks for Long-Tailed Image Classification";Peng Wang等;《CVPR 2021》;943-952页 * |
"样本自适应的不平衡分类器";才子昕等;《计算机科学》;94-99页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117253095A (en) | 2023-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zheng et al. | Background learnable cascade for zero-shot object detection | |
CN109063649B (en) | Pedestrian re-identification method based on twin pedestrian alignment residual error network | |
CN110443257B (en) | Significance detection method based on active learning | |
CN107066951B (en) | Face spontaneous expression recognition method and system | |
CN111126482A (en) | Remote sensing image automatic classification method based on multi-classifier cascade model | |
CN113744311A (en) | Twin neural network moving target tracking method based on full-connection attention module | |
JP6892606B2 (en) | Positioning device, position identification method and computer program | |
Dev et al. | Multi-level semantic labeling of sky/cloud images | |
CN111833322B (en) | Garbage multi-target detection method based on improved YOLOv3 | |
CN114549894A (en) | Small sample image increment classification method and device based on embedded enhancement and self-adaptation | |
CN110458022B (en) | Autonomous learning target detection method based on domain adaptation | |
US20200143209A1 (en) | Task dependent adaptive metric for classifying pieces of data | |
CN112257738A (en) | Training method and device of machine learning model and classification method and device of image | |
WO2015146113A1 (en) | Identification dictionary learning system, identification dictionary learning method, and recording medium | |
CN116229112A (en) | Twin network target tracking method based on multiple attentives | |
CN116206327A (en) | Image classification method based on online knowledge distillation | |
CN111723600B (en) | Pedestrian re-recognition feature descriptor based on multi-task learning | |
CN117253095B (en) | Image classification system and method based on biased shortest distance criterion | |
CN115100694A (en) | Fingerprint quick retrieval method based on self-supervision neural network | |
CN115203408A (en) | Intelligent labeling method for multi-modal test data | |
CN110956177A (en) | Hybrid verification code identification method and system | |
CN117152746B (en) | Method for acquiring cervical cell classification parameters based on YOLOV5 network | |
Wang et al. | Research on Small Vehicle Detection in Natural Traffic Scene | |
CN114463602B (en) | Target identification data processing method based on big data | |
CN113240007B (en) | Target feature selection method based on three decisions |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |