Aerial Plane-Ship-Harbour-Vehicle Detector (YOLOv8)
A YOLOv8 object detection model trained to identify planes, ships, harbours, and vehicles in aerial imagery, built for UNISA's inaugural Hackathon.
Overview
This model detects four object classes in aerial imagery: plane, ship, harbor, large-vehicle, and small-vehicle (5 classes total). It was trained on the DOTA v1.0 aerial object detection dataset and is deployed via a Hugging Face Space backend, with a lightweight HTML frontend embedding the Space through an iframe.
Inference flow:
- User uploads an aerial image via the web UI
- The request is forwarded to this Space
- YOLOv8 performs object detection
- The annotated image is returned, along with a per-class count of detected objects
Model & Training
| Architecture | YOLOv8 |
| Dataset | DOTA v1.0 |
| Training platform | Google Colab |
| Accelerator | TPU |
| Training images | 1,302 |
| Validation images | 109 |
Performance
Evaluated on the validation split (109 images).
Overall
Per-class
| Class | Precision | Recall | F1 | mAP@0.5 | mAP@0.5:0.95 |
|---|---|---|---|---|---|
| plane | 0.762 | 0.721 | 0.741 | 0.727 | 0.390 |
| ship | 0.768 | 0.279 | 0.410 | 0.416 | 0.178 |
| large-vehicle | 0.690 | 0.296 | 0.414 | 0.343 | 0.237 |
| harbor | 0.516 | 0.174 | 0.260 | 0.198 | 0.098 |
| small-vehicle | 0.724 | 0.060 | 0.111 | 0.130 | 0.054 |
Limitations, stated plainly
- Plane detection is the model's clear strength β high precision and recall, the only class where both exceed 0.7.
- Small-vehicle detection is weak, driven almost entirely by low recall (0.060) β the model rarely finds small vehicles when they're present, even though precision is reasonably high (0.724) on the ones it does catch. In practice, expect most small vehicles in an image to go undetected.
- Harbor detection is the second-weakest class, with both precision and recall below 0.55/0.20 respectively.
- Ship and large-vehicle sit in the middle β precision above 0.65, but recall under 0.30 for both, meaning many true instances are missed even when the model's positive detections are usually correct.
- Overall recall (0.306) is the model's main weakness β across all classes, it misses more true objects than it finds. Precision (0.692) is meaningfully more reliable than recall.
This pattern β solid precision, weak recall, concentrated in the small/dense-object classes β is a common failure mode for aerial detection on small objects, and is a reasonable target for further work (more training data for small-vehicle and harbor specifically, or an architecture/anchor change better suited to small object scale).
Reproducing training
Prepare the DOTA v1.0 dataset in YOLO format:
dataset/
βββ images/
β βββ training/ # Training images
β βββ val/ # Validation images
βββ labels/
βββ training/ # Training labels (YOLO format)
βββ val/ # Validation labels (YOLO format)
Then, using the YOLOv8 training scripts/notebooks in Google Colab with TPU acceleration enabled, train with a split matching:
- Train: 1,302 images
- Val: 109 images
License
MIT License
Copyright (c) 2025 mabogiqwa
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

