← Journal
13 July 2024 · 5 min read

Paws: Connecting NGOs and Stray Animals in Need

animal rescueNGO platformAI for social good

Overview

Paws is a platform built to reduce response time for injured stray animals by connecting people with nearby NGOs and animal hospitals in real time.

It combines AI, geolocation, and instant notifications to solve a coordination problem that usually ends in delays.

Inspiration Behind Paws

Our college hosts a state-level hackathon called Smart Bengal Hackathon. During it, my friend Arnab proposed a system that lets anyone report an injured stray quickly and makes sure the right NGO is notified without manual effort.

The problem was obvious: people want to help, but don't know who to contact. NGOs, on the other hand, lack a structured, real-time reporting pipeline.

Out of 510+ teams, we reached the top 30 and made it to the finals. The judges specifically appreciated the practical impact, the clarity of the UI, and how AI was woven into the workflow.

Tech Stack

The system is built for speed and real-time interaction.

Component Technology
Frontend React.js, Material UI, Tailwind CSS
PWA Progressive Web App
Backend Django + Django REST Framework
Realtime Django Channels
Notifications Firebase Cloud Messaging
AI Azure Custom Vision
Media storage Cloudinary
Maps OpenStreetMap

How It Works

sequenceDiagram
    actor U as Reporter
    participant A as Paws app
    participant B as Backend
    participant AI as Custom Vision
    actor N as Nearest NGO
    U->>A: Photo + auto-detected location
    A->>B: Submit report
    B->>AI: Classify image
    AI-->>B: Animal type, injury severity
    B-->>A: Predictions (user can correct)
    B->>N: Push notification (FCM)
    N->>B: Accept, update status
    B-->>U: Live status updates

Reporting an incident

Users upload an image of the injured animal. Location is auto-detected with the browser's geolocation API, and users can optionally add landmarks and a description.

The AI model predicts the animal type and the injury severity. Users can correct either prediction before submitting, and login is optional.

After submission, the user gets a confirmation along with basic guidance on what to do until help arrives.

NGO response system

Once a report is submitted, the backend assigns the case to the nearest NGO and sends a push notification. NGOs can:

  • Accept or reject cases.
  • View details and location.
  • Navigate there via Google Maps.
  • Update the case status.

Every update is reflected to the reporter in real time.

NGO analytics

NGOs get insights like reports per day, week, and month; heatmaps of incidents; the most common injury types; and average resolution time.

Donations and awareness

Users can donate directly to NGOs or support the platform. NGOs can post announcements, events, and awareness campaigns.

The AI Model (Azure Custom Vision)

We used Azure Custom Vision to build and deploy our models without training everything from scratch.

Model design

We use two models:

  1. Animal detection. Detects the animal type (dog, cat, cow, etc.), handles multiple animals in one image, and outputs bounding boxes with confidence scores.
  2. Injury classification. Classifies severity as normal, urgent, or critical, with probability scores.

Training process

Collect and label a dataset, upload it to Custom Vision, tag images with bounding boxes and labels, train with transfer learning, then evaluate on standard metrics.

Performance

Metric Animal detection Injury classification
Precision ~95.8% ~83.3%
Recall ~91.0% ~71.4%
Accuracy ~95.7% ~91.0%
xychart-beta
    title "Model metrics (%)"
    x-axis ["Det. precision", "Det. recall", "Det. accuracy", "Inj. precision", "Inj. recall", "Inj. accuracy"]
    y-axis "Percent" 60 --> 100
    bar [95.8, 91.0, 95.7, 83.3, 71.4, 91.0]

The injury model is weaker because its data was limited and noisy.

Inference flow

  1. User uploads an image.
  2. Backend sends it to the Azure API.
  3. The model returns predictions.
  4. Results are shown to the user.
  5. The user can override them.

This keeps the system fast while avoiding a hard dependency on AI accuracy. The model suggests; the human decides.

System Architecture

flowchart LR
    FE[React PWA] -->|REST| BE[Django backend<br/>on Azure]
    BE --> DB[(PostgreSQL)]
    BE --> CV[Azure Custom Vision]
    BE --> CL[Cloudinary<br/>images]
    BE --> FCM[Firebase<br/>notifications]
    BE --> OSM[OpenStreetMap]
    BE <-->|Channels / WebSocket| FE

The React frontend talks to the backend, which acts as the central controller and coordinates PostgreSQL for storage, Custom Vision for inference, Cloudinary for images, Firebase for notifications, and OpenStreetMap for location services.

This separation gives us a modular architecture, lets each service scale on its own, and means one failing service doesn't take the rest down.

Finding the Nearest NGO

flowchart TD
    R[Report with lat/lng] --> F[Fetch all NGO coordinates]
    F --> H[Haversine distance to each NGO]
    H --> M[Pick the minimum]
    M --> A[Assign case]
    A --> P[Push notification to that NGO]
  1. NGOs register and their coordinates are stored in the database.
  2. A user submits a report with a location.
  3. The backend fetches all NGO locations.
  4. Distance is calculated with the Haversine formula.
  5. The nearest NGO is selected.
  6. The case is assigned and a notification is sent.

No human dispatcher sits in the loop, so the time from report to alert is as short as it can be.

Conclusion

Paws is not just a hackathon project. It's a system that could realistically reduce response time for injured strays.

What works: a simple reporting flow, real-time NGO coordination, and AI-assisted classification.

What doesn't yet: NGO reliability isn't guaranteed, the AI struggles with messy real-world images, and it hasn't been tested beyond controlled environments.

Fix those, and this becomes a real product, not just a good prototype.