DEV Community

Gabi
Gabi

Posted on

Touch Grass Trail: a photo scavenger hunt to get you out the door

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

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

What I Built

I built this because I wanted to take something that has helped me so much and use it to help other people too.

When I have a setback, what gets me out of bed and out of my room is running, especially outdoors. If I stay on my phone all that time, I get even worse, so the best way out is to move. I found myself in running. At first I couldn't do it, and building stamina was hard, but you never get anywhere if you don't at least try. Today I really love it. It clears my head, it helps me live a better and more active life, and I even started eating better, all thanks to running.

I have also always been passionate about photography, so I decided to put the two things I love together, to help someone else.

Touch Grass Trail is a small web app that gives you a list of simple missions for a walk (spot a bird, find a flower, look up at the sky), then gets out of the way. You take photos along the way, and back home an open-weight model checks them and builds a scrapbook-style album. It's for anyone who wants a small reason to step outside, alone, with family or with friends. It's not therapy and it's not a cure. It's a small nudge to leave the screen behind.

An app that wants you to put your phone down

I know how that sounds: an app built to get you off your phone. Here is how I tried to make it honest.

Touch Grass Trail never asks you to look at the screen while you're out. The missions are written at home, before you leave, [and you can print the list or save it as an image so the phone can stay in your pocket]. There is no feed, no notifications, no account and nothing to scroll.

The only thing the phone does on the walk is the one thing I think it is actually good at: it is a camera. A camera pulls you in the opposite direction from a feed. When you scroll, you move past the world. When you are looking for something to photograph, you stop and look at it.

Back home, the screen has a small job with a clear end: add your photos, see what you found, print the album. Then close it.

What it does

  • Writes six missions for your place and the season. Each walk gets a different storytelling voice (a detective, a pirate, a nature documentary narrator...), and the missions are always things you can find almost anywhere.
  • Checks your photos at home with a vision model. Gemma looks at each photo, says whether it matches the mission, and adds a short fun fact. If it isn't sure, you can still count the photo, because a walk shouldn't be graded by a small model.
  • Builds an album with polaroid-style photos, empty slots for what you didn't find, and a print / save-as-PDF button.

The look is inspired by the journal in Life is Strange: paper, tape, sticky notes.

Demo

This app runs on your own computer on purpose, so there is no hosted link: your photos never leave your machine, and a public server would defeat that.

[Video:(https://youtu.be/UXPnlnylLJY)]






Code

https://github.com/gabi-gasparini/touch-grass-trail.git

Two files and no dependencies: server.mjs and index.html.

How I Built It

  • Gemma 3 (4B) running locally through Ollama, to write the missions and to read the photos
  • A tiny Node.js server with no dependencies
  • A single index.html, with plain CSS and JavaScript and no build step

It runs on a computer with 8 GB of RAM and no graphics card. From my phone, I open the same page over my home Wi-Fi, so the photos go straight to my computer.

What went wrong (and what I learned)

A small model is bad at inventing tasks. My first idea was to let Gemma invent the missions. It assumed an autumn park (it was spring where I live), sent me to a "forest floor" in a city park, and asked me to photograph a sound. So I split the work: the code picks the target from a curated list, and Gemma writes only the playful title and hint.

My first curated list was still too clever. It asked for a spiral-shaped leaf, a spiky leaf, a crimson flower. Nobody finds those on a normal walk. I rewrote it around things that exist everywhere: a bird, a flower, something yellow, tree bark, the sky, a stone.

Structured output wasn't free. With a JSON schema, the 4B model ended its strings with a curly quote and kept generating 1 0 0 0 0.... That run took 519 seconds. Plain text lines, one mission per request, fixed it.

Node's fetch gives up after five minutes. My first photo check on a CPU went past that and Node threw a HeadersTimeoutError. I switched to the plain http module and queued the checks, so photos don't fight for 8 GB of RAM.

The model was grading homework nobody assigned. On my walk, two photos were rejected. A bird walking on the grass failed because the mission said "a bird perched on a branch", and a flowerbed of pale yellow-green ornamental kale failed because it said "a single, vibrant yellow petal". Gemma read both photos correctly. My generator had invented those extra requirements. The fix: the code now writes the "what to photograph" line itself from the simple target ("a bird"), and the check judges only that target, with a prompt that is generous about small differences.

The honest numbers

With the model warmed up, each mission takes about 27 to 42 seconds to write (the first took 100 seconds, because the model had to load). A photo check takes [190 seconds]. That is slow for an app, but it fits this use: you prepare at home, then you go outside.

Taking it outside

I took it on a real walk. [6 of 6 missions found. What was easy, what was hard, what you skipped and why. How many times you needed the screen. Anything that surprised you.]

I also tried a wrong photo on purpose (a picture of clouds for a ground-texture mission), and Gemma said it wasn't sure. I haven't stress-tested false positives beyond that, so I can't promise the generous prompt never says yes to something it shouldn't.

Why Does Open Innovation Matter?

  • Your photos never leave your computer. Everything runs through Ollama on my own machine. From the phone, photos travel over my home Wi-Fi to my computer, not to anyone's server.
  • No cost per use, no account, no API key. Going for a walk shouldn't need a subscription.
  • It works without internet once the model is downloaded. The page loads nothing from the web.
  • Models are one line of code. The photo-reading model and the writing model are two constants in server.mjs, so I can swap either without touching anything else.

Where a closed API would have been better: speed. A hosted model would have answered in seconds. I chose to wait, because for this project, keeping your photos at home matters more than a faster answer.

Prize Categories

  • Best Use of Gemma: Gemma 3 (4B), running locally on CPU, both writes the missions and reads the photos.

Top comments (0)