File size: 6,056 Bytes
9f26f3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65267ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f26f3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65267ad
9f26f3e
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
---
language: de
license: apache-2.0
tags:
- image-classification
- computer-vision
- birds
- ornithology
- wildlife
- efficientnet
datasets:
- custom
metrics:
- accuracy
model-index:
- name: german-bird-classifier
  results:
  - task:
      type: image-classification
      name: Image Classification
    metrics:
    - type: accuracy
      value: 100.0
      name: Test Accuracy
---

> ⚠️ **DEPRECATED - Use v2 for Better Accuracy**
> 
> This is **version 1** of the German Bird Classifier with 87.69% accuracy.
> 
> **Please use [german-bird-classifier-v2](https://huggingface.co/kamera-linux/german-bird-classifier-v2) instead:**
> - ✅ **99.71% accuracy** (vs. 87.69% in v1)
> - ✅ **42× fewer errors**
> - ✅ **Perfect classification** for 5 out of 8 species
> 
> This v1 model will remain available for compatibility but is no longer actively maintained.
> 
> ---

- accuracy
model-index:
- name: german-bird-classifier
  results:
  - task:
      type: image-classification
      name: Image Classification
    metrics:
    - type: accuracy
      value: 100.0
      name: Test Accuracy
---

# German Bird Classifier 🐦

A fine-tuned EfficientNet-B0 model for classifying 8 common German garden bird species with **100% validation accuracy**.

## Model Description

This model was trained using [vogel-model-trainer](https://github.com/kamera-linux/vogel-model-trainer), a toolkit for creating bird classification models from video footage.

**Base Model:** `google/efficientnet-b0` (8.5M parameters)  
**Fine-tuned for:** German garden birds classification  
**Training Framework:** PyTorch + Hugging Face Transformers

## Supported Species

The model can classify the following 8 bird species:

1. **Blaumeise** (Blue Tit) - *Cyanistes caeruleus*
2. **Grünling** (European Greenfinch) - *Chloris chloris*
3. **Haussperling** (House Sparrow) - *Passer domesticus*
4. **Kernbeißer** (Hawfinch) - *Coccothraustes coccothraustes*
5. **Kleiber** (Eurasian Nuthatch) - *Sitta europaea*
6. **Kohlmeise** (Great Tit) - *Parus major*
7. **Rotkehlchen** (European Robin) - *Erithacus rubecula*
8. **Sumpfmeise** (Marsh Tit) - *Poecile palustris*

## Performance

| Species | Validation Accuracy | Samples |
|---------|---------------------|---------|
| Blaumeise | 100.0% | 5 |
| Grünling | 100.0% | 5 |
| Haussperling | 100.0% | 5 |
| Kernbeißer | 100.0% | 5 |
| Kleiber | 100.0% | 5 |
| Kohlmeise | 100.0% | 5 |
| Rotkehlchen | 100.0% | 5 |
| Sumpfmeise | 100.0% | 5 |
| **Overall** | **100.0%** | **40** |

## Usage

### With vogel-model-trainer

```bash
# Install the toolkit
pip install vogel-model-trainer

# Extract birds from video using this classifier
vogel-trainer extract --folder ~/bird-data \
  --species-model kamera-linux/german-bird-classifier \
  --sample-rate 20 --skip-blurry --deduplicate \
  video.mp4
```

### With Python

```python
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch

# Load model and processor
model = AutoModelForImageClassification.from_pretrained("kamera-linux/german-bird-classifier")
processor = AutoImageProcessor.from_pretrained("kamera-linux/german-bird-classifier")

# Load and preprocess image
image = Image.open("bird.jpg")
inputs = processor(images=image, return_tensors="pt")

# Predict
with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits
    predicted_class = logits.argmax(-1).item()

# Get species name
species = model.config.id2label[predicted_class]
print(f"Predicted species: {species}")
```

## Training Details

- **Training Date:** November 13, 2025
- **Optimizer:** AdamW with cosine LR schedule
- **Augmentation:** Random rotation, affine, color jitter, gaussian blur
- **Regularization:** Weight decay 0.01, label smoothing 0.1
- **Early Stopping:** 7 epochs patience
- **Input Size:** 224x224 pixels
- **Batch Size:** 32
- **Learning Rate:** 2e-5

## Dataset

The model was trained on custom-collected video footage of German garden birds using the vogel-model-trainer toolkit:
- Video sources: Garden bird feeders in Germany
- Extraction method: YOLO-based bird detection + quality filtering
- Data split: 80% training / 20% validation
- Preprocessing: Blur detection, deduplication, class balancing

## Limitations

- Trained specifically on German garden birds - may not generalize to other species or regions
- Best performance on clear, well-lit images similar to training data
- May struggle with:
  - Juvenile birds with different plumage
  - Birds in flight or unusual poses
  - Heavy occlusion or poor lighting
  - Species not in the 8 training classes

## Ethical Considerations

This model is intended for:
- Wildlife monitoring and conservation
- Educational purposes
- Citizen science projects
- Automated bird feeder cameras

**Not recommended for:**
- Commercial wildlife tracking without proper permits
- Any use that could harm bird populations

## Citation

If you use this model, please cite:

```bibtex
@software{german_bird_classifier_2025,
  author = {Kamera Linux},
  title = {German Bird Classifier},
  year = {2025},
  url = {https://huggingface.co/kamera-linux/german-bird-classifier},
  note = {Trained with vogel-model-trainer: https://github.com/kamera-linux/vogel-model-trainer}
}
```

## Links

- **Training Toolkit:** [vogel-model-trainer on GitHub](https://github.com/kamera-linux/vogel-model-trainer)
- **PyPI Package:** [vogel-model-trainer](https://pypi.org/project/vogel-model-trainer/)
- **Model Repository:** [kamera-linux/german-bird-classifier](https://huggingface.co/kamera-linux/german-bird-classifier)

## License

This model is released under the **Apache License 2.0**. See the [LICENSE](https://huggingface.co/kamera-linux/german-bird-classifier/blob/main/LICENSE) file for details.

## Acknowledgments

Built with:
- [Hugging Face Transformers](https://huggingface.co/transformers/)
- [PyTorch](https://pytorch.org/)
- [Google EfficientNet](https://github.com/google/automl)
- [Ultralytics YOLO](https://github.com/ultralytics/ultralytics)