Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
Inspiration
Every household asks several times a day: which bin does this go in? In Spain, Ecoembes reports that 28.6% of what goes into the yellow bin is not packaging (2020). The mistakes are systematic: drink cartons in the blue bin, thermal receipts and dirty napkins treated as paper, drinking glasses in the glass igloo, toys and toothbrushes in the yellow bin because they are plastic.
What it does
TiraBien answers in Spanish or English, for Malaga. Take a photo or type an item and it tells you the bin, the reason, the most common mistake for that item, and the nearest real container with walking time on a map. It covers the five street bins plus textile, used-oil and battery containers, clean points and pharmacy medicine take-back (73 items, 10 routes).
How we built it (AI implementation)
- Model: SigLIP (Xenova/siglip-base-patch16-224), run in the browser with transformers.js / ONNX Runtime Web (WASM, int8 vision tower, ~100 MB, cached). About 2 s per photo on a laptop CPU, in a Web Worker.
- Zero-shot matching: the text side of SigLIP runs once offline over 74 label descriptions and ships as a 300 KB embedding file; only the vision tower runs on the device. Logit = scale x cosine + bias, with scale and bias fitted from the model's own outputs (residual 4e-6).
- Responsible use by design: the AI never decides the bin. It only says which catalog item the photo resembles. The bin comes from a hand-written rule catalog that cites its public sources. Answers are graded confident / likely / unsure / not-waste, and below the threshold the app shows its top candidates and asks instead of guessing. Photos never leave the device: no server, no account, no tracking. Location is optional and stays on the device.
- Real data: 14,400 container locations from Ayuntamiento de Malaga open data (CC BY 4.0) and OpenStreetMap (ODbL), searched with a grid index verified against brute force.
Measured, not claimed
On 272 real Wikimedia Commons photos of 37 items, the bin is right 96.8% of the time when the app answers confidently (150/155 photos, 57% of all) and 79.4% if forced to answer every photo; the exact item is in the top 3 in 84.6%. The threshold was chosen on the same photos, so 96.8% is optimistic. Full report with the wrong-but-confident cases: eval/RESULTS.md in the repo.
Challenges
Photo sets from the internet are noisy (concert photos labelled as cartons), so we removed 22 photos that plainly did not show the item and published each exclusion with its reason. A real bug taught us a lesson too: nearest-container search froze for users far outside Malaga, now fixed and covered by a test.
Limitations
Malaga only. Rules come from public Limasam, Ecoembes and Ecovidrio guidance and are not audited by Limasam. OpenStreetMap lists only 27 brown (organic) bins in the city, so the food-waste map is sparse and the app says so. Accuracy figures come from internet photos, not phones in kitchens. Coffee capsules are flagged as a rule that is changing (EU law counts them as packaging since 12 Aug 2026; Spain has not updated its rules).
What's next
Audit the rules with Limasam, evaluate on phone photos taken in real kitchens, and extend to other Spanish cities by swapping the rule and container files.
Transparency
Designed and written with an AI coding assistant (Claude Code), which also chose the concept on the author's behalf; the author reviewed it and is responsible for it. Started on 18 Nov 2026, inside the hackathon period. The same project is also entered in Arbiter Hacks V1.
What we learned
What's next for TiraBien
Built With
- github
- leaflet.js
- onnx-runtime-web
- openstreetmap
- siglip
- transformers.js
- typescript
- vite
- vitest