Skip to content

Adaptive path planning for efficient object search by UAVs in agricultural fields

License

Notifications You must be signed in to change notification settings

WUR-ABE/uav_adaptive_planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adaptive path planning for UAVs

flight-path

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

About

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.

Installation

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.

Run on custom orthomosaic dataset

Dataset preperation

NOTE: Some tools require the Agisoft Metashape Python module (with valid license). See their website for installation instructions.

  1. Transform Topcon data files CRS from RDNAPTRANS2008 to WGS84:
transform_markers <<path_to_markers_file_rdnaptrans2008>> <<path_to_markers_file_WGS84>> epsg:4326
  1. Create plot of marker locations:
plot_markers <<path_to_markers_file>> --output_file <<path_to_output_file>>
  1. Build orthomosaics for the 12m altitude images
  2. Align images for the 24m and 32m altitude images
  3. Select images for train and validation:
create_detection_dataset <<path_to_markers_file>> <<path_to_dataset>> <<path_to_metashape_project>>
  1. 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
  1. 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>>

Training

  1. Adapt the paths in train.sh to refer to your custom dataset
  2. Run training:
./train.sh

The weights will be saved in training_results.

Run adaptive path planner

  1. 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)>>
  1. Run the adaptive path planner:
adaptive_planner orthomosaic_sim <<path to field yaml file>> <<path to planner config file>> --name <<experiment name>>

Citation

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}
}

Funding

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.

wageningen university logo     synergia logo

About

Adaptive path planning for efficient object search by UAVs in agricultural fields

Topics

Resources

License

Stars

Watchers

Forks