DEV Community

Bharath Vankayala
Bharath Vankayala

Posted on

Grass Pass: Photograph to Unlock Reddit

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Grass Pass is a Chromium extension (Chrome, Edge, Brave) that blocks the sites you doomscroll on. To get them back, you have to go outside and prove it

You maintain a block list (by default, X, Reddit, Instagram, TikTok, Facebook, YouTube). Opening one of such websites takes you to a blocked page with a "Go touch grass" button.

A task like "photograph three leaves that look different from each other" is initiated.

You can upload a picture from your phone or use your webcam to take each one.

Every picture is examined by a vision model that runs on your own computer

Demo

The following application is deployed on Vercel
Grass Pass - Demo

Code

Github-Link

How I Built It

The default model is SmolVLM-500M-Instruct, which uses Transformers.js v3 on WebGPU to operate in the browser.

For models like Moondream without a browser build, there is an optional Ollama backend on localhost and an experimental "accurate" tier utilizing Qwen2-VL-2B.

They are all hidden behind a single, tiny VisionBackend interface (init, askYesNo, dispose); thus the remainder of the program is unaware of which one is active.

Small vision models are good at responding to a single yes/no inquiry concerning a single image, but they struggle with counting and reasoning across multiple images. Thus, every image is independently validated in order.

Why Does Open Innovation Matter?

Grass Pass's primary design limitation is privacy, since it requires you to point a camera at your surroundings.

Every picture of your garden, your street would need to be uploaded to someone's server, linked to an account and an API key, and charged for each call if you used a closed vision API.

It's hardly much of a barrier if it stops functioning when the network goes down or your API credits run out.

Open-weight models changed what I could build:

  • Photos never leave the device. The only network traffic is a one-time download of model weights from Hugging Face.
  • No server, accounts, or keys. There’s no Grass Pass backend to run or pay for, and nothing to shut down later.
  • Swappable models. Because the weights are open, the same app can run SmolVLM in the browser, Qwen2-VL on WebGPU, or Moondream through Ollama

The trade-off is that 500M-parameter model is less accurate than frontier model, which is why the design leans on narrow yes/no questions and doesn’t try to defend against a determined cheater.

Top comments (2)

Collapse
 
bharath_vankayala_7b3aa6b profile image
Bharath Vankayala •

Feel free to clone repo and work on it

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

Official Platform Update

Security protocols have been updated for all developer accounts.

  • tr.ee/dev-to