n2b8/backyard-birds
By n2b8 · ↓ 0 · ♥ 0 · Updated 2025-04-17
What's in this repo
This page lists the files in n2b8/backyard-birds, including efficientnet_b7_backyard-birds.onnx.
- 1 ONNX models (.onnx files)
- 4 files, including 1 .md, 1 .txt, 1 .onnx
- Last updated 2025-04-17
ONNX files
| File | Size | Download |
|---|---|---|
| efficientnet_b7_backyard-birds.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
🐦 EfficientNet-B7 — Backyard Feeder Bird Classifier
Custom ONNX-based bird classification model trained on a filtered subset of the NABirds dataset, optimized for backyard bird feeders.
Designed to run on a Raspberry Pi + Hailo-8 setup in real-time as part of the Birdwatcher Project
🧠 Model Details
- Architecture: EfficientNet-B7
- Resolution:
600×600 - Precision: Mixed (AMP)
- Format: ONNX
- Classes: 95 backyard species +
not_a_bird - Validation Accuracy: 93.14% @ Epoch 23
- Optimized for inference on edge devices (e.g., Raspberry Pi 5 + Hailo-8)
📁 Files
efficientnet_b7_backyard_feeder_birds.onnx— Trained ONNX modelclass_labels_v3.txt— One class label per line
🛠️ Intended Use
- Use Case: Real-time fine-grained classification of birds visiting backyard feeders
- Hardware: Optimized for Raspberry Pi + Hailo-8 AI accelerator
- Pipeline: Captures images via YOLOv8 detection, then classifies via this model
🐍 Example Inference Code
import onnxruntime as ort
import numpy as np
from PIL import Image
# Load model
session = ort.InferenceSession("efficientnet_b7_backyard_feeder_birds.onnx")
# Preprocess
img = Image.open("bird.jpg").resize((600, 600))
x = np.array(img).astype(np.float32) / 255.0
x = np.transpose(x, (2, 0, 1))[np.newaxis, :] # CHW + batch
# Predict
outputs = session.run(None, {"input": x})
pred_idx = np.argmax(outputs[0])
📊 Training
- Dataset: Subset of NABirds (filtered for common backyard species)
- Augmentations: Flip, rotation, brightness
- Regularization: Dropout, label smoothing
- Loss: Cross-entropy
- Optimizer: AdamW
- Early stopping enabled
🔗 Related Repos
📜 License
GPLv3
Model info
Created: 2025-04-17
Updated: 2025-04-17
View on Hugging FaceFiles (4)
Related models
More from n2b8
No other models by this author.
More models
No task type declared.