- Overview
- Problem & Motivation
- What This Project Does
- Dataset & Labeling
- Model & Approach
- Project Structure
- Getting Started
- Results & Evaluation
- Challenges
- What We Learned
- Limitations & Future Work
- Tech Stack
- Contributors
- License
- Acknowledgments
This repository contains our CS 4824 – Machine Learning final project: a computer vision system that detects safe landing zones for drones / VTOL craft from images.
The goal is to build an end-to-end pipeline that:
- Takes aerial or near-ground images from drone-like viewpoints
- Uses a modern object detection model to localize landing zones
- Trains and evaluates the model using a COCO-formatted dataset
- Can be extended to work with synthetic scenes (Blender) and real-world photos
We use Roboflow’s RF-DETR object detector and a COCO dataset to explore how well a model can learn to recognize “safe places to land” under diverse environments.
Autonomous drones and VTOL vehicles must often land in unstructured, cluttered environments:
- Rooftops, parking lots, courtyards, stadiums
- Urban areas with people, cars, obstacles, wires
- Remote areas with uneven ground or vegetation
In many practical scenarios (delivery, inspection, search and rescue), the drone has to choose a safe landing zone on its own. Misclassification is dangerous:
- A false positive (unsafe area labeled safe) can lead to damage or injury
- A false negative limits where the drone can land and reduces mission flexibility
We ask:
Can we train a robust detector that reliably finds safe landing zones across diverse scenes and viewpoints?
At a high level, this repository provides:
-
🧹 Data Processing
- Scripts to preprocess raw landing zone images
- Conversion of custom annotations into COCO format
-
🏷️ Dataset Conversion
- A script to convert landing zone annotations → COCO JSON compatible with RF-DETR and other detectors
-
🧠 Model Training
- A training script that uses
config_landing_zone.yamlto train a model on the landing zone dataset - A Colab notebook to run training in the cloud (GPU)
- A training script that uses
-
✅ Verification & Setup
- A helper script to verify that your environment, dependencies, and dataset paths are correctly configured
Overall, the repository is focused on reproducible training and clean data handling for the drone landing zone detection task.
The dataset is stored as a compressed archive:
coco-dataset.zip– COCO-style dataset containing:- Images of potential landing zones from diverse environments
- Bounding box annotations marking landing zone regions
The project is designed to support images from:
- Synthetic scenes created in Blender (e.g., rooftops, fields, rooftops with helipads)
- Prompt-generated images (e.g., Midjourney / similar tools)
- Real-world-like drone views (city plazas, rooftops, open fields, campuses)
The dataset uses COCO object detection format, with:
images– metadata and file pathsannotations– bounding boxes + category id for landing zonescategories– class definitions (landing_zone, and optionally others)
You can regenerate or modify the COCO annotations using:
convert_to_coco.py– converts raw annotation formats into a unified COCO JSONprocess_landing_zones.py– optional additional cleaning / preparation logic
This project is designed around RF-DETR, Roboflow’s implementation of the DETR-style transformer-based object detector:
- End-to-end detection (no anchors, no NMS)
- Strong performance on crowded scenes
- Works well with COCO and custom datasets
The core configuration lives in:
config_landing_zone.yaml
That config typically includes (you can open it and adjust):
- Paths to training / validation COCO files
- Image sizes and augmentations
- Model backbone / architecture choices
- Training hyperparameters (epochs, batch size, learning rate, etc.)
Training logic is handled by:
train_landing_zone.py– Python script for local trainingtrain_landing_zone_colab.ipynb– Jupyter notebook for Google Colab training
CS4824FinalProject/
├── .gitattributes
├── .gitignore
├── coco-dataset.zip # COCO dataset archive (images + JSON)
├── config_landing_zone.yaml # RF-DETR / training configuration
├── convert_to_coco.py # Convert raw annotations into COCO format
├── process_landing_zones.py # Preprocess / clean landing zone datasets
├── train_landing_zone.py # Main training script (Python)
├── train_landing_zone_colab.ipynb# Colab notebook for training in the cloud
└── verify_and_setup.py # Environment + dataset verification helper
This project provides a complete pipeline for training and evaluating a YOLO-based computer-vision model for detecting drone landing zones. Follow the steps below to set up your environment, prepare data, train models, and run inference.
Make sure you have the following installed:
- Python 3.9+
- PyTorch (with CUDA recommended)
- Ultralytics YOLO (
pip install ultralytics) - Git
- (Optional) NVIDIA GPU for faster training
Install the correct version of PyTorch for your system:
https://pytorch.org/get-started/locally/
Clone the repository:
git clone https://github.com/PieLord757/CS4824FinalProject
cd CS4824FinalProjectTraining outputs (weights, metrics, predictions) will be saved automatically in: runs/detect/train/
• config_landing_zone.yaml
Central config for the landing zone detector: dataset paths, model config, hyperparameters. • convert_to_coco.py Script to take your raw labels (e.g., from a specific tool / format) and convert them into a standard COCO JSON. • process_landing_zones.py Helper script for cleaning, normalizing, or restructuring landing zone data before conversion / training. • train_landing_zone.py Training entrypoint. Uses the config file and your COCO dataset to train an object detection model. • train_landing_zone_colab.ipynb Notebook version of training that you can run on Google Colab, with cells for mounting Drive, setting config, and kicking off training. • verify_and_setup.py Utility script to sanity-check the environment, dataset paths, and any prerequisites before training.
We evaluate the landing zone detector using standard object detection metrics: • mAP@0.5 • mAP@0.5:0.95 • Precision / Recall curves • Qualitative inspection of predictions on held-out images
Key analysis directions you can explore: • Performance across: • Different scene types (urban vs field vs rooftop) • Different viewing angles (high drone view vs closer ground-level view) • Synthetic vs more realistic images
Add your own: • Plots of mAP vs epoch • Side-by-side examples of ground truth vs predictions • Error analysis (where the model fails, failure modes: clutter, shadows, small landing zones, etc.)
⸻
Some challenges we faced while building this project: • Defining “landing zone” consistently • It’s not a simple object like “car”; it’s a region that must be flat, open, and safe. • Viewpoint variation • Drones can be high overhead, low and close, or at oblique angles. • Synthetic vs real • Synthetic training data from tools like Blender or AI image generators is powerful, but may not perfectly match real-world textures and clutter. • Balancing dataset variety vs label noise • Pushing for diversity in scenes often introduces noisier labels or ambiguous landing areas.
⸻
• How to design a dataset and annotation scheme for a region-based concept like “landing zone”
• How to convert custom labels into robust COCO format using Python scripts
• How to configure and run RF-DETR / modern detection models on a custom dataset
• Practical experience with:
• Training on Colab
• Managing configs
• Debugging dataset path / format issues
⸻
Future directions and potential improvements: • 🔍 Segmentation instead of bounding boxes • Use semantic / instance segmentation for more precise landing area boundaries. • 🎥 Video + temporal consistency • Smooth predictions across frames for more stable drone decision-making. • 🌦️ More realistic data • Mix in real drone captures, varied weather, nighttime scenes, and motion blur. • 🚁 Integration with control systems • Use the detector’s output to feed a simulated or real drone control policy. • 🧪 Robustness tests • Evaluate on held-out city / country / environment types.
⸻
Core • Python • Jupyter / Google Colab
Computer Vision • RF-DETR (Roboflow DETR-based object detector) • COCO dataset format • OpenCV (preprocessing & visualization)
Data & Config • YAML for configuration (config_landing_zone.yaml) • Zip archive dataset (coco-dataset.zip)
Tools Used in the Workflow (outside the repo) • Roboflow for dataset management / labeling • Blender for synthetic scene generation • Prompt-based image generation tools for synthetic drone views
⸻
• Student Team – CS 4824 – Mikhail, Nathan, Shiva, Stephen, Syon
⸻
This project uses the license specified in the repository (see LICENSE if present).
If you’re adapting this project, we recommend adding an explicit license (e.g. MIT) to clarify reuse.
⸻
• CS 4824 (Machine Learning) course staff for project guidance
• Roboflow & RF-DETR for tooling and open-source resources
• Blender & the open-source community for 3D tools used to generate synthetic environments
• Classmates and friends who provided feedback on the landing zone definitions and demo scenes
