A full-stack image classification web application that identifies birds, plants, and animals using pretrained HuggingFace & BioCLIP machine learning models, with additional species information retrieved from internal datasets and an external LLM API when applicable.
The project focuses on backend architecture, service separation, and reliable API design rather than training custom ML models.

- Overview
- Features
- Architecture
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Running the Application
- API Documentation
- Project Structure
- Deployment
- License
Feather Scan is a three-service web application that allows users to upload images and classify them as birds, plants, or animals.
The system is split into a React frontend, an Express + TypeScript backend, and a FastAPI-based ML inference service.
The backend acts as a mediator between the client and the ML service.
It handles authentication, user history persistence, request validation, file uploads, and response shaping.
Pretrained models from Hugging Face and BioCLIP are used for inference, while Gemini API is used to enrich bird predictions with additional contextual information.
- Upload an image of (up to 5 MB) and classify it as a bird, plant, or animal
- Bird species identification using a pretrained classifier
- Plant identification using a medicinal plant model
- Animal classification using BioCLIP (zero-shot)
- Species information enrichment using Gemini API (birds only)
- Confidence score returned with each prediction
- Clear separation between frontend, backend, and ML services
- Centralized request validation and file handling in the backend
- Backend-to-ML communication via HTTP APIs
- FastAPI-based ML inference service
- Automated backend tests using Jest and Supertest
Feather Scan follows a service-separated architecture to keep concerns isolated and the system easy to reason about.
βββββββββββββββββ
β Frontend β React + Vite (5173)
βββββββββ¬ββββββββ
β POST /upload
βββββββββΌββββββββ
β Backend API β Express + TypeScript (3000)
βββββββββ¬ββββββββ
β POST /predict
βββββββββΌββββββββ
β ML Service β FastAPI (5000)
βββββββββββββββββ
The backend acts as a boundary layer, preventing the client from directly interacting with the ML service and allowing validation, authentication, and future extensibility without changing the client.
- The client uploads an image along with the selected model type.
- The backend validates the request and handles file processing.
- The image is forwarded to the ML service for inference:
- Birds and plants use pretrained Hugging Face models.
- Animals use BioCLIP for zero-shot classification.
- For bird predictions, additional species information is generated using Gemini API.
- For animal & plant predictions, info is retrieved from a database based on predicted label.
- The backend returns a structured JSON response (label, confidence, info) to the client for display.
| Category | Model | Source |
|---|---|---|
| Birds | chriamue/bird-species-classifier |
Hugging Face |
| Plants | dima806/medicinal_plants_image_detection |
Hugging Face |
| Animals | imageomics/bioclip-2 |
BioCLIP |
These pretrained models were chosen to prioritize system design and integration over custom model training.
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- Python (v3.9 or higher) - Download
- npm or yarn - Comes with Node.js
- pip - Python package manager
- Git - Version control
Optional but recommended:
- Virtual environment (venv or conda) for Python dependencies
git clone https://github.com/devansh436/feather-scan.git
cd feather-scannpm installcd client
npm install
cd ..cd server
npm install
cd .. cd model
pip install -r requirements.txt
cd ..Create .env files in the respective directories:
VITE_API_BASE=http://localhost:3000/upload
VITE_FIREBASE_API_KEY=<your-key>
VITE_FIREBASE_AUTH_DOMAIN=example-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=example-project-a1b2c3
VITE_FIREBASE_APP_ID=x:123456789:web:e1x1m1p1lePORT=3000
FAST_API_URL=http://localhost:5000/predict
MONGO_URI=<your-mongo-uri>GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flashFrom the root directory:
npm run devThis starts all three services simultaneously:
- π¨ Client: http://localhost:5173
- π Server: http://localhost:3000
- π€ Model: http://localhost:5000
In separate terminal windows:
# Terminal 1 - ML Service
npm run model
# Terminal 2 - Backend Server
npm run server
# Terminal 3 - Frontend Client
npm run clientOpen your browser and navigate to:
http://localhost:5173

Accepts an image and model type, returns the predicted label and confidence.
Request
multipart/form-datafile: image (jpg/png)modelType:bird | plant | animal
Response
{
"label": "bald eagle",
"type": "bird",
"confidence": 0.95,
"info": {
"name": "Bald Eagle",
"scientific_name": "Haliaeetus leucocephalus",
"confidence": 97.3,
"habitat": "Near large bodies of open water, forests",
"origin": "North America",
"description": "A large bird of prey known for its white head and tail."
}
}API details are intentionally kept minimal, as the backend is not intended for third-party consumption.
feather-scan/
β
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ public/ # Static assets
β βββ package.json
β βββ vite.config.js # Vite configuration
β
βββ server/ # Backend Express API
β βββ src/
β β βββ routes/ # API routes
β β βββ middleware/ # Custom middleware
β β βββ utils/ # Helper functions
β β βββ index.ts # Server entry point
β βββ package.json
β βββ tsconfig.json # TypeScript config
β
βββ model/ # ML inference service
β βββ data/ # Static species data
β βββ main.py # FastAPI application
β βββ model.py # Model loading & inference
β βββ requirements. txt # Python dependencies
β
βββ .github/
β βββ workflows/ # CI/CD workflows
β βββ test.yml # Automated testing
β
βββ package.json # Root package (scripts)
βββ README.md
Run backend tests:
cd server
npm testTests are automatically run on push via GitHub Actions.
- Used pretrained ML models to focus on backend architecture and system integration.
- Isolated ML inference into a separate FastAPI service to keep the Node.js backend non-blocking.
- Centralized validation and file handling in the backend to avoid exposing the ML service.
- Implemented backend testing early using Jest and Supertest to ensure API stability.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by devansh436
*If you found this project useful, consider giving it a β! *