Inspiration
Kazakhstan sorts household waste into three fractions: dry, wet and hazardous. The rules were tightened again on 9 November 2026: sorted fractions must not be mixed at any later stage. Astana has 17,000+ eco-bins, but people still stand in front of them unsure. Is a pizza box dry? A wine glass? A dead phone? One wrong item can spoil a batch of recyclables, or start a fire in a garbage truck if it's a battery.
What it does
- Take a photo of one item and get the bin (Dry, Wet or Hazardous) plus a one-line prep tip.
- No upload, no account: the model runs in your browser.
- "Not sure" is a real answer. When the evidence is weak or two bins are tied, Qaldyq asks instead of guessing.
- Safety rule: anything with a 20%+ chance of being hazardous is never silently sent to a yard bin.
- Teach it: tap the right bin and Qaldyq remembers. Similar photos are sorted correctly next time.
- A personal counter of items sorted, and how many were kept out of the dry bin.
- English and Russian.
Expected environmental impact
Kazakhstan produces more than 4.5 million tonnes of municipal waste a year, and in 2024 only 25.8% of it was recycled against a 30% target (Government of Kazakhstan, March 2025). Two everyday mistakes at the bin make this worse, and Qaldyq is designed against both:
- Contamination of recyclables. Food or a greasy box in the dry bin can spoil a whole batch. Qaldyq separates dry from wet and adds a prep tip, such as "empty and rinse".
- Hazardous items in household bins. Batteries, lamps and electronics pollute soil and can start fires in garbage trucks. Qaldyq never sends an item with a 20%+ chance of being hazardous to the dry or wet bin.
There is nothing to install and no sign-up, so using it at the bin takes one camera tap. The personal counter shows how many items a person sorted and how many they kept out of the dry bin. We have not measured real-world impact yet; that needs a pilot in a residential complex (see What's next).
How we built it
- MobileNet v2 in TensorFlow.js gives the top-5 ImageNet classes and a 1280-dimensional embedding, all on-device.
- 140+ ImageNet classes are hand-mapped to Kazakhstan's three fractions with bilingual tips. A unit test checks that every key is a real ImageNet class.
decide()sums probability mass per fraction and refuses when coverage < 25%, margin < 15%, or hazard share ≥ 20%.- Personalisation is k-NN (cosine ≥ 0.8, k = 3) over the user's own corrections, stored as compact embeddings in localStorage. Few-shot learning with no server.
- Plain HTML/CSS/JS, 15 unit tests, hosted on GitHub Pages.
Challenges we ran into
ImageNet wasn't made for trash. It has no aluminium-can or Tetra Pak class. Instead of pretending, we made uncertainty a feature: "Not sure" plus one tap to teach. We also had to decide what's worse: a wrong "dry" contaminates recycling, and a wrong "wet" on a battery is a fire risk. Hence the asymmetric hazard rule.
Accomplishments that we're proud of
- Fully on-device and private, so it works for anyone with a phone browser.
- An honest model that says when it doesn't know.
- Real few-shot learning from user corrections, with no backend.
What we learned
In a safety-relevant domain, calibrated refusal is more useful than a confident wrong answer, and personal correction can cover a model's blind spots cheaply.
What's next for Qaldyq
- Collect 200+ labelled photos of real Astana waste and add them to the public benchmark.
- Fix the over-cautious hazard flag on bottles and cans, tested on a held-out split.
- Fine-tune a small head on that data for items ImageNet lacks (cans, Tetra Pak, batteries).
- A map of verified hazardous-waste and e-waste drop-off points, e.g. via the EcoQolday platform used in Astana's "Taza Үй – Taza El" project.
- A Kazakh language interface and a kiosk mode for residential-complex bin areas.
Testing and limitations
We tested Qaldyq on TrashNet: 2,527 photos of single waste items (cardboard, glass, metal, paper, plastic and mixed trash). The benchmark page is public and runs in your browser: https://bekdauletbol.github.io/qaldyq/bench.html
- Qaldyq named a bin for 57% of photos and said "not sure" for the rest.
- When it answered, it was right 62% of the time.
- Errors that would contaminate recycling (dry and wet mixed up) were about 6% of photos.
- The most common mistake is over-caution: about 16% of photos, mostly bottles and cans, were flagged as possibly hazardous because ImageNet confuses them with pill bottles, lighters or syringes. That is the safe direction for this domain, but it is annoying, and it is the next thing we will fix, with a held-out test split so the benchmark stays honest.
Other limits: single-object photos only; TrashNet photos are cleaner than real Astana waste; corrections stay in one browser. 15 unit tests cover the class-to-bin mapping and the decision rules.
Built during the event
All Qaldyq code, the class-to-bin mapping, the decision rules and the benchmark were written from 30 November 2026. Pre-existing components: MobileNet v2 with ImageNet weights and TensorFlow.js (in the app), and the TrashNet dataset by Gary Thung and Mindy Yang (for evaluation only).
AI disclosure
Code was written with the help of an AI coding assistant (Claude). The idea, the rules mapping and the testing were reviewed by the author.
Built With
- css3
- github
- html5
- javascript
- machine-learning
- mobilenet
- tensorflow.js