A "smart" vending machine that analyses users' age and gender has been launched in the US by Intel and Kraft Foods.
It allows Kraft to tailor the product to the shopper, and exclude children from the adult-focused promotion.
Intel says it intends to retrofit the technology to existing vending machines to allow companies to study what type of people are buying their products.
The machine uses an optical sensor fitted to the top of the machine to recognise the shape of the human face. A computer processor then carries out a series of calculations based on measurements such as the distance between the eyes, nose and ears.
These are used to determine the sex of the shopper and place them in one of four age brackets. This data is then used to determine what, if any, product the shopper should be served.
"It's actually very quick - it's a fraction of a second," Michelle Tinsley, Intel's general manager of personal solutions told the BBC.
"We have trained the software to do this via machine learning on a bunch of pictures of human faces.
"It does the calculations very quickly right there on the machine - it does not need to go off into the internet or cloud - and then based on that will recognise that you fit a certain demographic."
Trial run
Intel stress that the machine does not take any photographs or video, so there is no footage for hackers to steal or employees to misuse.
Kraft is using the devices to trial Temptations - a jelly-based dessert. The product is marketed as "the first Jell-O that's just for adults", so if the machine detects a child it asks them to step away.
To maximise the opportunity, the firm has picked two busy locations for the initial roll-out: The Shedd Aquarium in Chicago and the South Street Seaport ferry service in New York.
"We only have two iSample machines in the US so far, as this is a test and learn from experience," said Ed Kaczmarek, director of innovations and consumer experiences at Kraft.
"Our ultimate goal is to bring value to both our retailers and our brands by better understanding consumer engagement with our products.