Generation of a digital document from an analog document is provided. The document generation includes obtaining a user image of a user-filled document. A first set of key points and a second set of key points are extracted from a template image and the user image, respectively. Probabilistic matching of the first s...