Counting Nests of Shags With YOLO To Assess the Wellbeing of the Antarctic Ecosystem
Appsilon’s ML Team recently partnered with ecologists at the Arctowski Polish Antarctic Station managed by IBB PAS. The scientists here are focusing on monitoring the Antarctic ecosystem, flying drones to capture images of the precious polar wildlife. There are many possible fronts on which we hope to collaborate in the future. Still, to start the collaboration, we have decided to test if computer vision techniques can be used to automate the counting of cormorant (shag) nests in drone imagery.
Table of contents:
- What are Antarctic Shags?
- Why are Shags (Cormorants) Important in Antarctica?
- Why use Drones for Antarctic Shag Ecological Surveys?
- Identifying Antarctic Birds – (Not Always) Black and White
- Identifying Nests of Antarctic Birds
- Antarctic Bird Nests and Object Detection – A Case for Machine Learning
- Applying YOLO Object Detection: A Custom Measure of Success
- Highlights of the Results
What are Antarctic Shags?
The Antarctic shag (Leucocarbo bransfieldensis) is the southernmost of the world’s cormorant species and its population (< 12,000 pairs) is restricted to the Antarctic Peninsula, the South Shetland archipelago, and Elephant Island.
It is the only flying bird of the Antarctic Peninsula region that predates near-exclusively on fish, requiring plunge diving to the bottom near the shore; thus, the bird occupies the niche of a major predator of demersal fish.
Just how deep can Cormorants dive?
The maximum diving depth and duration for the Antarctic shag is truly impressive. When hunting for fish they can submerge more than 110 m deep and spend five and a half minutes diving! It is the deepest and longest-duration record for any flying bird in Antarctica.
Why are Shags (Cormorants) Important in Antarctica?
In the Southern Ocean surrounding Antarctica, several unique species (e.g. the Patagonian toothfish or krill) are harvested in commercial fisheries managed by the Convention for the Conservation of Antarctic Marine Living Resources (CCAMLR).
For the fishery to serve its purpose it has to be managed sustainably. Sustainable fishing means leaving enough fish in the ocean so that they can survive and reproduce to provide enough food for other animals that depend on them. The CCAMLR sets limits to determine how much can be harvested each year to minimize the negative impact on the ecosystem.
To decide how much fish can be taken out of the ocean without disrupting the population, scientists estimate how much biomass of any particular species there is. The problem is, we cannot simply count fish in the ocean so the population sizes are estimated based on careful monitoring and interpretation of the data arising from it. The monitoring is focused on a few selected indicator species, which are most likely to respond to changes in the ecosystem. Cormorants are one of these indicator species, making them vital to monitoring shifts in the ecosystem.
What makes Antarctic shags a good indicator species?
Following the decline of seal and whale populations prior to 1970, demersal fish stocks were depleted in the South Shetland Islands by industrial fishing during the 70s to early 80s. Since 1982, the fisheries are regulated by CCAMLR and many were closed due to overexploitation.
At the same time, a marked decline in the Antarctic shag breeding population has been recorded. The undeniable link between the condition of the shag population and its prey makes it the only non-krill-dependent species on the list of CCAMLR indicators.
Antarctic shags’ diet, as well as, e.g., the size of the breeding population are used to monitor changes in coastal fish population and enrich the biomonitoring of living marine resources.
Why use Drones for Antarctic Shag Ecological Surveys?
Scientists from the Department of Antarctic Biology, IBB PAS are using drones to survey the size of the Antarctic shag population, which, as prof. Robert Bialik, Head of the Department, points out, “is a more accurate method, less invasive for the animals and does not require human presence in the colony area“.
However, counting cormorant nests in aerial photographs is not a simple task. Antarctic shags very often nest in mixed colonies with chinstrap penguins, requiring a lot of effort and patience to find their nests among hundreds or even thousands of penguin nests.
Remotely sensed imagery and computer vision
Katarzyna Fudala, an ecological monitoring specialist at the Department of Antarctic Biology, emphasized that adapting computer vision techniques capable of automatically detecting cormorant nests would be a significant improvement for scientists involved in Antarctic shags research based on aerial photogrammetry. An efficient object detection model could not only save scientists’ time, but as shown below, could find nests the scientists miss.
Sound science is vital for improving our understanding of the Antarctic ecosystem and for sustainable management of living marine resources.
Identifying Antarctic Birds – (Not Always) Black and White
The difference in morphology between shags and penguins seems obvious.
But when we look at both species from a distance…
And in particular from a bird’s-eye view (or, to be more precise, from a drone’s-flight perspective)…
The obvious differences appear to be blurring and the ubiquitous black and white come to the fore- the colors being part of the adult plumage of both species.
Why are Antarctic birds black and white?
The black and white plumage of these birds is not an evolutionary accident and is related to the ocean-dependent lifestyle of both species – birds use countershading to camouflage themselves from potential predators. When seen from below, a white belly blends in with light-filled surface waters while from above a black back merges with the dark abyss of the ocean.
Identifying Nests of Antarctic Birds
Fortunately, the obvious difference in the nest styles of the two species is particularly evident in aerial images. Antarctic shags build impressive nest structures from algae and feathers fused with feces, while chinstrap penguin nests consist of small pebbles painstakingly collected by their owners before breeding.
However, nest recognition is also not straightforward – a shag colony, especially one mixed with penguins, undergoes a number of visual transformations during the season related to breeding phenology (figure below): incubation (a), presence of chicks in the nests (b) or fledglings scattered around the nest (c).
Moreover, the nest and its surroundings look very different during the breeding (a-c) and in the post-breeding (d) season, and the level of difficulty in identifying nests on orthophotos depends on a number of factors such as the presence of snow or lighting conditions.
Antarctic Bird Nests and Object Detection – A Case for Machine Learning
Rather quickly into the discussions we realized that the data collected and used by the scientists could be transformed in a way ideal for training object detection models.
We found several key factors which made this a good case to study for machine learning. If you’re wondering if machine learning could be applied in your research see if the following also apply to your case:
- There were multiple images available, spanning all the seasons and phases of the lifecycle of shags.
- Images came from three distinct locations – perfectly suited for splitting the data geographically, ensuring and assessing the robustness of our models.
- The images were of very high spatial resolution (ranging from ~6mm per pixel to 2.5cm per pixel). These are resolutions 10-50x better than the best satellite imagery currently available to the public!
- Each image was geolocated, which allowed us to study the nests and performance of our models over time.
- The individual nests of the cormorants were marked and geolocated. With a rather constant physical size (roughly 0.5m in diameter), the point markings could easily be translated into bounding boxes.
Applying YOLO Object Detection: A Custom Measure of Success
We formulated the machine learning problem to be a case of object detection as it seemed the latest installments of the YOLO family of models, such as YOLOv6 would work well on the data. However, in this case, we weren’t so much interested in the precise sizes of the nests but rather in the presence or absence of them. So, we developed a custom way of assessing the detections based on the confidence of the prediction and the level of overlap with the ground truth.
The metric is defined as follows:
- We accept only predictions with a confidence score above a certain fixed threshold.
- We look at predictions that overlap with a nest above a certain threshold of their area
- If a given nest is covered by predictions above a certain threshold of its area we count this as a True Positive – a correct detection of a nest (this is important as we tile the large maps both for the training of models and inference).
- Nests not covered enough are counted as missed – False Negatives.
- Predictions not aligned enough with any nest are counted as False Positives.
Highlights of the Results
Several approaches could be considered, but we have decided to try one of the most demanding for any model. We picked a single image from a relatively large colony of shags (having ~250 nests) and trained an object detection model on it. Using a few neat tricks on the way we got the model to perform very well on the training colony.
Clearly, the predictions only appeared within the colony, e.g., no penguin nests were misidentified as shag nests. Several nests were missed, and in a few cases, the model saw nests that were not initially marked by experts. In fact, some of such cases were reconsidered and led to a correction of the labels!
“We are impressed with the results and high quality that Appsilon was able to produce in a small amount of time. Appsilon’s ML technique has great potential to shift the way we monitor Antarctic fauna in the future.” — Robert Bialik, Head of Antarctic Biology Department, Prof. of Institute of Biochemistry and Biophysics PAS
The examples show many correct predictions, as well as, both a missed nest (left) and individual predictions of nests not initially labeled as such (both).
The real test came when we applied the model trained on a single image from a single colony to images of colonies kilometers away from the first (20 and 40 kilometers to be exact):
Notice the correctly identified cormorant nest which lies within the penguin colony – in the lower part of the middle section of the image.
Summary of Counting Nests of Antarctic Birds with YOLO
In this project, we combined unique and important research data with the latest object detection techniques. Already the first iterations of the effort led to very promising results, potentially shifting the way monitoring Antarctic fauna is perceived in the ecological community and opening a new and important door to an improved understanding of the ecosystem of the Antarctic.
A paper explaining the details of the method, quantifying the results, and exploring their limitations is in preparation.
Last but not least, this project was run as part of the Data for Good program at Appsilon. Want to see how AI, computer vision, and machine learning models can help your projects? Reach out to us to learn more about computer vision and machine learning solutions and discuss a possible collaboration!