Model or dataset
agentmorris/MegaDetector avatar
agentmorris/MegaDetector

MegaDetector: sorting camera trap images with an animal, person and vehicle detector

MegaDetector is an AI model that helps conservation folks spend less time doing boring things with camera trap images.

332 stars52 forksPythonMIT

At a glance

What is it?
MegaDetector is an MIT-licensed detection model for camera trap images, distributed as a Python package. It finds animals, people and vehicles, which makes blank-image removal its most common job, but it does not identify species.
Who is it for?
Adopt MegaDetector if your bottleneck is the volume of camera trap images and you can run Python or a GUI tool such as AddaxAI. Do not adopt it expecting species labels: the README states plainly that it only finds animals, and points to SpeciesNet for classification.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The blank-image problem MegaDetector was built for

A camera trap left in the field for a season produces thousands of images, and the majority of them contain nothing. Wind moves a branch, the sun crosses a heat sensor, a volunteer walks past on a maintenance visit. Someone still has to open those files and decide. MegaDetector exists to move that decision from a human to a model: it runs over a folder of images and marks where animals, people and vehicles appear, so the empty frames can be set aside before anyone looks at them.

The audience is conservation biologists and the people who support them. The README describes the project as helping conservation biologists spend less time doing boring things with camera trap images, and the list of organisations that have used it includes national parks agencies, university labs, consultancies and NGOs. The repository also names a second, less obvious audience: agents acting on a user's behalf, with a dedicated skill file for running MegaDetector on someone else's images. If you are writing automation around a camera trap workflow, that file is the intended entry point.

What the model detects, and what it deliberately does not

MegaDetector returns bounding boxes for three classes: animals, people and vehicles. The vehicle class arrived with version 4.1, according to the release list. Nothing in the output says deer, fox or boar. The README is explicit that MegaDetector only finds animals and does not identify them to species level, and it redirects anyone who needs that to SpeciesNet, a separate classifier that the README says plays nicely with MegaDetector.

That boundary is the design, not a gap waiting to be filled. A detector trained on several million images from a variety of ecosystems can generalise across species it has never been tuned for, because it only has to answer whether an animal is present and roughly where. A classifier has to commit to a label set. Teams that need species counts run the detector first to reduce the image set, then a classifier on the crops. Treating MegaDetector as a species tool is the most common way to be disappointed by it.

How the pipeline is put together

The repository is organised around a Python package rather than a single script. The root holds the model documentation, the output format specification, a getting-started page, notebooks, environment files under envs/ and the package source under megadetector/. The package metadata in pyproject.toml pins the runtime to Python 3.9 through 3.14 and lists dependencies including numpy, Pillow, opencv-python, pandas, scikit-learn and fastquadtree.

The detection backend is where the packaging gets interesting. The dependency list includes ultralytics-yolov5 version 0.1.1, and a comment in pyproject.toml explains why: this is not the ultralytics package and not the package called yolov5, but a snapshot of the YOLOv5 code base that predates Ultralytics's switch to an AGPL licence. That choice keeps the whole stack under MIT. The same file leaves yolov9pip and the ultralytics package commented out, so a user who wants YOLOv9 or YOLOv11 models installs them separately and accepts whatever licence those bring. Torch is not listed directly either; the comment says PyTorch will get installed by ultralytics-yolov5.

Images flow through the detector and come out in a documented JSON structure. The repository carries a separate megadetector-output-format.md file describing that structure, which is the contract to read before writing any downstream parsing. The package also exposes utilities beyond detection, which is why there are two README files at the root: README-package.md for the Python package and README-package-utils.md for the surrounding tools.

Installing the megadetector package and running a first batch

The README gives the install as a plain pip command, and the package is published on PyPI under the name megadetector. The pyproject.toml requires Python 3.9 or newer and below 3.15, so check your interpreter before starting.

bash
pip install megadetector

After installation, the package is importable as megadetector. The README points programmers to the package for access to everything in the repository, and the user guide in megadetector.md carries the instructions for running the model on data. The repository layout suggests the entry points live under the megadetector/ directory, but the README does not print a full command line for a first run, so the honest next step is to open megadetector.md and follow the invocation it documents rather than guessing flags.

If you would rather not touch Python at all, the README offers a different route. It states that if you are looking for a convenient tool to run MegaDetector, you do not need anything from this repository, and points to AddaxAI, formerly EcoAssist, a GUI-based tool for running AI models including MegaDetector on camera trap images.

bash
# not a MegaDetector command; the README directs GUI users to AddaxAI instead

One packaging detail matters before you build anything on top. The commented-out blocks in pyproject.toml mean the default install is deliberately narrow: YOLOv9 and YOLOv11 support are opt-in, and the torch version you end up with is whatever ultralytics-yolov5 pulls in. If your deployment pins torch for other reasons, resolve that conflict first.

Where MegaDetector is the wrong tool

The clearest failure mode is asking it for species. The README states the limitation in one sentence and offers SpeciesNet as the follow-on. Any workflow that needs a species table has to add a classifier, and that classifier has its own accuracy profile on your images.

The second limitation is hardware and throughput. MegaDetector is a neural network run over images, and the package pulls in PyTorch through ultralytics-yolov5. Nothing in the README promises a CPU-only path or a particular images-per-second rate, and the environment files under envs/ exist precisely because the dependency set is heavy. If your image collection lives on a field laptop with no GPU, test the runtime on a few hundred images before planning a season's processing around it.

The third case is small scale. If a project produces a few hundred images a year, the setup cost of a Python environment, model weights and output parsing can exceed the time saved by automated filtering. The README's own getting-started page is aimed at people who are not yet sure whether AI belongs in their workflow at all, which is a signal that adoption is not automatic.

MegaDetector against a general-purpose detector such as YOLO

The obvious comparison is a general object detector. YOLO models are trained on broad image corpora and can be fine-tuned on your own labels; MegaDetector is trained specifically on camera trap imagery, several million images from a variety of ecosystems according to the README. That difference shows up in the class list. A general detector carries dozens or hundreds of categories and will happily label a person as a person and a vehicle as a vehicle, but it has no notion of an animal as a single class, and it has never seen the infrared, motion-blurred, oddly framed output of a trail camera at scale.

The relationship is closer than a simple either-or. MegaDetector's own backend is a YOLOv5 snapshot, pinned in pyproject.toml as ultralytics-yolov5 0.1.1 specifically to avoid the AGPL licence that later Ultralytics releases carry. So the real question is not whether to use YOLO but whether to use a camera-trap-trained YOLO derivative or to fine-tune your own detector on your own labels. Fine-tuning gives you species classes and control; it also gives you an annotation project, a training pipeline and a model to maintain. MegaDetector trades that work for a fixed three-class output that is good enough to delete blanks.

Maintenance, licence and the cost of upgrading

The repository is not archived, and the last push was on 2026-09-11. Releases are infrequent and large: v5.0 and v4.1 both landed on 2023-05-20, and v1000.0 arrived on 2025-07-23. The package version in pyproject.toml is 10.0.25, which does not track the release tags, so do not assume the tag number and the installed package version move together. Pin the package version you have validated rather than tracking the latest tag.

The licence is MIT, declared in both LICENSE and the pyproject.toml metadata. That is the reason for the YOLOv5 snapshot: the comment in pyproject.toml says the pinned code base predates Ultralytics's switch to an AGPL licence. If you enable the optional YOLOv9 or YOLOv11 paths by installing yolov9pip or ultralytics, you are adding a dependency whose licence is not MIT, and that is a decision for your own legal review, not something this article can settle. The same applies to model weights, which the repository does not describe in licence terms in the available documentation.

Upgrade cost is dominated by the output format. Because parsing depends on the structure documented in megadetector-output-format.md, and because the model has changed across major versions, a version bump is a chance for downstream code to break silently. Read that file before upgrading, not after.

Editorial conclusion

Adopt MegaDetector if your bottleneck is the volume of camera trap images and you can run Python or a GUI tool such as AddaxAI. Do not adopt it expecting species labels: the README states plainly that it only finds animals, and points to SpeciesNet for classification. Before committing, verify two things on your own images: the detection confidence threshold you will use to discard blanks, and whether your hardware can run the model at a speed that beats manual review. Both are decisions only your data can settle.

Frequently asked questions

How do I use MegaDetector?

Install the Python package with pip install megadetector, then follow the user guide in megadetector.md for instructions on running it over your images. If you prefer not to work in Python, the README points to AddaxAI, a GUI tool that runs MegaDetector on camera trap images.

How does MegaDetector compare with YOLO?

MegaDetector is trained on camera trap images and returns three classes: animals, people and vehicles. Its backend is actually a pinned snapshot of the YOLOv5 code base, chosen because it predates Ultralytics's switch to an AGPL licence, so the difference is the training data and the fixed class list rather than the architecture family.

What type of sensor can detect animals?

MegaDetector does not work from a sensor directly; it runs on images that a camera trap has already captured. The README describes it as identifying animals, people and vehicles in camera trap images, which also makes it useful for eliminating blank images.

What is a wildlife monitoring system?

MegaDetector is one tool in a camera trap workflow rather than a complete monitoring system: it detects animals, people and vehicles in images, and the README points to SpeciesNet when species-level identification is needed.

Official sources

  1. agentmorris/MegaDetector on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/agentmorris-megadetector.svg)](https://hysenlabs.com/projects/agentmorris-megadetector)