| CPC G06V 10/764 (2022.01) [G06V 10/751 (2022.01); G06V 10/762 (2022.01); G06V 10/82 (2022.01)] | 17 Claims |

|
1. An image classification method applied to an electronic device, the method comprising:
acquiring a classification network, an image to be classified, a plurality of training images, and a plurality of test images;
obtaining a first classification model by training the classification network based on the plurality of training images, comprising: calculating a loss value of the classification network based on the plurality of training images; and obtaining the first classification model by adjusting the classification network based on the loss value, until the loss value decreases to a minimum value;
obtaining a prediction result of each test image of the plurality of test images by inputting each test image into the first classification model, determining a plurality of target images from the plurality of test images according to the prediction result of each test image, calculating a prediction accuracy rate of the first classification model based on the plurality of target images;
in response that the prediction accuracy rate is less than a preset value, obtaining a second classification model by adjusting the first classification model according to the plurality of target images, the second classification model comprising a flattening layer, a fully connected layer, and a classification layer;
acquiring an initial feature matrix output from the flattening layer by inputting the image to be classified into the second classification model;
in response that a dimension of the initial feature matrix is less than a dimension of an initial weight matrix in the fully connected layer, obtaining an input feature matrix by performing a dimension raising process on the initial feature matrix;
obtaining a target weight matrix by rearranging elements in the initial weight matrix;
generating a target vector according to the target weight matrix and the input feature matrix; and
obtaining a classification result of the image to be classified by inputting the target vector into the classification layer.
|