An Unforgettable Experience at the IORA Blue Carbon Hub as an Early Career Visiting Professional in 2022

By Mussa Ngosha

Introduction

It was a day of great joy for me when I received a letter from the permanent secretary of the Ministry of Livestock and Fisheries informing me of my selection for the IORA Blue Carbon Hub Early Career Visiting Professionals Program.

Mat, Mark, and Lauren from the Commonwealth Scientific and Industrial Research Organization (CSIRO) in Australia, helped me prepare for my travel. During the first week, I discussed with my supervisor Mat Vanderklift, my expertise and experience in computer science, data science, and earth observation sciences. We explored the idea of a project that combined remote sensing techniques on blue carbon ecosystems, especially in seagrass classification and detection. Hence, I proposed to develop a seagrass detection model based on deep learning from unoccupied aerial vehicle (UAV) data.

Research Overview

Seagrass monitoring by remote sensing has been conducted for many years using satellite and aerial images to analyze the changes in composition of different seagrass species. Mapping seagrass by optical remote sensing has been carried out using pixel-based and object-based classification. However, these classification methods are limited to image information like colour, shape, and size, but seagrasses have different morphologies and life histories depending on the species and their location. Recently, UAV data has allowed us to obtain much higher resolution images, and deep learning techniques have demonstrated capacity to distinguish seagrass species that were previously difficult to identify based on colour variation alone. UAV images are capable of acquiring fine resolution with more features, including pattern, texture, and locations. These features can be easily extracted and detected by using deep learning algorithms. I selected the “You Only Look Once” (YOLO) algorithm to train and validate the model. The YOLOv5 algorithm was selected because it is one of the most versatile and well-known object detection models, and it is also very fast compared to previous deep learning object detection models. The YOLOv5 model was trained using pre-trained convolutional weights, and the testing part was done by selecting the best weights generated during the training phase. To achieve the main goal of the research project, I used the methodology described in the project workflow below in Figure 1. The workflow diagram describes step by step the processes for implementing a seagrass detection model using YOLOv5 Algorithm.

Figure 1. Object detection workflow using YOLOv5 model.

Data

The UAV dataset for the research project was obtained from Milica Stankovic, one of the former IORA Blue Carbon fellows from Thailand. Mat introduced me to Nick Mortimer from CSIRO, who helped me to prepare the UAV data in tiles of 10×10 pixels, and Milica helped to identify the seagrass species from the UAV data. I used two seagrass species from a site in Laem Yong Lam in Thailand. Only UAV data of Enhalus acoroides and Halophila ovalis was selected for further processing.

Imagery annotation, model training, testing and validation

The Roboflow framework as a computer vision developer was used to annotate the UAV images into two classes: Enhalus acoroides and Halophila ovalis. 1058 annotated UAV images were then split into a training set with 925 images (70%), a validation set with 90 images (10%), and a testing set with 43 images (20%), and each image in the dataset was tagged with different classes. The dataset was then downloaded to Google Colab platform using the Roboflow-generated URL as a zip folder. To train the model, the Python programming language, the PyTorch framework, the OpenCV image processing package, and the Google Colab cloud service were used in this project. The model was trained within the Google Colab cloud platform with a powerful GPU tool that requires no configuration. The YOLOv5 algorithm for the seagrass detection model took 30 minutes to train and complete 150 epochs (number of iterations). The YOLOv5 algorithm with pre-trained convolutional weights was selected, and the model testing part was done by selecting the best weights generated during the training phase.

Results

Performance and Evaluation

The experimental findings show that the YOLOv5 algorithm has achieved the following metrics on seagrass detection: a mean average precision (mAP) of 37.1%. a precision of 40.2% and a recall of 44.3%. The mAP was used to measure the accuracy of the seagrass detection model. Precision was used to calculate the percentage of the correct prediction of seagrass (Enhalus acoroides and Halophila ovalis), and recall was used to indicate how well a positive prediction was made when a positive input was given. Simply put, it means how well the model detects seagrass species. Precision and recall influence each other. Generally, if the accuracy rate is high, the recall rate will be low, and if the accuracy rate is low, the recall rate will be high, as shown in figure 2. Similarly, the loss function demonstrates how well a particular predictor performs in identifying a given input data element. Thus, the lower the loss, the better the detector, as shown in figure 2.

Figure 2. Plots of precision, recall, and mAP parameters along with class object loss for training epochs.

Model Testing and Validation

The YOLOv5 model was tested on 925 UAV images and the results shows that Enhalus acoroides and Halophila ovalis species were correctly detected (figure 3). Also, the model was validated on a separate UAV dataset which was not used during the training and testing set, and the detection results are shown correctly on both seagrass species in figure 4.

Figure 3. YOLOv5 detection of Enhalus acoroides and Halophila ovalis

Figure 4. YOLOv5 validation of Enhalus acoroides (left) and Halophila ovalis (right)

Conclusion

From this study, results show that seagrass detection from UAV data and deep learning techniques is possible. The YOLOv5 has demonstrated state-of-the-art accuracy to detect Enhalus acoroides and Halophila ovalis seagrass species. I hope that this project will provide insightful information for researchers who are working on underwater vegetation and benthic habitat to improve seagrass mapping and monitoring for sustainable conservation. Hence, this YOLOv5 seagrass detector model can be extended and used at other sites with similar species.

Challenge

In this project, one of the challenges was time to annotate the UAV images and convert them into YOLOv5 format because each deep learning algorithm accepts a different data format. As we know, YOLOv5 needs data with class labels, x and y coordinates for locating the position of objects in an image, and width and height to define the bounding boxes. However, it is recommended to have more data to train a deep learning model.

Limitations and Recommendations

There have been limitations to this project; the YOLOv5 model was trained with less UAV dataset and few number of epochs (number of iteration during training). To improve the accuracy of seagrass detection in future work more UAV images and epochs should be used with enough training time.

Program Overview

The Early Career Visiting Professionals Program helped me to learn more about the importance of blue carbon ecosystems and their ecosystem services to both marine life and humans. Also, I have learned a lot from my fellows who were looking at the blue carbon ecosystem concepts.

My supervisor, Senior Scientist, Mat Vanderklift second from left with myself (first on the left) and the other IORA Blue Carbon Visiting professionals at CSIRO, IORA Blue Carbon Hub in Perth, University of Western Australia (UWA).

Moreover, during the project implementation, Nick Mortimer invited me to attend an OceanHackweek Hackathon on Stradbroke Island in Brisbane, Queensland. The focus of the hackathon was to use Python and R programming languages to access, analyze, and visualize oceanographic data from buoys and satellites. This was an excellent opportunity for me to meet colleagues from various institutions around the world, and the hackathon also allowed me to learn about and explore more Python packages.

Nick Mortimer from CSIRO standing in the middle alongside Hackathon participants on Stradbroke Island, Brisbane.

I was also invited to attend a seagrass mapping workshop in Brisbane, where I met other professionals working on the blue carbon ecosystem. I enjoyed the opportunity to extend my understanding of benthic habitat mapping, including seagrass, and will never forget the day we conducted a practical on seagrass mapping at Moreton Bay.

A practical field day on seagrass and benthic habitat mapping at Moreton Bay, Queensland.

Following the research project that I have completed, I would love to thank Mat, Lauren, Mark, and Nick for supporting and hosting me in Perth as well as Brisbane for the past couple of weeks. I would also like to thank my colleagues Karizki, Mir, Tai, and Upal for sharing thoughts and encouragement during the project implementation. Lastly, I would like to thank the Ministry of Foreign Affairs, the Ministry of Livestock and Fisheries (fisheries sector) and the Tanzania Fisheries Research Institute (TAFIRI) that granted me the opportunity to attend the IORA Blue Carbon Hub fellowship as an Early Career Visiting professional in Perth, Australia.

This is the starting point for me, and I am ready to explore the concept of applying deep learning to blue carbon ecosystem sciences, especially in the Western Indian Ocean (WIO) and the Indo-Pacific regions, through further studies.

Data Scientist, Tanzania Fisheries Research Institute (TAFIRI)

Follow Mussa on Twitter 

Follow Mussa on github