1. An image processing apparatus comprising: a holding unit configured to classify a variation of a target object included in an image from a specific state as one of a plurality of types of attributes, and to hold, for each variation attribute, a correction parameter for spatial transformation that corrects the target object to the specific state; a vectorizing unit configured to generate an input image vector by vectorizing at least a partial region of the input image; a determination unit configured to determine a variation attribute by detecting a variation of the target object from the specific state in the input image; and a generation unit configured to select a correction parameter from the holding unit based on the variation attribute determined by the determination unit and generate a transformed image vector by performing the spatial transformation on the input image vector, using the selected correction parameter.