Using Deep Learning to Detect Stitching Artefacts in Drone-Based Orthomosaics of Orchards
摘要
The rapidly increasing human population has necessitated the development of Precision Agriculture (PA), which leverages technology to support sustainable crop management. An important element of PA is the use of drones to capture aerial imagery of crops. In this work, we focus on orchard monitoring, specifically the image preparation phase that precedes downstream image analysis. The images produced by the drone must be stitched together to form a large orthomosaic, for later analysis. Unfortunately, the automated stitching process involves many steps and is prone to registration errors, resulting in a defective orthomosaic. Currently, these artefacts are detected through manual inspection, a time-consuming and expensive process. We present a new automated pipeline for detecting, isolating and visualising stitching artefacts in orchard orthomosaics, built on unsupervised deep anomaly detection. To train the model, we first create orchard masks to remove non-orchard regions such as roads, houses, etc. Masked orthomosaics are then decomposed into fixed-size patches which are used to train an unsupervised deep anomaly detection model. We evaluated two anomaly detection models - reverse distillation and UniAD. During inference, a SAM-based segmentation model is used to generate an image mask, and the trained anomaly detection model assigns anomaly scores to unmasked orchard patches. For each orchard, these scores are combined to derive a final orchard classification. Two algorithms were evaluated - isolation forest and HDBSCAN clustering - over eight unique orchards. The segmentation model provided satisfactory masking across orchards. The reverse distillation model (average AUROC 98%) outperformed the transformer-based UniAD model (89.4%). For orchard classification, HDBSCAN clustering achieved 100% accuracy with an average F1 score of 0.695 for patch classification, beating the F1 of 0.381 for isolation forest. These results were achieved using only 1200 patches for training, demonstrating the method’s potential should more data be available. Code has been made publicly available: https://github.com/dangor18/STITCH-AD