This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
TrailNote is a small command-line tool for walks. Take a photo of a bird or plant, run one command, and it gives you its top 3 guesses with confidence scores. It runs on your own machine with no API key and no account. There is an optional walk log that saves each guess with the date to a local JSON file, and a simple Gradio page for uploading photos.
It is a guess tool, not a field guide. It checks the photo against a hardcoded list of about 35 labels (a few trees, flowers and common birds, plus generic ones like "a plant" or "an insect"), so it often lands on something general and can be wrong. Every result ends with a reminder to verify before touching or eating anything.
Repo: https://github.com/DhanushNehru/trialnote
Demo
A real run on a public-domain photo of an American robin from Wikimedia Commons:
- robin (73.06%)
- cardinal (18.70%)
- a bird (5.39%)
That was a good result. It won't always be: anything outside the ~35 labels gets pushed to the nearest wrong or generic one.
How I Built It
The model is OpenAI's CLIP (clip-vit-base-patch32), an open-weight model, run through the Hugging Face transformers zero-shot image classification pipeline. I give it the candidate labels and it scores the photo against each. The CLI uses argparse, the log is a JSON file in the home folder, and the web page is Gradio. The model downloads once; after that it works from the local cache (I checked with HF_HUB_OFFLINE=1). On my CPU a run took about 7 seconds. PyTorch alone is around 750MB.
Why Does Open Innovation Matter?
This only works outside because the weights are open. No API key, no server, no signal needed after the first download. Anyone can open the code, see the short label list, and replace it or swap in a better model. Open weights make the limits visible and fixable.
Next steps: a bigger local-species label list, and a model built for bird or plant ID.
Top comments (0)