---
title: 'TinyDef-DETR: UAV Power Line Defect Detection'
url: https://www.emergentmind.com/topics/tinydef-detr
type: topic
---

# TinyDef-DETR: UAV Power Line Defect Detection

Searching arXiv for the specified paper and closely related work to ground the article in current literature.
TinyDef-DETR is a DETR-based framework for UAV power line defect detection that was proposed to address small and ambiguous defects against complex backgrounds, particularly in settings where conventional detectors suffer from detail loss due to strided downsampling, weak boundary sensitivity in lightweight backbones, and insufficient integration of global context with local cues. Built on RE-DETR-R18, it augments the backbone and neck with a stride-free space-to-depth module for lossless downsampling, an edge-enhanced convolution for boundary-aware feature extraction, a cross-stage dual-domain multi-scale attention module to jointly capture global and local information, and a Focaler-Wise-SIoU regression loss to improve localization of small objects. Experiments on the CSG-ADCD dataset and further validation on the VisDrone benchmark are reported as showing improved precision, recall, and small-object performance with only modest computational overhead [2509.06035].

## 1. Problem setting and design rationale

TinyDef-DETR was developed for automated inspection of transmission lines using UAVs, where the task includes detecting polluted or broken insulators, missing tie wires, bird nests, and related defects that typically occupy fewer than \(32\times 32\) pixels and blend into highly cluttered backgrounds such as vegetation, towers, and shadows [2509.06035]. The motivating diagnosis is fourfold: mainstream detectors incur loss of detail due to strided downsampling, exhibit weak boundary sensitivity in lightweight CNN backbones, insufficiently fuse global context with local cues, and treat easy and hard samples equally in bounding-box regression.

The framework was therefore designed to satisfy four stated objectives: preserve pixel-level detail, inject edge and gradient priors, jointly capture global and local information in a lightweight module, and adaptively reweight regression loss toward moderately hard samples [2509.06035]. This places TinyDef-DETR within a line of small-object DETR adaptations in which architectural changes are concentrated before the standard encoder–decoder, while the end-to-end set-prediction formulation is retained. A plausible implication is that the model aims to improve the quality of features and regression targets without abandoning the DETR operating regime.

## 2. System architecture

TinyDef-DETR builds on RE-DETR-R18, described as a DETR variant using ResNet-18, and inserts three plug-in modules into the backbone and neck before the features are passed into the standard DETR encoder–decoder and box/class heads [2509.06035]. The summarized pipeline is: input to a Detail-Enhanced ResNet, with EEBlock inserted; before each downsampling in ResNet, a Space-to-Depth module reorganizes spatial information into channels; Cross-Stage Dual-Domain Multi-Scale Attention Blocks are distributed in the backbone; then the features are processed by the Transformer encoder–decoder as in DETR; finally, classification and 4-D box regression are optimized by Focaler-Wise-SIoU loss.

The principal architectural extensions beyond standard DETR are four components. EEConv replaces the second \(3\times 3\) convolution in each residual block to obtain sharper boundary features. Space-to-Depth stride-free downsampling is inserted before each backbone stride-2 operation for lossless detail preservation. CSDMAM introduces a large receptive-field branch, a local \(1\times 1\) branch, and a dual-domain FCSA branch. Focaler-Wise-SIoU modifies box regression with IoU-based regression, geometric penalties, and non-monotonic focal modulation [2509.06035].

This organization indicates that TinyDef-DETR is not a redesign of the Transformer core but a targeted enhancement of the visual front end and localization loss. That division of labor is consistent with the paper’s emphasis on small-defect perception rather than on changing DETR matching or decoding itself.

## 3. Detail-preserving and edge-aware feature extraction

The stride-free Space-to-Depth module, denoted SPD in the summary, operates on an input feature map \(X\in\mathbb R^{S\times S\times C}\) with downsampling factor \(\mathit{scale}=2\). It produces \(X'\in\mathbb R^{\frac S2\times\frac S2\times (C\cdot 2^2)}\) by re-partitioning each \(2\times 2\) patch into channels:
\[
X'(u,v,:)
=\bigoplus_{i=0}^{1}\bigoplus_{j=0}^{1}
X\bigl(2u+i,\;2v+j,\;:\bigr),
\]
where \(\bigoplus\) denotes channel concatenation [2509.06035]. No pixels are discarded. A subsequent \(3\times 3\) convolution with stride 1 fuses these \(4C\) channels back to a chosen \(C_2\):
\[
X'' = \mathrm{Conv}_{3\times3}\bigl(X';\,W,b\bigr),
\quad X''\in\mathbb R^{\frac S2\times\frac S2\times C_2}.
\]

The edge-enhanced convolution, EEConv, trains with four parallel branches \((W_k,b_k)\), \(k=1\ldots 4\), corresponding to Central Difference Conv, Horizontal Difference Conv, Vertical Difference Conv, and standard \(3\times 3\) convolution. Their weights and biases are fused at training time:
\[
W_\Sigma=\sum_{k=1}^4W_k,
\quad
b_\Sigma=\sum_{k=1}^4b_k.
\]
The fused response after convolution, batch normalization, and activation is written as
\[
z=\mathrm{Conv}_{3\times3}(x;W_\Sigma,b_\Sigma),\quad
y=\phi\Bigl(\gamma\frac{z-\mu}{\sqrt{\sigma^2+\epsilon}+\beta\Bigr).
\]
For inference, batch normalization is absorbed using per-channel scale \(\alpha_c=\gamma_c/\sqrt{\sigma_c^2+\epsilon}\), yielding
\[
W^{(\mathrm{final})}_c=\alpha_c\,W_{\Sigma,c},\quad
b^{(\mathrm{final})}_c
=\alpha_c\bigl(b_{\Sigma,c}-\mu_c\bigr)+\beta_c.
\]
The summary states that EEConv therefore collapses into a single \(3\times 3\) convolution plus \(\phi(\cdot)\) with zero overhead [2509.06035].

Taken together, SPD and EEConv target two early-stage failure modes of small-object detection: information removal during downsampling and the loss of weak contours. The ablation results reported for the model support the interpretation that these modules contribute substantially even before the addition of more elaborate attention blocks.

## 4. Cross-stage dual-domain multi-scale attention

CSDMAM is the principal context-aggregation mechanism in TinyDef-DETR. Given an input \(X\in\mathbb R^{B\times C\times H\times W}\), a \(1\times 1\) convolution first produces \(X_n\) [2509.06035]. The module then combines three branches.

The large branch uses three depthwise convolutions with kernels \((k,k)\), \((k,1)\), and \((1,k)\), with \(k=31\), to model long-range context. The local branch uses a \(1\times 1\) depthwise convolution to preserve pixel details. The dual-domain FCSA branch transforms the normalized feature into the frequency domain through a 2D DFT:
\[
X_f = \mathcal F(X_n),\quad
\widetilde X_f = A_c\odot X_f,
\]
where \(A_c\in\mathbb R^{B\times C\times1}\) is obtained from GAP followed by a \(1\times 1\) convolution. The inverse transform yields
\[
X_{fca}=\mathcal F^{-1}(\widetilde X_f),
\quad
X_{fca}\leftarrow A_{sc}\odot X_{fca},
\]
where \(A_{sc}\) is produced by another GAP and \(1\times 1\) convolution. A lightweight feature-guidance module then refines \(X_{fca}\) [2509.06035].

The branches are summed, including the residual path:
\[
Y = X_n
  + \sum_{\substack{\text{kernel}\in\{k\times k,\;k\times1,\;1\times k\}}}
\mathrm{DW}_{\text{kernel}}(X_n)
  + \mathrm{DW}_{1\times1}(X_n)
  + X_{fca}.
\]
Following CSP, the channels are split into a branch and an identity part and fused by a final \(1\times 1\) convolution:
\[
Y_{cs}=\mathrm{Conv}_{1\times1}\bigl([\mathrm{CSDMAM}(X_{\mathrm{branch}}),\,X_{\mathrm{id}}]\bigr).
\]

The module is explicitly intended to jointly capture global and local information in both spatial and frequency domains [2509.06035]. The reported ablation behavior is notable: CSDMAM alone produces a slight drop in \(AP_{50}\) to \(0.165\), and the summary states that its gains emerge once combined with detail-preserving modules. This suggests that the attention mechanism depends on sufficiently informative low-level features and is not, in isolation, the main source of improvement.

## 5. Regression objective: Focaler-Wise-SIoU

TinyDef-DETR uses Focaler-Wise-SIoU for box regression. Let the predicted box be \(B_p=(x_p,y_p,w_p,h_p)\) and the target box be \(B_t=(x_t,y_t,w_t,h_t)\). The standard IoU is
\[
IoU=\frac{S_{\mathrm{int}}}{S_{\mathrm{union}}}.
\]
To increase high-IoU discriminability, IoU is normalized with \(d=0\) and \(u=0.95\):
\[
\widehat{IoU}=\mathrm{clip}\Bigl(\tfrac{|IoU-d|}{u-d},\,0,\,1\Bigr),\quad
L_{IoU}=1-\widehat{IoU}.
\]

With center displacement \(\Delta=(d_x,d_y)\), the angle penalty is defined as
\[
\phi=\arcsin\!\bigl(\tfrac{\min(|d_x|,|d_y|)}{\sqrt{d_x^2+d_y^2+10^{-4}}}\bigr),\quad
\mathrm{Angle}=\sin(2\phi)-2.
\]
The distance cost over the smallest enclosing box \((w_{\mathrm{box}},h_{\mathrm{box}})\) is
\[
\mathrm{Dist}=2-\exp\!\bigl(\mathrm{Angle}\,\tfrac{d_x}{w_{\mathrm{box}}}\bigr)
             -\exp\!\bigl(\mathrm{Angle}\,\tfrac{d_y}{h_{\mathrm{box}}}\bigr).
\]
The shape cost is
\[
\mathrm{Shape}
=\Bigl(1-\exp(-\tfrac{|w_p-w_t|}{\max(w_p,w_t)})\Bigr)^\theta
+\Bigl(1-\exp(-\tfrac{|h_p-h_t|}{\max(h_p,h_t)})\Bigr)^\theta,
\quad \theta=4.
\]
The core SIoU term is then
\[
L_{\mathrm{SIoU}}
=L_{IoU}
+\tfrac{\mathrm{Dist}+\mathrm{Shape}}{2}.
\]

The difficulty-adaptive component is introduced through
\[
\beta=L_{IoU}/\mathbb E[L_{IoU}],
\]
where the expectation is computed with EMA and momentum \(10^{-2}\). The non-monotonic focal modulation is written as
\[
\gamma(\beta)=\frac{\beta}{\delta\;\alpha^{(\beta-\delta)}}.
\]
The final Focaler-Wise-SIoU loss is
\[
L
=\Bigl(1-\widehat{IoU}+\tfrac{\mathrm{Dist}+\mathrm{Shape}}{2}\Bigr)
 \cdot\Bigl(\tfrac{1-IoU}{\mathbb E[1-IoU]}\Bigr)
 \cdot\Bigl(\tfrac{1-IoU}{\mathbb E[1-IoU]}\Bigr)^{\!\delta}.
\]
The paper summary describes this loss as adapting regression toward moderately hard samples and augmenting IoU-based regression with geometric penalties and non-monotonic focal modulation [2509.06035]. A plausible implication is that the regression signal is shaped not merely by overlap magnitude but also by center geometry and relative sample difficulty, which is particularly relevant for tiny defects where small coordinate shifts can dominate the overlap error.

## 6. Training setup, datasets, and empirical results

Two datasets are reported. CSG-ADCD contains \(10\,000\) UAV images of transmission lines, split into \(8\)k train, \(1\)k val, and \(1\)k test, with \(73\,448\) instances over \(9\) defect classes; \(94.5\%\) of instances are small, defined as smaller than \(32^2\) pixels [2509.06035]. VisDrone contains approximately \(26\)k images plus \(263\) videos across \(10\) generic UAV categories and dense small objects. Preprocessing resizes the longer side to \(640\) pixels and pads to \(640\times 640\) with a gray border. The implementation uses PyTorch 2.3.1, CUDA 12.1, Ubuntu 20.04, and an RTX 3090 with 24 GB. Optimization uses AdamW for \(100\) epochs with the default DETR learning schedule and batch size as in RE-DETR. Evaluation uses COCO metrics: Precision, Recall, \(AP_{50}\), \(mAP_{50:95}\), and the scale-sensitive \(AP_s\) and \(AP_m\) [2509.06035].

On CSG-ADCD, the summary reports the following quantitative comparison against the baseline RT-DETR-R18 and selected reference models.

| Model | GFLOPs | Key results |
|---|---:|---|
| RT-DETR-R18 | 57.0 | Prec 0.369, Rec 0.177, \(AP_{50}\) 0.163, \(AP_s\) 0.071 |
| TinyDef-DETR | 65.3 | Prec 0.534, Rec 0.263, \(AP_{50}\) 0.275, \(AP_s\) 0.106 |
| YOLO 11m | 67.7 | \(AP_{50}\) 0.173 |
| DINO | – | \(AP_{50}\) 0.224 |

For TinyDef-DETR relative to RT-DETR-R18, the reported changes are \(+14.5\%\) GFLOPs, \(+44.8\%\) Precision, \(+48.6\%\) Recall, \(+68.7\%\) \(AP_{50}\), and \(+49.3\%\) \(AP_s\) [2509.06035]. The same summary states that, compared to top-performing YOLO variants and heavier DETR-based models, TinyDef-DETR achieves higher detection accuracy on small defects with a favorable FLOPs/accuracy trade-off.

On VisDrone, RT-DETR-R18 achieves \(mAP_{50}=0.333\), \(AP_s=0.139\), \(AP_m=0.275\), and \(AP_l=0.423\), whereas TinyDef-DETR reaches \(mAP_{50}=0.372\), \(AP_s=0.148\), \(AP_m=0.348\), and \(AP_l=0.464\) [2509.06035]. The reported improvements are \(+11.5\%\) in \(mAP_{50}\), \(+6.5\%\) in \(AP_s\), \(+26.5\%\) in \(AP_m\), and \(+9.7\%\) in \(AP_l\). The summary interprets this as confirmation that SPD, EEConv, CSDMAM, and Focaler-Wise-SIoU address generic small-object weaknesses rather than overfitting to power-line imagery.

## 7. Ablations, limitations, and relation to adjacent work

The ablation study is summarized over four innovations: EER, SPD, CSDMAM, and FWS. The baseline with none of the four innovations uses \(57.0\) GFLOPs and obtains Precision \(0.369\), Recall \(0.177\), \(AP_{50}\) \(0.163\), and \(AP_s\) \(0.071\) [2509.06035]. Adding EER only preserves \(57.0\) GFLOPs while reaching Precision \(0.444\), Recall \(0.203\), \(AP_{50}\) \(0.189\), and \(AP_s\) \(0.073\). Adding SPD only gives \(59.9\) GFLOPs, Precision \(0.486\), Recall \(0.195\), \(AP_{50}\) \(0.190\), and \(AP_s\) \(0.083\). Adding FWS only keeps \(57.0\) GFLOPs and yields Precision \(0.500\), Recall \(0.204\), \(AP_{50}\) \(0.207\), and \(AP_s\) \(0.082\). Adding CSDMAM only raises cost to \(72.8\) GFLOPs and results in a slight drop in \(AP_{50}\) to \(0.165\). The full combination reaches \(65.3\) GFLOPs, Precision \(0.534\), Recall \(0.263\), \(AP_{50}\) \(0.275\), and \(AP_s\) \(0.106\) [2509.06035].

The reported takeaways are that EER and SPD each give large precision and recall gains at near-zero extra cost, Focaler-Wise-SIoU significantly raises \(AP_s\), and CSDMAM best leverages the detail-preserved, edge-enhanced features when used in combination. These findings counter a possible misconception that the attention block is the sole driver of performance; the ablation evidence instead attributes much of the improvement to the interaction between detail preservation, edge-sensitive representation, and regression design.

The stated limitations are class imbalance in CSG-ADCD, limited environmental diversity, modest performance on ultra-small objects smaller than \(8\) pixels or heavily occluded defects, and the need for pruning, quantization, or efficient-architecture search for real-time onboard UAV deployment on low-power hardware [2509.06035]. The future directions listed in the summary are temporal and multi-view fusion, self-supervised or foundation-model pretraining on large aerial corpora, incorporation of physics or CAD-based structural priors, coupled detection and segmentation or keypoint refinement, semi- or weakly supervised learning for unlabeled video, and hardware-aware compression.

Within the broader DETR literature for tiny aerial targets, TinyDef-DETR can be contrasted with D\(^3\)R-DETR, which addresses tiny object detection in aerial images using Dual-Domain Density Refinement, fusing spatial and frequency domain information and using a predicted density map to guide encoder sparsification and query initialization [2601.02747]. This suggests a convergent research pattern: recent small-object DETR variants increasingly combine dual-domain representations with task-specific guidance mechanisms, but they differ in the locus of intervention. TinyDef-DETR focuses on lossless downsampling, edge enhancement, multi-scale dual-domain attention, and difficulty-adaptive regression, whereas D\(^3\)R-DETR centers its refinement on density estimation and query/object matching [2601.02747].

Source: https://www.emergentmind.com/topics/tinydef-detr