How google/cameratrapai works
SpeciesNet runs a camera-trap image through object detection and species classification, then combines their results into a single prediction, optionally using location to constrain wildlife labels. The main CLI delegates inference orchestration to the multiprocessing pipeline; that pipeline invokes the model components and produces per-image results. Supporting capabilities include model retrieval, taxonomy and geofence logic, and drawing detection overlays. The README also documents restartable CLI runs and geographic filtering. Some orchestration details and auxiliary scripts are unsampled, so the graph omits uncertain connections.
Main entry points: multiprocessing.py Inference pipeline · ensemble.py Ensemble · utils.py Model resources · run_model.py Model CLI
Components 14
Inference workflow
- Model CLI
speciesnet/scripts/run_model.py - Inference pipeline
speciesnet/multiprocessing.py - Prediction JSON
Vision models
- Object detector
speciesnet/detector.py - Species classifier
speciesnet/classifier.py
Prediction logic
- Ensemble
speciesnet/ensemble.py - Prediction combiner
speciesnet/ensemble_prediction_combiner.py - Geofence rules
speciesnet/geofence_utils.py - Taxonomy utilities
speciesnet/taxonomy_utils.py
Supporting capabilities
- Model resources
speciesnet/utils.py - Location lookup
speciesnet/geolocation.py - Detection overlay
speciesnet/display.py - Model files
Other components
- CLI user
Connections 14
- CLI user → Model CLI: runs
README.md - Model CLI → Inference pipeline: delegates inference
speciesnet/multiprocessing.py - Inference pipeline → Object detector: runs detection
speciesnet/multiprocessing.py - Inference pipeline → Species classifier: runs classification
speciesnet/multiprocessing.py - Inference pipeline → Ensemble: runs ensemble
speciesnet/multiprocessing.py - Inference pipeline → Location lookup: resolves location
speciesnet/multiprocessing.py - Inference pipeline → Prediction JSON: writes predictions
README.md - Species classifier → Model resources: loads model
speciesnet/classifier.py - Object detector → Model resources: loads model
speciesnet/detector.py - Model resources → Model files: downloads or reads
speciesnet/utils.py - Ensemble → Prediction combiner: combines predictions
speciesnet/ensemble.py - Ensemble → Geofence rules: applies rules
speciesnet/ensemble.py - Ensemble → Taxonomy utilities: uses taxonomy
- CLI user → Detection overlay: visualizes results
README.md