Abstract
Burrows are tunnels or holes excavated into the ground by certain types of animals, to be used as habitation or temporary refuge, or as a by-product of their locomotion. Burrows provide a form of shelter against predation and exposure to the elements, and can be found in nearly every biome and among various biological interaction types. River bank burrowing weakens the soil structure, increases the risk of erosion, and may lead to bank retreat and landslides. Currently, burrow watching, mapping, and prevention are human-only activities, and there are no conventional data or information systems designed for this purpose. In this paper, we design, implement, and test a novel AI-based solution that, starting with drone-acquired imagery, allows the user to automatically identify and map potentially dangerous burrows in the target area, and lays the basis for the digitization and systematic conservation of such information, to be later used for intervention and planning. Our solution contributes to the environmental sustainability of rivers, especially close to densely populated areas.
1. Introduction
River embankments serve as critical infrastructure for flood protection, safeguarding communities and agricultural lands from catastrophic inundation. However, the progressive deterioration, damage and eventual breach of river embankments can result from several failure scenarios or chain of events. These failures are typically driven by processes such as internal erosion and instability affecting both the waterside and landside slopes. The performance of river embankments is significantly influenced by the presence of such macro pores in the ground, which contribute to the progressive degradation of soil properties. These discontinuities negatively affect water pressure distribution, diminishing both effective stresses and shear strength, ultimately promoting instability. Furthermore, cavities breaching the levee’s full width can rapidly accelerate internal erosion, leading to catastrophic failure [1,2].
Among the various macro pores, animal burrows stand out as a primary source of biological erosion in earthen structures like levees and dams. The consequences of wildlife activities in levees can be categorized into structural damage, surface erosion and hydraulic alterations; impacts that are often interrelated and mutually reinforcing. Hydraulic performance changes are one of the most common causes of failure in earthen structures, which typically lead to internal erosion and piping [3], a phenomenon responsible for nearly half of global dam failures [4]. Research has demonstrated that burrowing activity severely compromises levee stability through mechanisms that can induce complete failure and catastrophic flooding [5,6,7]. Studies show how the hydraulic impact of rising water levels on earthen levees, occurring during heavy and prolonged periods of rain, is severely compounded in damaged levees, leading to an increased risk of failure. In such a state, the conditions for the onset of inner erosion are achieved for shorter flood durations [8]. Given the increasing risks associated with animal burrowing activity, a threat potentially amplified by changing precipitation patterns, altered wildlife behavior and ecosystem shifts, the development of efficient methodologies for early cavity identification is essential for effective risk mitigation and adaptive infrastructure management. Prior efforts in this domain have largely focused on geophysical techniques. These methods have been widely applied to levees, primarily to image the internal structure and estimate hydrogeological features [9]. Other studies have specifically used techniques like resistivity, magnetic measures [10] and Ground Penetrating Radar (GPR) [11,12,13] for the direct detection of internal voids and burrows. However, these approaches typically require specialized equipment, trained personnel and significant time investment, limiting their application for continuous, system-wide monitoring.
Our work proposes a data-driven approach that enables scalable, resource-efficient surveillance of extensive levee networks. By applying machine learning techniques to remotely sensed imagery, we can automatically identify and map surface patterns consistent with burrows, enabling continuous surveillance at a fraction of the cost, resource requirements and environmental footprint of traditional survey methods. A machine learning model was dynamically trained on real-world examples via a dedicated platform, progressively improving detection accuracy and adapting to regional variations in wildlife activity and embankment characteristics. This system offers precise identification of threats and provides an efficient and accurate way to manage and monitor the territory. This approach supports a fundamental shift from reactive, resource-intensive emergency repairs to proactive maintenance strategies that extend infrastructure lifespan, optimize resource allocation and minimize the environmental disruption associated with catastrophic failures. Beyond detection, our objective is to furnish an innovative tool for adaptive land management that provides precise threat identification, efficient territorial monitoring and comprehensive data collection capabilities, enabling more effective and timely interventions that balance infrastructure protection with broader ecosystem considerations. In a single sentence, we want to answer the question:
Is it possible to automatically identify animal burrows in riverbanks?
Our system is fully implemented and already at the disposal of regional officials, who contribute to its improvement and test by using it as part of their normal activities.
Automatic detection of wildlife activities in levees is extremely relevant for the sustainability of the environment at the local level. Progressively shifting the monitoring load and its responsibility from human-based to machine-based systems could enable more restrictive and safer policies without increasing the economic cost for local and regional communities, therefore allowing a prompter response to the ever more pressing environmental changes.
2. Related Works
Manual inspection of river levees and embankments is not only time consuming, often taking hours to days depending on the complexity and amount of cases, but also prone to human error, particularly when identifying subtle anomalies or working under time constraints. This has motivated significant research into both geophysical detection methods and automated visual inspection systems for identifying structural vulnerabilities in earthen structures.
Several non-destructive methods are available to detect and map underground voids [9,10,14], with applications ranging from cavity detection in earthen structures to archeological surveys. Among these methods are gravity survey, resistivity methods, seismic reflection and Ground Penetrating Radar (GPR) [11,12,13]. Gravity survey is a non-destructive geophysical technique that measures differences in the Earth’s gravitational field at specific locations. Its success depends on identifying variations in the measured gravitational field due to differences in the bulk density of earth materials. This method is considered one of the most cost-effective geophysical approaches when investigating wide areas with relatively large caverns [15,16,17]. Resistivity methods have also been applied for burrow detection, exploiting the fact that the electrical resistance of air filled voids is higher than the surrounding soils [18]. Since air filled voids provide an excellent dielectric constant contrast, GPR has been successfully used to identify animal burrows in earthen structures [19]. GPR surveys have yielded reliable information about lithology and internal structure of river banks, including the identification of flood terraces and detection of damage failures due to water percolation, out-washing and erosion. Kinlaw et al. [20] and Cortez et al. [21] used GPR to visually map underground burrows of the Gopher Tortoise. Field studies utilizing GPR to monitor river embankments have been reported by Di Prinzio et al. [22]. For more in-depth discussions on the presence of animal burrows, their impact and management, we refer to Bayoumi et al. [3] and the Federal Emergency Management Agency report [1].
Despite their accuracy, geophysical techniques, and, in particular, GPR, still have penetration limitations, especially in conductive silty-clayey soils (1.5 m). They also require specialized equipment, qualified personnel and a significant investment of time, which limits their feasibility for continuous, large scale surveys and monitoring. These limitations have motivated research into complementary automated visual detection methods that can rapidly process imagery from routine inspections or aerial surveys.
The automated detection of burrows in levee imagery exemplifies a broader class of computer vision problems that require the identification of small scale features within large natural images. The general problem can be formulated as follows: given a collection of high resolution images containing sparse instances of target features embedded within complex, heterogeneous backgrounds, develop an automated system capable of locating and classifying these features with sufficient reliability to support operational decision making. Similar challenges have been addressed in other environmental monitoring domains. Lieshout et al. [23] and Hidaka et al. [24] employed Convolutional Neural Networks (CNNs) to detect and quantify floating plastic pollution in rivers using deep learning and camera imagery. The latter specifically proposes and applies semantic segmentation, a pixel-based classification approach to recognize and distinguish between natural and artificial litter along sea shores. This methodology has been applied to images captured by human operators via Unmanned Aerial Systems (i.e., drones), an approach further elaborated by Gonçalves et al. [25] and Kako et al. [26] as a low cost monitoring technique. Various authors propose aerial surveys as a solution to monitor coasts and shores and identify plastic waste [27,28,29,30]. These studies share key similarities with burrow detection: both involve identifying relatively small, visually subtle features within complex natural environments; both benefit from aerial or elevated imaging perspectives and require distinguishing target features from highly variable background textures including vegetation, soil, water and shadow patterns.
In the field of anomaly detection, Nayak et al. [31] and Sifnaios et al. [32] suggest a pixel-first approach, building up from independent pixel-level classifications and leading to frame-level classification, using data such as the quantity of detected anomalous pixels and their spatial distribution. This approach has proven particularly effective in medical imaging, where image segmentation techniques have been crucial in diagnosing diseases for many years, transforming images into clear and visually interpretable sections that facilitate recognition [33]. Random Forest classifiers [34] have proven particularly effective for environmental monitoring tasks involving heterogeneous natural imagery. This method combines multiple decision trees to improve classification robustness and reduce overfitting, all critical advantages when dealing with the inherent variability in field imagery. Unlike deep learning approaches that require large labeled datasets and significant computational resources, Random Forests offer several practical advantages: they handle high-dimensional feature spaces efficiently, provide interpretable feature importance rankings, generate probabilistic confidence estimates, and can achieve strong performance with relatively modest training datasets. Furthermore, various studies support their dominance over deep learning when working with tabular data [35,36,37,38]. Random Forests have been successfully applied to land cover classification [39,40,41], vegetation mapping [42] and detection of environmental anomalies in remote sensing imagery [43]. Their ability to assess feature importance is particularly valuable for understanding which visual characteristics (i.e., texture, color, shape, and context) are most discriminative for target detection.
3. Materials and Methods
After briefly introducing the study site, in this section, we describe the hardware and software used in the image collection process, detailing its context and the distinctly applied procedures, as well as the characteristics of the obtained results. Then, we describe the general workflow covering the differences between traditional monitoring missions and our contribution’s approach. Lastly, we present the pipeline of our methodology divided into three phases: gathering of user-provided labels, the training of a first filtering model and the final detection of burrow-like structures whose location will be reported on an associated map relative to this specific monitoring campaign.
3.1. Study Area
Our proposed methodology has been tested on images extracted from a surveillance campaign conducted along selected reaches of the Senio River, a 92 km tributary of the Reno River in the Emilia-Romagna region of Italy (44.5475° N, 12.0954° E). The Senio originates in the Appennino Tosco-Emiliano mountains in the province of Florence and flows northeast through the province of Ravenna, before its confluence with the Reno. The river exhibits highly variable discharge patterns, with a mean flow of approximately 10 m3/s, ranging from minimum flows of 0.3 m3/s during dry periods to peak discharges exceeding 500 m3/s during flood events. Notably, in May 2023 the river experienced significant flooding as part of the widespread inundation events that affected the Emilia-Romagna region. The selected areas represent sections where animal burrowing activity posed potential concerns for bank integrity and flood risk management.
3.2. Image Collection
Aerial imagery was acquired using an Unmanned Aircraft System (UAS) platform equipped with a DJI Mavic 3 Enterprise produced by DJI Technology (Shenzhen, China) and a 20-megapixel RGB camera (Shenzhen, China). The drone was integrated with an RTK module connected to the Hexagon SmartNet network, which provided real-time GNSS correction services to achieve centimeter accuracy (horizontal: 1 cm; vertical: 1.5 cm + 1 ppm) for camera positions and general navigation. Choosing RBG-only imagery was motivated by economic costs, as well as the driving principle of building a system that works based on the same premises as human-assisted identification. The camera featured a three axis stabilized RGB sensor with a wide-angle lens (24 mm equivalent focal length, f/2.8–f/11 aperture) and a 4/3″ CMOS sensor with 3.3 μm pixels (maximum image dimensions: 5280 × 3956 px). The system was chosen for its stability in variable wind conditions, typical of riparian corridors and its capability to capture high resolution imagery, suitable for detecting small scale geomorphological features such as burrow entrances. Prior to field deployment, flight missions were planned using DJI Pilot 2 to ensure systematic coverage of target riverbank sections. Flight plans were designed to capture both banks of the river through separate parallel flight lines to better capture the details along the levee. Survey altitude was maintained at approximately 30–35 m above ground level (AGL), providing a ground sampling distance of approximately 9 mm/pixel. This resolution was selected to enable reliable identification and measurement of burrow openings while maintaining efficient coverage of extended river reaches. The collected data were georeferenced to the RDN2008/UTM 32N coordinate system (North-East coding, EPSG Code 6707). Elevation values are based on the ellipsoidal height system. Image overlap was configured at approximately 80% longitudinal overlap and 60% lateral overlap to ensure adequate redundancy for subsequent photogrammetric processing and to minimize the risk of data gaps. The UAS was flown at a consistent speed below 3 m/s to maintain image quality and reduce motion blur. Nadir (vertical) imagery was acquired in automated flight mode for general coverage and photogrammetric model construction, while more detailed oblique shots of burrows along the internal and external sides of the river banks were captured through manual flight with time interval programmed capture. The positional accuracy (RMSE) of camera positions ranged between 1.5 cm and 2.5 cm. In total, approximately 0.155 km2 were surveyed along a 950 m linear river reach. Flight operations were conducted during the autumn season (2024) to take advantage of optimal conditions, such as low water levels for maximum bank exposure and favorable vegetation conditions. Missions were scheduled during midday hours to minimize shadow effects and ensure consistent illumination across the survey area. All flights were performed under suitable meteorological conditions. No special authorizations were required for the flight operations, though nearby landowners and residents were notified prior to survey activities. Concurrent with UAS operations, ground-based topographic surveys of burrow entrances and feeding holes were conducted using a Stonex S990a GNSS topographic system (Stonex, Paderno Dugnano, Italy) operating in nRTK mode and connected to the Hexagon SmartNet network for real-time data correction. Having this fundamental ground truth allowed objective verification of the number and precise locations of these features. The image acquisition methodology was subject to several constraints inherent to UAS-based surveys of riparian environments. Examples of the shots can be seen in Figure 1, while in Figure 2 provides an overview of all of the taken shots. Dense vegetation in certain reaches limited visibility of bank faces, especially in areas lacking recent maintenance. Additionally, the single date nature of the survey represents a snapshot of conditions and does not capture the temporal dynamics of burrow activity, nor seasonal variations in detectability.
Figure 1.
Examples of collected images: (a,b) show a nadiral view of the river, figures (c,d) show the specific details of burrows along the levee.
Figure 2.
Overview of all the shots taken via drone on the site: figure (a) refers to the nadiral shots taken during the programmed flight, while figure (b) refers to the inclined shots of the levee taken with human supervision.
3.3. Workflow
After acquisition, images are stored and organized into a hierarchical structure, encompassing the levels of campaigns and image sets. A campaign includes all images from a specific monitoring initiative conducted at a particular site. Each campaign is further subdivided into multiple image sets, grouping images based on shared characteristics such as shooting position, angle and environmental conditions. The entire campaign is stored in a centralized database. Traditionally, this workflow would require users to manually label images and identify the areas of the riverbank that are deemed most at risk, a time consuming process that demands expert knowledge and careful inspection. The classification workflow aims at automating this critical step through a systematic approach: users manually label representative image regions to identify burrow and non-burrow areas, establishing training examples. To enable effective automation, it is essential to extract general features that can reliably distinguish burrows across diverse conditions. These annotations enable the training of a pixel-level classification model that learns to distinguish patterns associated with burrows from background elements. Once trained, the model processes complete images to generate binary classification outputs, which then undergo morphological filtering and geometric analysis to identify any candidate burrow locations. Results are presented to users for validation and correction, thus enabling an iterative refinement of the model’s performance. The classification pipeline is illustrated in Figure 3.
Figure 3.
The classification pipeline: The first layer is composed of a random forest that provides a binary classification for each pixel, while the second layer makes use of density and shape properties inside of the binary frame, allowing for accurate classification of the whole frame.
The implementation of this workflow faces significant challenges inherent to the nature of riverbank monitoring data. Image reconnaissance is demanding in resources and time consuming, often requiring specialized equipment and favorable environmental conditions. This constraint frequently results in insufficient training examples to adequately cover the full variance of burrow characteristics, including shape, size and color across various contexts. Variations across geographical zones, like vegetation density, burrow dimensions, illumination conditions (e.g., due to the time of the day), image inclination and other environmental factors substantially increase the complexity of the prediction problem. Traditional monitoring campaigns are inherently constrained by temporal and environmental factors, hence typically capturing images during optimal lighting conditions within specific seasonal windows. This results in the available training data rarely covering the full spectrum of possible burrow appearances across different geographical, climatic, seasonal and meteorological conditions. These sources of variability affect not only the visual appearance of burrows, but also the background context, making feature extraction and model generalization particularly challenging. Consequently, developing a single general-purpose model capable of reliably detecting burrows across all possible conditions proves impractical.
To address these challenges, rather than pursuing a single universal predictive model, we implemented a flexible, context-dependent modeling strategy. This approach enables the development of customized models specifically tailored to the characteristics of each image set within its respective campaign. By training lightweight models adapted to the specific visual conditions of each image set, the system can effectively handle the high variability observed in field data while maintaining computational efficiency. This strategy balances automation with expert oversight, allowing the system to progressively refine its detection capabilities while maintaining flexibility across diverse environmental conditions and image characteristics. The modular design also supports model reuse across visually similar image sets, reducing redundant annotation efforts and enabling efficient scaling across multiple monitoring sites. The process can be divided into three phases: manual annotation, model training, and frame classification and refinement. These will be detailed in the following sections.
3.4. Manual Annotation
In the manual annotation phase, the user manually labels regions within each image, distinguishing between positive samples (i.e., corresponding to burrows) and negative samples (i.e., non-burrow areas). This task is carried out through a dedicated graphical interface, which allows to inspect images visually, zoom-in and pan as needed. Using the mouse, the user draws rectangular regions of variable size and explicitly assigns each one to a category, either burrow or non-burrow. The system automatically records the selection’s coordinates, width and height. Each annotated region is stored while maintaining its association with the corresponding image for subsequent analysis and model development. In this process, identifying zones free of burrow activity is critically important, as these negative samples play a key role in defining a clear distinction between the two categories. By providing examples of areas where burrows are absent, the system can better distinguish relevant features and reduce the likelihood of false positives during training, thus proficiently ruling out noise and inference. This manual annotation defines the foundational knowledge that the predictive system will learn from. The overall analysis is based on a continuous feedback loop between the user and the application, in which the human component plays a fundamental role in conveying to the system the concept of a burrow, guiding it in the discrimination between positive and negative areas.
3.5. Model Training
In the model training phase, a machine learning algorithm uses the labeled regions from the first phase to generate a predictive model capable of distinguishing between burrow and non-burrow pixels. The model relies primarily on the color information of individual pixels (RGB values) without explicitly considering spatial relationships between neighboring pixels. Specifically, the algorithm trains a decision tree ensemble, namely a Random Forest, which combines the output of multiple decision trees to improve classification accuracy and robustness. The transformation from image regions to individual pixel classifications allows the application of a Random Forest to this computer vision task. Each pixel within the selected positive and negative image regions was treated as an independent classification instance, with its RGB color values serving as the three-dimensional feature vector input to the machine learning algorithm.
The pixel classification process systematically sampled every pixel within the designated positive and negative regions, creating a comprehensive representation of the color characteristics associated with each class. For burrow regions, this approach mostly captured the dark internal pixels typically associated with cavity openings, but also the transitional pixels at the edges of the burrow where shadow gradients create intermediate color values. Similarly, negative regions comprised pixels that cover the full range of background color variations, from bright soil surfaces to shadowed areas that might be erroneously misclassified as actual burrow openings. Once trained, the Random Forest model was applied to classify every pixel within new target images requiring burrow detection.
Each pixel in these candidate images was extracted and evaluated by the classifier, which assigned it to either the burrow or non-burrow class based on its color characteristics. The extraction and training process is represented in Figure 4. This pixel-by-pixel classification produces a binary output frame, a black and white representation where black pixels indicate locations classified as potential burrow regions, and white pixels encapsulate multiple non-burrow elements, such as background areas (sky, water, etc.), vegetative elements (plants and trees) or artificial structures (roads and signs).
Figure 4.
The training process pipeline. Pixels are extracted from user-selected examples to train a Random Forest model able to recognize the differences between positive and negative pixels.
This binary frame represents an intermediate processing stage rather than a final detection result. While it successfully highlights candidate regions where burrow-like color patterns exist, the pixel-level classification alone does not account for spatial coherence, morphological characteristics, nor any contextual features that distinguish true burrow openings from false positives. The binary frame may contain scattered individual pixels or small clusters classified as burrows due to color similarity. Consequently, this initial classification output requires further post-processing steps, including morphological operations for noise reduction, contour detection and feature-based filtering to consolidate fragmented detections, eliminate spurious classifications and extract meaningful burrow candidates for subsequent validation and measurement.
The performance of the predictive model strongly depends on the quality and precision of the manual annotations from the first phase. Accurate labeling of burrow and non-burrow regions ensures that the system can learn reliable visual patterns and environmental cues, ultimately improving detection accuracy across diverse images and scenarios.
3.6. Frame Classification
Finally, during classification and refinement, the trained model is deployed across the entire image dataset to automatically detect and localize burrows. Following a cleaning step, the method additionally filters sub-areas out of the black and white binary frame, selecting those that contain certain morphological and spatial properties typical of a visible burrow opening. Three low-level image cleaning steps are performed at this point: noise reduction, consisting of cleaning and removing the sporadic false positive pixels; the application of a density filter, that is, letting a sliding window through the binary frame, by means of which, given the density ratio of the positive burrow and total pixels in each window, we extract the windows where that ratio surpasses a certain threshold; lastly, the application of a geometric filter allows us to search and extract agglomerates of positively classified pixels that can be inscribed inside of a circle, evaluating the objects’ circularity.
The model outputs are then presented back to the user, who can assess their accuracy and, if necessary, refine or extend the existing labels by correcting erroneous classifications. These corrections are incorporated into the training dataset and the cycle repeats. This iterative process of learning and correction allows the system to progressively improve its performance and ability to generalize, with each iteration refining the model’s understanding of what constitutes a burrow. Each trained model is therefore explicitly linked to the image set from which it was generated. This design choice provides several advantages. Firstly, it ensures that users can rely on stable and well-performing models for specific portions of their data (i.e., images), independent of the variability present in the rest of the dataset. Secondly, it allows for the reuse of similar models. Through comparative analysis, users may identify multiple image sets that share visual or contextual similarities. In such cases, instead of training a new model from scratch (including the entire manual labeling process), users can test previously trained models on new image sets to evaluate their flexibility, applicability and general performance. This mechanism promotes efficiency, reduces computational costs and encourages the incremental refinement of predictive models based on empirical feedback.
4. Experiments and Results
To validate the efficacy of the proposed methodology for animal burrow detection in river levee aerial imagery, we conducted a comprehensive experimental evaluation. The assessment framework was designed to quantify performance at two distinct levels: the pixel-wise classification capability of the initial Random Forest stage and, crucially, the spatial accuracy of the final detection system in localizing actual burrow instances.
The experimental dataset comprises selected aerial images from the Senio River dataset, that capture levee infrastructure and animal burrows with high spatial detail. These images serve as the testing ground for the pipeline, encompassing a representative variety of environmental conditions.
4.1. Dataset
The images collected are described in Section 3.2 and are characterized by high resolution (5280 × 3956 px) and substantial overlap between each subsequent shot, resulting in broad areas encompassing numerous burrows. Because of the specific characteristics of the area and of the animals that populate it, the set of images does not contain negative frames; that is, burrows occur in every image (see Section 4.4). Thus, we processed the images as follows: the image set was linearly spaced and each image was divided into six equally sized quadrants, 52 containing burrows and 35 without any burrows, resulting in a total of 87 images. Figure 5 shows examples of the extracted dataset snippets, with their relative manual classification.
Figure 5.
Examples of images extracted for the dataset: (a,b) show images without burrows, while (c,d) show images with burrows.
4.2. Labeling
The objective assessment of the automated classification results relies on a comparison against the labeled dataset, which serves as the authoritative reference standard. In this study, ground truth was established through a rigorous manual annotation process. Human experts meticulously inspected the dataset to classify regions of interest. Areas confirmed to exhibit burrow characteristics were manually delineated and labeled as positive instances, creating a definitive classification mask. The resulting set of labeled instances provides the baseline required to calculate the performance metrics detailed in the following sections.
Consistency in the manual annotation phase was guaranteed by having several independent experts contributing to this step; the area under analysis was already known to each expert, who had several years of experience in this field.
4.3. Experimental Protocol
To rigorously assess the robustness and the zero-configuration capability of the proposed method, we designed a comprehensive experimental protocol. The global optimization was conducted by a full grid search strategy, exploring the interplay between the morphological filtering and spatial density parameters. We evaluated every possible combination within the defined parameter space to capture interactions between the morphological cleaning intensity and the detection criteria, in particular, we combined the following: five morphological configurations () representing a range of morphological filtering intensity, from raw segmentation to aggressive noise reduction, and eight density thresholds (), encompassing a range of thresholds defining the required proportion of positive pixels within a candidate section.
The parameters C and D are intrinsically coupled. Morphological cleaning acts by eroding the predicted positive areas in the probability map, so the density threshold could be significantly affected by the resulting change in the spatial distribution and quantity of these pixels. By mapping the entire performance landscape, we can assess the stability of the proposed descriptors. A robust method should exhibit a wide plateau of high performance rather than a single, isolated peak. To measure the impact of data availability and perceived effort for the user, the entire grid search was repeated varying the training set size ( of the training pool). This multidimensional approach allows us to quantify the learning convergence of the morphological features and demonstrates the system’s ability to achieve high performance, even with limited labeled data. To ensure consistent benchmarking, we adopted a fixed hold-out validation strategy with bootstrapped training sets. Thus, prior to the experiments a dedicated test set (comprising 20% of the dataset) was isolated and kept fixed throughout all iterations; the remaining images constituted the training pool. For every experimental condition (i.e., specific configuration, density, and training size), we cross-validated the results with a 10-fold repetition of randomly sampling a subset of distinct images from the training pool according to the chosen percentage, training the model and evaluating the model on the test set. For every recorded performance index, the final reported performance is given in terms of mean value and standard deviation over the 10 runs. This approach isolates the variability due to training data selection, providing a robust estimate of the method’s stability.
4.4. Evaluation Metrics
The performance evaluation is conducted at the frame (or image) level. In this context, the problem is formalized as a binary classification task: distinguishing between frames containing at least one target (positive frames) and frames containing exclusively background (negative frames). Accordingly, the metrics are defined as follows: a true positive is recorded when the system detects at least one burrow candidate in a frame that actually contains one, and a false positive is recorded when the system flags a frame as containing a burrow, but the frame is actually empty (pure background). Given the potential imbalance between frames with and without burrows, we chose to record, for every run, precision and F1-score: precision assesses the reliability of the system’s alerts, and answers the question “given that the system claims an image contains a burrow, how likely is that it is correct?”; F1-score, defined as the harmonic mean of precision and recall, allows us to establish when high precision is not achieved simply by ignoring difficult cases, therefore summarizing the system’s ability to correctly identify positive frames without generating excessive false alarms on empty ones. The results are shown in Table 1.
Table 1.
Full Grid Search Results. Precision (P) and F1-Score (F1) metrics (). Vertical labels indicate the Morphological Filtering configuration (C), columns indicate Density Threshold (D).
4.5. Discussion
Upon reading the results, the following considerations emerge. The observed invariance in both mean performance and standard deviation with minimal morphological cleaning () and permissive density thresholds () suggests a state of under-filtering saturation. In such configurations, the system essentially operates at a performance floor where the post-processing logic (cleaning and density threshold) is too loose to reflect any incremental improvements in the underlying decision tree ensemble classifier. Because the detection criteria are so easily satisfied, even a minimal 5 training set appears sufficient to generate a probability map capable of triggering a detection, effectively masking the benefits that a larger training volume would typically provide to the model’s discriminative power. This lack of response to increased data is further compounded by the dominance of structural noise, such as shadows and rocky textures, which are consistently present throughout the aerial imagery. Finally, the remarkable stability of the standard deviation values across iterations is proof of statistical determinism. In more restrictive configurations, the selection of different training samples during bootstrapping typically introduces variance in the results.
Observing the results from the perspective of the morphological configurations (rows C), a consistent trend emerges: the optimal performance peak for each row gradually shifts toward lower density values (columns D) as the cleaning intensity increases. This behavior is a direct consequence of the filtering logic of the pipeline. Since morphological cleaning acts by eroding positive pixels, an increase in the parameter C effectively thins out the structural representation of the burrow. Consequently, to maintain a high F1-Score and prevent a collapse in recall, the density threshold D must be proportionally relaxed to accommodate the reduced pixel count within the target area. In contrast, for milder cleaning configurations, a higher number of predicted pixels is maintained, necessitating a stricter density threshold to effectively suppress the surviving background noise. This shift confirms that the two parameters act as a coupled system, where the optimal operating point is defined by their balance rather than by their individual values.
A notable trend is observed in the lower-diagonal region of the parameter matrix, particularly as the training set size increases. In this regime, the system consistently achieves perfect or near-perfect precision. This behavior can be explained by the interplay between model maturity and systemic restrictiveness. As the training set expands from 5% to 100%, the underlying pixel classifier develops a significantly higher discriminative power, producing probability maps with a superior signal-to-noise ratio. When this mature model is paired with aggressive morphological cleaning () and high density thresholds (), the entry barrier for a candidate detection becomes extremely high. Under these conditions, the probability of background noise or structural artifacts generating a signal strong enough to survive both filters drops to near zero. Consequently, while the system becomes increasingly conservative (at the expense of missing true positive predictions) the reliability of its positive predictions becomes absolute. Such values for C and D can be considered as a high-confidence operating mode, where the total elimination of false alarms is prioritized.
Despite achieving perfect precision in the more restrictive regions (high C and D), the corresponding F1-score reveals a significant performance trade-off. As the system moves toward the lower-diagonal extremity of the grid search, the F1-Score exhibits a noticeable decline, often dropping below the values recorded in the intermediate sweet spot. This divergence is caused by a collapse in recall: the severity of both filters becomes so restrictive that it not only eliminates noise, but also rejects valid burrow candidates. Since the F1-Score balances precision and recall, it penalizes this over-conservative behavior, highlighting that configurations with perfect precision are not necessarily the most effective ones, failing to detect a substantial portion of the targets.
Based on the grid search analysis, the parametrization and can be identified as the optimal operational configuration. While other specific combinations might yield sporadic performance spikes, this setup consistently delivers state-of-the-art results (achieving a test F1-score of ≈ with the full training set) while maintaining superior stability. Crucially, the superiority of this configuration extends beyond the absolute metric values. A defining characteristic of the model obtained by setting and is its distinct responsiveness to data availability. Unlike minimal configurations (e.g., ) which suffered from early saturation and flat performance curves, this setup exhibits a consistent positive learning trend, as seen in Figure 6. As the training set size increases, a noticeable improvement in the metrics is observed, increasing the F1-score from (on of the training set) to (on ). This behavior seems very significant, as it validates the quality of the feature descriptors, proving that the system is not only relying on static filtering constraints, but effectively leverages the additional training examples to refine its decision boundaries and reduce generalization error.
Figure 6.
Performance for the best configuration (C = 2, D = 0.3) varying the size of the training set.
As a final note, it should be observed that our protocol can be immediately extended to cover any similar area; no assumptions have been made on the type of river, riverbanks, or animals involved in the process.
5. Conclusions
This study presents a scalable, data-driven approach for detecting animal burrows in river levee systems using aerial imagery and machine learning techniques. Traditional geophysical methods, while accurate, require specialized equipment, trained personnel, significant time investment and are not always reliable, limiting their applicability for wide monitoring. Our methodology addresses these constraints by leveraging Unmanned Aircraft Systems and Random Forest classification to enable efficient, large scale surveillance of levee infrastructure. The solution addresses both the scarcity and high variability of field data, the latter arising from geographical differences, vegetation density, illumination conditions, image inclination and seasonal factors. Rather than pursuing a single universal model, the system develops a lightweight customized model, tailored to the collected images belonging to a specific monitoring campaign. The classification workflow addresses a fundamental challenge in infrastructure monitoring: the need to inspect extensive levee networks efficiently. Rather than requiring users to manually examine every image in detail, the system enables them to label only a small number of representative regions that exemplify burrow and non-burrow characteristics. From these limited training examples, a Random Forest classifier learns to automatically process entire image datasets, identifying potential burrow locations across hundreds or thousands of images. The automated detection pipeline applies morphological filtering, density analysis, and geometric constraints to refine the initial classifications, presenting users with a curated set of candidate locations for final validation.
This process went through comprehensive experimental validation using a full grid search strategy, exploring the interplay between cleaning configurations and spatial density thresholds across varying training set sizes. Results revealed that a compensatory relationship existed between the parameters of the system; the optimal parametrization allowed us to achieve a good balance between precision and recall even with limited training data, with a performance stably between 0.8 and 0.9 F1-score, effectively suggesting that our approach may be feasible. This last result is particularly valuable for operational deployment, as it provides users with an economical annotation workflow, requiring minimal manual labeling effort to achieve reliable detection across large image datasets. This dramatically reduces the inspection burden, transforming a task that would require hours of careful manual review into a process where human expertise is focused only on providing initial guidance and validating final results. This research demonstrates the viability of automation and machine learning for infrastructure monitoring, offering a practical alternative, as well as a supporting tool, to traditional survey methods. By providing precise threat identification and efficient monitoring capabilities, the system facilitates a fundamental shift from reactive emergency repairs to proactive maintenance strategies.
The software has already been adopted by public officials for operational use, demonstrating its practical value in real-world monitoring scenarios. Such practical deployment establishes a continuous feedback loop between field operators and system development, ensuring that it evolves in response to actual monitoring challenges. Furthermore, it provides operational data collected through routine use, creating opportunities for expanding the training dataset across diverse geographical contexts, progressively enhancing the model’s generalization capabilities.
Author Contributions
Conceptualization, A.C. and F.P.; methodology, G.S.; software, G.P. and E.P.; validation, L.B., M.G. and M.V.; formal analysis, G.S.; investigation, A.P. and S.P.; resources, R.Z. and D.M.; data curation, D.M.; writing—original draft preparation, G.P. and E.P.; writing—review and editing, G.S. and A.P.; visualization, G.P.; supervision, R.Z. and G.S.; project administration, R.Z.; funding acquisition, R.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This research received was funded by Emilia-Romagna region.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Our original dataset is available at https://www.kaggle.com/dsv/14153346 (accessed on 15 November 2025), with DOI 10.34740/KAGGLE/DSV/14153346.
Conflicts of Interest
Davide Martinucci and Roberta Zambrini were employed by Esplora S.R.L. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- Federal Emergency Management Agency (FEMA). Technical Manual for Dam Owners: Impacts of Animals on Earthen Dams; Technical Manual no. 473; Federal Emergency Management Agency (FEMA): Washington, DC, USA, 2005.
- Sharp, M.; Wallis, M.; Deniaud, F.; Hersch-Burdick, R.; Tourment, R.; Matheu, E.; Seda-Sanabria, Y.; Wersching, S.; Veylon, G.; Durand, E.; et al. The International Levee Handbook; CIRIA: London, UK, 2013. [Google Scholar]
- Bayoumi, A.; Meguid, M.A. Wildlife and safety of earthen structures: A review. J. Fail. Anal. Prev. 2011, 11, 295–319. [Google Scholar] [CrossRef] [Scilit]
- Richards, K.S.; Reddy, K.R. True triaxial piping test apparatus for evaluation of piping potential in earth structures. Geotech. Test. J. 2010, 33, 83–95. [Google Scholar] [CrossRef] [Scilit]
- Orlandini, S.; Moretti, G.; Albertson, J.D. Evidence of an emerging levee failure mechanism causing disastrous floods in Italy. Water Resour. Res. 2015, 51, 7995–8011. [Google Scholar] [CrossRef] [Scilit]
- Camici, S.; Barbetta, S.; Moramarco, T. Levee body vulnerability to seepage: The case study of the levee failure along the Foenna stream on 1 January 2006 (Central Italy). J. Flood Risk Manag. 2017, 10, 314–325. [Google Scholar] [CrossRef] [Scilit]
- Borgatti, L.; Forte, E.; Mocnik, A.; Zambrini, R.; Cervi, F.; Martinucci, D.; Pellegrini, F.; Pillon, S.; Prizzon, A.; Zamariolo, A. Detection and characterization of animal burrows within river embankments by means of coupled remote sensing and geophysical techniques: Lessons from River Panaro (northern Italy). Eng. Geol. 2017, 226, 277–289. [Google Scholar] [CrossRef] [Scilit]
- Palladino, M.R.; Barbetta, S.; Camici, S.; Claps, P.; Moramarco, T. Impact of animal burrows on earthen levee body vulnerability to seepage. J. Flood Risk Manag. 2019, 13, e12559. [Google Scholar] [CrossRef] [Scilit]
- Panthulu, T.; Krishnaiah, C.; Shirke, J. Detection of seepage paths in earth dams using self-potential and electrical resistivity methods. Eng. Geol. 2001, 59, 281–295. [Google Scholar] [CrossRef] [Scilit]
- Butler, J.; Roper, T.J.; Clark, A.J. Investigation of badger (Meles meles) setts using soil resistivity measurements. J. Zool. 1994, 232, 409–418. [Google Scholar] [CrossRef] [Scilit]
- Ni, S.H.; Chen, C.K.; Lin, H.M. Application of Ground Penetrating Radar on the Void-Detection in Levee. In Proceedings of the Twelfth (2002) International Offshore and Polar Engineering Conference, Kitakyushu, Japan, 26–31 May 2002; ISOPE: Cupertino, CA, USA, 2002; pp. 836–839. [Google Scholar]
- Pennisi, V.; Musumeci, R.E.; Grasso, R.; Ferraro, A.; Foti, E. Non-invasive surveys to assess animal burrows as potential causes of levee instability. J. Flood Risk Manag. 2023, 16, e12931. [Google Scholar] [CrossRef] [Scilit]
- Loperte, A.; Bavusi, M.; Cerverizzo, G.; Lapenna, V.; Soldovieri, F. Ground penetrating radar in dam monitoring: The test case of Acerenza (Southern Italy). Int. J. Geophys. 2011, 2011, 654194. [Google Scholar] [CrossRef] [Scilit]
- Bertone, N.; Forte, E.; Titti, G.; Zambrini, R.; Macini, P.; Mocnik, A.; Parodi, S.; Pellegrini, F.; Possamai, M.; Staboli, C.; et al. Integration of seasonal frequency domain electromagnetic surveys and geological data for assessing the integrity of earthen levee systems. The case study of the Panaro River (Northern Italy). Eng. Geol. 2024, 342, 107749. [Google Scholar] [CrossRef] [Scilit]
- Anderson, N.; Ismail, A. A generalized protocol for selecting appropriate geophysical techniques. In Proceedings of the Geophysical Technologies for Detecting Underground Coal Mine Voids Forum, Lexington, KY, USA, 28–30 July 2003; Citeseer: University Park, PA, USA, 2003; pp. 28–30. [Google Scholar]
- Benson, R.C. Remote sensing and geophysical methods for evaluation of subsurface conditions. In Practical Handbook of Environmental Site Characterization and Ground-Water Monitoring; CRC Press: Boca Raton, FL, USA, 2005; pp. 259–306. [Google Scholar]
- Butler, D.K. Microgravimetric and gravity gradient techniques for detection of subsurface cavities. Geophysics 1984, 49, 1084–1096. [Google Scholar] [CrossRef] [Scilit]
- Roth, M.; Mackey, J.; Mackey, C.; Nyquist, J. A case study of the reliability of multielectrode earth resistivity testing for geotechnical investigations in karst terrains. Eng. Geol. 2002, 65, 225–232. [Google Scholar] [CrossRef] [Scilit]
- Szynkiewicz, A. GPR monitoring of earthen flood banks/levees. In Proceedings of the Eighth International Conference on Ground Penetrating Radar, Gold Coast, Australia, 23–26 May 2000; SPIE: Bellingham, WA, USA, 2000; Volume 4084, pp. 85–90. [Google Scholar]
- Kinlaw, A.; Grasmueck, M. Evidence for and geomorphologic consequences of a reptilian ecosystem engineer: The burrowing cascade initiated by the gopher tortoise. Geomorphology 2012, 157, 108–121. [Google Scholar] [CrossRef] [Scilit]
- Cortez, J.D.; Henke, S.E.; Redeker, E.; Fulbright, T.E.; Riddle, R.; Young, J. Demonstration of ground-penetrating radar as a useful tool for assessing pocket gopher burrows. Wildl. Soc. Bull. 2013, 37, 428–432. [Google Scholar] [CrossRef] [Scilit]
- Di Prinzio, M.; Bittelli, M.; Castellarin, A.; Pisa, P.R. Application of GPR to the monitoring of river embankments. J. Appl. Geophys. 2010, 71, 53–61. [Google Scholar] [CrossRef] [Scilit]
- van Lieshout, C.; van Oeveren, K.; van Emmerik, T.; Postma, E. Automated River Plastic Monitoring Using Deep Learning and Cameras. Earth Space Sci. 2020, 7, e2019EA000960. [Google Scholar] [CrossRef] [Scilit]
- Hidaka, M.; Matsuoka, D.; Sugiyama, D.; Murakami, K.; Kako, S. Pixel-level image classification for detecting beach litter using a deep learning approach. Mar. Pollut. Bull. 2022, 175, 113371. [Google Scholar] [CrossRef] [Scilit]
- Gonçalves, G.; Andriolo, U.; Pinto, L.; Duarte, D. Mapping marine litter with Unmanned Aerial Systems: A showcase comparison among manual image screening and machine learning techniques. Mar. Pollut. Bull. 2020, 155, 111158. [Google Scholar] [CrossRef] [Scilit]
- Kako, S.; Morita, S.; Taneda, T. Estimation of plastic marine debris volumes on beaches using unmanned aerial vehicles and image processing based on deep learning. Mar. Pollut. Bull. 2020, 155, 111127. [Google Scholar] [CrossRef] [Scilit]
- Bao, Z.; Sha, J.; Li, X.; Hanchiso, T.; Shifaw, E. Monitoring of beach litter by automatic interpretation of unmanned aerial vehicle images using the segmentation threshold method. Mar. Pollut. Bull. 2018, 137, 388–398. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Deidun, A.; Gauci, A.; Lagorio, S.; Galgani, F. Optimising beached litter monitoring protocols through aerial imagery. Mar. Pollut. Bull. 2018, 131, 212–217. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Fallati, L.; Polidori, A.; Salvatore, C.; Saponari, L.; Savini, A.; Galli, P. Anthropogenic Marine Debris assessment with Unmanned Aerial Vehicle imagery and deep learning: A case study along the beaches of the Republic of Maldives. Sci. Total Environ. 2019, 693, 133581. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Moy, K.; Neilson, B.; Chung, A.; Meadows, A.; Castrence, M.; Ambagis, S.; Davidson, K. Mapping coastal marine debris using aerial imagery and spatial analysis. Mar. Pollut. Bull. 2018, 132, 52–59. [Google Scholar] [CrossRef] [Scilit]
- Nayak, R.; Pati, U.C.; Das, S.K. A comprehensive review on deep learning-based methods for video anomaly detection. Image Vis. Comput. 2021, 106, 104078. [Google Scholar] [CrossRef] [Scilit]
- Sifnaios, S.; Arvanitakis, G.; Konstantinidis, F.K.; Tsimiklis, G.; Amditis, A.; Frangos, P. A deep learning approach for pixel-level material classification via hyperspectral imaging. arXiv 2024, arXiv:2409.13498. [Google Scholar]
- Ramesh, K.; Kumar, G.K.; Swapna, K.; Datta, D.; Rajest, S.S. A review of medical image segmentation algorithms. EAI Endorsed Trans. Pervasive Health Technol. 2021, 7, e1–e13. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Gorishniy, Y.; Rubachev, I.; Khrulkov, V.; Babenko, A. Revisiting deep learning models for tabular data. Adv. Neural Inf. Process. Syst. 2021, 34, 18932–18943. [Google Scholar]
- Shwartz-Ziv, R.; Armon, A. Tabular data: Deep learning is not all you need. Inf. Fusion 2022, 81, 84–90. [Google Scholar] [CrossRef] [Scilit]
- Grinsztajn, L.; Oyallon, E.; Varoquaux, G. Why do tree-based models still outperform deep learning on typical tabular data? Adv. Neural Inf. Process. Syst. 2022, 35, 507–520. [Google Scholar]
- Baramal, S.; Chauhan, D. A Comparative Study of TabNet and XGBoost for Tabular Data Classification; Springer Nature: Berlin, Germany, 2025. [Google Scholar]
- Belgiu, M.; Drăguţ, L. Random forest in remote sensing: A review of applications and future directions. ISPRS J. Photogramm. Remote Sens. 2016, 114, 24–31. [Google Scholar] [CrossRef] [Scilit]
- Pal, M. Random forest classifier for remote sensing classification. Int. J. Remote Sens. 2005, 26, 217–222. [Google Scholar] [CrossRef] [Scilit]
- Sheykhmousa, M.; Mahdianpari, M.; Ghanbari, H.; Mohammadimanesh, F.; Ghamisi, P.; Homayouni, S. Support vector machine versus random forest for remote sensing image classification: A meta-analysis and systematic review. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2020, 13, 6308–6325. [Google Scholar] [CrossRef] [Scilit]
- Feng, Q.; Liu, J.; Gong, J. UAV remote sensing for urban vegetation mapping using random forest and texture analysis. Remote Sens. 2015, 7, 1074–1094. [Google Scholar] [CrossRef] [Scilit]
- Grimmer, G.; Wenger, R.; Forestier, G.; Chardon, V. Automatic detection of in-stream river wood from random forest machine learning and exogenous indices using very high-resolution aerial imagery. Environ. Model. Softw. 2025, 190, 106460. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.





