TTPLA: An Aerial-Image Dataset for Detection and Segmentation of Transmission Towers and Power Lines
January 7, 2023 ยท View on GitHub
TTPLA is a public dataset which is a collection of aerial images on Transmission Towers (TTs) and Powers Lines (PLs). This is the official repository of paper TTPLA: An Aerial-Image Dataset for Detection and Segmentation of Transmission Towers and Power Lines.

The repository includes:
- The original images of TTPLA dataset with pixel level annotation in COCO format. The dataset images here (updated March 2021).
- Splitting text files contain a list of images names after splitting to train.txt, validate.txt, and test.txt.
- Weights of training models based on two different backbones and three different image sizes.
Preparation data:
-
Modify
resize_image_and_annotation-final.pyto use the target image dimension (line 10). Then, call the script usingpython resize_image_and_annotation-final.py -t <images_path>. It will produce new folder calledsized_data. -
Then call
remove_void.pyto removevoidlabel if you would like to remove it.python remove_void.py -t <sized_images_path>. It will produce new folder callednewjsons, you may renamed to whatever is fit. -
Based on three lists of train.txt, test.txt, and val.txt,
split_jsons.pyis used to split the creatednewjsonsto three folderstrain,val, andtestto prepare this before get theCOCOjson file.You can use the following command.python split_jsons.py -t newjsons/. It will produce new folder calledsplitting_jsons, you may renamed to whatever is fit. -
Use
labelme2coco_2.pyto get theCOCO_jsonthat used byYolact.python labelme2coco_2.py splitting_jsons/train_jsons/. This step is done for three folderstrain_jsons,val_jsons, andtest_jsons.
Tips to use our files directly
- Install yolact Yolact.
- Rename
yolactfolder toyolact700. Based on different sizes, it can rename also toyolact550oryolact640. - In setp 1 in
Prepration data, rename the generatedsized_datafolder name todata_700x700and upload inyolact700/data/data_700x700. Based on different sizes,data_550x550anddata_640x360are the other named folders with different sizes. - Use the suitable configuration from next table according to image size and backbone. Rename the picked config file to config.py and insert in
yolact700/data/. - The generated json from step 4 in
Prepration data, rename totrain_coco_700x700,2_test_json700,2_val_json700and put them intoyolact700/data/if you would like to use our config file directly or you can use any name and modify the pathes into config file.
Train Model:
For train image for example with size 700x700,
python train.py --config=yolact_img700_val_config --batch_size=8 --resume=weights/yolact_img550_108_12253_interrupt.pth
For evaluation,
python eval.py --config=yolact_img550_secondtest_config --mask_proto_debug --trained_model=weights/weights_img550_resnet50/yolact_img550_400_30061_resnet50_sep7_2217.pth --fast_nms=false
Evaluation:
| Image Size | Backbone | configs | weights |
|---|---|---|---|
| 640 x 360 | Resnet50 | config_img640_resnet50_aspect.py | yolact_img640_secondval_399_30000_resnet50.pth |
| 550 x 550 | Resnet50 | config_img550_resnet50.py | yolact_img550_399_30000_resnet50.pth |
| 700 x 700 | Resnet50 | config_img700_resnet50.py | yolact_img700_399_30000_resnet50.pth |
| 640 x 360 | Resnet101 | config_img640_resnet101_aspect.py | yolact_img640_secondval_399_45100_resnet101.pth |
| 550 x 550 | Resnet101 | config_img550_resnet101.py | yolact_img550_399_45100_resnet101_b8.pth |
| 700 x 700 | Resnet101 | config_img700_resnet101.py | yolact_img700_399_45100_resnet101_b8.pth |
Results:
Average Precision for Different Deep Learning Models on TTPLA is reported in the following table

Citation:
@inproceedings{abdelfattah2020ttpla,
title={TTPLA: An Aerial-Image Dataset for Detection and Segmentation of Transmission Towers and Power Lines},
author={Abdelfattah, Rabab and Wang, Xiaofeng and Wang, Song},
booktitle={Proceedings of the Asian Conference on Computer Vision},
year={2020}
}
Contact:
For questions about our paper or code, please contact Rabab Abdelfattah.