Protecting Brazil Nut Trees, The Cornerstone of Amazon Conservation
Among the towering giants of the Amazon Rainforest, the Castana tree, known internationally as the Brazil nut tree (Bertholletia excelsa), holds a unique and vital place. These ancient trees, some reaching over 50 meters tall and living for more than 500 years, are keystones of both ecological health and human livelihood in the Amazon basin.
Ecologically, Castana trees play an essential role in maintaining forest structure and biodiversity. Their enormous canopies provide critical habitat for countless species, from insects to primates, while their large, coconut-sized fruits are a key food source for animals like agoutis, who also act as natural seed dispersers.
But perhaps even more importantly, the Castana tree offers a rare economic bridge between local communities and forest conservation. The Brazil nut industry is one of the few examples were harvesting a wild, non-timber product can be more profitable over time than cutting down the trees for timber or clearing the forest for agriculture. In many parts of Peru, Bolivia, and Brazil, families rely on the seasonal harvest of Castana fruits for income, providing a powerful incentive to keep the forest standing.
This incentive is strengthened by the tree's deep ecological ties: Castana trees cannot be farmed in plantations. They require the presence of specialized rainforest pollinators and seed dispersers to reproduce and fruit, and only thrive in intact, biodiverse Amazonian ecosystems. Without a healthy, undisturbed forest around them, Castana trees simply stop producing nuts. This makes them a natural ally for conservation efforts — generating income only when the forest remains whole.
Each year, skilled gatherers brave the dense undergrowth during the rainy season, collecting fallen fruits by hand. The nuts inside are processed and sold locally and internationally, feeding markets that value sustainably sourced goods. This form of forest-based economy promotes the long-term health of the Amazon and creates a viable alternative to destructive land uses.
In short, every Castana harvested sustainably is a small victory for the forest, reinforcing the idea that thriving ecosystems and thriving economies can coexist. With growing global pressures on tropical forests, finding ways to support and expand these sustainable models is more critical than ever.
Wired Amazon's Aerobotany Program: Marrying Tech with Conservation
Conservation in the 21st century demands more than passion, it requires technology, innovation, and bold thinking. Wired Amazon embodies this spirit by creating programs that connect cutting-edge technology with on-the-ground conservation efforts in the heart of the Amazon.
One of Wired Amazon's most exciting initiatives is the Aerobotany Program. Led by tropical ecologist Dr. Varun Swamy, Aerobotany brings the power of drone technology into the rainforest canopy. Over the past seven years, Dr. Swamy has worked tirelessly to gather detailed, ground-based data on Castana trees across concessions in the Peruvian Amazon, painstakingly recording tree health, fruit production, and harvest yields year after year.
This rich dataset has become the foundation for a new vision: using drones and AI to predict Brazil nut harvests from the sky.
Traditionally, predicting a Castana harvest meant months of work: hiking deep into remote forests, observing thousands of trees, and manually counting fallen fruits scattered across the forest floor. These efforts are labor-intensive, slow, and limited in scale and often covering only a small fraction of the vast Amazonian landscape.
Moreover, environmental factors like rainfall patterns, soil conditions, and pollination success create huge year-to-year variability in fruit production, making long-term planning difficult for local harvesters.
Aerobotany aims to change that. By deploying drones to capture high-resolution imagery of Castana trees at known GPS locations, the program is building an automated, scalable method to detect and count Castana fruits directly from the canopy, eliminating the need for exhaustive ground surveys and enabling rapid, data-driven predictions of harvest volumes across large areas.
What was once a task requiring weeks of manual labor can now, potentially, be accomplished in a single day of flying. This approach has the potential to transform how we understand and manage one of Amazon's most important resources.
The Drone-Based Solution: High-Tech in the Rainforest
Flying above the towering canopy of the Amazon, drones are opening a new frontier for conservation science. In the Aerobotany Program, drones are used to conduct precision surveys of Castana trees at known GPS-marked locations, where detailed ground data has already been collected over several years. These targeted flights allow researchers to capture high-resolution images of individual trees, focusing specifically on the coconuts-sized fruits, known as "cocos", nestled among the leaves.
The goal is ambitious but simple: detect and count Castana fruits from drone imagery in order to predict harvest volumes. Instead of relying on long, exhausting hikes through the rainforest and time-consuming ground counts, researchers can now assess fruit production from the air with speed and accuracy.
This drone-based method offers a host of advantages:
- Speed and Scalability: What once took weeks of ground surveys can now be accomplished in a single day. Entire concessions can be surveyed systematically, opening the door to much larger-scale harvest prediction efforts.
- Reduced Environmental Impact: By minimizing the need for physical access to sensitive forest areas, drone surveys reduce disturbance to wildlife, understory vegetation, and the trees themselves.
- Data Consistency: Drone imagery provides consistent, repeatable visual records that can be archived and reanalyzed as needed, improving the reliability of year-to-year comparisons.
- Empowering Local Communities: Ultimately, this technology has the potential to give Brazil nut concessions new tools to plan harvests, optimize labor, and secure sustainable incomes — all while keeping the forest intact.
By merging remote sensing with artificial intelligence, the Aerobotany project is laying the groundwork for a future where conservation decisions are faster, smarter, and more deeply rooted in data.
Building the AI Model: Training YOLO to See the Invisible
Once the drone images are captured, the next challenge begins: teaching a computer to recognize and count the Brazil nut tree fruits , "Coco's", among the dense canopy.
For this task, we turned to YOLO, short for "You Only Look Once," one of the fastest and most powerful open-source object detection algorithms available today. YOLO models are designed to scan an image and instantly identify and localize objects within it, making them ideal for detecting small, scattered targets like Castana fruits in a complex rainforest environment.
The Training Process
Training the model began with careful dataset preparation. High-resolution drone images were meticulously labeled by hand, with each visible Castana fruit manually outlined to create a ground-truth dataset. This labeling process is a critical step in the process: the model could only learn what it was explicitly shown.
The model was trained using YOLO11 in Google Colab with a combination of CPU and A100 GPU runtimes. Image annotation was done using Roboflow, and training scripts were managed in Python using Ultralytics' YOLO framework.
Once the labeled dataset was prepared, the YOLO model was trained over hundreds of epochs (training cycles), gradually improving its ability to detect Castana fruits by adjusting its internal parameters.
The model is now able to detect a majority of Castana fruits with strong accuracy, demonstrating that automated fruit counting from drone imagery is not only possible, but practical.
As part of this project, I led the development of the computer vision model, including dataset creation, annotation, training, and performance evaluation using the YOLO11 framework.
The Road Ahead: Refining, Scaling, and Predicting
While the current model performance is encouraging, the journey is far from over. Achieving consistent, high-accuracy detection of Castana fruits in the wild presents several ongoing challenges.
One major hurdle is the difficulty of small-object detection. Even in high-resolution drone imagery, the fruits can appear tiny and partially hidden by dense canopy leaves, making them easy to miss — or mistakenly detect — especially under varied lighting and shadow conditions. Precision and recall must both improve to ensure reliable fruit counts across different sites and conditions.
Another challenge is data variability. Changes in altitude, tree shape, fruit maturity, and background clutter can all affect detection accuracy. The model needs to generalize well across these variations, something that only comes with larger, more diverse training datasets.
Next Steps
To tackle these challenges, our next steps are clear:
- Expand the Dataset: Collect and annotate a larger, more varied set of drone images from different sites and seasons to expose the model to a wider range of conditions.
- Fine-Tune the Model: Experiment with hyperparameter tuning, additional layers, and more advanced loss functions to squeeze out better performance.
- Advanced Data Augmentation: Introduce sophisticated augmentation strategies, like synthetic lighting changes and random occlusions, to better simulate real-world variability.
- Field Validation: Compare drone-predicted fruit counts with actual ground-truth harvest numbers to calibrate and validate the model's predictions in the real world.
From Detection to Prediction: Turning Fruit Counts into Harvest Forecasts
Building an accurate AI model is a crucial step, but it's only part of the journey. The true goal of the Aerobotany project goes beyond fruit detection: it's to transform drone-based observations into actionable predictions about Brazil nut harvests.
Once the model reliably detects and counts cocos (the large, woody fruits of the Castana tree) in drone imagery, the next step is to connect those counts to real-world harvest volumes. If we can determine that a tree with 20 visible cocos in a drone image typically yields 8 kilograms of processed nuts, for example, then we can begin to generate powerful, data-driven harvest forecasts tree by tree, and therefore calculate a harvest forecast for an entire concession.
This would be a game-changer for communities that depend on the Brazil nut economy. Rather than entering the harvest season with uncertainty, concessionaires could use drone surveys to estimate expected yields in advance, plan their labor accordingly, and prioritize collection from the most productive trees. This could increase harvest efficiency, reduce costs, and strengthen the economic case for forest conservation.
A Long-Term Vision Rooted in Real Data
Fortunately, this next phase of the project is already underway. For the past seven years, Dr. Varun Swamy and the Wired Amazon team have been collecting both drone imagery and detailed harvest records at Refugio Amazonas, a Brazil nut concession and ecotourism lodge deep in the Peruvian rainforest. This rich, longitudinal dataset forms the foundation for linking what we see from above to what ends up in sacks on the forest floor.
The objective now is to analyze the relationship between the number of cocos detected in aerial imagery and the actual harvest weight for each tree. This involves building statistical models that account for natural variation such as fruit maturity, visibility in the canopy, and nut yield per fruit. The result will be a predictive tool: if a drone survey detects 15 cocos on a given tree, we can estimate its likely harvest in kilograms, with a quantifiable margin of error.
As the model matures and expands to new regions, this same approach can be applied to other concessions, enabling large-scale harvest forecasts that are faster, more accurate, and more cost-effective than traditional methods.
In essence, we're not just building a model to detect fruits, we are building a bridge between technology and sustainable livelihoods.
Small Fruits, Big Future
In the heart of the Amazon, small fruits like the Castana hold an outsized importance, not just for the trees that bear them or the animals that rely on them, but for entire communities and the future of one of the planet's most vital ecosystems.
By combining drone technology, AI-driven object detection, and years of dedicated fieldwork, the Aerobotany project is pioneering a new model for sustainable resource management. Instead of clearing forests or exhausting natural resources, we now have the tools to work with the landscape allowing us to count, predict, and manage Castana harvests in harmony with the forest itself.
The broader implications are profound. With better harvest predictions, local economies can thrive without sacrificing the health of the Amazon. With scalable, non-invasive monitoring, conservation efforts can be more targeted and effective. And by advancing these technologies today, we lay the groundwork for a future where data-driven conservation becomes a cornerstone of global climate action.
In every drone flight and every predicted fruit count, we are proving a simple but powerful idea: That the solutions to some of our greatest environmental challenges may already be growing quietly, high above us in the canopy.
Let's Connect
This project blends two things I care deeply about: conservation and cutting-edge AI. By using drones and computer vision to monitor Brazil nut trees, we're building tools that can support both local livelihoods and rainforest protection. I'm always open to collaborating on applied AI for conservation — feel free to reach out if this work resonates with you.
If this project sparks your curiosity, if you're working on something similar, or if you're just excited about the potential of AI and drone technology for conservation — I'd love to hear from you.
Whether you're a researcher, student, conservationist, or simply passionate about the Amazon, there's space in this conversation for you. Collaboration and dialogue are at the heart of innovation, and the more minds we bring together, the stronger and more impactful our solutions can become.
Feel free to reach out, ask questions, share ideas, or just say hello. You can connect with me here on Medium or on LinkedIn, and follow along as the Aerobotany project continues to grow.
The forest has stories to tell — we're just beginning to learn how to listen from above.