Adaptive path planning for efficient object search by UAVs in agricultural fields
Rick van Essen, Eldert van Henten, Lammert Kooistra and Gert Kootstra Paper: https://doi.org/10.1016/j.atech.2025.101075
This repository contains the code beloning to the paper "Adaptive path planning for efficient object search by UAVs in agricultural fields".
It contains the original code and network weights to reproduce the results in the paper. The image training data and orthomosaics are published in https://doi.org/10.4121/bbe97051-07df-4934-b634-701d91a2075e.
Python 3.10 is needed with all dependencies listed in requirements.txt and some additional dependencies. Install using:
sudo apt-get install libimage-exiftool-perl
pip install -r .
export DATA_HOME=<<path to orthomosaic folders>>
Additionally, Fields2Cover is needed. See their website for installation instructions.
Alternatively, you can use the provided dev container. Make sure to put the DATA_HOME variable to ~/.profile or ~/.bash_profile.
NOTE: Some tools require the Agisoft Metashape Python module (with valid license). See their website for installation instructions.
- Transform Topcon data files CRS from
RDNAPTRANS2008toWGS84:
transform_markers <<path_to_markers_file_rdnaptrans2008>> <<path_to_markers_file_WGS84>> epsg:4326
- Create plot of marker locations:
plot_markers <<path_to_markers_file>> --output_file <<path_to_output_file>>
- Build orthomosaics for the 12m altitude images
- Align images for the 24m and 32m altitude images
- Select images for train and validation:
create_detection_dataset <<path_to_markers_file>> <<path_to_dataset>> <<path_to_metashape_project>>
- Refine the auto-generated labels using a labeling tool (for example
labelImg):
labelImg <<path_to_dataset>>/images/train <<path_to_dataset>>/classes.txt <<path_to_dataset>>/labels/train
labelImg <<path_to_dataset>>/images/val <<path_to_dataset>>/classes.txt <<path_to_dataset>>/labels/val
- Mask out annotations that are not training and validation and create YOLO dataset:
mask_detection_dataset <<path_to_dataset>>/data.yml <<path_to_train_markers_file>> <<path_to_validation_markers_file>> <<path_to_metashape_project>>
- Adapt the paths in
train.shto refer to your custom dataset - Run training:
./train.sh
The weights will be saved in training_results.
- Draw a field and boundary file to indicate the area of interest to the planner:
draw_field --output_folder fields --name <<name of field>> --scheme_file <<path to orthomosiac scheme file (optional, as reference for drawing)>>
- Run the adaptive path planner:
adaptive_planner orthomosaic_sim <<path to field yaml file>> <<path to planner config file>> --name <<experiment name>>
If you find this code usefull, please consider citing our paper:
@article{vanEssen2025,
author = {van Essen, Rick and van Henten, Eldert and Kooistra, Lammert and Kootstra, Gert},
title = {Adaptive path planning for efficient object search by UAVs in agricultural fields},
journal = {Smart Agricultural Technology},
volume = {12},
pages = {101075},
year = {2025},
issn = {2772-3755},
doi = {10.1016/j.atech.2025.101075}
}
This research is part of the research program SYNERGIA, funding was obtained from the Dutch Research Council (NWO grant 17626), IMEC-One Planet and other private parties.


