Complete Technical Paper Content — Ai Conservation Projects
1. Executive Abstract, Problem Formulation & Background
Multi-agent reinforcement learning (MARL) is a sub-field of reinforcement learning. It focuses on studying the behavior of multiple learning agents that coexist in a shared environment. Each agent is motivated by its own rewards, and does actions to advance its own interests; in some environments these interests are opposed to the interests of other agents, resulting in complex group dynamics. Multi-agent reinforcement learning is closely related to game theory and especially repeated games, as well as multi-agent systems. Its study combines the pursuit of finding ideal algorithms that maximize rewards with a more sociological set of concepts. While research in single-agent reinforcement learning is concerned with finding the algorithm that gets the biggest number of points for one agent, research in multi-agent reinforcement learning evaluates and quantifies social metrics, such as cooperation, reciprocity, equity, social influence, language and discrimination.
A set S {\displaystyle S} of environment states. One set A i {\displaystyle {\mathcal {A}}_{i}} of actions for each of the agents i ∈ I = { 1 , … , N } {\displaystyle i\in I=\{1,\dots ,N\}} .
P a → ( s , s ′ ) = Pr ( s t + 1 = s ′ ∣ s t = s , a → t = a → ) {\displaystyle P_{\vec {a}}(s,s')=\Pr(s_{t+1}=s'\mid s_{t}=s,{\vec {a}}_{t}={\vec {a}})} is the probability of transition (at time t {\displaystyle t} ) from state s {\displaystyle s} to state s ′ {\displaystyle s'} under joint action a → {\displaystyle {\vec {a}}} .
R → a → ( s , s ′ ) {\displaystyle {\vec {R}}_{\vec {a}}(s,s')} is the immediate joint reward after the transition from s {\displaystyle s} to s ′ {\displaystyle s'} with joint action a → {\displaystyle {\vec {a}}} . In settings with perfect information, such as the games of chess and Go, the MDP would be fully observable. In settings with imperfect information, especially in real-world applications like self-driving cars, each agent would access an observation that only has part of the information about the current state. In the partially observable setting, the core model is the partially observable stochastic game in the general case, and the decentralized POMDP in the cooperative case.
In pure competition settings, the agents' rewards are exactly opposite to each other, and therefore they are playing against each other. Pure cooperation settings are the other extreme, in which agents get the exact same rewards, and therefore they are playing with each other. Mixed-sum settings cover all the games that combine elements of both cooperation and competition.
Most real-world scenarios involving multiple agents have elements of both cooperation and competition. For example, when multiple self-driving cars are planning their respective paths, each of them has interests that are diverging but not exclusive: Each car is minimizing the amount of time it's taking to reach its destination, but all cars have the shared interest of avoiding a traffic collision. Zero-sum settings with three or more agents often exhibit similar properties to mixed-sum settings, since each pair of agents might have a non-zero utility sum between them. Mixed-sum settings can be explored using classic matrix games such as prisoner's dilemma, more complex sequential social dilemmas, and recreational games such as Among Us, Diplomacy and StarCraft II. Mixed-sum settings can give rise to communication and social dilemmas.
Stefano V. Albrecht, Filippos Christianos, Lukas Schäfer. Multi-Agent Reinforcement Learning: Foundations and Modern Approaches. MIT Press, 2024. https://www.marl-book.com Kaiqing Zhang, Zhuoran Yang, Tamer Basar. Multi-agent reinforcement learning: A selective overview of theories and algorithms. Studies in Systems, Decision and Control, Handbook on RL and Control, 2021. [1] Yang, Yaodong; Wang, Jun (2020). "An Overview of Multi-Agent Reinforcement Learning from Game Theoretical Perspective". arXiv:2011.00583 [cs.MA].
The environmental impact of the design, training, deployment and use of artificial intelligence includes the greenhouse gas emissions from generating electricity for data centres and computing hardware, operational and upstream water use, and material impacts from hardware manufacturing, mining and electronic waste. AI also enables increased emissions through its use by the oil and gas industry, which is using AI to find, extract, and refine fuels more quickly and at reduced cost. Estimating AI's environmental effects can be difficult because results depend on how impacts are measured, including whether accounting includes only model computation or also data-centre overhead, idle capacity, hardware manufacture, and local electricity supply. As these issues have received greater attention, governments and regulators have increasingly considered data-centre reporting requirements, energy-efficiency standards, and broader transparency measures for AI-related resource use.
2. Related Work, Literature Survey & Algorithmic Foundations
Published estimates of energy use per AI request vary widely across models, tasks and measurement methods. A benchmark study presented at the 2024 ACM Conference on Fairness, Accountability, and Transparency found substantial differences between task types, with lower energy use for some text tasks and much higher energy use for image generation in the study's test conditions. In that benchmark, simple classification tasks consumed about 0.002–0.007 Wh per prompt on average (about 9% of a smartphone charge for 1,000 prompts), while text generation and text summarisation each used about 0.05 Wh per prompt; image generation averaged 2.91 Wh per prompt, and the least efficient image model in the study used 11.49 Wh per image (roughly equivalent to half a smartphone charge). First-party measurements in production environments have also been published. A 2025 Google study on Gemini assistant serving reported median per-prompt energy, emissions, and water-use estimates under the authors' accounting framework, while noting that different system boundaries can produce substantially different results. The study reported a median text-prompt estimate of about 0.24 Wh, which is roughly as much energy as watching nine seconds of television. The study also stated that software and infrastructure improvements reduced energy use by a factor of 33 and carbon emissions by a factor of 44 for a typical prompt over one year within the authors' framework. Researchers at the University of Michigan measured the energy consumption of various Meta Llama 3.1 models released in 2024 and found that smaller language models (8 billion parameters) use about 114 joules (0.03167 Wh) per response, while larger models (405 billion parameters) require up to 6,700 joules (1.861 Wh) per response. This corresponds to the energy needed to run a microwave oven for roughly one-tenth of a second and eight seconds, respectively. Comparisons between AI systems and human labour for specific tasks have produced mixed results and remain sensitive to assumptions about output quality, workload and system boundaries. A 2024 study in Scientific Reports reported 130 to 2900 times lower estimated carbon emissions for selected AI systems than for human writers and illustrators under its assumptions. A later Scientific Reports paper reported a counterexample for programming tasks under its assumptions, finding 5 to 19 times higher estimated emissions for the evaluated AI system than for human programmers on the benchmark used in that study.
AI electricity intensity depends not only on model architecture but also on hardware and facility efficiency. Data centre operators commonly report Power usage effectiveness (PUE), which measures the ratio of total facility energy to IT equipment energy; a lower PUE indicates less overhead energy for cooling and other supporting infrastructure. Operators may also publish metrics and case studies on hardware efficiency, cooling systems and power sourcing. In its 2024 environmental report, Google stated that its 2023 total greenhouse gas emissions increased 13% year over year, primarily because of increased data-centre energy consumption and supply-chain emissions, while also reporting lower PUE than industry averages for its own facilities. The International Energy Agency has also reported that data-centre project growth is straining planning and regulatory systems and holding up grid connections and other approvals.
AI systems depend on specialised computing hardware, and rapid turnover in servers and accelerators may contribute to rising e-waste. The World Health Organization identified e-waste as a growing environmental and public-health issue. The primary contributor to e-waste from AI is the high performance hardware used in data centers, which can contain hazardous materials like lead, mercury, and chromium. AI data center components are also swapped frequently, with companies expected to completely replace their hardware every three years to remain competitive. Recycling AI hardware can also be more difficult than typical consumer electronics due to the possibility of storing sensitive data. A 2024 study in Nature Computational Science estimated that generative AI could add between 1.2 and 5 million tonnes of e-waste by 2030 under the scenarios examined by the authors. In the study's higher-end scenarios, this would represent up to 12% of projected global e-waste by 2030. The authors also reported that circular economy strategies along the generative AI value chain could reduce AI-related e-waste generation by 16–86%. A study from 2026 instead estimated that by 2030, AI servers would generate 131.0 to 224.8 thousand tonnes of e-waste per year. Deep learning and AI systems have also been suggested to help with e-waste tracking, collection, and management.
The environmental effects of AI-related infrastructure are not distributed evenly. Research on data centres in the United States has found that their environmental footprints vary by region and may intersect with local electricity systems, water availability and existing environmental burdens. In that study, one-fifth of servers' direct water footprint came from moderately to highly water-stressed watersheds, while nearly half of servers were fully or partially powered by plants located in water-stressed regions. Concerns have also been raised about local air pollution, permitting and grid stress in communities hosting AI-related facilities and associated power infrastructure. In 2025, civil rights and environmental groups challenged permits connected to an xAI facility in the Memphis area, arguing that air pollution burdens could fall disproportionately on historically overburdened neighbourhoods. The dispute has been the subject of regulatory and legal proceedings.
Pytorch-Wildlife: A Collaborative Deep Learning Framework for Conservation Update highlights (Version 1.0.2) Added Snapshot Serengeti classification model into the model zoo. Added Classification fine-tuning module. Announcement At the core of our mission is the desire to create a harmonious space where conservation scientists from all over the globe can unite, share, and grow. We are expanding the CameraTraps repo to introduce Pytorch-Wildlife , a Collaborative Deep Learning Framework for Conservation, where researchers can come together to share and use datasets and deep learning architectures for wildlife conservation. We've been inspired by the potential and capabilities of Megadetector, and we deeply value its contributions to the community. As we forge ahead with Pytorch-Wildlife, under which Megadetector now resides, please know that we remain committed to supporting, maintaining, and developing Megadetector, ensuring its continued relevance, expansion, and utility. To use the newest version of MegaDetector with all the exisitng functionatlities, you can use our newly developed user interface or simply load the model with Pytorch-Wildlife and the weights will be automatically downloaded: from PytorchWildlife . models import detection as pw_detection detection_model = pw_detection . MegaDetectorV5 () If you'd like to learn more about Pytorch-Wildlife , please continue reading. For those interested in accessing the previous MegaDetector repository, which utilizes the same MegaDetector v5 model weights and was primarily developed by Dan Morris during his time at Microsoft, please visit the archive directory, or you can visit this forked repository that Dan Morris is actively maintaining. If you have any questions regarding MegaDetector and Pytorch-Wildlife, please email us ! Table of contents Pytorch-Wildlife: A Collaborative Deep Learning Framework for Conservation Announcement Table of contents Welcome to Pytorch-Wildlife Version 1.0 Explore Pytorch-Wildlife and MegaDetector with Our User Interface Core Features of Pytorch-Wildlife What are the core components of Pytorch-Wildlife? Progress on the core tasks Development roadmap Examples! Image detection using MegaDetector v5 Image classification with MegaDetector v5 and AI4GAmazonRainforest Opossum ID with MegaDetector v5 and AI4GOpossum Contributing Existing Collaborators License Welcome to Pytorch-Wildlife Version 1.0 PyTorch-Wildlife is a platform to create, modify, and share powerful AI conservation models. These models can be used for a variety of applications, including camera trap images, overhead images, underwater images, or bioacoustics. Your engagement with our work is greatly appreciated, and we eagerly await any feedback you may have. The Pytorch-Wildlife library allows users to directly load the MegaDetector v5 model weights for animal detection. We've fully refactored our codebase, prioritizing ease of use in model deployment and expansion. In addition to MegaDetector v5 , Pytorch-Wildlife also accommodates a range of classification weights, such as those derived from the Amazon Rainforest dataset and the Opossum classification dataset. Explore the codebase and functionalities of Pytorch-Wildlife through our interactive Gradio web app and detailed Jupyter notebooks, designed to showcase the practical applications of our enhancements at PyTorchWildlife . You can find more information in our documentation . Here is a brief example on how to perform detection and classification on a single image using PyTorch-wildlife : import torch from PytorchWildlife . models import detection as pw_detection from PytorchWildlife . models import classification as pw_classification img = torch . randn (( 3 , 1280 , 1280 )) # Detection detection_model = pw_detection . MegaDetectorV5 () # Model weights are automatically downloaded. detection_result = detection_model . single_image_detection ( img ) #Classification classification_model = pw_classification . AI4GAmazonRainforest () # Model weights are automatically downloaded. classification_results = classification_model . single_image_classification ( img ) Explore Pytorch-Wildlife and MegaDetector with Our User Interface If you want to directly try Pytorch-Wildlife with the AI models available, including MegaDetector v5 , you can use our Gradio interface. This interface allows users to directly load the MegaDetector v5 model weights for animal detection. In addition, Pytorch-Wildlife also has two classification models in our initial version. One is trained from an Amazon Rainforest camera trap dataset and the other from a Galapagos opossum classification dataset (more details of these datasets will be published soon). To start, please follow the installation instructions on how to run the Gradio interface! We also provide multiple Jupyter notebooks for demonstation. Core Features of Pytorch-Wildlife What are the core components of Pytorch-Wildlife? Unified Framework : Pytorch-Wildlife integrates four pivotal elements: Machine Learning Models Pre-trained Weights Datasets Utilities Our work : In the provided graph, boxes outlined in red represent elements that will be added and remained fixed, while those in blue will be part of our development. Inaugural Model : We're kickstarting with YOLO as our first available model, complemented by pre-trained weights from MegaDetector v5 . This is the same MegaDetector v5 model from the previous repository. Expandable Repository : As we move forward, our platform will welcome new models and pre-trained weights for camera traps and bioacoustic analysis. We're excited to host contributions from global researchers through a dedicated submission platform. Datasets from LILA : Pytorch-Wildlife will also incorporate the vast datasets hosted on LILA, making it a treasure trove for conservation research. Versatile Utilities : Our set of utilities spans from visualization tools to task-specific utilities, many inherited from Megadetector. User Interface Flexibility : While we provide a foundational user interface, our platform is designed to inspire. We encourage researchers to craft and share their unique interfaces, and we'll list both existing and new UIs from other collaborators for the community's benefit. Let's shape the future of wildlife research, together! Progress on the core tasks Below you can find our progress in these core tasks: Development roadmap Here you can find details of the milestone roadmap for Pytorch-Wildlife : We are working on a new roadmap for 2024! To check the previous roadmap and finished tasks for 2023, please click here . Examples! Image detection using MegaDetector v5 Credits to Universidad de los Andes, Colombia. Image classification with MegaDetector v5 and AI4GAmazonRainforest Credits to Universidad de los Andes, Colombia. Opossum ID with MegaDetector v5 and AI4GOpossum Credits to the Agency for Regulation and Control of Biosecurity and Quarantine for Galápagos (ABG), Ecuador. Contributing This project welcomes contributions and suggestions. If you would like to submit a pull request, we will publish a contribution guideline soon. This project has adopted the Microsoft Open Source Code of Conduct . For more information see the Code of Conduct FAQ or contact zhongqimiao@microsoft.com with any additional questions or comments. Citing PyTorchWildlife If you find this code useful, please consider citing @misc{PyTorchWildlife, title={Pytorch-Wildlife: A Collaborative Deep Learning Framework for Conservation}, author={Miao, Z., Hernández, A., Vargas, L., Nasir, M. Gupta, Amrita, Dodhia, R., Ferres, J.}, booktitle={GitHub}, year={2024} } We are currently working on a technical report to make PyTorchWildlife a citable paper! We will update this readme once it is published. Existing Collaborators Here are a few of the organizations that have used MegaDetector. We're only listing organizations who (a) we know about and (b) have given us permission to refer to them here (or have posted publicly about their use of MegaDetector). The extensive collaborative efforts of Megadetector have genuinely inspired us, and we deeply value its significant contributions to the community. As we continue to advance with Pytorch-Wildlife, our commitment to delivering technical support to our existing partners on MegaDetector remains the same. If you have any questions regarding MegaDetector, want to become a collaborator, or would like to be added to this list, please email us ! (Newly Added) TerrOïko ( OCAPI platform ) Arizona Department of Environmental Quality Blackbird Environmental Camelot Canadian Parks and Wilderness Society (CPAWS) Northern Alberta Chapter Conservation X Labs Czech University of Life Sciences Prague EcoLogic Consultants Ltd. Estación Biológica de Doñana Idaho Department of Fish and Game Island Conservation Myall Lakes Dingo Project Point No Point Treaty Council Ramat Hanadiv Nature Park SPEA (Portuguese Society for the Study of Birds) Synthetaic Taronga Conservation Society The Nature Conservancy in Wyoming TrapTagger Upper Yellowstone Watershed Group Applied Conservation Macro Ecology Lab , University of Victoria Banff National Park Resource Conservation , Parks Canada Blumstein Lab , UCLA Borderlands Research Institute , Sul Ross State University Capitol Reef National Park / Utah Valley University Center for Biodiversity and Conservation , American Museum of Natural History Centre for Ecosystem Science , UNSW Sydney Cross-Cultural Ecology Lab , Macquarie University DC Cat Count , led by the Humane Rescue Alliance Department of Fish and Wildlife Sciences , University of Idaho Department of Wildlife Ecology and Conservation , University of Florida Ecology and Conservation of Amazonian Vertebrates Research Group , Federal University of Amapá Gola Forest Programma , Royal Society for the Protection of Birds (RSPB) Graeme Shannon's Research Group , Bangor University Hamaarag , The Steinhardt Museum of Natural History, Tel Aviv University Institut des Science de la Forêt Tempérée (ISFORT), Université du Québec en Outaouais Lab of Dr. Bilal Habib , the Wildlife Institute of India Mammal Spatial Ecology and Conservation Lab , Washington State University McLoughlin Lab in Population Ecology , University of Saskatchewan National Wildlife Refuge System, Southwest Region , U.S. Fish & Wildlife Service Northern Great Plains Program , Smithsonian Quantitative Ecology Lab , University of Washington Santa Monica Mountains Recreation Area , National Park Service Seattle Urban Carnivore Project , Woodland Park Zoo Serra dos Órgãos National Park , ICMBio Snapshot USA , Smithsonian Wildlife Coexistence Lab , University of British Columbia Wildlife Research , Oregon Department of Fish and Wildlife Wildlife Division , Michigan Department of Natural Resources Department of Ecology, TU Berlin Ghost Cat Analytics Protected Areas Unit, Canadian Wildlife Service School of Natural Sciences , University of Tasmania ( story ) Kenai National Wildlife Refuge , U.S. Fish & Wildlife Service ( story ) Australian Wildlife Conservancy ( blog , blog ) Felidae Conservation Fund ( WildePod platform ) ( blog post ) Alberta Biodiversity Monitoring Institute (ABMI) ( WildTrax platform ) ( blog post ) Shan Shui Conservation Center ( blog post ) ( translated blog post ) Irvine Ranch Conservancy ( story ) Wildlife Protection Solutions ( story , story ) Road Ecology Center , University of California, Davis ( Wildlife Observer Network platform ) The Nature Conservancy in California ( Animl platform ) San Diego Zoo Wildlife Alliance ( Animl R package ) License This repository is licensed with the MIT license .
At the core of our mission is the desire to create a harmonious space where conservation scientists from all over the globe can unite, share, and grow. We are expanding the CameraTraps repo to introduce Pytorch-Wildlife , a Collaborative Deep Learning Framework for Conservation, where researchers can come together to share and use datasets and deep learning architectures for wildlife conservation.
We've been inspired by the potential and capabilities of Megadetector, and we deeply value its contributions to the community. As we forge ahead with Pytorch-Wildlife, under which Megadetector now resides, please know that we remain committed to supporting, maintaining, and developing Megadetector, ensuring its continued relevance, expansion, and utility.
To use the newest version of MegaDetector with all the exisitng functionatlities, you can use our newly developed user interface or simply load the model with Pytorch-Wildlife and the weights will be automatically downloaded:
3. Dataset Ingestion, Preprocessing & Stochastic Augmentations
from PytorchWildlife . models import detection as pw_detection detection_model = pw_detection . MegaDetectorV5 ()
For those interested in accessing the previous MegaDetector repository, which utilizes the same MegaDetector v5 model weights and was primarily developed by Dan Morris during his time at Microsoft, please visit the archive directory, or you can visit this forked repository that Dan Morris is actively maintaining.
If you have any questions regarding MegaDetector and Pytorch-Wildlife, please email us !
PyTorch-Wildlife is a platform to create, modify, and share powerful AI conservation models. These models can be used for a variety of applications, including camera trap images, overhead images, underwater images, or bioacoustics. Your engagement with our work is greatly appreciated, and we eagerly await any feedback you may have.
The Pytorch-Wildlife library allows users to directly load the MegaDetector v5 model weights for animal detection. We've fully refactored our codebase, prioritizing ease of use in model deployment and expansion. In addition to MegaDetector v5 , Pytorch-Wildlife also accommodates a range of classification weights, such as those derived from the Amazon Rainforest dataset and the Opossum classification dataset. Explore the codebase and functionalities of Pytorch-Wildlife through our interactive Gradio web app and detailed Jupyter notebooks, designed to showcase the practical applications of our enhancements at PyTorchWildlife . You can find more information in our documentation .
Here is a brief example on how to perform detection and classification on a single image using PyTorch-wildlife :
import torch from PytorchWildlife . models import detection as pw_detection from PytorchWildlife . models import classification as pw_classification img = torch . randn (( 3 , 1280 , 1280 )) # Detection detection_model = pw_detection . MegaDetectorV5 () # Model weights are automatically downloaded. detection_result = detection_model . single_image_detection ( img ) #Classification classification_model = pw_classification . AI4GAmazonRainforest () # Model weights are automatically downloaded. classification_results = classification_model . single_image_classification ( img )
If you want to directly try Pytorch-Wildlife with the AI models available, including MegaDetector v5 , you can use our Gradio interface. This interface allows users to directly load the MegaDetector v5 model weights for animal detection. In addition, Pytorch-Wildlife also has two classification models in our initial version. One is trained from an Amazon Rainforest camera trap dataset and the other from a Galapagos opossum classification dataset (more details of these datasets will be published soon). To start, please follow the installation instructions on how to run the Gradio interface! We also provide multiple Jupyter notebooks for demonstation.
4. Neural Network Backbone, Layer Specifications & Loss Formulations
Our work : In the provided graph, boxes outlined in red represent elements that will be added and remained fixed, while those in blue will be part of our development.
Inaugural Model : We're kickstarting with YOLO as our first available model, complemented by pre-trained weights from MegaDetector v5 . This is the same MegaDetector v5 model from the previous repository.
Expandable Repository : As we move forward, our platform will welcome new models and pre-trained weights for camera traps and bioacoustic analysis. We're excited to host contributions from global researchers through a dedicated submission platform.
Datasets from LILA : Pytorch-Wildlife will also incorporate the vast datasets hosted on LILA, making it a treasure trove for conservation research.
Versatile Utilities : Our set of utilities spans from visualization tools to task-specific utilities, many inherited from Megadetector.
User Interface Flexibility : While we provide a foundational user interface, our platform is designed to inspire. We encourage researchers to craft and share their unique interfaces, and we'll list both existing and new UIs from other collaborators for the community's benefit.
Credits to the Agency for Regulation and Control of Biosecurity and Quarantine for Galápagos (ABG), Ecuador.
This project welcomes contributions and suggestions. If you would like to submit a pull request, we will publish a contribution guideline soon.
5. Training Protocol, Convergence Behavior & Experimental Evaluation
This project has adopted the Microsoft Open Source Code of Conduct . For more information see the Code of Conduct FAQ or contact zhongqimiao@microsoft.com with any additional questions or comments.
@misc{PyTorchWildlife, title={Pytorch-Wildlife: A Collaborative Deep Learning Framework for Conservation}, author={Miao, Z., Hernández, A., Vargas, L., Nasir, M. Gupta, Amrita, Dodhia, R., Ferres, J.}, booktitle={GitHub}, year={2024} }
We are currently working on a technical report to make PyTorchWildlife a citable paper! We will update this readme once it is published.
Here are a few of the organizations that have used MegaDetector. We're only listing organizations who (a) we know about and (b) have given us permission to refer to them here (or have posted publicly about their use of MegaDetector).
The extensive collaborative efforts of Megadetector have genuinely inspired us, and we deeply value its significant contributions to the community. As we continue to advance with Pytorch-Wildlife, our commitment to delivering technical support to our existing partners on MegaDetector remains the same.
If you have any questions regarding MegaDetector, want to become a collaborator, or would like to be added to this list, please email us !
Ecology and Conservation of Amazonian Vertebrates Research Group , Federal University of Amapá
Road Ecology Center , University of California, Davis ( Wildlife Observer Network platform )
Model Figures & Evaluation Curves (4 Images)
Deep Learning Execution Pipeline
(Preprocessing)
(Feature Extraction)
(Self-Attention)
(Loss Optimization)