SpeciesNet – A Global AI-Powered Wildlife Classifier
SpeciesNet is Google’s latest AI-powered wildlife classifier, designed to identify animals in camera trap images. Unlike many older models that focus on specific regions, SpeciesNet aims to be a global classifier, covering over 2,000 species. That means whether you're monitoring wildlife in the Amazon rainforest, the African savanna, or a local nature reserve, this one model could help identify what’s in the frame.
At its core, SpeciesNet combines two key AI components:
But SpeciesNet doesn’t just blindly predict species. It uses smart decision-making to refine results and improve accuracy. This includes checking if an animal is actually present, applying location-based filtering to avoid unrealistic predictions, and rolling up uncertain classifications to broader categories instead of making an incorrect guess.
How Does SpeciesNet Work?
The following breakdown is taken directly from Google’s official GitHub repository (GitHub Repository) and describes the decision-making process used by SpeciesNet:
How SpeciesNet Works – Step by Step (as described in the official GitHub repository)
1. Input Processing – Raw images are preprocessed and passed to both the object detector (MegaDetector) and the image classifier. The type of preprocessing will depend on the selected model. For "always crop" models, images are first processed by the object detector and then cropped based on the detection bounding box before being fed to the classifier. For "full image" models, images are preprocessed independently for both models.
2. Object Detection – The detector identifies potential objects (animals, humans, or vehicles) in the image, providing their bounding box coordinates and confidence scores.
3. Species Classification – The species classifier analyzes the (potentially cropped) image to identify the most likely species present. It provides a list of top-5 species classifications, each with a confidence score.
4. Detection-Based Human/Vehicle Decisions – If the detector is highly confident about a human or vehicle, that label will be returned as the final prediction, overriding other classifications.
5. Blank Decisions – If the classifier predicts "blank" with high confidence and the detector has low confidence about an animal being present, the blank label is returned.
6. Geofencing – If an animal species is detected and location data is available, a geofencing rule ensures species predictions align with known species distributions.
7. Label Rollup – If the species prediction is uncertain, the model rolls up the classification to a higher level, such as genus or family, ensuring more reliable results.
8. Detection-Based Animal Decisions – If the object detector finds an animal but the species classifier is uncertain, the image is labeled as “animal” rather than making an incorrect species prediction.
9. Unknown Classification – If no other rule applies, the image is labeled as “unknown” to avoid incorrect guesses.
10. Prediction Source Tracking – The system logs which parts of the model contributed to the final decision, helping improve future predictions.
By following these structured steps, SpeciesNet is able to accurately classify a vast range of wildlife species while minimizing errors.
How Can SpeciesNet Be Used?
By default, running “run_model.py" with SpeciesNet applies a decision-making strategy where only the highest-confidence detection in each image is used. This approach assumes that multi-species images are rare, meaning that only one species per image is classified.
Limitations of the Default Approach
This works well in many cases, but in images containing multiple animals, it can cause misclassifications. For example, if the highest-confidence detection is a zebra, the entire image may be labeled as a mountain zebra, even if other animals are present.
Example: (Image example from GitHub user hooge104 – Issue #8)
However, there are workarounds to classify each individual animal in the image separately.
For my own testing, I decided to classify each detected animal individually. If there’s only one animal in the image, it performs well. If there are multiple animals of the same species, it sometimes struggles to classify them all correctly. But when there are different species in the same image, they are no longer misclassified as the same animal.
Geofencing and Labeling Trade-Offs
One of the most impressive features of SpeciesNet is its geofencing logic, which allows users to pass in a country code (three-letter format)—and even more specific regions in USA, to prevent impossible classifications.
For example, it ensures that you won’t see a kangaroo in Denmark.
However, this system isn’t perfect. There’s a trade-off when using a broad classifier like SpeciesNet:
There are generally cases where the logic work fine and sometimes, where the logic defaults to.. "Animal"
领英推荐
Testing SpeciesNet – Real-World Performance
For a real-world test, I processed 5,000 images from the NZ Trailcams dataset (LILA Science).
Test Setup
From these images, 5,091 detections were made by MegaDetector with a confidence above 0.2.
While I love MegaDetector, and if I recall right have an accuracy of 96%, you may still end up with:
Detection Breakdown
The remaining 1,991 images were classified at a more specific level (genus, family, or order).
While impressive for a global classifier, it isn’t perfect. There’s no official benchmark, but I recommend filtering predictions based on confidence thresholds. I found that setting a 0.75 - 0.80 confidence threshold reduces false positives.
Some misclassifications I encountered:
Amongst others :)
That said, over 90% of images were correctly classified, even if some only reached the genus or kingdom level.
Final Thoughts – Is SpeciesNet the Best Global Classifier?
Is it perfect? No.
But is it the best global classifier we currently have for trail camera wildlife images? Yes. (As far as I know)
A universal wildlife AI is exactly what I’ve been asking for. I want AI models that can be used anywhere in the world to sort, process, and manage wildlife data, which is exactly what we’re working toward with Animal Detect .
We’re currently exploring ways to integrate SpeciesNet with our own technologies and pipelines, adding specialized improvements to refine detections, reduce outliers, and better manage classified data visually.
More on that soon.
And now, let’s look at some real detections from the testing! ?? (Good and bad - Randomly selected 10)