# Install ChirpKit
pip install git+https://github.com/prossm/chirpkit.git@main
# Models will auto-download on first use
# Or manually download:
python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.download_all_models()"# Clone with model files
git clone https://github.com/prossm/chirpkit.git
cd chirpkit
git lfs pull # Download model files (~50MB)
# Install in development mode
pip install -e .FROM python:3.11-slim
# Install ChirpKit
RUN pip install git+https://github.com/prossm/chirpkit.git@main
# Models will be downloaded automatically on first use
# Container needs internet access for initial downloadFROM python:3.11-slim
# Install Git LFS
RUN apt-get update && apt-get install -y git git-lfs && rm -rf /var/lib/apt/lists/*
# Clone repository with models
RUN git clone https://github.com/prossm/chirpkit.git /tmp/chirpkit && \
cd /tmp/chirpkit && \
git lfs pull
# Install ChirpKit
RUN pip install -e /tmp/chirpkit
# Models are now bundled in the imageFROM python:3.11-slim
RUN pip install git+https://github.com/prossm/chirpkit.git@main
# On host machine, download models once:
# python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.download_all_models()"
# Then mount the models directory in docker-compose.yml:
# volumes:
# - ~/.chirpkit/models:/root/.chirpkit/models:roChirpKit requires two model files (~50MB total):
- File:
BirdNET_GLOBAL_6K_V2.4_Model_FP16.tflite - Location:
models/birdnet/ - Auto-downloads from: GitHub Release v0.2.0
- Files: 7 ensemble models + metadata
- Location:
models/trained/chirpkit-ensemble/ - Auto-downloads from: GitHub Release v0.2.0
ChirpKit uses multiple fallback methods to ensure reliable model downloads:
- Downloads pre-packaged ZIP files
- Fastest method (~2 seconds)
- Requires: Internet access
- Clones repository and pulls LFS files
- Slower but more reliable (~1 minute)
- Requires:
gitandgit-lfsinstalled
If automatic downloads fail:
# Install Git LFS
# Ubuntu/Debian:
sudo apt-get install git-lfs
# macOS:
brew install git-lfs
# Clone and get models
git clone https://github.com/prossm/chirpkit.git
cd chirpkit
git lfs pull
# Install
pip install -e .Cause: Corrupted or incomplete BirdNET model file
Solution:
# Force re-download the model
python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.download_model('birdnet', force=True)"
# Or manually verify the file
cd models/birdnet
ls -lh BirdNET_GLOBAL_6K_V2.4_Model_FP16.tflite # Should be ~25MB
file BirdNET_GLOBAL_6K_V2.4_Model_FP16.tflite # Should show "data"Cause: Using an older version of ChirpKit with outdated import paths
Solution:
# Update to latest version
pip install --upgrade --force-reinstall git+https://github.com/prossm/chirpkit.git@mainCause: GitHub release v0.2.0 hasn't been created yet
Solution: Git LFS fallback will automatically activate. Ensure you have git and git-lfs installed:
# Ubuntu/Debian
sudo apt-get install git git-lfs
# macOS
brew install git git-lfs
# Verify installation
git lfs versionSolution 1: Use pre-download method (see Docker Method 2 above)
Solution 2: Ensure container has internet access:
docker run --rm your-image python -c "import requests; print(requests.get('https://google.com').status_code)"
# Should print: 200# In your Docker container or environment:
pip install --upgrade --force-reinstall git+https://github.com/prossm/chirpkit.git@main
# Verify models are present:
python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.list_available_models()"FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
# Install ChirpKit
RUN pip install git+https://github.com/prossm/chirpkit.git@main
# Pre-download models during build (requires internet)
RUN python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.download_all_models()"
# Your application code
COPY . /app
WORKDIR /app
CMD ["python", "your_app.py"]After installation, verify everything works:
from chirpkit import InsectClassifier
# Initialize classifier
classifier = InsectClassifier()
# Load models (will auto-download if needed)
success = classifier.load_model()
if success:
print("✅ ChirpKit installed and ready!")
print(f" Species: {classifier.n_classes}")
print(f" Model version: v0.2.0")
else:
print("❌ Model loading failed - check logs above")If you encounter issues not covered here:
-
Check model download status:
python -c "from chirpkit.model_downloader import ModelDownloader; ModelDownloader.list_available_models()" -
Enable debug logging:
import logging logging.basicConfig(level=logging.DEBUG)
-
Report issues at: https://github.com/prossm/chirpkit/issues