A deep learning framework for bone fragment classification of owl pellets using Yolov12

Machine Learning


This study demonstrates the feasibility and effectiveness of using deep learning to automate the classification of bone fragments from barn owls (Tight Javanica Javanica)pellet. To our knowledge, this is the first application of an object detection framework specially trained to recognize skeletal fragments of owl pellets for ecological surveillance. Traditional pellet analysis relies on manual osteologic examinations6,7,13limits throughput and increases sensitivity to human error. Our Yolov12-based model overcomes these limitations by providing rapid, reproducible, scalable detection of rodent skeletal components directly support both conservation and pest management efforts. Sample preparation remains a prerequisite for both manual and AI-based methods, but the classification steps themselves are greatly accelerated with deep learning. When deployed, the model can analyze hundreds of fragments within seconds, surpassing human observers in throughput and consistency, especially when dealing with large-scale pellet investigations. For example, researchers can simply take photos of the bones during various sampling times throughout the year, and our Python scripts can provide counts separated by sampling times within less than 5 minutes. There is no need to collect and maintain bone specimens.

This model achieved strong performance on multiple metrics, including high Map@0.5 (0.984), accuracy (0.90), and F1 score (0.97), comparable to or exceed other ecological deep learning applications.11,14. These results indicate that constrained classification tasks, such as distinguishing between four anatomically different bone types, may produce more consistent results than the broader species recognition model.15. The relatively high accuracy of our study reflects distinct structural features of selected bones (skull, femur, mandibular, pubic bone), and was intentionally selected due to the recognitionability and frequency of owl pellets.16,17.

The confusion matrix revealed a consistent misclassification of the background area as the femur, with 48% of true background instances predicted as the femur. This suggests that the model may confuse debris and shadows with anatomical features, especially when the background texture resembles a long bone structure. This confusion may be linked to the conformance of the objectivity components during training. Since Yolov12 incorporates an object loss term, future training iterations can explore adjusting their relative weights to improve background discrimination.

Detect small, obstructed, or broken bone fragments10,18. This model worked well with well-conserved fragments, but insufficient digestion-related degradation, structural overlap, and insufficient contrast can reduce the sensitivity of bones below 1 cm in length. Nevertheless, this model demonstrates the ability to successfully identify complex anatomical features such as imaginary branches and shaking masses and manage biologically noisy, visually variable data.19. A limitation of this study is a relatively small set of tests (81 images). This can contribute to variation in performance metrics. This split provided sufficient object-level annotations (~200 bones), but may not fully capture the variability present in the natural owl pellet sample. Future studies should consider implementing K-fold cross-validation or increasing the test split to 20% to improve robustness and reduce performance variability for different subsets.

A dual strategy for rich estimation by using skull counts as a conservative measure indicates increased reliability, especially when the skull is absent or damaged. This method is consistent with previous pellet analysis protocols5,7in contrast to live trapping and invasive sampling, supports ecological reasoning with minimal interference to wildlife. These benefits are particularly relevant in protected areas or large agricultural systems where non-invasive monitoring is preferred.

The ability to automatically estimate rodent abundances from owl pellet remaine retains considerable ecological and applied value. Rodents are one of the most prolific agricultural pests in the world and are responsible for significant yield losses in rice, oil palms and other crops20. Accurate and timely rodent population estimates are important to deploy targeted pest management interventions before an outbreak occurs. Traditional trapping methods are expensive, time-consuming, and are often logistically unfeasible on the landscape scale. In contrast, pellet-based monitoring offers a cost-effective, passive, and non-invasive alternative that reflects the long-term presence of prey. Automating this process through AI-driven image analysis increases scalability and responsiveness, allowing continuous monitoring and real-time integration into an integrated pest management (IPM) framework. This approach also supports ecological research by providing high-resolution data on the composition and predator and play dynamics of small mammalian communities, particularly in areas that are sensitive to biodiversity.

Despite the efficiency of the model, certain structural limitations of euro-based detectors guarantee discussion. Using bounding boxes limits the ability of the model to handle duplicate or fragmented objects, a common scenario for dense pellet content. Effective image-based detection should be noted that physical decomposition of the pellet is required to expose bone fragments, as the intact pellet obstructs the skeletal element. New segmentation models such as Mask R-CNN and Yolov5-SEG have improved spatial accuracy via pixel-level object delineation21,22,23 If the skeletal elements are visually merged, they may be suitable for resolving ambiguity. Future adaptations of this pipeline can incorporate instance segmentation to address these challenges.

Our model was consistently performed on samples from two countries, but requires extensive testing across different owl populations, seasons, and prey assemblies. Environmental heterogeneity and taxonomic variation are known to affect model performance9,10. Approaches such as domain adaptation, ensemble learning, synthetic data augmentationtwenty four It could further enhance the applicability of crosshabitat.

The study also demonstrates the value of cloud-based platforms such as Roboflow and Google Colab in democratizing access to deep learning tools. However, practical constraints such as calculation limits, session timeouts, and reliance on internet connections. It highlights the need for a lightweight, locally deployable solution. Beyond pellet analysis, this approach could be extended to other ecological use cases involving fragmented biological materials, such as scat analysis, archaeological assemblies, and forensic bone classification. Minimal changes allow the model and inference pipeline to be adapted to identify additional skeletal elements and to distinguish species. This versatility supports a wide range of conservation, agriculture, and research applications where accurate species monitoring is critical.

Our results show that the Yolov12 object detection framework, in particular, can be used effectively to automate rodent bone classification in barn owl pellets. The high accuracy, recall, and average average accuracy values achieved demonstrate the robustness and reliability of the approach, even under biological and visually complex conditions. By integrating this model with an inference pipeline that can estimate rodent abundance, we provide a scalable and non-invasive tool for ecological monitoring.

Future research should focus on addressing the challenges of overlapping objects in increasing diversity in anatomical classes, increasing sensitivity for small bone fragments, and incorporating segmentation models. Furthermore, increasing the generalizability of the model across habitat and prey profiles is important for wider deployments. Open accessibility of models and datasets has encouraged reproducibility and adoption by other researchers, contributing to the expansion of artificial intelligence integration in conservation biology and ecological informatics.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *