Method for classifying a document on the basis of its visual appearance, the document taking the form of an image made up of pixels, the method comprising the steps of: - extracting (E20) keypoints in the image, - describing (E21) each extracted keypoint using a vector representative of the shape of the image in a neighbourhood of the keypoint, - determining (E22) one visual word for each extracted keypoint, the visual word being determined on the basis of the characteristic vector such that similar characteristic vectors are associated with the same visual word, - determining (E24) one or more hash polynomials for each keypoint, - classifying (E25) the document, into one class of a plurality of classes, on the basis of a score determined on the basis of the hash polynomials, the score being an average of weights of the hash polynomials present in the document; characterized in that : - each vector representative of the shape of the image is determined on the basis of a circular neighbourhood around each keypoint, the circular neighbourhood being aligned with the gradient vector of the keypoint and comprising at least one circle, said circle being divided into a plurality of regions, each region of each circle having an identical area, the coordinates of each vector representative of the shape of the image being obtained on the basis of a gradient vector of the keypoint and of the average of the gradient vectors in each region of the circular neighbourhood of the keypoint; in that each hash polynomial comprises at least one first visual word associated with the keypoint, which serves as anchor point of the hash polynomial, and a sequence of positions in a list that specifies the context of the first visual word, the list being made up of second visual words arranged in order of increasing distance of their spatial position in the image with respect to a spatial position in the image of the first visual word, each position of the sequence of positions being either an empty element or the second visual word present at this position in said list. - extracting (E20) keypoints in the image, - describing (E21) each extracted keypoint using a vector representative of the shape of the image in a neighbourhood of the keypoint, - determining (E22) one visual word for each extracted keypoint, the visual word being determined on the basis of the characteristic vector such that similar characteristic vectors are associated with the same visual word, - determining (E24) one or more hash polynomials for each keypoint, - classifying (E25) the document, into one class of a plurality of classes, on the basis of a score determined on the basis of the hash polynomials, the score being an average of weights of the hash polynomials present in the document; - each vector representative of the shape of the image is determined on the basis of a circular neighbourhood around each keypoint, the circular neighbourhood being aligned with the gradient vector of the keypoint and comprising at least one circle, said circle being divided into a plurality of regions, each region of each circle having an identical area, the coordinates of each vector representative of the shape of the image being obtained on the basis of a gradient vector of the keypoint and of the average of the gradient vectors in each region of the circular neighbourhood of the keypoint; in that each hash polynomial comprises at least one first visual word associated with the keypoint, which serves as anchor point of the hash polynomial, and a sequence of positions in a list that specifies the context of the first visual word, the list being made up of second visual words arranged in order of increasing distance of their spatial position in the image with respect to a spatial position in the image of the first visual word, each position of the sequence of positions being either an empty element or the second visual word present at this position in said list. <EOS>