Personal project · 2026
SnapShelf
Choose the model in the kitchen, not in the lab.
A kitchen inventory app that reads a photo of your shopping, built on my dissertation research into which vision model does that best.
- Stack
- React Native, FastAPI, PostgreSQL, GPT-5.2, YOLOv8, TensorFlow
- Research
- BSc dissertation, Anglia Ruskin
- Training data
- 120,842 images, three public datasets merged
- Test set
- 120 kitchen photos I took, on Hugging Face
Why it matters
A lot of food waste at home happens because people forget what they have, and inventory apps fail because typing everything in is too much work. SnapShelf swaps the typing for a photo, which only works if the app can read a real photo of real shopping. I started it as a personal project, then took the chance to research that question for my BSc dissertation at Anglia Ruskin. In the first experiment I trained three CNNs on 120,842 images, merged from three public datasets with the duplicates removed. In the second I compared whole pipelines on 120 kitchen photos I took myself. SnapShelf is built on the approach that won.
How it works
Snap the shopping, and the vision model lists every item in it.
Photo
Your shopping, in one picture
Expo · sent at 1024 px
Barcode
The phone reads it itself
EAN and UPC
Backend
Asks the right service
FastAPI
GPT-5.2
Names each item and its amount
OpenAI · JSON · the research pick
chicken breast · 500 g
Open Food Facts
Looks up the barcode
one item · 100 g unless changed
Expiry
Tidies each item, then dates it
shelf‑life table
- category and unit fixed
- expiry predicted
Expires: 2026‑11‑01
Review
Nothing counts until you confirm
drafts · one confirm route
- edit if wrong
- confirm or skip
Item added to inventory!
Inventory
What goes off first, on top
PostgreSQL · confirmed only
4 expiring soon
Recipe ideas
Built around what expires first
OpenAI · gpt‑4o‑mini
Uses 3 items expiring in the next 3 days
Decisions I made
Test the approaches before building on one
The plan was one custom CNN. Vision-language models improved so fast while I read the literature that the better question became which approach to build on at all. So I compared three pipelines on 120 photos I took and labelled in a real home: GPT-5.2, a YOLOv8 detector trained on 14 kinds of produce, and YOLO finding each item with a CNN naming it: EfficientNetB0, the best of the three CNNs from the first experiment. Each photo was also blurred, noised and JPEG-damaged.
Trade-off. A small test: 120 photos from one home and one phone, all taken and labelled by me. My YOLO baseline was also undertrained, so its score sits below what YOLOv8 usually reaches.
Accuracy over speed and offline use
GPT-5.2 came first on clean, blurred, noisy and compressed photos. On clean ones it scored F1 0.900, against 0.603 for YOLO and 0.547 for YOLO with the CNN, and damage cost it at most 0.034, against 0.350 for YOLO. Gemini 3.1 Pro scored 0.004 higher but was 2.4 times slower and 2.7 times dearer, so SnapShelf runs GPT-5.2.
Trade-off. In the tests a photo took 2.3 to 10.7 seconds and about $0.004, and it needs a network; YOLO was 10 to 50 times faster and runs offline. The scores also cover only 14 kinds of produce, while the app asks about any food.
Nothing counts until you confirm it
Even the winner miscounts: all 126 of its false positives on clean photos were grapes, counted one by one where my labels counted the bunch. So whatever a photo or a barcode returns lands in a review list as a draft, and the only way into the inventory is a confirm step that needs every field filled in.
Trade-off. Every scan ends with a review, a little of the typing the app exists to remove. Add All confirms a whole photo in one tap.
Gallery
Results on 120 kitchen photos
| Pipeline | F1, clean photos | Worst drop when damaged | Time per photo |
|---|---|---|---|
| GPT-5.2 | 0.900 | 0.034 | 2.3 to 10.7 s |
| YOLOv8s, 14 classes | 0.603 | 0.350 | 0.2 to 0.5 s |
| YOLOv8s + EfficientNetB0 | 0.547 | 0.180 | 0.9 to 1.3 s |
The full engineering is on GitHub.