🦜 001. AvIAry: AI-Powered Bird Identification

TL;DR

  • AvIAry brings AI to bird-watching with a React PWA frontend, a PyTorch AI server, and a MongoDB backend; split into clear modules for UI, inference, data storage, and PWA features.

Ever snapped a photo of a feathered friend and wished you knew its name? AvIAry is a Progressive Web App that marries React, deep learning (CNNs & Transformers), and MongoDB to let anyone upload a bird image and get an instant species ID—no install required.

Under the hood, AvIAry is organized into three pillars:

  • Front-End: A React + Bootstrap UI split into a dozen components—search bar, “Our Tech”, AI demo, FAQ, and more—each sketched in Excalidraw and coded for responsiveness.
  • AI Server: A PyTorch service exposing a REST endpoint that takes an image, runs it through a fine-tuned CNN/Transformer ensemble, and returns the top identification with confidence.
  • Back-End: A MongoDB-based API storing user uploads, inference logs, and community annotations for continual model improvement.

Sample upload & identify call

// uploads a bird image and gets an identification
async function identifyBird(file) {
  const formData = new FormData();
  formData.append('birdImage', file);

  const res = await fetch('/api/identify', {
    method: 'POST',
    body: formData
  });

  if (!res.ok) throw new Error('Identification failed');
  return await res.json(); // { species: 'Northern Cardinal', confidence: 0.93 }
}

// Usage in a React component
function BirdUploader() {
  const [result, setResult] = React.useState(null);

  const onChange = async (e) => {
    const file = e.target.files[0];
    const data = await identifyBird(file);
    setResult(data);
  };

  return (
    <div>
      <input type="file" accept="image/*" onChange={onChange} />
      {result && (
        <p>
          Identified as <strong>{result.species}</strong> (
          {(result.confidence*100).toFixed(1)}% confidence)
        </p>
      )}
    </div>
  );
}

By structuring AvIAry into clear, testable layers and leaning on PWA capabilities—offline support, add-to-home, auto-updates—we delivered a seamless bird-watching companion that scales from web to mobile. Welcome to AvIAry: where AI meets ornithology, right in your browser.

đź“„ Full Document

Download detailed PDF


<- Back to blog