1. A method performed by one or more computers, the method comprising: obtaining data indicating (i) a facial template for an input facial image, and (ii) reference facial templates for multiple reference facial images; computing, by a first facial matching module, a first set of scores representing respective similarities between the input facial image and each of the obtained reference facial templates; determining, by the first facial matching module and based on the first set of computed scores, that the input facial image does not match any of the multiple reference facial images; in response to determining that the input facial image does not match any of the multiple reference facial images, computing, by a second facial matching module, a second set of scores representing respective similarities between the input facial image and each of the obtained reference facial images, wherein the second facial matching module applies a facial verification technique that has a higher sensitivity than a facial verification technique applied by the first facial matching module; determining, by the second facial matching module and based at least on the second set of computed scores, that the input facial image matches a particular reference facial image from among the multiple reference facial images; combining the first set of scores and the second set of scores to compute a match score between the input facial image and the particular reference facial image; and providing the match score for output.