The software maps the unique distances between points on a face
The supermarket chain Budgens has installed face recognition cameras in one of its stores to stop children buying alcohol and cigarettes.
It is thought to be the first time a UK retailer has used the technology to identify underage customers.
The scheme is being piloted at an unnamed branch of Budgens in London.
If the system recognises someone who has previously been unable to prove they are 18, a signal alerts the cashier who will refuse to serve them.
Facial recognition software makes a unique template of an individual's features by taking measurements between key points on the face.
Three cameras have been installed at the pilot branch, one in each checkout lane.
The cameras monitor customers as they approach the tills, transmitting the pictures to a control centre in Worcester.
The customers' facial features are automatically scanned against a database of images of young people who have visited the store before.
Anyone who has been refused alcohol or cigarettes on a previous occasion will be flagged up.
The system also identifies when a customer has previously verified that they are 18 or over, enabling the sale to proceed more quickly.
Young customers who are not recognised by the system will be asked by the cashier to provide proof of their age when buying drink or cigarettes.
Their details will then be added to the database.
Charlie Willetts, managing director of Charton Ltd, which is supplying the software, said about 1,500 images were currently stored on computer, but it had the capacity for almost two million.
He said other supermarkets and convenience stores were interested in linking the scheme to their own shops to create a giant database of customers.
The system should make it easier for shop staff to spot underage drinkers
But Mr Willetts said the system had to overcome a number of technical issues first and ensure that it was compliant with data protection laws.
The storage of large amounts of data is also likely to fuel concerns about civil liberties.
Face recognition technology is increasingly used by police and other law enforcement agencies to match CCTV footage of suspects with images of known offenders.
It is also used by some companies to verify the identity of employees.
In the summer, trials will begin at airports to scan the facial details of some passport-holders.