Skip to main content

Automated detection of overhead power line cables from aerial imagery using YOLOv8

Project description

PowerLine Vision — Automated Detection of Overhead Conductors from Aerial Imagery

Python YOLOv8 PyTorch License

Overview

This project develops an end-to-end deep learning pipeline for the automatic detection of overhead power lines and transmission towers from aerial imagery. The system addresses a core challenge in electricity distribution asset management: identifying and mapping low-voltage conductors at scale, including those that are partially obscured or difficult to locate manually.

The pipeline combines YOLOv8 object detection with classical computer vision preprocessing (OpenCV) and produces confidence-scored bounding box detections suitable for downstream GIS integration and asset mapping workflows.

Live Demo: https://karanm5-powerline-vision.hf.space


Motivation

Electricity distribution networks span thousands of kilometres. Manual inspection and mapping of overhead conductors is time-intensive, expensive, and prone to gaps in coverage. Automated detection from aerial and UAV imagery offers a scalable alternative — enabling utilities to maintain accurate, up-to-date asset records and identify infrastructure that may be hidden by vegetation or environmental occlusion.

This project is directly motivated by real-world infrastructure intelligence challenges in the UK electricity distribution sector.


Dataset

This project uses the TTPLA Dataset (Transmission Towers and Power Lines from Aerial imagery), a publicly available annotated dataset containing aerial images of overhead power line infrastructure.

  • Source: TTPLA Dataset — GitHub
  • Classes: Power lines, Transmission towers
  • Format: COCO-style annotations, converted to YOLO format for training
  • Split: 70% train / 15% validation / 15% test

To download and prepare the dataset:

python data/download_data.py

Project Structure

powerline-vision/
├── README.md
├── requirements.txt
├── configs/
│   └── config.yaml              # Training and model hyperparameters
├── data/
│   ├── download_data.py         # Dataset download and preparation script
│   └── processed/               # YOLO-format annotations after conversion
├── notebooks/
│   ├── 01_data_exploration.ipynb   # Dataset statistics and visualisation
│   └── 02_results_analysis.ipynb  # Post-training evaluation and analysis
├── src/
│   ├── dataset.py               # Dataset loading, conversion, augmentation
│   ├── train.py                 # Training pipeline
│   ├── evaluate.py              # Evaluation: mAP, precision-recall, F1
│   └── utils.py                 # Shared utilities and visualisation helpers
├── scripts/
│   └── inference.py             # Run detection on new images or video
├── results/
│   └── plots/                   # Training curves, detection visualisations
└── tests/
    └── test_dataset.py          # Unit tests for data pipeline

Model Architecture

The detection backbone is YOLOv8n/s (Ultralytics), fine-tuned from COCO pretrained weights on the TTPLA dataset. YOLOv8 was selected for:

  • State-of-the-art real-time detection performance
  • Strong transfer learning capability from diverse pretraining
  • Native support for custom dataset fine-tuning
  • Efficient inference suitable for edge deployment scenarios

Preprocessing uses OpenCV for image normalisation, contrast enhancement (CLAHE), and augmentation (horizontal/vertical flip, mosaic, HSV jitter).


Results

Metric Value
mAP@0.5 0.688
mAP@0.5:0.95 0.561
Precision 0.758
Recall 0.647
Inference speed (GPU) 4.9ms per image (Tesla T4)
Validation images 359
Instances evaluated 2,738

Trained for 50 epochs on YOLOv8s fine-tuned from COCO weights. Dataset: aerial power line imagery (cable detection). Hardware: Tesla T4 GPU.


Quickstart

1. Install dependencies

pip install -r requirements.txt

2. Download and prepare data

python data/download_data.py

3. Train

python src/train.py --config configs/config.yaml

4. Evaluate

python src/evaluate.py --weights results/best.pt --data configs/config.yaml

5. Run inference on a new image

python scripts/inference.py --source path/to/image.jpg --weights results/best.pt

Training Results

Training curves and detection visualisations from the completed run:

Results Confusion Matrix PR Curve

Sample detections on validation images:

Predictions


Limitations and Future Work

  • Detection performance degrades under heavy occlusion from tree canopy — a known challenge in UK distribution networks
  • LiDAR point cloud fusion is identified as a key extension to improve detection of hidden conductors; this is a planned next phase of development
  • GIS export of detected conductor coordinates is in scope for a future release

Author

Karan | MSc Data Analytics (Distinction), Aston University
LinkedIn | GitHub


Acknowledgements

  • TTPLA dataset authors for making aerial power line imagery publicly available
  • Ultralytics for the YOLOv8 framework

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerline_vision-1.0.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerline_vision-1.0.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file powerline_vision-1.0.0.tar.gz.

File metadata

  • Download URL: powerline_vision-1.0.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for powerline_vision-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a15257c94fd29054b103f5243d945a7571276be6540aa790724b9fe61f03a278
MD5 6762c7702716c76961768af3156e3140
BLAKE2b-256 4e4b14d884768bc8c3b60b003f489e557970ecb91cd55db16d23dad80a1528fb

See more details on using hashes here.

File details

Details for the file powerline_vision-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for powerline_vision-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6653a193af6f1744ea754859374716689714adc331bb54a03a237adb09921e1
MD5 0a0f47ee0af9ba1a7c111aebcb770f57
BLAKE2b-256 94e4c3003468998d07b36c5cc9eb5cc173534c9beefbb638dad8ada2040a7673

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page