Towards Continuous Floating Invasive Plant Removal Using Unmanned Surface Vehicles and Computer Vision

Deficient domestic wastewater management, industrial waste, and floating debris are some leading factors that contribute to inland water pollution. The surplus of minerals and nutrients in overly contaminated zones can lead to the invasion of different invasive weeds. Lemnoideae, commonly known as duckweed, is a family of floating plants that has no leaves or stems and forms dense colonies with a fast growth rate. If not controlled, duckweed establishes a green layer on the surface and depletes fish and other organisms of oxygen and sunlight. In the last decades, duckweed blooms have become an expensive plague to remove in Lake Titicaca, causing significant biodiversity and economic losses. To address this issue, we propose the development of an unmanned surface vehicle (USV) to continuously monitor and collect duckweed. This device includes a steering angle estimation system (SAE) that combines a duckweed detector, a steering angle classifier, and a momentum-inspired module to determine continuously the orientation of the USV when it is inspecting a zone. We train and test our deep learning-based models with two novel datasets: first, a dataset for end-to-end steering angle classification collected synthetically using a bespoke simulator; and second, a dataset for duckweed detection. An experimental evaluation of the USV and SAE system is provided in virtual and outdoor environments.


I. INTRODUCTION
Aquatic weeds are plants that are not native to a region and that spread through interconnected, still water bodies by waterfowl, livestock, boat trailers, and fishermen's gear and boots.Although they can be beneficial in providing natural filtration, food, and shelter for aquatic animals, they can become an aggressive plague when they grow out of control.Moreover, while they are manageable in small water bodies, including ponds, pools, and wetlands, their removal is challenging in longer water bodies, such as lagoons, lakes, dams, and bays.They disrupt such ecosystems by depleting The associate editor coordinating the review of this manuscript and approving it for publication was Turgay Celik .light and oxygen resources, and over-increasing minerals and nutrients, to the point of causing fish death and sludge [1].This process, known as eutrophication, causes ecosystem decay and biodiversity loss that are hard to recover in years.
According to McNabb and Anderson [2], aquatic weeds can be clustered into two groups: algae and vascular plants.Algae are characterized mainly by being a common component and critical foundation of the food chain in healthy aquatic environments.A rapid increase in the population of uni-cellular algae, also known as harmful algae blooms (HABs), has been a constant research thread for automatic removal systems due to their dangerous consequences to nature [3], [4].On the other hand, vascular plants can be split into three sub-categories: submerged, emergent and floating weeds.The first two are rooted to the bottom and can remain underwater or appear over the surface, respectively.In contrast, floating invasive weeds grow freely over the water surface, and they find suitable conditions to overgrow in eutrophicated water bodies that have a surplus of minerals and nutrients, an increase in temperature, and little airflow.The development of new automatic tools is important to control and suppress invasive weeds timely.
The present research was developed as a response to the recent duckweed blooms in Lake Titicaca.Duckweed, also known as (lemna minor), is a species of floating weed in the subfamily lemnoideae.In recent decades, increasing urbanization in coastal areas, inadequate sewage, and domestic wastes have poured a surplus of minerals and nutrients [5] in Lake Titicaca, affecting the water consumption and sustenance of 3 million residents in Bolivia and Peru.Furthermore, since 2015, the effects of eutrophication and climate change have worsened, and duckweed blooms have become more frequent [6].Nowadays, duckweed invasion is a recurring problem in Cohana Bay, Bolivia and Puno Bay, Peru, where the local governments are frequently forced to spend large amounts of money to treat and dredge the lake.
Compared with other elements present in aquatic environments (e.g.boats and buoys), duckweed colonies can be arbitrarily shaped, and their precise detection is a challenging task; see Figure 1.In this research, we propose the development of a low-cost unmanned surface vehicle (USV) for the monitoring and removal of duckweed from Lake Titicaca.With this goal, we implement and deploy a Steering Angle Estimation system (SAE) to process RGB and stereo vision data coming from an OAK-D camera in realtime.Not only does the SAE system recognize duckweed appearances, but it also avoids collisions when the USV keeps cleaning a water body.The gradual development of the SAE's architecture and subsequent deployment on the embedded system NVIDIA Jetson Nano Development Kit makes the autonomous navigation approach stable and portable.Moreover, a virtual simulator was implemented for synthetic data collection and experimentation of the removal FIGURE 1. Complex shape of a duckweed colony covering the entire water surface and not supporting a precise detection.Courtesy of GBIF [7].
• A survey on the recent automatic tools and robotic-based approaches for aquatic weed detection and removal.
• The prototype of the electronic and mechanical sub-systems of an unmanned duckweed collection vehicle for experimental evaluation.
• The development of duckweed detectors and steering angle estimators.
• The implementation of a virtual simulator to augment data and evaluate the autonomous removal system.
The rest of this paper is organized as follows.In Section II, we review recent approaches for aquatic weed mapping and removal that make use of different sensing and collection modalities, but we pay particular attention to unmanned surface vessels that deploy modern artificial intelligence systems.In Section III, we present the development stages of the proposed unmanned surface vehicle.In Section IV, we describe the implementation of the autonomous navigation system.Afterwards, Section V informs about the obtained results when testing the removal system in situ and inside a simulation environment.The paper ends with a conclusion section in VI.

II. LITERATURE REVIEW
In this section, a review of automatic methods and unmanned vehicles to collect and monitor invasive weeds is discussed.In addition, we include an analysis of the related work on self-driving approaches that could be a good basis for the development of the proposed aquatic vehicle.

A. FLOATING WEED REMOVAL METHODS
Nowadays, there are different hand-operated methods to prevent and control invasive weed growth in small water bodies, including ponds, pools, and wetlands.For instance, handheld tools, such as rakes or planks covered with fabric to push weed to the edges; chemical solutions, such as diquat, metsulfuron methyl, chlorimuron methyl, and fluridone [14], [15]; and biological control, such as koi, goldfish, and grass carp.Although the aforementioned methods proved to be efficient for small ponds, they can be impractical in larger water bodies.Not only does their application require support from expert professionals, but also a thorough study of the potential side effects in the long term.For example, authors in [16] explain how efforts to remove invasive plants by introducing Asian species of carp caused the loss of native fish populations in the Mississippi River system.
When it comes to mechanical means, private companies in the UK and the US, such as Elastec [17], Oilskimmers Inc. [18], and Vikoma [19], offer their own models of aquatic weed skimmers.These are mainly based on suction pumps and filters that drain water to land and then to the source while filtering duckweed.Other recommended methods are based on bubble aerators whose continuous operation can avoid aquatic weed overgrowth.The main disadvantage of these methods is that they would require multiple devices and high energy costs when applied to larger water bodies.Removing floating invasive plants from lagoons, lakes, dams, and bays usually requires heavy machinery (e.g.backhoes), which in turn incurs high costs.

B. UNMANNED VEHICLES FOR AQUATIC WEED AND ALGAE MANAGEMENT
During the past decades, USVs have demonstrated tremendous potential to automate tasks performed in aquatic environments, such as navigation, sensor data collection, and debris removal.In contrast, the body of knowledge about autonomous vehicles for floating weed removal is still narrow.To the best of the authors' knowledge, USVs listed in Table 1 are the most recent proposals, yet their target are different aquatic weeds.These range from submerged aquatic vegetation, such as hydrilla, eurasian watermilfoil, and contail; emergent plants, such as alligatorweed and water primrose; and floating weeds, such as water meal, water hyacinth, and sargassum.For instance, Patel et al. propose the development of a two-hull unmanned boat that uses hydroacoustic imaging to map regions with hydrilla and disperse aquathol-K for their removal [11].Additionally, S. Jung et al. designed a catamaran-shape USV to carry a electrocoagulation and flotation reactor to separate pollutants and cyanobacteria from superficial water by using a series of parallel electrodes inside a box to generate an electrolytic reaction [4].While the left electrodes (anodes) flocculate the microalgae particles, the hydrogen bubbles generated from the right electrodes (cathodes) float the flocculated mass, creating an effective mechanism to separate and collect HABs from lakes.
Most USVs proposed for aquatic weed management aim to detect and map invasive blooms for their following collection by personnel in charge.For example, researchers in [9] published their progress on the development of a trimaran-shape USV that follows a route and registers data using a SONAR sensor and a downward-facing camera.While the SONAR data was used to calculate water depth and vegetation density, the camera collected visual information for post-analysis about areas with and without european water-milfoil.Frequently, aquatic vehicles are designed to work standalone, however, authors already published about the fusion of simultaneous data coming from an UAV and USV to better detect invasive weed [8], support data collection [13], and enhance path planning [4].In contrast, authors in [12] posit that both UAVs and USVs have sight constraints and rely more on a complete aerial approach by combining remote sensing and UAV imaging to map floating weeds, such as ribbonweed, pondweed, parrot's feaher, and cumbungi.
The election of sensors for aquatic weed detection varies because some floating algae or weeds can be easily distinguishable from long distances, while others can be partially visible or fully submerged.Table 1 shows the preferred sensing methods by researchers according to the target weed species.It is worth noting the ''Weed type'' column considers the categories stated by McNabb and Anderson [2]: submerged aquatic vegetation (SAV), emergent and floating plants, and algae.When it is about SAV detection, researchers use hydroacoustic imaging [11], multispectral imaging [8], underwater cameras [9], and SONAR sensors.In contrast, detecting algae as well as floating and emergent weeds often entails the use of regular RGB cameras.For example, authors in [20] propose to use an RGB camera mounted in a Raspberry Pi Model-B to find regions with floating weed.Finally, authors in [12] and [21] propose tools to leverage remote sensing data to detect and map the appearances of ribbonweed and sargassum.
Automatic floating weed collection, as a particular research subject for its connection and potential impacts on aquatic life, still demands more research (as, certainly, many more related topics to inland water quality management).In contrast, extensive research has been carried out on robotized debris collection in recent years.For example, two unmanned watercraft, the WasteShark (Drone Solutions) and Clearbot (Open Ocean Engineering) devices are commercially available for trash collection in water bodies [22].Nowadays, maximum extra payload, autonomy, operation duration, and collection approach are among some factors that differentiate one device from the others.For example, WasteSkark is equipped with route planning algorithms and optical recognition and is capable of identifying and collecting up to 350 kg of floating garbage.Once it cleans an area, WasteSkark travels to its base of operations, where it unloads the collected waste and recharges its batteries for the following 16 hours.Moving on, Clearbot has the capacity to collect up to one metric ton of plastic per day by using a conveyor belt.These approaches could serve as a good basis for designing better autonomous navigation and floating weed collection systems in the future.

C. AUTONOMOUS DRIVING APPROACHES FOR UNMANNED SURFACE VEHICLES
Approaches for USV's navigation systems development can be organized in two groups: self-relying vehicles and vehicles accompanied by a different sensing modality for better path planning, e.g.aerial imaging and remote sensing.Since the latter usually limits the autonomy of a USV, the present research focuses on building a self-sufficient vehicle that leverages its sensors to determine the best route to follow.Therefore, we orient the literature review towards sensors that detect the current location and methods to estimate the correct steering wheel angle.
Nowadays, we can distinguish three main approaches concerning steering angle prediction: image processingbased, end-to-end learning-based, and deep reinforcement learning-based.Even though the first one has meaningful results in controlled scenarios, it has high failure risks in real scenarios due to the uncertain nature of water bodies.In contrast, end-to-end learning can generalize for diverse scenarios and provide a good estimation of the heading angle with a reasonable computational cost [23].The main drawback of this method is the extensive datasets it requires to achieve good results [24].Still, there are several available simulation environments, and currently, it is possible to develop one that is specifically suited to a project's needs.Therefore, we selected this approach for the USV proposed in the present research.It is worth mentioning that recent investigations on the deep reinforcement learning-based approach for autonomous vehicles have obtained compelling results, and it is a research thread worth exploring for future USVs [25].
Compared with urban environments, self-driving vehicles are considered to be more reliable to operate on water bodies' surface due to the fewer obstacles.Nevertheless, navigating autonomously entails several challenges such as aquatic fauna and vegetation, shorelines, manned ships, and most importantly, instability and imprecise position estimation.Most USV proposals depend on depth measurement equipment to detect potential collisions in long distances (e.g.AIS, Radar, GNSS) and short distances (e.g.RGB or spectral cameras, LiDAR, stereo vision) [22].Other unmanned ships make use of SONARs [9] or light sources to measure depth in water and detect the presence of vegetation or other obstacles.While the main function of sonar sensors is to emit sound waves and measure the time taken for the echoes to return, light sensors are used to estimate water depth and potential obstacles based on the amount of light that passes through a water body.

III. DESIGN AND IMPLEMENTATION OF THE UNMANNED SURFACE VEHICLE
This section describes the materials and methods used when prototyping the USV.Both hardware and software components were implemented, such that the USV could successfully collect duckweed in inland water bodies.The prototype was designed to work under ideal duckweed overgrowth conditions, such as still water, excessive minerals and nutrients, and low wind.These conditions, as described in [26], ensure minimal environmental disturbances that could significantly impact the USV's maneuverability.

A. MECHANICAL DESIGN
First of all, we considered the operation conditions to design the mechanical components of the proposed prototype.For example, the vehicle must have been capable of collecting duckweed in calm water bodies.We used the 3D CAD software SolidWorks to design the vehicle's prototype ensuring the feasibility of the manufacturing and proper assembly of the components.The USV, illustrated in Figure 2, was designed with a catamaran shape and incorporates two floaters on the sides to ensure navigability, as indicated in (1).Additionally, we embedded two compartments within the floaters to house the prototype's batteries (7).These are equipped with protective covers to ensure water resistance.Finally, 2 DC motors were embedded within fins placed at the bottom of each floater, as shown in (8).This configuration eliminates the need for a rudder and increases maneuverability to the joint operation mode of both propellers.
Both floaters are bonded with a main body (6), which has a net in the back to permit the USV collect and transport duckweed when it passes through the USV's interior (5).We included extra protection to both DC motors to avoid potential collisions with the net and added a filtering grid in (3) to prevent access to other types of aquatic wastes (e.g.debris, trash, plastic, or other floating plants).Moreover, we included a box on the top of the main body to safeguard the electronic components (2).This container has apertures on the front and on both sides to install the OAK-D camera and two cooling fans, respectively.Both side vents were designed considering potential splashes or water infiltration.Moreover, we also added support elements to reinforce the joint between both floaters and the main body (4).

B. ELECTRONIC DESIGN
The electronic design considered two sets of components.The first group was focused on the electronic and motion components of the USV, while the second group was geared towards a portable remote control.This was used to operate the vehicle when manual control was necessary.Consequently, both the USV and the remote control were developed as separate subsystems.A detailed description of the components within each subsystem is presented in Table 2.
Figure 3.A illustrates the interconnection of the components installed inside the remote control.In this case, an Arduino Mega 2560 was employed as the main processor for data flow between the vehicle and a ground station.A joystick was used for manual control of the vehicle, along with a set of switches and indicators to determine the operating mode (e.g.manual, autonomous).Additionally, a GPS module was responsible for registering the position of the ground station and generating a comparative signal with the vehicle's location.Moreover, an Xbee 3 RF module was utilized to transmit the movement commands to the vehicle through the Zigbee protocol with a range of 1,200 meters under ideal conditions.A Bluetooth module was also integrated to transmit information from the remote control.Data received through both the Xbee 3 RF and Bluetooth modules was stored for post-processing and analysis.Finally, a set of lithium batteries, along with a voltage regulator, served as the power source.
On the other hand, Figure 3.B displays the components of the USV.In this configuration, a Jetson Nano served as the main processing unit and ensured all navigation data was received from the remote control and transmitted appropriately to the rest of the components.We included an OAK-D camera to acquire RGB and depth images, as well as bounding boxes enclosing duckweed colonies' appearances.Furthermore, we installed a GPS module to help us delimit the vehicle's automatic operation.The USV's control system was installed to relay movement commands to a Raspberry Pi Pico connected via USB, which in turn transmits them to both thrusters through two high-power H-bridges.Finally, two LiPo batteries provided power to all components inside the USV using voltage regulators to meet the individual needs of each component.

C. MANUFACTURING AND ASSEMBLY
The design detailed above and a preliminary material comparison encouraged us to choose 3D printing for manufacturing most of the prototype's components.Specifically, we selected PLA (Polylactic Acid) due to its ease of printing, lightweight feature, and feasible conversion from CAD format to G-code using PrusaSlicer.In addition, we confirmed PLA was also suitable to resist water pressure and let the USV navigate.Although the modular nature of 3D printing made the ensemble process straightforward, the design required modifications and improvements that meant re-printing some components.Yet, this minimized material waste while optimizing the device's functionality.Due to the dimensions of the floaters, they had to be printed in two parts; therefore, water-resistant silicone was used to join both pieces.Furthermore, plastic spray paint was applied to the entire structure, thereby sealing any porosities that may have resulted from the 3D printing process and ensuring complete impermeability and proper flotation of the vehicle.
For the prototype assembly, zinc-coated bolts and nuts were used to enhance water resistance.Such mechanical joints allowed for easy assembly and disassembly of the robot's parts, which was convenient when integrating any additional component.The supports added in the last prototyping iteration provided a more robust structure for holding the superior container and the floaters, thereby increasing the overall strength of the vehicle.All electronic components were interconnected using 16AWG gauge wires, ensuring that they could support the current flow from the batteries.We used heat-shrink tubing and silicone coatings to protect wires in contact with water and ensure electronic components were well-positioned.

D. MOTION LOGIC SYSTEM
We implemented Robot Operating System (ROS) for the USV's motion and logic system due to its versatility to integrate and communicate with sensors and actuators.Although ROS was used mainly for data reception from the Xbee 3 RF module, GPS module, and the OAK-D camera, it also incorporated the necessary algorithms for the SAE system, detailed in Section IV.Moreover, ROS also communicated inference results with the actuators, which in turn required the implementation of Micro-ROS to send the motion logic to both motors.The diagram of topics and nodes used in the ROS implementation is shown in Figure 4, from where each subsystem is detailed in the following sub sections.

1) MICRO-ROS IMPLEMENTATION
For the implementation of the motion logic, it was first necessary to establish communication between the Raspberry Pi Pico and the Jetson Nano Card.This connection was achieved by configuring the information transmission between both devices via UART and utilizing micro-xrce-dds-agent to manage this data.Within this connection, a topic is generated for the reception of the desired velocity information from the Jetson Nano, and this information is sent to the Raspberry Pi Pico in the form of  linear and angular velocity (along the X, Y, and Z axes).Then, these values are packaged in the topic /cmd_vel.
The code for reading the angular and linear velocity information was implemented using C++ since the Raspberry Pi Pico only supports this functionality in this programming language.The Equation 1 and Equation 2 were used to translate these linear and angular velocities into PWM values for each of the motors individually.
Equations 1 and 2 describe the PWM value as a function of the linear velocity v (movement forward or backward) and angular velocity omega (rate of turn around its own axis).Additionally, two terms are added where the value of L is given by the distance between the motors.The value of K PWM is determined by a constant that scales the PWM value to the desired value.In this case, this value was determined experimentally so that a linear velocity of 1 m s equates to the maximum PWM value on both motors.These equations were derived from those determining the turning speed of each motor in a differential robot, which is similar to the configuration of the proposed vehicle.
To determine these turning modalities, we assumed that pin A is on and pin B is off when turning forward.Likewise, when turning backward, pin A is off, and pin B is on.This configuration considers that there are two PWM values for each motor and is used to demonstrate how the direction of rotation of both motors varies to determine the vehicle's state of motion based on the previously determined linear and angular velocities, as shown in Table 3.Therefore, all possible operating states were considered.

2) Xbee ROS NODE
As previously outlined, the logic for the movement of each motor was embedded within the Raspberry Pi Pico, which subscribes to the cmd_vel topic.The data sent to this was processed in two ways: firstly, in manual mode, where they were extracted from the data received via the Xbee 3 RF module, and secondly, according to the states of motion defined by the SAE system (described in Section IV).For manual operation, data was transmitted from an Arduino Mega 2560, where the X and Y position data were encoded into a string to be decoded in the USV.These data values were then decoded, and depending on the X and Y position of the Joystick, a linear or angular velocity for the robot was determined and limited to 1 m s for linear velocity and 1 rad s for angular velocity.These commands were subsequently published to /cmd_vel and received by the Raspberry Pi Pico.Furthermore, it is important to note that the Joystick commands were also published on the /xbee/joystick topic, so the Joystick could be used for other purposes than only manual vehicle control.Additionally, owing to the integrated sensors within the vehicle, the topic also gathered data from the GPS module.This module sent encoded NMEA-type signals through its USB port via UART.Also, these signals were decoded to produce longitude and latitude data, which were then published on the /xbee/gps topic.This had the aim to use the information for vehicle tracking and for delimiting the USV's working area.

3) OAK-D ROS NODE
We implemented an OAK-D camera as the primary sensor for the USV's context data acquisition.Not only does the camera capture RGB and depth images, but it also has a System on Module (SoM) of 4 Tera Operation Per Second (TOPS) that permits the embedding of an object detection model.Such a feature let us deploy a duckweed detection model inside the camera and save computational power.The obtained duckweed detections were generated at an approximate speed of 2 frames per second (FPS), which was relatively reasonable given the vehicle's data collection speed.The RGB and depth images were published on the /oakd/camera topic, making this information accessible from the main operating script.Similarly, duckweed detections were published on the /oakd/yolo topic, where information about bounding boxes, the number of detections, and their confidence level was stored.Furthermore, steering angles obtained with SAC (further detailed in Section IV-C) were published on a new topic named /oakd/sac, making this result available for the main ROS script.

IV. IMPLEMENTATION OF THE STEERING ANGLE ESTIMATION SYSTEM A. SYSTEM DESIGN
The principal purpose of the SAE system is to provide navigation autonomy and collision avoidance capabilities to the USV.Four self-driving approaches, named M 1, M 2, M 3, and M 4, were developed gradually to obtain the final SAE's architecture.The approaches' composition is summarized in Table 4, and Figure 5 depicts the overall architecture of the SAE system.In this figure, the section on the left represents an OAK-D stereo vision camera, which obtains RGB and depth information from the USV's environment.On the other hand, the section in the middle shows the SAE system, which is deployed inside a Jetson Development Kit to process the obtained RGB images, bounding boxes, and depth maps to calculate the angle α for the next USV movement.
Initially, training a duckweed detection model let us propose the M 1 self-driving mode, which relied uniquely on duckweed detection to infer the next best angle α.This was achieved by averaging the horizontal coordinates of the detected bounding boxes using Equation 3. There, d represents the number of horizontal partitions, w is the input RGB image's width, and n is the number of detected bounding boxes.Additionally, x i and z i represent the x coordinates of the top left and bottom right of each bounding box, respectively.Given that M 1 caused unpredictable, inconsistent navigation, we noted the importance of evolving the model, which led us averaging the current angle α with the immediate nine previous angles.We named this calculation momentum, and its formula is given in Equation 4, where B and m were defined experimentally.Moreover, we denominated the combination of M 1 and momentum as M 2.
Later, to provide collision avoidance capabilities to the USV, we designed the M 3 self-driving mode by appending a Deep Neural Network model (DNN) to M 2 to classify the next best steering angle according to the USV's visual perception.This approach, named Steering Angle Classification (SAC), had the purpose of detecting and avoiding environmental disturbances, such as boats, ducks, and buoys, among other aquatic objects.We contrasted M 3 with a fourth self-driving mode, named M 4, which applies SAC by replacing the DNN with stereo vision (SV).Then, we averaged the α 1 and α 2 angles coming from SAC and Equation 3 weightily using the variables w 1 and w 2 .While the values of w 1 and w 2 were determined experimentally, we used Equation 5to pre-establish their values according to the detections sent by the inner modules.In this equation, t represents the total number of duckweed bounding boxes, and s represents the steering angle detected by the SAC algorithm.For both M 3 and M 4, the result is passed to the momentum module, shown in blue in Figure 5, to obtain the optimal α.
For all self-driving approaches, the best next angle α is communicated to the H Bridge Driver, which in turn transforms the values and activates the respective motors to rotate the USV.The SAE system repeats this process while the vehicle is in operation, and GPS coordinates are used to limit the navigation area.While the physical inspection area's borders were detected reading the GPS coordinates, we managed to mimic the same behaviour in the simulator using red bands; see Figure 6.When the USV reaches a border, it is programmed to turn around by selecting a random angle in the range [0 • , 180 • ] contrary to the border.Finally, the vehicle is programmed to send notifications when it is about to run out of power or if the net containing duckweed is full.

B. DUCKWEED DETECTION
We implemented versions 5 and 8 of the Yolo architecture to detect duckweed colonies over water bodies [27], [28].Given a series of challenges for the detection task, we performed extensive experiments augmenting and enhancing the initial dataset.Mainly, we balanced the frequency of images with close and far duckweed colonies.Although duckweed is easily distinguishable in short distances, it looks like a grass field when seen from a long distance.Both dataset preparation and model implementation are explained in the next subsections.

1) DATASET PREPARATION
Research on floating weed detection is narrow, and related image datasets are almost non-existent.In the case of duckweed, we struggled to find datasets from a surface perspective, which made us collect our dataset.Because of the challenges of collecting diverse images in situ, we opted to scrape images from the Internet using Selenium and Python.The first part of the dataset comes from Google Images and was found using the terms ''lemna minnor'', ''duckweed'', ''lenteja de agua'', ''lago titicaca'', ''laguna alalay'', among other terms.It is worth mentioning that we made sure to download images with Creative Commons licenses that permit reutilization for non-commercial purposes.We achieved this by selecting the option ''Creative Common Licenses'' on the image searcher's interface with Selenium.The second part of the dataset comes from the Global Biodiversity Information Facility Repository (GBIF) [7], which is an international network and data infrastructure funded to provide open access to data about all types of life on Earth.Similarly, we used Selenium and Python to collect 6656 VOLUME 12, 2024 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.images with the terms ''lemna gibba'', ''lemna minor'', ''lemna trisulca'', ''spirodela polyrhiza'', among others.
Once we obtained 4,341 suitable images, we started normalizing them with respect to their format, color space, and dimensions.Moreover, initial manual reviews and Exploratory Data Analysis (EDA) let us discard samples with blur, oversize, and low illumination.We made sure that all images contained at least one duckweed colony seen from a close or distant point of view (POV), which resulted in a dataset of 3,335 images.Then, we used the Roboflow platform to label the images and included 665 pictures of water bodies without duckweed.Furthermore, because we identified miss-recognition between samples captured from long and short distances, we labeled the dataset according to four categories: close-view, long-view, near-close view, and near-long view.In order to increase the diversity of the training data, we made use of the simulation environment (detailed in Section IV-C) to collect synthetic samples.Additionally, we applied random augmentations (rotations, horizontal and vertical flipping, illumination variation, and noise incorporation) to the images to balance the POV frequencies.Table 5 shows the POV frequencies in the resulting final dataset, which contains 10,000 instances.

2) MODEL IMPLEMENTATION
Deep neural networks have demonstrated better generalization benefits for conventional tasks such as object detection, image segmentation, and classification.However, the more complex the annotations required for the task are, the more human effort and time it takes to complete a dataset to train a model.From this point of view, we defined the duckweed detection task to be a specific application of object detection.Still, we remark on the importance of exploring the segmentation task in future research work.We implemented Yolov5 and Yolov8 because of their performance with regard to the COCO benchmark dataset [28].Both versions of Yolo are available in five versions for retraining with a custom dataset: n, s, m, l, and x.The codes denote the number of parameters and model footprint, with n as the lightest and x as the heaviest.The model election was governed by the lightest footprint as opposed to the highest precision.As such, the Yolov5s and Yolov8s versions were used in this project.

Accuracy =
TP + TN TP+FP+TN+FN ( 6) Our evaluation algorithm processed the detected bounding boxes to convert them into 2D binary masks, where pixels inside bounding boxes were assigned 1.We managed to obtain a confusion matrix by quantifying the correct matches, which in turn let us count the True Positives (TP), True Negatives (TN ), False Positives (FP), and False Negatives (FN ).Then, these values allowed us to calculate the Accuracy, Sensitivity (Recall), and Specificity values according to Equations 6, 7, and 9, respectively.Moreover, we calculated the Average Precision (AP) per class by finding the area under the precision-specificity curve: where p is the proportion of true positives (precision), and r is the proportion of true positives out of the possible positives (recall).Both variables are always between 0 and 1.Therefore, the average precision per class falls between 0 and 1 as well, and it helps calculate the mean Average Precision metric (mAP).Besides these metrics, we put further consideration on the Intersection over Union (IoU) metric because of the higher importance of detecting duckweed appearances, as opposed to assessing if pixels were assigned to the correct bounding boxes.IoU quantifies the similarity between a predicted mask and a ground truth mask.For the project, IoU was defined as in Equation 12, where G and P were obtained by converting labeled and predicted bounding boxes of the same image into binary masks, respectively.

C. STEERING ANGLE CLASSIFICATION
As previously stated in Section II-C, developing an autonomous control system for unmanned vehicles is always a challenge because of the many exceptions that happen in real environments.While some approaches make use of multiple sensors for collision avoidance [9], others attempt to map the environment first for better path planning [4], [11].
In the present project, we developed a prototype of USV to be deployed in any environment without prior exploration.Therefore, we researched the approaches M 3 and M 4 for the USV to avoid collisions using end-to-end learning and stereo vision.These approaches will be explained and compared in the following sections.

1) END-TO-END LEARNING
For the M 3 approach, we explored end-to-end-based models that could let the USV avoid collisions by mapping the correlations between RGB images and steering angles.End-to-end learning has proved to be efficient in generalizing diverse scenarios and obstacles with a reasonable computational cost.Nevertheless, its main drawback is that it requires large annotated datasets.Given that data collection in situ was a limiting factor for the project, we created a simulator inspired by the Udacity Self Driving Car Nanodegree emulator using Unity, Blender, C# and Python.As shown in Figure 6, this simulator resembled Lake Titicaca and helped us perform two core tasks: collect images and perform testing with the selfdriving modalities.Specifically, the simulator let us collect 1,380 images with duckweed colonies and 37,846 images of manually controlled trips.
As soon as we finished recording trips in visual and numeric format, we preprocessed the dataset by flipping the images and angles.Then, we started training generic regression models based on the ResNet34 architecture.Yet, the initial regression metrics let us note quickly the importance of balancing underrepresented angle ranges and transforming the task into a classification problem.Consequently, we split the angle range into seven and obtained the respective bins to categorize each sample's angle, which in turn resulted in the steering category distribution shown in Table 5, in column ''Base''.This decision was also supported by the fact that the movement of a USV changes slowly compared with unmanned aerial or terrestrial vehicles.Finally, we performed augmentations to obtain 7,000 samples per steering category, adding up to a total of 49,000 instances.
Despite the application of data augmentation, our initial classifiers failed to recognize angles reliably.Navarro et al. [23] highlighted the need for large datasets to train steering angle detectors based on end-to-end learning.Therefore, we opted to apply transfer learning by modifying the last layer of five generic models available in the PyTorch's Torchvision package [29].Specifically, we used the implementation of ResNet-50, ResNet-101 [30], EfficientNet [31], ConvNeXt [32], and ResNeXt-101 [33].These are provided with their corresponding pre-trained weights obtained using the ImageNet dataset.Then, we replaced their last layer with a layer of 7 output nodes and applied a softmax activation layer.Furthermore, to fine-tune all models, we split the dataset into 34,301 for training (70%), 9,800 for validation (20%), and 4,900 for testing (10%).For the models to converge efficiently, we started testing hyperparameters with only one model and used similar hyperparameters once we obtained a suitable combination.
To measure the performance obtained by the models, we used a confusion matrix per validation or testing stage.The predicted and ground-truth labels let us quantify the True Positives (TP), True Negatives (TN), False Positives (FP), and False Negatives (FN).Then, these values let us calculate the Accuracy, Sensitivity (Recall), Specificity, and F1-score according to Equations 6, 7, 9, and 10, respectively.
2) STEREO VISION Moving on, the stereo vision-based approach, namely M 4, split the depth maps coming from the OAK-D camera in seven vertical regions.Then, each region was used to calculate the average depth and select an optimal angle α, such that regions with potential obstacles could be avoided.A graphical representation of the approach is illustrated in Figure 7, where the effective depth detection range is shown in red.Similarly to M 1, SAC based on stereo vision outputs a discrete number in the range [0, 6] as the optimal angle.Then, this is passed to momentum to obtain the final optimal angle.

A. THE UNMANNED SURFACE VEHICLE
To test the buoyancy, resistance, and navigability of the USV prototype, we conducted a series of field experiments at two different sites.Initial tests were performed on April 6th, 2023 at the Olympic Swimming Pool in Alto Obrajes, La Paz, Bolivia.There, we aimed to test the USV's behavior in calm water conditions when controlled via the Zigbee protocol using the remote control.Problems with the collection net and buoyancy were identified and managed properly for the next testing phases.A demonstration video of these tests is available in [34].The second testing phase was carried out on October 14th, 2023 in Lagoon Achocalla, La Paz, Bolivia, where the environment resembles Lake Titicaca.The goal of these tests was to evaluate not only the USV's buoyancy on wavy water but also navigability with additional factors such as local fauna and flora, among other elements.A demonstration video of these tests is available in [35].Additionally, a pair of pictures illustrating the final USV and Remote Control prototypes is shown in Figure 8.
The present research has successfully developed the necessary hardware for automated floating invasive plant removal.We consider the testing and enhancement of the USV as an ongoing project given the challenges to test in situ.For instance, the southern hemisphere, and specially Lake Titicaca, are currently at devastating drought due to frequent heat waves that have caused record low water levels [36].On the other hand, we carried out exhaustive experiments to evaluate the performance of the SAE system inside the simulator.These experiments and SAE submodules' performance will be discussed in the next sections.

B. DUCKWEED DETECTION
The overall architecture of the SAE system relies on the precision of the duckweed detector.As mentioned above, although generic object detectors feature great generalization capabilities, we initially identified problems when fine-tuning detectors using image samples captured from distant and close POV.This was because a duckweed colony resembles a field of grass when seen from a distant POV.For that reason, our initial experiments were oriented to test the scale-invariant properties of Yolov5s.We downloaded weights from the Ultralytics repository [27] and retrained the model with new dataset versions obtained from the Base Duckweed Dataset described in Table 5.The resulting IoUs let us note that augmenting samples considering the POV categories (shown in the 6 th row) was a better approach than augmenting the dataset in general (shown in the 2 nd row).Additionally, it is worth mentioning that the detectors obtained compelling metrics when we focused on only one POV category at a time (shown in the 3 rd and 4 th rows).To obtain the results in Table 7, we used 10 epochs, the ADAM optimizer, 0.01 learning rate, and 16-samples batchsize as hyper-parameters to evaluate all models fairly.
Moving on, we comparatively tested the combination of the ''Base'' dataset, named ''Real'' dataset, and the dataset obtained with the simulator, named ''Virtual'' dataset.We also augmented the combined version to equalize the number of instances per POV category.Table 8 lists IoU, mAP, and Accuracy values of custom-trained Yolov5s and Yolov8s tested with a subset composed of only real samples.It is interesting to see how Yolov8s trained with the ''Augmented'' dataset (last row) outperformed other models with a 0.894 IoU.In the same table, the last two columns show the Average Duration (AD) time and Effective Cleaning Percentage (ECP) when testing the models for the M 1 self-driving mode 10 times.While AD was calculated by measuring the total time it took the USV to clean duckweed from an area of 24.8 m 2 , ECP measured the difference between the initial duckweed colonies and the remaining ones after 20 minutes.An AD of 1,093 for Yolov8s shows the relevance of detection precision in reducing the weed cleaning time.

C. STEERING ANGLE ESTIMATION
The progressive development of the SAE system permitted explore 4 driving modalities, as defined in Table 4.While M 1 and M 2 aim to move forward by tracking duckweed, M 4 and M 3 also avoid potential collisions using stereo vision and end-to-end learning, respectively.In contrast to the stereo vision approach, applying deep learning (DL) to steering angle classification required the collection of a dataset as well as the implementation of classification models.Table 9 lists the Accuracy, Recall, and F1-score metrics of five classifiers that were fine-tunned with the ''Augmented'' dataset detailed in Table 6.EfficientNet outperformed the rest of the models with 0.831, 0.972, and 0.831 values for accuracy, recall, and F1-score, respectively.Although ResNet50 obtained lower precision results, it got better efficiency in terms of FPS and necessary megabytes to store the model.
All, M 2, M 3, and M 4 make use of the momentum module to define the best angle according to Equation 4. Experimental testing of 10 repetitions let us find B = 0.3 and m = 10 as the best parameters for Equation 4. This testing phase was performed with the M 2 modality inside the simulator and let us obtain the average least time (1,064 seconds) and highest cleaning success (98.6%).To evaluate the performance of M 3 and M 4 modes, we created a specific section with barriers, duckweed colonies, and obstacles inside the virtual environment; see Figure 6.Then, we varied the weights w 1 and w 2 in the range [0.1, 0.9] and performed 10 executions per combination and self-driving mode.The averaged results are shown in Table 10, from which we can conclude collision avoidance based on stereo vision (M 4) obtained better performance than the end-to-end learning approach.Since the vehicle completed most of its cleaning tasks efficiently with w 1 = 0.8 and w 2 = 0.2, we used the same parameters when deploying the SAE system inside the USV.

VI. CONCLUSION
In this paper, we propose the development of an unmanned surface vehicle that incorporates a steering angle estimation system for the monitoring and removal of floating invasive weeds.Specifically, we study the case of duckweed due to its recent far-reaching ecological and economic implications in Lake Titicaca.The USV proposed in the investigation has been successfully implemented with the required hardware and software capabilities to collect duckweed.Our approach aimed to leverage a bespoke simulator to collect data synthetically and test the removal system exhaustively.Moreover, the simulator let us identify stereo vision-based M 4 as the most efficient self-driving approach when defining 0.8 and 0.2 for the w 1 and w 2 modules' weights, respectively.
To date, there is no dataset for floating weed detection or end-to-end steering angle classification in inland waters.Therefore, as a result of conducting this research, we also put forward two datasets for the mentioned tasks.The accuracy obtained by EfficientNet (0.831) indicates it was the best-performing model for steering angle classification.Moving on, Yolov8s obtained 0.894 IoU using the dataset that was augmented according to viewpoint.While this strengthens the importance of enhancing the data, it shows that scale, rotation, and light variances can heavily affect the recognition task.Therefore, testing should be performed with different weather conditions, obstacles, and locations for realworld deployment.
The new challenges to control floating weed plagues can be understood by the increasing pollution near inland water bodies around the world.The findings that we have presented here suggest that future versions of the USV should leverage aerial imaging and incorporate path planning and simultaneous localization.This would open doors to develop a multi-USV system to cover longer areas and split the floating weed removal task.Additionally, for further studies, it would be fruitful to incorporate a better collection mechanism on the front side of the vehicle.

FIGURE 2 .
FIGURE 2. A visual illustration of the solidworks (CAD) design of the USV.

TABLE 2 .
List of hardware components used in the unmanned surface vehicle and remote control.

FIGURE 3 .
FIGURE 3. Block diagram of the components used in the USV and remote control.

FIGURE 4 .
FIGURE 4. Block diagram of the ROS architecture.

FIGURE 5 .TABLE 5 .
FIGURE 5.The overall architecture of the SAE system.

FIGURE 7 .
FIGURE 7. Integral disparities in 3D space for the OAK-D camera.

FIGURE 8 .
FIGURE 8. Prototypes of the USV and remote control.

FIGURE 9 .
FIGURE 9. Detected duckweed colonies using the best performing Yolov8s model.Columns denote the point of view from where the samples were taken.

TABLE 1 .
Summary of recent unmanned vehicles proposed for invasive weed removal and mapping.

TABLE 3 .
Modalities of operation and motor PWM configurations.

TABLE 4 .
Self-driving modalities explored in the investigation.

TABLE 6 .
SAC dataset evolution with respect to steering angle categories.

FIGURE 6 .
Our virtual environment for synthetic data collection and autonomous driving testing.

TABLE 7 .
Comparison of results obtained with Yolov5s and different versions of the base dataset reported in Table5.

TABLE 8 .
Comparison between results obtained with Yolov5s and Yolov8s with the datasets reported in Table5.We include M1 results as for average duration (AD) and effective cleaning percentage (ECP).

TABLE 9 .
Steering angle classification results.