--- license: gpl-3.0 tags: - bird-classification - onnx - efficientnet - raspberry-pi - hailo - computer-vision - real-time datasets: - duyminhle/nabirds model-index: - name: EfficientNet-B7 Backyard Feeder Bird Classifier results: [] --- # 🐦 EfficientNet-B7 — Backyard Feeder Bird Classifier Custom ONNX-based bird classification model trained on a filtered subset of the [NABirds dataset](https://dl.allaboutbirds.org/nabirds), optimized for backyard bird feeders. > Designed to run on a Raspberry Pi + Hailo-8 setup in real-time as part of the [Birdwatcher Project](https://github.com/n2b8/birdwatcher) --- ## 🧠 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 model - `class_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 ```python 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 - [Birdwatcher Project (GitHub)](https://github.com/n2b8/birdwatcher) - [NABirds Dataset (Kaggle)](https://www.kaggle.com/datasets/duyminhle/nabirds) --- ## 📜 License GPLv3