Esther Vera
Plant locator from row-view to global-view -> grid
12/02/2024
This repository contains the complete workflow from detecting a plant in an image and locate this plant in the global-view orthomosaic following a predefined grid to visualize its health status. Besides, it also locates the drone positions from where the images where captured and the plant was analyzed.
The dataset needed to execute this model should be download from UC1 GITHUB DATA FOLDER and copy the content to the data folder present in this repository. This UC1 GITHUB DATA FOLDER contains images and data that has been generated with the codes available in the section top_view.
No specific data preparation is needed.
The parameters are defined directly in the code.
For using the model, just type the following command in the 02_plant_locator_v2 directory with the environment active:
python locate_plants_grid.py
The row images, such as the one shown on the left, are analyzed using the YOLOv8 model to detect the plant health. The results from this analysis are then mapped onto the orthomosaic view of the vineyards, as illustrated in the image on the right. This process allows for a comprehensive visualization of the detection outcomes across the entire vineyard.
As a result, the orthomosaic image of the vineyards will show the plant locations, their health status and the drone's positions. The plant locations follow a grid layout, meaning that the positions of the plants are predetermined to this grid structure. The grid was generated using the create_grid code. The droneβs position is determined through GPS data embedded in the images captured during flight. These coordinates can be mapped onto the orthomosaic view, as each pixel in the orthomosaic contains location-specific information.ains this information.
After processing all the row images, it is obtained the global visualization of the vineyards where the drones' positions are marked as blue triangles and the health status of the plants are shown as green rectangles (healthy) or red rectangles (unhealthy):
Upon zooming in on the output, the positions of the drones and the grid which marks the locations become clearly visible. The grid cells without color indicate areas where no drone captures were recorded close enough to those positions.
This project is funded by the European Union, grant ID 101060643.