An image classification method based on feature selection for edge computing

The fuzzy C-means clustering algorithm is used to select features with large distribution differences between classes in the convolutional neural network and reconstruct the Softmax classifier, which solves the lightweight and high-precision problems of the convolutional neural network image classifier in the deployment of edge computing nodes. , achieving an improvement in image classification accuracy.

CN113255814BActive Publication Date: 2024-10-29DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110642624.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-09
Publication Date
2024-10-29
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

Based on the image features extracted by convolutional neural networks, how to select features with large distribution differences between classes and obvious effects on classification to achieve reconstruction and high-precision classification of lightweight convolutional neural network image classifiers, especially at the edges There are challenges in the deployment of compute nodes.

Method used

The fuzzy C-means clustering algorithm is used to cluster image features, calculate the distribution difference between classes of each dimensional feature, select features that contribute greatly to classification, and implement the classifier by resetting the number of input nodes of the Softmax classifier. lightweight and high-precision image classification.

Benefits of technology

It improves the accuracy of image classification, reduces the dimension of image features and the scale of the classifier, and is suitable for the deployment of edge computing nodes, with the classification accuracy increased by 1.63%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113255814B_ABST
    Figure CN113255814B_ABST
Patent Text Reader

Abstract

The present invention discloses an image classification method based on feature selection for edge computing, which uses the convolution layer and pooling layer of a convolutional neural network to extract features from a training set image, and then uses a feature selection method based on fuzzy C-means clustering to select image features that contribute more to classification, and sends them to a redesigned classifier for classification. In feature selection, full use is made of image label information, and fuzzy clustering results for image features of each dimension are used to describe the distribution of image features of each dimension on different sample categories, and the inter-class distribution difference of each dimensional feature is calculated based on the cluster center and membership information obtained by clustering, so as to select features with obvious inter-class distribution differences and greater contributions to classification. The present invention improves the accuracy of classification, and at the same time, reduces the dimension of image features, correspondingly reduces the scale of the classifier network, realizes the lightweight of the classifier, and lays a foundation for the deployment and implementation of edge computing nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image feature selection and classification for edge computing, and relates to an image classification method based on feature selection for edge computing, which is a lightweight image classification method based on convolutional neural network and fuzzy clustering selection features. Background Art

[0002] In the field of image classification, convolutional neural networks are widely used due to their efficient feature extraction capabilities. The convolution layer in the convolutional neural network imitates the structure of the biological visual cortex and can effectively extract the deep features of the image. However, the structure of the convolutional neural network is relatively complex, and there are certain difficulties in embedded deployment and application in many fields such as industrial control and edge computing. In order to adapt to the computing power constraints, the lightweight method can reduce the network structure of the convolutional neural network. Given that the distribution difference of some features extracted by the convolutional neural network is small between different categories and the contribution to classification is not large, therefore, through feature selection, not only can the features that contribute more to the classification be selected to ensure the classification accuracy of the lightweight network, but also the dimension of the image features can be reduced, so that the scale of the classifier network is reduced, thereby reducing the possibility of overfitting of the classifier.

[0003] Feature selection algorithm is a kind of feature dimensionality reduction method that directly selects a subset of features that are helpful for classification from existing features. There are many methods for feature selection in image classification. A common idea is to start from the data set itself, analyze the intrinsic properties of the features, design internal evaluation indicators such as distance, information, and correlation, and evaluate and select features (Hancer E, Xue B, Zhang M. Differential evolution for filter feature selection based on information theory and feature ranking. Knowledge-Based Systems, 2018, 140: 103-119.). In addition, many researchers embed feature selection into the learner and express the feature selection problem as an optimization problem. By adding regularization terms to the loss function of the learner, that is, the combination of feature weight matrix norms, features with higher weights are selected (J. Han, Z. Sun, H. Hao. Selecting featuresubset with sparsity and low redundancy for unsupervised learning. Knowledge-Based Systems. 2015, 86: 210-223). In addition to the above algorithms that directly select feature subsets from existing features, many researchers also use feature dimensionality reduction methods. Typical algorithms include principal component analysis, factor analysis, local linear embedding, etc. These methods mine the hidden structure of data, map the original feature set to a low-dimensional feature space, and enable the data to retain its original structure to the greatest extent in the low-dimensional space, thereby reducing the dimension of the feature. Summary of the invention

[0004] The technical problem to be solved by the present invention is: based on the image features extracted by convolutional neural network, the fuzzy C-means clustering algorithm is used to select image features with large inter-class distribution differences and obvious classification effects, so as to achieve lightweight reconstruction of the classifier and higher-precision image classification, laying the foundation for deployment and implementation in edge computing nodes.

[0005] The present invention aims to solve the problem of lightweight convolutional neural network image classifier by feature selection method. Taking into account the existence of classifier training sample labels, the present invention intends to make full use of these image label information and use fuzzy clustering results for each dimensional image feature to describe the distribution of each dimensional image feature in different sample categories. According to the size of the distribution difference of each dimensional image feature between classes, the features that contribute most to the classification are selected to achieve lightweight classifier and high-precision image classification.

[0006] The technical solution of the present invention is:

[0007] An image classification method based on feature selection for edge computing, the specific steps are as follows:

[0008] Step (1), training process and feature extraction

[0009] After the convolutional neural network is trained with the training set, the convolutional layer and pooling layer of the convolutional neural network are used to obtain the image features of the training set. Suppose the image feature set is X = {x1, x2, ..., x n}, n is the number of training set samples, and the dimension of each image feature extracted by the convolutional neural network is f; let X d ={x d1 ,x d2 ,...,x dn} is the set of d-th dimension features of all image features in X, d = 1, 2, ..., f; the number of label categories of the training set images is c, and X is classified according to the category labels d To divide:

[0010]

[0011] in, represents the feature set of the t-th image on the d-th dimension feature, Represents the empty set.

[0012] Step (2): Use the fuzzy C-means algorithm to perform clustering and calculate the inter-class distribution difference

[0013] The fuzzy C-means algorithm is used to The clustering process is as follows: Assume that Clustered into k categories, The two clustering parameters corresponding to the above algorithm: V (t) ={ν1,ν2,…,ν k} are k cluster centers, U (t) =[u ij ] k×n is the membership matrix, where u ij express A sample x j The membership degree u to the i-th cluster center ij ; The objective function and constraints of the algorithm are as follows:

[0014]

[0015]

[0016] Where m is the fuzzy weighting parameter.

[0017] Using the Lagrange multiplier method, let the partial derivative be 0 and solve for u ij , ν i as follows:

[0018]

[0019]

[0020] The clustering result V is obtained by iterating equations (4) and (5) (t) and U (t) .

[0021] The fuzzy C-means algorithm obtains cluster center and membership information. The cluster center describes the location in the feature set, and the membership describes the degree of aggregation of each dimensional feature around k cluster centers in each image category. The cluster center and membership are used to obtain a description of the distribution of each dimensional feature in each category.

[0022] Based on the cluster center and membership information obtained by the fuzzy C-means algorithm, the inter-class distribution difference of each dimension feature is calculated, and the measure of the inter-class distribution difference on the d-th dimension feature is defined as:

[0023]

[0024] in The calculation method is:

[0025]

[0026] where ν i for The i-th cluster center, ν neighbor For other subclasses l=1,2,...,c,l≠t and ν i The cluster center with the smallest absolute value of the difference is express All samples on the cluster center ν i The sum of the membership degrees.

[0027] Calculate the inter-class distribution difference of image features in each dimension and arrange them in descending order. Select the first z-dimensional features as the result of feature selection (the greater the inter-class distribution difference, the greater the classification contribution). Reset the input nodes of the Softmax classifier according to the dimensions of the selected features to reconstruct the classifier, and use the selected features to train the classifier. Among them, the Softmax classifier is reset, the number of input nodes is the selected feature dimension z, and the number of output nodes is the number of label categories c of the image; z is a hyperparameter, and its value can be adjusted according to the classification results of the test set image samples.

[0028] Step (3): Classification of the image to be classified

[0029] For the image samples to be classified, use the trained convolutional layer and pooling layer to extract their image features, and according to the feature selection results of steps (1) and (2) on the training set, select the corresponding features and send them to the re-set Softmax classifier to finally output the classification results.

[0030] Beneficial effects of the present invention: This method can select features with high contribution to classification to participate in image classification, thereby improving the accuracy of classification. At the same time, this method reduces the dimension of image features, correspondingly reduces the scale of the classifier network, realizes the lightweight of the classifier, and lays the foundation for deployment and implementation on edge computing nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of a feature selection-based image classification method for edge computing. DETAILED DESCRIPTION

[0032] The specific implementation of the present invention is described in detail below in conjunction with technical solutions, drawings and examples.

[0033] The process of the present invention is as follows Figure 1 As shown in the figure, the method first uses the training set image samples to train the convolutional neural network, and then uses the trained convolutional layer and pooling layer in the convolutional neural network to extract the training set image features. Then, on each dimension of the training set image features, the fuzzy C-means algorithm is used to cluster the feature sets corresponding to each category of image. The parameters (cluster center and membership degree) obtained by clustering are used to calculate the inter-class distribution difference of each dimension of features. Its size is used as the basis for feature selection, and features with higher contribution to classification are selected to reconstruct and train the Softmax classifier. For the image samples to be classified, the convolutional layer and pooling layer are used to extract their image features, and according to the selection results of the training set features, the features of the corresponding dimensions in the image features to be classified are selected and sent to the Softmax classifier. The output obtained is the classification result of the image to be classified.

[0034] In this embodiment, the images used are from the public dataset Cats vs Dogs. The images are divided into two categories: cats and dogs. The specific implementation is as follows:

[0035] First, the convolutional neural network is trained using the training set image samples of Cats vs Dogs, and the trained convolutional layer and pooling layer are used to extract the training set image features. At this time, the feature dimension is 2048. Each dimension of all image features is selected in turn to form a feature set, which can be expressed as X d ={x d1 ,x d2 ,...,xdn}, d = 1, 2, ..., f. According to the category labels of the training set images, the features are divided into subsets as shown in formula (1), and the fuzzy C-means algorithm (formula (4) and formula (5)) is used to Clustering is performed with t=1,2,…c.

[0036] The cluster center and membership degree obtained by the fuzzy C-means algorithm are used to calculate the inter-class distribution difference of the image features of the current dimension according to equations (6) and (7). After completing the calculation of the inter-class distribution difference of image features of all dimensions, the image features are sorted in descending order according to the inter-class distribution difference, and the first z-dimensional features are selected as the feature selection results. In this example, according to the results on the validation set, the highest classification accuracy can be obtained when the selected features are 1200 dimensions.

[0037] According to the feature selection result, the number of input nodes of the Softmax classifier is adjusted to realize the reconstruction of the classifier, and the reconstructed classifier is trained. The Softmax classifier is composed of an input layer and an output layer in a fully connected manner. In this embodiment, the input layer includes 1200 input nodes, and the output layer includes 2 output nodes.

[0038] The test set of Cats vs Dogs is used as the image to be classified, and the features are extracted by the trained convolution layer and pooling layer. The features of the corresponding dimensions are selected as the input of the Softmax classifier according to the feature selection results in the training phase, and the final output is the classification result. In this embodiment, a classification accuracy of 95.53% is obtained, which is 1.63% higher than the original convolutional neural network, indicating that this method can select features that contribute more to classification and improve the image classification accuracy of the network.

Claims

1. A feature selection-based image classification method for edge computing, characterized in that: Here are the steps: Step (1), training process and feature extraction After the convolutional neural network is trained with the training set, the convolutional layer and pooling layer of the convolutional neural network are used to obtain the image features of the training set. Suppose the image feature set is X = {x1, x2, ..., x n }, n is the number of training set samples, and the dimension of each image feature extracted by the convolutional neural network is f; let X d ={x d1 ,x d2 ,...,x dn } is the set of d-th dimension features of all image features in X, d = 1, 2, ..., f; the number of label categories of the training set images is c, and X is classified according to the category labels d To divide: in, represents the feature set of the t-th image on the d-th dimension feature, represents the empty set; Step (2): Use the fuzzy C-means algorithm to perform clustering and calculate the inter-class distribution difference The fuzzy C-means algorithm is used to The clustering process is as follows: Assume that Clustered into k categories, The two clustering parameters corresponding to the above algorithm: V (t) ={ν1,ν2,…,ν k } are k cluster centers, U (t) =[u ij ] k×n is the membership matrix, where u ij express A sample x j The membership degree u to the i-th cluster center ij ; The objective function and constraints of the algorithm are as follows: Where m is the fuzzy weighting parameter; Using the Lagrange multiplier method, let the partial derivative be 0 and solve for u ij , ν i as follows: The clustering result V is obtained by iterating equations (4) and (5) (t) and U (t) ; Based on the cluster center and membership information obtained by the fuzzy C-means algorithm, the inter-class distribution difference of each dimension feature is calculated, and the measure of the inter-class distribution difference on the d-th dimension feature is defined as: in The calculation method is: where ν i for The i-th cluster center, ν neighbor For other subclasses l=1,2,...,c,l≠t and ν i The cluster center with the smallest absolute value of the difference is express All samples on the cluster center ν i The sum of the membership degrees of ; Calculate the inter-class distribution difference of image features in each dimension, and arrange them in descending order, and select the first z-dimensional features as the result of feature selection; reset the input nodes of the Softmax classifier according to the dimensions of the selected features to achieve the reconstruction of the classifier, and use the selected features to train the classifier; wherein, reset the Softmax classifier, the number of input nodes is the selected feature dimension z, and the number of output nodes is the number of label categories c of the image; z is a hyperparameter, and its value can be adjusted according to the classification results of the image samples in the test set; Step (3): Classification of the image to be classified For the image samples to be classified, use the trained convolutional layer and pooling layer to extract their image features, and according to the feature selection results of steps (1) and (2) on the training set, select the corresponding features and send them to the re-set Softmax classifier to finally output the classification results.

Citation Information

Patent Citations

  • Method and device for Hyperspectral image semi-supervised classification

    CN103150580A

  • Ensemble classification method based on randomized greedy feature selection

    CN106991296A