A method for identifying a particular template paper form, of which a selected paper form is an instance, based on digital images of the particular and the selected forms, the method comprising:
- generating a template form library by:
- for each template form of a plurality of template forms:
- extracting, by a processor implementing a first visual feature extractor, a first plurality of visual features for said each template form based on an image of said each template form;
- extracting, by the processor implementing a second visual feature extractor, a second plurality of visual features for said each template form based on the image of said each template form;
- determining, by the processor implementing a clustering algorithm, a plurality of clusters of visual features based on any of the first plurality or the second plurality of visual features;
- determining, by the processor implementing a bag of visual words vector algorithm, a bag of visual words vector for said each template form based on the plurality of clusters of visual features;
- and
- storing, by the processor, the first plurality of visual features, the second plurality of visual features, and the bag of visual words vector;
- preparing to identify a template form of the plurality of template forms of which a selected form is an instance by:
- extracting, by the processor implementing the first visual feature extractor, a first plurality of visual features of the selected form based on an image of the selected form, the selected form being an instance of a particular template form of the plurality of template forms;
- extracting, by the processor implementing the second visual feature extractor, a second plurality of visual features of the selected form based on the image of the selected form;
- determining, by the processor implementing the clustering algorithm, a first plurality of clusters of visual features of the selected form based on any of the first plurality or the second plurality of visual features of the selected form;
- and
- determining, by the processor implementing the bag of visual words vector algorithm, a first bag of visual words vector for the selected form based on the first plurality of clusters of visual features;
- identifying a first set of candidate template forms of which the selected form may be an instance by:
- identifying, by the processor implementing a first classifier, a first set of potentially matching template forms of the plurality of template forms based on a correlation between the first plurality of visual features of the selected form and visual features of a first subset of the plurality of template forms extracted by the first visual feature extractor;
- identifying, by the processor implementing a second classifier, a second set of potentially matching template forms of the plurality of template forms based on a correlation between the second plurality of visual features of the selected form and visual features of a second subset of the plurality of template forms extracted by the second visual feature extractor;
- and
- identifying, by the processor implementing a third classifier, a third set of potentially matching template forms of the plurality of template forms based on a correlation between the first bag of visual words vector for the selected template form and a subset of bag of visual words vectors of the plurality of template forms;
- and
- identifying the particular template form of which the selected form is an instance by:
- when the first set, the second set, and the third set of potentially matching template forms are all a same template form:
- identifying, by the processor, the same template form as being the particular template form of which the selected form is an instance;
- and
- when the first set, the second set, and the third set of potentially matching template forms are not all the same template form:
- comparing, by the processor implementing a matching algorithm, the image of the selected form to images of the first set, the second set, and the third set of potentially matching template forms, and
- based on results of said comparing, identifying, by the processor, the particular template form of which the selected form is an instance.