Microsoft yesterday received a patent for augmented reality glasses that act as that little voice telling you not to eat that third slice of pizza.

The glasses would, according to the patent, have sensors that can identify food that the user is looking at and relay nutritional information either from a restaurant, food company or other source. Based on the user’s actions, the glasses know how much is being eaten. For example, if the glasses see a full plate of food and watch the user pick up food, it listens as it is chewed. If it later sees only half the plate, the device will assume the user has eaten part of the meal and track that information accordingly.

The glasses are able to track consumption over time. So when users have already had a big meal that day, the device can warn them later that they might be running up against their calorie limits for the day.

Beyond tracking individual diets, the glasses would have a social component. That could mean when users walk into the restaurant, the glasses display reviews of the place written by friends. Users could also send nutritional information to each other.

Wearable health-focused technology has become a huge industry, with countless fitness trackers like Fitbit and other gadgets that chronicle users’ daily activity. Microsoft itself got into this arena with the Microsoft Band, as part of the Microsoft Health platform that debuted in 2014, but ceased production of the fitness trackers last year.

Many of these wearable devices track physical activity and other aspects of daily life like sleep cycles. But automatically registering users’ food intake has been a challenge, and most fitness platforms rely on the individual to log food manually.