Disclosed in this application is an
image processing method and a related apparatus, applicable to various scenarios such as a cloud technology,
artificial intelligence,
smart transportation, and assisted driving. Vectorization is performed based on a to-be-processed image, to obtain an
image representation vector of the to-be-processed image.
Feature mapping is performed on the
image representation vector by using a network block included in an image classification model, to obtain an image feature. During obtaining the image feature, at a same
network layer of a network block, global
feature mapping and local
feature mapping are performed, by using the
network layer, on input content obtained based on the
image representation vector, to obtain a global feature and a local feature,
feature fusion is performed on the global feature and the local feature by using the
network layer, to obtain a fused feature corresponding to the network layer, and the image feature is obtained based on the fused feature. Prediction is performed by using a classification module based on the image feature to obtain a
classification result. In this application, the to-be-processed image can be accurately classified, and a classification capability and a classification effect are improved.