Had seen the idea proposed many times, never successfully. Really a specific kind of sensor. Now add image recognition to it to get inventory. It was pointed out to me that there are many practical problems with such a sensor. Lots of previous posts on the frig, see tag below.
FridgeCam lets you make your dumb fridge smart with a simple camera
Why replace an entire fridge when you can stick a camera inside the one you have? by Valentina Palladino
LAS VEGAS—Companies love to debut as many "smart" home products as possible at CES to show that Wi-Fi in anything could make your life easier. LG is a perfect example as it just announced a new smart refrigerator (pricing info not disclosed yet) and the plan to put Wi-Fi in a number of its connected appliances. But investing in the smart home doesn't mean you have to drop thousands of dollars on a whole new fridge or oven. At CES, the London-based company Smarter announced its new FridgeCam, a small circular camera you stick on the inner door of your refrigerator to monitor the food you have. ... "