BirdLens AI β An Open-Source AI Bird Identification Companion
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass.
What I Built
I built BirdLens AI, a browser-based bird-identification companion for beginner birdwatchers, curious walkers, and anyone who wants to learn more about the wildlife around them.
My approach to βTouch Grassβ is simple: use technology to support an outdoor experience, not replace it.
The intended flow is:
Go outside β Notice a bird β Take a photograph β Get a suggested identification β Return to observing.
BirdLens AI lets users:
- Upload a bird photograph and identify it locally using an open-weight model.
- Review the top five predictions rather than trusting a single answer.
- Read sourced information about the suggested species.
- Save photographs and results in a local discovery journal.
- Track simple outdoor observation challenges.
- Revisit saved discoveries and identify photographs offline after the required assets and model have been cached.
The journal turns individual sightings into a personal record of exploration. The challenges give users a reason to notice more of their surroundings.
The goal is to make the screen the shortest part of the experience.
Demo
Live project: Try BirdLens AI
Try It Yourself
- Open the app and choose Identify a bird.
- Upload a clear photograph of a bird.
- Wait for the model to load and run inference.
- Review the suggested species, model score, and alternative predictions.
- Save the result and explore My discoveries.
The first identification downloads the model. Later identifications can work offline once the production application and model have been successfully cached, provided the browser retains that storage.
New online species references may still need an internet connection.
Please observe birds from a respectful distance. An identification app is not a reason to approach or disturb wildlife.
Code
Public repository: View BirdLens AI on GitHub
Technology Stack
- React and TypeScript β Interface and application logic
- Vite β Development and production builds
- Tailwind CSS β Styling
- ONNX Runtime Web β Browser-based inference
- IndexedDB β Local discovery journal
- Service Worker and Cache Storage β Production offline support
There is no application backend, user account requirement, or paid AI inference API.
How I Built It
An Open-Weight Model Is the Core, Not an Extra Feature
BirdLens AI uses the chriamue/bird-species-classifier, an EfficientNet-B2 model with 525 output classes.
The publisher declares the model MIT-licensed. Its weights are loaded in ONNX format and executed through ONNX Runtime Web.
Without that model and the local inference runtime, the application's main identification feature would not work. Open AI is therefore central to the project.
Running Inference in the Browser
The inference pipeline works as follows:
- Decode the uploaded photograph.
- Resize and normalize it for the model.
- Run the ONNX classifier using WebAssembly inside a worker.
- Convert the output into ranked model probabilities.
- Display the top five predictions.
Running inference in a worker keeps it separate from the main interface.
Photographs are not sent to a remote AI service for identification. The application does download model assets and may fetch online species references, but image inference happens on the user's device.
Showing Uncertainty Honestly
A model prediction is not a confirmed sighting.
BirdLens AI uses score and prediction-margin heuristics to mark uncertain results as tentative. It also shows alternative candidates so users can compare possibilities.
There are important limitations:
- The model is a closed-set classifier, not a bird detector.
- Unsupported species and non-bird images can produce misleading predictions.
- Poor lighting, small subjects, and similar-looking species can confuse it.
- Model probabilities are not calibrated identification confidence.
Scientifically important observations should be independently verified.
A Local Journal and Conditional Offline Support
Saved discoveries are stored in IndexedDB, including the photograph and identification results.
In production, a service worker caches application assets. The model is cached after loading, enabling subsequent offline identification.
This is not offline immediately. The application and model must first be loaded and cached. Clearing browser data or storage eviction can remove cached assets and saved discoveries.
Development with an AI Coding Assistant
I used an AI coding assistant to help develop the project. The finished application runs a real open-weight classifier locally rather than using mocked predictions or a hosted AI API.
Deploying on Vercel
Because BirdLens AI runs in the browser, I deployed it on Vercel without building a backend.
My deployment settings are:
| Setting | Value |
|---|---|
| Framework preset | Vite |
| Build command | npm run model:download && npm run build |
| Output directory | dist |
| Install command | npm ci |
The model-download step is essential.
The model weights are ignored by Git. During deployment, npm run model:download retrieves a pinned model revision and verifies its checksum before saving it to public/models/birds.onnx.
The build then includes that model in the deployment so the browser can load it for identification.
No backend environment variables or AI API keys are required.
Why Does Open Innovation Matter?
For BirdLens AI, openness makes privacy, offline use, and model control practical.
A hosted-only AI API would require sending photographs to a remote service and maintaining a connection for each identification. A redistributable model lets the user's browser perform that work locally.
That makes several things possible.
Keep Image Inference on the Device
Users do not need to upload their photographs to a third-party AI service to get a prediction.
Continue Without a Signal After Setup
Once the necessary application assets and model are cached, identification can work without an internet connection.
That is useful for a nature-focused application, where connectivity is not always available.
Avoid Per-Request AI Fees
Local inference does not require paid API calls or credentials. Hosting and initial downloads still consume resources, but each identification does not depend on a billable inference request.
Inspect and Improve the Implementation
Developers can review the labels, preprocessing, model revision, and output handling.
They can also evaluate a different model and adapt the application without depending on a closed provider's inference endpoint.
Open weights do not automatically make a model accurate. What they provide here is control over where inference happens and how the system can be inspected, tested, and changed.
That is the kind of open innovation I wanted to build around: a small tool that helps people understand the world outside without making them dependent on a remote AI service.
My Agent Session
I used an AI coding assistant during development, but I do not currently have a shareable DevRelay recording of the build session.
I am sharing the implementation through the source repository instead.

Top comments (0)