<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ankan Giri</title>
    <description>The latest articles on DEV Community by Ankan Giri (@ankan0503).</description>
    <link>https://dev.to/ankan0503</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4150086%2F70c4102c-68df-4b84-b2f2-661c92115fc7.jpg</url>
      <title>DEV Community: Ankan Giri</title>
      <link>https://dev.to/ankan0503</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ankan0503"/>
    <language>en</language>
    <item>
      <title>Kiska Kachra: an open-weight AI in your phone's browser that asks whose trash this is</title>
      <dc:creator>Ankan Giri</dc:creator>
      <pubDate>Sun, 11 Oct 2026 18:27:49 +0000</pubDate>
      <link>https://dev.to/ankan0503/kiska-kachra-an-open-weight-ai-in-your-phones-browser-that-asks-whose-trash-this-is-54ho</link>
      <guid>https://dev.to/ankan0503/kiska-kachra-an-open-weight-ai-in-your-phones-browser-that-asks-whose-trash-this-is-54ho</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;*&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Kiska Kachra&lt;/strong&gt; (किसका कचरा, Hindi for &lt;em&gt;"whose trash is this?"&lt;/em&gt;) turns a litter pick-up walk into a &lt;strong&gt;brand audit&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go outside and pick up a piece of litter.&lt;/li&gt;
&lt;li&gt;Snap it. An open-weight AI model &lt;strong&gt;running inside your phone's browser&lt;/strong&gt; guesses the brand (Lay's? Bisleri? Kurkure?) and the item type.&lt;/li&gt;
&lt;li&gt;Confirm or correct the guess with one tap, and it's logged.&lt;/li&gt;
&lt;li&gt;When you get home, you have a ranked list of &lt;em&gt;who&lt;/em&gt; is littering your street, ready to share or export as CSV.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Clean-up drives usually report kilos: "we removed 40 kg of waste." Kilos don't put pressure on anyone. "38% of what we picked up came from two snack brands" does. Brand audits already exist, but they run on clipboards and tally sheets. I wanted the clipboard to be the phone in your pocket, with the AI doing the squinting at logos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who it's for:&lt;/strong&gt; clean-up volunteers, plogging and run clubs, school eco-clubs, anyone who already picks up litter on a walk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The screen is the shortest part.&lt;/strong&gt; Each piece of litter costs about five seconds of phone time: snap, glance, tap. The rest of the walk is eyes on the ground. There's no indoor mode: the app is useless until you step outside and bend down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live app:&lt;/strong&gt; &lt;a href="https://ankan0503.github.io/hf26-week1/" rel="noopener noreferrer"&gt;https://ankan0503.github.io/hf26-week1/&lt;/a&gt; (open it on your phone)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FAnkan0503%2Fhf26-week1%2Fmain%2Fmedia%2Fdemo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FAnkan0503%2Fhf26-week1%2Fmain%2Fmedia%2Fdemo.gif" alt="Kiska Kachra demo: snap, guess, correct, teach, offline, share"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full-quality video: &lt;a href="https://github.com/Ankan0503/hf26-week1/blob/main/media/demo.mp4" rel="noopener noreferrer"&gt;media/demo.mp4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo isn't staged by hand. GitHub Actions recorded it while driving the real app with the real model on a phone-sized screen: snap, guess, fix a wrong guess, teach it a new brand, switch to airplane mode, and share.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Ankan0503" rel="noopener noreferrer"&gt;
        Ankan0503
      &lt;/a&gt; / &lt;a href="https://github.com/Ankan0503/hf26-week1" rel="noopener noreferrer"&gt;
        hf26-week1
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Kiska Kachra (किसका कचरा?): whose trash is this?&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Go for a walk and pick up litter. Snap each piece, and an &lt;strong&gt;open-weight AI model running inside your phone's browser&lt;/strong&gt; guesses which brand made it. You confirm the guess with one tap, and the app keeps the tally. At the end of the walk you have a brand audit of your street that you can share or export as CSV.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Live app:&lt;/strong&gt; &lt;a href="https://ankan0503.github.io/hf26-week1/" rel="nofollow noopener noreferrer"&gt;https://ankan0503.github.io/hf26-week1/&lt;/a&gt;  ·  &lt;strong&gt;Demo video:&lt;/strong&gt; &lt;a href="https://github.com/Ankan0503/hf26-week1/media/demo.mp4" rel="noopener noreferrer"&gt;&lt;code&gt;media/demo.mp4&lt;/code&gt;&lt;/a&gt;  ·  &lt;strong&gt;Eval:&lt;/strong&gt; &lt;a href="https://github.com/Ankan0503/hf26-week1/eval/RESULTS.md" rel="noopener noreferrer"&gt;&lt;code&gt;eval/RESULTS.md&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Built for the Hacktoberfest 2026 DEV Open-Source AI Challenge, Week 1: &lt;em&gt;Touch Grass&lt;/em&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Clean-up drives count kilos. Kilos don't tell anyone &lt;em&gt;whose&lt;/em&gt; packaging keeps ending up in the drain. Brand audits do, but they mean clipboards and tally sheets. Kiska Kachra turns any phone into the clipboard, and it only works if you go outside.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What it does&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📷 Snap or 🖼️ pick a photo.&lt;/strong&gt; The AI ranks about…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Ankan0503/hf26-week1" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Plain HTML/CSS/JS, no build step, MIT licensed. The interesting files are &lt;code&gt;ai.js&lt;/code&gt; (the recognizer), &lt;code&gt;data/labels.json&lt;/code&gt; (brands and prompts), &lt;code&gt;tools/e2e.mjs&lt;/code&gt; (real-model eval + the demo recording) and &lt;code&gt;.github/workflows/verify.yml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  One open-weight model, used zero-shot
&lt;/h3&gt;

&lt;p&gt;I didn't have a labelled dataset of crushed chips packets, and I wasn't going to build one in a week. So the AI is &lt;strong&gt;OpenAI's CLIP&lt;/strong&gt; (ViT-B/16), whose weights are open under MIT. I use the quantized ONNX port by Xenova and run it with &lt;strong&gt;Transformers.js&lt;/strong&gt;. I first used the smaller ViT-B/32. The eval below showed B/16 roughly doubles top-1 accuracy for the same download size, at about 3.7× the compute per photo, so I switched. CLIP embeds images and text into the same space, which makes recognition a lookup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every brand gets several prompt templates ("a photo of {} packaging", "the {} logo", "a crumpled {} wrapper, bottle or can"…). Their text embeddings are averaged into one vector per brand. Averaging prompts like this is a cheap, well-known way to make CLIP more reliable.&lt;/li&gt;
&lt;li&gt;A photo goes through the vision encoder once. Cosine similarity against every brand vector, softmax at CLIP's own temperature, and you have a ranked guess.&lt;/li&gt;
&lt;li&gt;A second set of vectors guesses the item type: chips packet, PET bottle, tetra pak, gutka sachet…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Brands live in &lt;code&gt;data/labels.json&lt;/code&gt;. Adding your city's brands is a one-line pull request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making it phone-friendly
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text embeddings are precomputed.&lt;/strong&gt; CI computes the vectors for the built-in labels and ships them as a small JSON file. A phone downloads only the CLIP &lt;strong&gt;vision&lt;/strong&gt; encoder, not the text one, and each photo costs exactly one forward pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Teach it a brand.&lt;/strong&gt; If you type a brand it doesn't know, the text encoder is fetched lazily and the new brand is embedded on the device and cached, so next time it's one of the suggestions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No CDN at runtime.&lt;/strong&gt; Transformers.js and the ONNX Runtime WASM are vendored into the repo and served by GitHub Pages. A service worker caches the app, Transformers.js caches the weights, and embeddings sit in &lt;code&gt;localStorage&lt;/code&gt;. After the first load it works in airplane mode, which matters because the best litter is never where the signal is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Photos never leave the phone.&lt;/strong&gt; They're downscaled on a canvas, embedded, and thrown away. The only thing stored is &lt;code&gt;{time, brand, item}&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Human in the loop, on purpose
&lt;/h3&gt;

&lt;p&gt;The AI never logs anything by itself. The top guesses appear as chips with confidence percentages. Below 50% nothing is pre-selected, and the app says plainly that it isn't sure. I picked that threshold from the eval's calibration table: above 50%, the pre-selected brand was right 18 times out of 19. At 35% it was only 21 out of 30, and a wrong pre-selection that someone logs without looking corrupts the audit. The AI makes logging fast. The human keeps the data honest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing a phone AI without a phone
&lt;/h3&gt;

&lt;p&gt;I built this from a cloud sandbox while away from my laptop, so the real test had to be automated. On every push, a GitHub Actions workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;downloads freely licensed product and brand photos from Wikimedia Commons and Open Food Facts,&lt;/li&gt;
&lt;li&gt;runs the &lt;strong&gt;same &lt;code&gt;ai.js&lt;/code&gt; the app uses&lt;/strong&gt; in headless Chromium and measures accuracy and speed for a few model and prompt configs,&lt;/li&gt;
&lt;li&gt;writes the precomputed embeddings,&lt;/li&gt;
&lt;li&gt;drives the real app on a phone-sized screen and records the demo video above.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Real results from CI&lt;/strong&gt; (headless Chromium on a GitHub runner CPU; a phone will be slower):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Prompts&lt;/th&gt;
&lt;th&gt;Top-1&lt;/th&gt;
&lt;th&gt;Top-3&lt;/th&gt;
&lt;th&gt;ms / photo&lt;/th&gt;
&lt;th&gt;Phone download&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Xenova/clip-vit-base-patch16&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ensemble&lt;/td&gt;
&lt;td&gt;33%&lt;/td&gt;
&lt;td&gt;47%&lt;/td&gt;
&lt;td&gt;812&lt;/td&gt;
&lt;td&gt;87 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Xenova/clip-vit-base-patch16&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;single&lt;/td&gt;
&lt;td&gt;31%&lt;/td&gt;
&lt;td&gt;45%&lt;/td&gt;
&lt;td&gt;811&lt;/td&gt;
&lt;td&gt;87 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Xenova/clip-vit-base-patch32&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ensemble&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;38%&lt;/td&gt;
&lt;td&gt;221&lt;/td&gt;
&lt;td&gt;89 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Test set: 122 freely licensed photos across 41 brands; chance level is about 2%. It's small and noisy (Commons search results aren't all litter), so treat it as a smoke test, not a benchmark. Full per-photo results: &lt;a href="https://github.com/Ankan0503/hf26-week1/blob/main/eval/RESULTS.md" rel="noopener noreferrer"&gt;&lt;code&gt;eval/RESULTS.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it can't do (yet)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CLIP reads logos by looks, not by text.&lt;/strong&gt; Big, iconic packaging is recognised well. A sun-bleached, muddy, regional-brand wrapper often isn't. The confirm step exists because of this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The first load is heavy&lt;/strong&gt; (the vision encoder). Do it on Wi-Fi. The app shows the exact size while it downloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-threaded WASM.&lt;/strong&gt; GitHub Pages can't send the headers multi-threading needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's one person's tally.&lt;/strong&gt; There's no shared map or city leaderboard yet. That's the obvious next step, and the hard part is doing it without carelessly collecting where people walk.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;The open pieces aren't a nice-to-have here. They're the only reason this works at all.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It works where litter is, with no signal.&lt;/strong&gt; The model runs in the browser tab. After the first load you can put the phone in airplane mode and keep logging. A closed vision API would need a connection for every single photo, in exactly the places (drains, empty lots, riverbanks) where there often isn't one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The photos stay on the phone.&lt;/strong&gt; People photograph trash on &lt;em&gt;their&lt;/em&gt; streets, sometimes with houses, cars or faces in the frame. With an open model, nothing leaves the device. There's no server, no account, nothing to leak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs nothing to run, forever.&lt;/strong&gt; No API key, no per-image bill, no free tier to run out of. A clean-up drive with 200 volunteers snapping 50 items each is 10,000 inferences. With an open model that costs nothing, on hosting that's free (GitHub Pages).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I could measure and swap models.&lt;/strong&gt; Because the weights are open, I could run my own eval in CI and pick the model on evidence. The smaller ViT-B/32 got 20% top-1. ViT-B/16 got 33% for the same 87 MB download, so I switched. I could also precompute the text side of the model so phones only download its vision half, and tune the confidence threshold from real calibration data. A closed API gives you none of those knobs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The audit is checkable.&lt;/strong&gt; A brand audit only persuades if people can check how it was counted. With an open model, an open label list, open code and a published eval, anyone can see exactly how "Lay's: 7" was produced, and anyone can add the brands littering &lt;em&gt;their&lt;/em&gt; street with a one-line pull request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This whole thing is a chain of things people gave away: OpenAI's CLIP weights, Xenova's ONNX conversion, Hugging Face's Transformers.js, Microsoft's ONNX Runtime, and Wikimedia and Open Food Facts contributors' freely licensed photos that let me test it honestly.&lt;/p&gt;

&lt;p&gt;Thanks for reading. Now go pick something up. 🌳&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>I've never run an AI model on my own machine. This month I will.</title>
      <dc:creator>Ankan Giri</dc:creator>
      <pubDate>Sat, 03 Oct 2026 06:17:24 +0000</pubDate>
      <link>https://dev.to/ankan0503/ive-never-run-an-ai-model-on-my-own-machine-this-month-i-will-1k37</link>
      <guid>https://dev.to/ankan0503/ive-never-run-an-ai-model-on-my-own-machine-this-month-i-will-1k37</guid>
      <description>&lt;p&gt;Hi DEV, I'm Ankan, a CS student. I build whole projects end to end — the code that runs on a tiny chip, the server behind it, and the website on top. One habit I've picked up: I like models I can understand. If I can't look at what a model learned and explain it in plain words, I don't trust it enough to put it in front of people. I also keep a list of the things my projects can't do. A missing feature is fine. A feature that looks real but is actually made up is not.&lt;/p&gt;

&lt;p&gt;This year's Hacktoberfest theme is AI Belongs to Everyone — open-source AI. That hits the one gap I have. I do train models, but small ones, the kind I can read line by line and check myself. Every time I added an AI feature to something, I just sent a request to someone else's API and hoped the answer was right. That's the opposite of how I write everything else. So this month I want to run an open-weight model on my own machine and test it like any other part of my backend: how much memory it needs, how slow it gets, when it breaks under load, and how I can tell when it's wrong. If you know good issues for someone like me — open-weight tools, inference servers, ML on small devices — send them my way. And if you've run a model yourself and hit a problem no tutorial warned you about, I'd really like to hear it before I run into it at 3am. 🎃&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>ai</category>
      <category>iot</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
