🐍 Load programmatically in Python (huggingface_hub)
Install dependencies:
pip install huggingface_hub ultralytics
Load and run inference in your Python script:
python
1from huggingface_hub import hf_hub_download
2from ultralytics import YOLO
34# 1. Download the weights automatically from Hugging Face Hub5model_path = hf_hub_download(repo_id="kilanisainikhil/AerialEye", filename="aerialEye.pt")67# 2. Load the model using Ultralytics YOLO8model = YOLO(model_path)910# 3. Run inference on an image11results = model("sample_image.jpg")12results[0].show()
Model Details
Model Name: AerialEye (Fine-tuned SUTRA YOLOv11-Nano)
Previous Architecture: YOLOv8n (Upgraded to YOLOv11-Nano for better performance, faster processing, and higher accuracy)
Slicing Strategy: SAHI (Slicing Aided Hyper Inference) integration to detect small objects (humans, vehicles) from drone altitudes.
Intended Use
The AerialEye model is designed to detect critical objects from an aerial perspective to assist in emergency response, infrastructure assessment, and disaster management.
It is capable of rapidly identifying 6 specific classes:
0. human (Search and Rescue)
sos (Distress Signals)
vehicle (Traffic / Evacuation)
flood (Water Level Assessment)
road_damage (Infrastructure Integrity)
crack (Structural Integrity)
Dataset & Training
The model was trained on a highly curated, unified dataset of 6,327 images, which consists of:
High-altitude diverse drone frames from VisDrone (vehicles and humans).
Curated FloodNet images serving as negative background samples to drastically reduce false positives over flooded terrain.
Training Augmentations:
Simulated drone pitch/yaw (15-degree rotation).
Vertical & Horizontal flips to account for aerial orientation invariance.
Mosaic augmentations.
Performance & Optimization
This model serves as the Phase 1 Low-Res Pass in the perception pipeline. For inference on very small objects, the pipeline integrates SAHI (Slicing Aided Hyper Inference) to dynamically slice suspect regions into higher-resolution patches ($640 \times 640$).
Export Format
The exported weights are fully optimized for:
PyTorch (.pt): For standard inference.
ONNX (.onnx): For cross-platform deployment.
INT8 Quantization (TFLite): To maximize frames-per-second (FPS) on the Google Coral Edge TPU.
Evaluation & Simulation
A side-by-side simulation comparing standard full-frame downscaling ($640 \times 640$) and Slicing Aided Hyper Inference (SAHI) was executed on validation frames.
Metric
Standard (Downscaled)
SAHI (Sliced Window)
Delta / Change
Objects Detected
65
50
-15 (-23.1%)
Inference Latency
733.0 ms
293.6 ms
-439.3 ms
Resolution Processing
640x640 (Downscaled)
Multi-Tile Slicing (Full Scale)
SAHI preserves pixel density
Visual Comparison Map
Standard inference (left, blue) vs. SAHI sliced inference (right, green):
SUTRA Standard vs SAHI Comparison
Tactical Impact
SAHI successfully resolved duplicate detections and double-counts (reducing duplicate detections by 15 objects / 23.1%) through its overlapping slice merging NMS layer. This eliminates false positives and double-counting errors commonly made by standard downscaled inference over complex aerial grids.
Getting Started & Usage
1. Installation
Clone this repository and install the dependencies in a virtual environment:
bash
1# Clone the repository2git clone https://huggingface.co/kilanisainikhil/AerialEye
3cd AerialEye
45# Create and activate a virtual environment6python3 -m venv venv
7source venv/bin/activate
89# Install required packages10pip install -r requirements.txt
2. Model Downloads
Since the model weights are stored via Git LFS on Hugging Face, cloning the repository without Git LFS will only download small pointer files. You can retrieve the full model weights using either of the following options:
Option A: Python Downloader (Recommended)
We provide a lightweight Python downloader script download_model.py which downloads the actual weights and samples directly from Hugging Face resolve servers:
bash
1# Download default model weights (aerialEye.pt, best.pt) and comparison graphics:2python download_model.py
34# Download ALL assets (ONNX, TFLite models, and all sample images):5python download_model.py --all
67# Download specific files:8python download_model.py --files aerialEye.onnx best.onnx
Option B: Shell Script Downloader
Alternatively, you can run the provided bash script to fetch the weights using wget:
python -c "from ultralytics import YOLO; model = YOLO('aerialEye.pt'); model.export(format='onnx')"
4. Running Simulation & Inference
Compare standard full-frame YOLO inference against Slicing Aided Hyper Inference (SAHI) using the simulation script:
bash
1# Run the simulation on the default sample image:2python simulate_sahi.py --image sample_aerial_street.jpg --model aerialEye.pt
34# Run the simulation on other sample images:5python simulate_sahi.py --image sample_drone_roundabout.jpg
67# Run the simulation with custom slicing parameters:8python simulate_sahi.py --image sample_aerial_street.jpg --slice-size 640 --overlap 0.25
This script generates side-by-side visualization maps: