TraiLens: An Offline-First AI Nature Journal
DEV Community

TraiLens: An Offline-First AI Nature Journal

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass What I Built I built TraiLens, a local Python tool that automatically generates a Markdown nature journal from your hiking photos using a local open-weight vision model. Most outdoor apps require you to stare at your screen on the trail. TraiLens flips that: it encourages you to put your phone on airplane mode. You go outside, enjoy the trek, and simply snap photos of interesting plants, geology, or landscapes. When you get home, you drop the photos into a folder on your laptop. TraiLens runs them through an open-weight vision model and generates a beautiful, documented field diary of what you saw, complete with EXIF metadata extraction. The screen time happens after the hike, not during it. Demo Here is TrailLens running locally and analyzing my photos completely offline: And here is the beautiful field guide it automatically generates: Code ๐ŸŒฒ TraiLens An offline-first, local-inference field naturalist journal built for the Hacktoberfest "Touch Grass" AI Challenge. TrailLens eliminates screen time on the trail. Put your phone in airplane mode, hike screen-free, and take photos of flora, fauna, and geology. When you return, TrailLens processes your photos locally using Moondream via Ollama, extracting EXIF metadata and generating an automated Markdown field journal with zero cloud API dependencies. Features - 100% Offline & Private: Zero telemetry or cloud calls. GPS and photos stay on your device. - Local Vision Inference: Powered by Moondream via Ollama. - EXIF Extraction: Automatically retrieves capture timestamps and GPS markers. Quickstart - Install Ollama and pull the model: ollama pull moondream How I Built It TrailLens is built in Python and relies entirely on local edge inference. Instead of sending my photos to a paid cloud API, I used Ollama to run Moondream (a lightweight, highly capable open-source vision model). The Python script loops through a local directory of images, extracts the GPS and timestamp EXIF data using the Pillow library, and then prompts the local Moondream model to act as a master naturalist, identifying the flora and terrain. Finally, it compiles everything into a formatted Markdown file (TRAIL_JOURNAL.md ). Why Does Open Innovation Matter? This project only makes sense with open-source AI: - Total Privacy: Hiking photos contain metadata and exact GPS coordinates of where you have been. Sending a camera roll to a closed API is a massive privacy risk. Running Moondream locally guarantees your location history never leaves your laptop. - Zero Cost: Passing high-res images to a cloud vision API costs money per token. A heavy hiker might take 100 photos on a weekend trip. Local inference makes processing bulk image data completely free. - Disconnection: Because the processing happens locally on my laptop after the hike, I am not tempted to look for a cell signal on the trail to see what an app thinks I'm looking at. Open, offline models let nature actually be nature. Prize Categories - Grand Prize Track (Touch Grass): Engineered specifically to get people off screens while on the trail, utilizing local inference to process the data only after the outdoor experience is finished. - Best Use of Local Inference: The core of the project relies on Ollama and Moondream to analyze images without an internet connection. Top comments (0)

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.