2026-09-02 –, Phoenix Hall
Discover how I built a custom QGIS plugin integrating YOLOv8 and DeepLabV3+ to automate palm oil tree counting, road, and drainage detection from massive drone orthophotos. Learn about overcoming Out-of-Memory challenges and increasing spatial QC efficiency from 200 to 1,500 hectares per day in precision agriculture.
In precision agriculture, extracting actionable spatial data from high-resolution drone imagery is a massive bottleneck. At Terra Drone Agri, traditional Object-Based Image Analysis (OBIA) for tree counting required extensive manual Quality Control (QC), processing only 200 hectares per day. Similarly, infrastructure mapping (roads and drainage) relied heavily on slow, manual digitization.
To solve this, I developed a comprehensive, all-in-one QGIS plugin designed to automate these workflows using state-of-the-art Deep Learning models directly within the desktop GIS environment.
Our QGIS plugin features three main capabilities:
1. Multi-Variant Tree Counting (YOLOv8): I developed three specific tools tailored for 5-7 cm and 2 cm resolution orthophotos. This includes standard tree counting, a 3-class health classification (Healthy, Yellowish, Dead), and a precision center-point detection tool. The precision tool specifically extracts X,Y coordinates of the palm canopy centers, which are directly exported as flight missions for drone-based precision spraying against Oryctes pests. The model achieved a high mAP50 of 0.971.
Infrastructure Detection (Semantic Segmentation):
For road and drainage networks, we evaluated U-Net, Pre-trained U-Net, DeepLabV3+, and SegFormer. DeepLabV3+ yielded the best results for road detection (69% accuracy compared to manual digitization). We integrated a complex post-processing pipeline including skeletonization, pathfinding algorithms, and query cleaning to automatically convert pixel masks into clean, connected .shp polylines.Overcoming Technical & Environment Bottlenecks:
The core challenge in this development was integrating heavy Deep Learning libraries (PyTorch) into the QGIS environment and performing inference on gigabyte-sized orthophotos without triggering Out-of-Memory (OOM) crashes. To bypass this, we modified the SAHI (Slicing Aided Hyper Inference) library's source code to force sequential tiling for YOLO object detection. For the heavier semantic segmentation tasks, we engineered a memory-swapping mechanism utilizing SSD temporary files to compensate for RAM limitations.
This presentation will walk through the end-to-end development process: from data preparation in Roboflow, model training in cloud environments, UI creation with Qt Designer, PyQGIS integration, to deploying a stable local environment. By integrating AI into QGIS, we successfully shifted the workflow from manual digitization to rapid automated QC, boosting tree counting efficiency to 1,500 hectares per day.
PyQGIS Developer Cookbook: To understand how Python scripts and UIs (Qt Designer) are integrated into QGIS. (https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/)
Ultralytics YOLOv8 Documentation: For a fundamental understanding of the object detection architecture used for tree counting. (https://docs.ultralytics.com/)
DeepLabV3+ Architecture: A brief overview of semantic segmentation concepts for infrastructure and road detection.
Indicate what is (are) the open source project(s) essential in your talk:QGIS & PyQGIS: As the core GIS desktop environment and UI framework.
PyTorch: The underlying open-source machine learning framework for model inference.
Ultralytics YOLOv8: For the core object detection and tree counting architecture.
OpenCV & GDAL: For raster manipulation, spatial data extraction, and format conversion.
I make my conference contribution available under the CC BY 4.0 license. The conference contribution comprises the abstract, the text contribution for the conference proceedings, the presentation materials as well as the video recording and live transmission of the presentation: