Easiest way would be to use RFID tags. Many products have them hidden in their packaging already, and for those that don’t you can use a reusable RFID sticker
Image recognition would be somewhat possible, but honestly, a far more intensive process and over engineered.
All that said, this is overkill for the average home. Even me, with ADHD and forgetting what I have if I can’t see it, thinks this is a bad solution for me. I’d rather just keep my fridge at no more than 60% capacity so I can easily manage my fridge by always seeing the contents when I open it.
Sara Nelson is up for election next year. She’s repeatedly pissed off the constituents too. One of the biggest gaffs was when her friend, Tanya Woo, ran for city council and had a clear decisive loss. Not long after one of the the other council reps stepped down and Sara appointed Tanya to that seat. This last election Tanya had to run again To retain the seat and was, you guessed it, had a decisive loss.
Sara is going to lose the council seat next year, but the damage she’s caused will take a while to fix.