# Pole Lean Assessment Module - PD-Defect Collection, licensing, and citation are documented on the [main dataset card](../README.md). ## TL;DR Three subsets are released: object detection (`object_detection/`; `Leaned_Pole` / `Straight_Pole`), image classification (`classification/`; `Leaned` / `Straight` / `Rejected`), and keypoint detection (`keypoint_detection/`; `bottom` / `top`, `kpt_shape` [2, 3]). Object detection comprises 1,801 images (2,182 instances); classification, 2,274 images; keypoints, 1,798 images (2,025 `pole` instances). ## Task Definition - **Object Detection** (`object_detection/`): each annotated pole is labeled `Leaned_Pole` or `Straight_Pole`. - **Classification** (`classification/`): each image receives one of `Leaned`, `Straight`, or `Rejected`. - **Keypoints** (`keypoint_detection/`): each pole has a bounding box and structural-axis endpoints `bottom` and `top` in YOLO pose format (`kpt_shape: [2, 3]`). ## Label Definitions - `Leaned_Pole` / `Leaned`: the pole shows a consistent visual deviation from vertical relative to the ground line and other fixed reference structures visible in the image. - `Straight_Pole` / `Straight`: the pole shows no observable deviation from vertical. - `Rejected` (classification only): the primary pole cannot be assessed reliably because the top or base is obscured, the viewpoint is severely distorted, or the alignment is ambiguous. ## Annotation Protocol ### Object Detection Boxes enclose the pole shaft from top to base. Crossarms, top cleats, conductors, and background are excluded. Only poles with both top and base clearly identifiable are annotated. This box scope differs from [Pole Detection](../pole_detection/README.md), where overlapping fittings that intersect the shaft are included. Captures that fail those visibility or perspective criteria are excluded from this object-detection subset. ### Classification Whole-image label for the primary pole (`Leaned`, `Straight`, `Rejected`). ### Keypoints Along the pole centerline: - `bottom` (keypoint 0): base at the ground line - `top` (keypoint 1): visible tip YOLO pose order: bottom then top, each `(x, y, visibility)`. When partial occlusion by vegetation or other objects occurred, the centerline was continued through the occluded region only when its geometry could be reliably inferred; otherwise, samples with indeterminate keypoints were excluded. ### Perspective Lean assessment requires an approximately head-on viewpoint so that the imaged pole axis reflects true vertical alignment. Under an oblique angle, judgment can be affected. Such captures are excluded from object detection and labeled `Rejected` in classification. The same criterion defines the full-image subtask of [Perspective Validation](../perspective_validation/README.md). ## Class Distribution **Object Detection (instances, all splits):** `Leaned_Pole` 912; `Straight_Pole` 1,270 **Classification (images):** `Leaned` 619 (464 / 93 / 62); `Straight` 1,281 (962 / 191 / 128); `Rejected` 374 (280 / 57 / 37) **Keypoints:** `pole` 2,025 ## Annotation Format **Object Detection** — YOLO: ```text ``` Class 0 = `Leaned_Pole`, Class 1 = `Straight_Pole` **Classification** — folder name = class, plus `labels.csv` (`image_id,label`) **Keypoints** — YOLO pose (`kpt_shape: [2, 3]`): ```text ``` Class 0 = `pole`; keypoint 0 = `bottom`, keypoint 1 = `top` ## Dataset Structure ```text pole_lean_assessment/ ├── object_detection/ │ ├── data.yaml │ ├── dataset.json │ ├── train/ │ │ ├── images/ │ │ ├── labels/ │ │ └── train.json │ ├── valid/ │ │ ├── images/ │ │ ├── labels/ │ │ └── val.json │ └── test/ │ ├── images/ │ ├── labels/ │ └── test.json ├── classification/ │ ├── dataset.json │ ├── labels.csv │ ├── train/ │ │ ├── Leaned/ │ │ ├── Straight/ │ │ ├── Rejected/ │ │ ├── train.csv │ │ └── train.json │ ├── val/ │ │ ├── Leaned/ │ │ ├── Straight/ │ │ ├── Rejected/ │ │ ├── val.csv │ │ └── val.json │ └── test/ │ ├── Leaned/ │ ├── Straight/ │ ├── Rejected/ │ ├── test.csv │ └── test.json └── keypoint_detection/ ├── data.yaml ├── images/ │ ├── train/ │ ├── valid/ │ └── test/ ├── labels/ │ ├── train/ │ ├── valid/ │ └── test/ └── JSON/ ├── dataset.json ├── train.json ├── val.json └── test.json ``` Object detection and keypoints use `valid/`; classification uses `val/`. ## Train / Validation / Test Split - Object detection: train 1,441 (80.01%) / valid 181 (10.05%) / test 179 (9.94%); total 1,801 - Classification: train 1,706 (75.02%) / val 341 (15.00%) / test 227 (9.98%); total 2,274 - Keypoints: train 1,438 (79.98%) / valid 181 (10.07%) / test 179 (9.96%); total 1,798 ## Baseline Benchmarks **Object Detection** — YOLO12m (`Leaned_Pole`, `Straight_Pole`). Overall box metrics are given in the split headers; class-wise metrics follow. `valid` — Precision 87.31%; Recall 92.41%; `mAP@0.5` 95.73%; `mAP@0.5:0.95` 63.84% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ------------- | --------- | ------ | --------- | -------------- | | Leaned_Pole | 87.26% | 92.31% | 96.16% | 70.76% | | Straight_Pole | 87.35% | 92.50% | 95.29% | 56.92% | `test` — Precision 81.93%; Recall 88.56%; `mAP@0.5` 93.82%; `mAP@0.5:0.95` 65.90% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ------------- | --------- | ------ | --------- | -------------- | | Leaned_Pole | 77.71% | 83.19% | 90.96% | 69.89% | | Straight_Pole | 86.14% | 93.94% | 96.67% | 61.92% | ### Image-level metrics Image-level presence/absence per class at detection confidence 0.35 (binary Accuracy, Precision, Recall, and F1 over images). `valid` (181 images) | Class | Accuracy | Precision | Recall | F1 | | ------------- | -------- | --------- | ------ | ------ | | Leaned_Pole | 93.92% | 93.70% | 97.54% | 95.58% | | Straight_Pole | 95.58% | 93.42% | 95.95% | 94.67% | `test` (179 images) | Class | Accuracy | Precision | Recall | F1 | | ------------- | -------- | --------- | ------ | ------ | | Leaned_Pole | 89.94% | 88.51% | 90.59% | 89.53% | | Straight_Pole | 91.06% | 90.15% | 97.54% | 93.70% | **Keypoints** — YOLO12m pose (`pole`). Box metrics use detection IoU; pose metrics use Object Keypoint Similarity (OKS). **Box —** `valid` — Precision 94.12%; Recall 91.51%; `mAP@0.5` 96.66%; `mAP@0.5:0.95` 68.73% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ----- | --------- | ------ | --------- | -------------- | | pole | 94.12% | 91.51% | 96.66% | 68.73% | **Pose (OKS) —** `valid` — Precision 96.47%; Recall 90.33%; `mAP@0.5` 98.19%; `mAP@0.5:0.95` 96.27% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ----- | --------- | ------ | --------- | -------------- | | pole | 96.47% | 90.33% | 98.19% | 96.27% | **Box —** `test` — Precision 95.81%; Recall 92.40%; `mAP@0.5` 96.58%; `mAP@0.5:0.95` 69.43% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ----- | --------- | ------ | --------- | -------------- | | pole | 95.81% | 92.40% | 96.58% | 69.43% | **Pose (OKS) —** `test` — Precision 96.86%; Recall 93.40%; `mAP@0.5` 97.75%; `mAP@0.5:0.95` 96.85% | Class | Precision | Recall | `mAP@0.5` | `mAP@0.5:0.95` | | ----- | --------- | ------ | --------- | -------------- | | pole | 96.86% | 93.40% | 97.75% | 96.85% | **Classification** — DINOv3 ViT-B/16 (`facebook/dinov3-vitb16-pretrain-lvd1689m`). Split Accuracy is overall. Class-wise Precision, Recall, F1, and support (`n`) are from the same evaluation. Macro-F1 is the unweighted mean of the three class-wise F1 scores. `val` **(341)** — Accuracy 83.58% (285/341); Macro-F1 80.57% | Class | Precision | Recall | F1 | `n` | | -------- | --------- | ------ | ------ | --- | | Leaned | 84.15% | 74.19% | 78.86% | 93 | | Rejected | 82.98% | 68.42% | 75.00% | 57 | | Straight | 83.49% | 92.67% | 87.84% | 191 | `test` **(227)** — Accuracy 84.14% (191/227); Macro-F1 81.74% | Class | Precision | Recall | F1 | `n` | | -------- | --------- | ------ | ------ | --- | | Leaned | 81.82% | 72.58% | 76.92% | 62 | | Rejected | 75.61% | 83.78% | 79.49% | 37 | | Straight | 87.79% | 89.84% | 88.80% | 128 | ## Limitations Limitations specific to this module: - Labels are binary (Leaned / Straight) and do not include lean magnitude, direction, or measured angle. - Lean was judged from imagery only; no inclinometer or survey measurements accompany the labels. - Poles with very slight deviation sit near the Leaned/Straight boundary and may be labeled inconsistently despite protocol and review. - Lean is assessed in the image plane. A pole leaning directly toward or away from the camera may present little apparent deviation and be labeled Straight. ## Examples Object detection samples from the test set. Boxes show predicted class and confidence. ![Pole Lean Assessment detection examples](./examples/pole_lean_collage.jpg) Keypoint samples. The line joins the pole-axis endpoints from bottom to top. ![Pole Lean Assessment keypoint examples](./examples/pole_lean_pose_collage.jpg) Classification samples from the test set. Green **P** / **T** denote prediction and ground truth; red marks an error. ![Pole Lean Assessment classification examples](./examples/classification.png) ## Citation Please cite PD-Defect ([DOI 10.6084/m9.figshare.34329402](https://doi.org/10.6084/m9.figshare.34329402)); BibTeX is given on the [main dataset card](../README.md).