{"slug": "treetrail-bengaluru-tree-walks-curated-by-local-gemma", "title": "TreeTrail: Bengaluru Tree Walks Curated by Local Gemma", "summary": "A developer built TreeTrail, a walking app that maps Bengaluru's BBMP tree census — 72,456 trees in the bundled January 2025 South Zone snapshot — and uses Gemma 3 4B running locally through Ollama to generate tree trivia and curate short exploration loops exportable as GPX. The app shows the 450 nearest trees out of thousands in a pocket, adds observation prompts at each stop, and offers an optional live OpenStreetMap mode via Overpass for areas like Lalbagh and Cubbon Park, with no hosted inference calls or per-query AI costs.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass](https://dev.to/challenges/hacktoberfest-week1-2026-10-05)*\n\nMost apps that tell you to go outside start with a goal:\n\nWalk 5,000 steps. Burn 300 calories. Hit your daily target.\n\nI wanted to try something different.\n\nWhat if the reason to walk was simply:\n\nGo find these five trees.\n\nSo I built TreeTrail — a small walking app built around Bengaluru's public tree data.\n\nIt takes a tree census, puts the trees on a map around you, lets you tap them for local-AI trivia, and turns a handful of trees into a short exploration loop you can save or export as GPX.\n\nNo fitness score.\n\nNo leaderboard.\n\nNo gamification.\n\nJust a map full of trees and a reason to go look at them.\n\nThe surprising part: there are a lot of trees\n\nThe starting point is the BBMP tree census.\n\nFor the current South Zone snapshot, I bundled the January 2025 public-domain dataset directly into the app. It contains 72,456 mapped trees across the dataset.\n\nWhen you open a small pocket around Basavanagudi, TreeTrail can find thousands of trees.\n\nFor the initial view, I show the 450 nearest.\n\nThat little counter — 450 shown / 6,850 found — ended up being one of my favorite parts of the demo.\n\nIt makes the density of the city visible.\n\nThese aren't abstract numbers in a spreadsheet anymore. They're dots you can actually go and look for.\n\nThe basic loop\n\nThe flow is deliberately simple:\n\nPick a pocket → explore trees → choose a few → curate a loop → walk it.\n\nFor example, start in Basavanagudi.\n\nThe map fills with nearby trees.\n\nTap one.\n\nInstead of getting a giant botanical database entry, you get a small piece of context generated locally by Gemma 3 4B running through Ollama.\n\nThen add another tree.\n\nAnd another.\n\nMaybe five is enough.\n\nHit Curate loop.\n\nThe model orders your selected stops into a compact exploration loop.\n\nSave it.\n\nOr export the GPX and take it with you.\n\nThe point isn't to optimize the perfect route.\n\nIt's to give you a reason to leave your screen.\n\nA walk with something to notice\n\nThere's another small feature that matters more than I expected.\n\nAt each stop, TreeTrail gives you an observation prompt.\n\nLook at the leaves.\n\nCompare the bark.\n\nNotice the shape of the canopy.\n\nLook at the tree next to it.\n\nThat changes the nature of the walk.\n\nYou're not just accumulating distance.\n\nYou're paying attention.\n\nA 20-minute walk suddenly has a little mission attached to it:\n\nCan you find the five trees?\n\nAnd when you get there, you actually have something to look at.\n\nThe AI is intentionally local\n\nOne of the reasons I built this this way was to see how much of the experience could happen locally.\n\nThe tree trivia and trail curation run on my laptop using Gemma 3 4B.\n\nThere are no hosted inference calls and no per-query AI bill.\n\nThat also makes the architecture a little more interesting.\n\nThe tree census is local data.\n\nThe model is local.\n\nThe app can work from the bundled dataset without an API key.\n\nThere is still an internet dependency: map tiles come from the internet, and the optional OpenStreetMap mode queries Overpass for live community-mapped data.\n\nI think being explicit about that distinction matters.\n\n\"Local AI\" shouldn't quietly become \"the whole application is offline.\"\n\nThen I added OpenStreetMap\n\nTreeTrail also has an optional live OpenStreetMap mode for places like Lalbagh, Cubbon Park and Indiranagar.\n\nThat gives the app a second, very different kind of open data source.\n\nThe BBMP dataset is a civic snapshot.\n\nOpenStreetMap is a continuously editable community map.\n\nAnd the app labels the source of each tree so you're not left wondering where a particular point came from.\n\nThe Lalbagh pocket is particularly fun because the OSM data there is surprisingly rich.\n\nIt turns the app into something slightly bigger than a viewer for one government dataset.\n\nYou can compare what different open datasets know about the same city.\n\nThe data story is the point\n\nI deliberately didn't build an API layer for this prototype.\n\nThe BBMP tree census is bundled directly into a Python file.\n\nNo API key.\n\nNo complicated ingestion pipeline.\n\nNo mysterious backend.\n\nYou can inspect the source data and see where the trees came from.\n\nThat makes the project useful beyond the demo.\n\nBBMP did the work of counting and mapping these trees.\n\nTreeTrail is basically an experiment in asking:\n\nWhat else can we do with that public data once we make it human-scale?\n\nA spreadsheet can tell you that a tree exists.\n\nA map can show you where it is.\n\nA walking trail can give you a reason to go see it.\n\nThe honest limitations\n\nThere are a few things I don't want the demo to imply.\n\nFirst: the generated loop is not walking directions.\n\nIt's a straight-line exploration loop.\n\nThe dashed lines are a guide for the order of exploration, not turn-by-turn navigation.\n\nSecond: the AI's source notes are species-level knowledge phrased by the model.\n\nThey're not live research about that individual tree.\n\nIf TreeTrail tells you something interesting about a rain tree, that doesn't mean the model has inspected that particular rain tree.\n\nThird: the BBMP data is a January 2025 South Zone snapshot.\n\nIt's not a live, citywide inventory.\n\nAnd some mapped trees may be on private property.\n\nThat last one is particularly important.\n\nA point on a map doesn't automatically mean you can walk up to it.\n\nWhich brings me to the part I'm most interested in.\n\nI want people to try to break the map\n\nThe best test isn't whether the demo works on my laptop.\n\nIt's whether someone takes a TreeTrail walk and discovers something the dataset got wrong.\n\nMaybe the \"tree\" is inside someone's compound.\n\nMaybe it's gone.\n\nMaybe the species note doesn't match what you see.\n\nMaybe the point is technically correct but completely inaccessible.\n\nOr maybe you find an incredible tree you would have walked past a hundred times.\n\nThat's the experiment.\n\nTake one walk.\n\nPick a handful of trees.\n\nTake one photo.\n\nTell me what TreeTrail got right — and what it got wrong.\n\nBecause that's where an open-data project becomes interesting: when the map stops being an artifact on a screen and starts getting checked against the real world.\n\n[Code Repo]\n\nTreeTrail is built around a simple idea: use local AI to turn open civic data into something you can experience on foot.\n\nThe core dataset is the BBMP tree census — a public-domain snapshot of 72,456 trees from the January 2025 South Zone census. I bundled the data directly into the Python application, so the project doesn't depend on a tree-data API or API keys.\n\nFor the AI layer, I use Gemma 3 4B through Ollama, running locally on my laptop.\n\nThe model has two small but useful jobs:\n\nTree trivia — when I tap a mapped tree, the model generates a short species-level note that gives me something to notice when I reach the tree.\n\nTrail curation — after selecting a handful of trees, the model helps order them into a compact exploration loop.\n\nThe rest of the application is deliberately straightforward: a map, nearby-tree filtering, stop selection, loop creation, saving, and GPX export.\n\nThere's also an optional OpenStreetMap/Overpass mode for places such as Lalbagh, Cubbon Park and Indiranagar. This provides live community-mapped data alongside the bundled BBMP snapshot, with the source clearly identified.\n\nThe important part is that the AI isn't trying to replace the map or the data.\n\nThe data tells me where to look. The local model gives me something to look for. The walk is where I find out whether any of it is actually true.\n\nAnd because the inference happens locally, there is no hosted AI endpoint or per-query inference cost sitting behind every tap.\n\nThere are still internet dependencies — map tiles load online, and OSM mode queries Overpass — but the core AI experience can run on my own machine.\n\nTreeTrail exists because several pieces of open technology can be connected in ways that weren't possible — or weren't nearly as interesting — as isolated datasets.\n\nThe BBMP has already done the hard civic work of counting and mapping trees.\n\nOpenStreetMap provides another layer of community-maintained geographic data.\n\nOllama makes it practical to run an open-weight model such as Gemma locally.\n\nAnd open-source mapping and Python tooling make it possible to glue these pieces together without building the project around a proprietary AI platform.\n\nA closed AI API could certainly generate tree trivia and suggest an order for a list of stops.\n\nBut the open approach changes the economics and the relationship with the data.\n\nThere is no per-query AI bill for every tree someone taps. The model runs on my machine. The tree census can be inspected and bundled with the application. The OSM data can be explored and improved by its community.\n\nMore importantly, the pieces remain replaceable.\n\nThe dataset can change.\n\nThe local model can change.\n\nThe mapping source can change.\n\nSomeone else can fork the project, use a different city tree census, swap in another open-weight model, or build an entirely different experience on top of the same civic data.\n\nThat's what open innovation makes possible here: the project doesn't have to end at the prototype I built.\n\nThe BBMP tree census was created as civic data. TreeTrail is one experiment in making that data useful at street level.\n\nA closed API might have helped me build the demo.\n\nOpen data and open AI make it possible for someone else to take the idea somewhere I haven't thought of yet.", "url": "https://wpnews.pro/news/treetrail-bengaluru-tree-walks-curated-by-local-gemma", "canonical_source": "https://dev.to/viveknshah/treetrail-bengaluru-tree-walks-curated-by-local-gemma-52d7", "published_at": "2026-10-07 17:43:28+00:00", "updated_at": "2026-10-07 17:46:56.570303+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "large-language-models", "ai-products"], "entities": ["TreeTrail", "Gemma 3 4B", "Ollama", "BBMP", "OpenStreetMap", "Lalbagh", "Cubbon Park", "Bengaluru"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/treetrail-bengaluru-tree-walks-curated-by-local-gemma", "markdown": "https://wpnews.pro/news/treetrail-bengaluru-tree-walks-curated-by-local-gemma.md", "text": "https://wpnews.pro/news/treetrail-bengaluru-tree-walks-curated-by-local-gemma.txt", "jsonld": "https://wpnews.pro/news/treetrail-bengaluru-tree-walks-curated-by-local-gemma.jsonld"}}