How subhashbs36/autonomous-drone-path-optimization-for-pomegranate-tree-pesticide-spraying works
Project Overview
• This project is designed to autonomously determine an optimal drone path for pesticide spraying on a pomegranate farm.
Main Components
a. Input & Data Handling:
• TIFF Image Loader: A module to load the high-resolution TIFF image (with embedded GPS coordinates).
• Data Directory: Contains image datasets, YAML configuration files (e.g., for different detection datasets) and scripts to download weights and datasets.
b. Preprocessing & Image Processing:
• Image Resizing & Slicing: Located in modules or functions that handle image resizing (e.g., in main.py and possibly within utility scripts).
• Data Augmentation & Preprocessing Utilities: Found in the "utils" directory (e.g., augmentations, dataloaders) that support proper image handling.
c. Detection Module:
• YOLOv5 Model: This includes several variants as seen in the “models” folder (e.g., models/yolov5*.yaml, yolov3 etc.) and the "classify" and "segment" subdirectories which include predict, train, and validation scripts.
• Detection Pipelines: The detection works on each sliced image to detect individual trees.
e. Path Optimization:
• TSP Solver: A dedicated component that takes the extracted GPS coordinates as input and computes the optimal flight (spraying) path.
• Algorithm Implementation: Likely integrated within main.py or another dedicated module where TSP optimization is executed.
f. Visualization & Output:
• Results Rendering: Visual overlay on the original image showing the computed path (as indicated in the README with multiple path images).
g. Auxiliary Services:
• Docker and Cloud Deployments: There are Dockerfiles for CPU, ARM64, and deployment scripts (e.g., in utils/google_app_engine and utils/flask_rest_api) which may be used to expose an API or package the application.
Diagramming Relationships and Data Flow
• Optionally, branch off to show utilities (logging, docker setup, REST API integration) that interface with multiple components.
Architectural Patterns & Design Principles
• Modular Design: Clearly separate concerns into specialized modules (preprocessing, detection, optimization, visualization).
• Pipeline Flow: Emphasize a linear pipeline where the output of one stage is the input to the next.
• External Dependencies: Optionally annotate external libraries and frameworks (YOLOv5, OpenCV, NumPy, GDAL, tsp_solver).