3.2. YOLO-Pose-Based Pose Estimation Model
The system follows an end-to-end lightweight design and is optimized for underground power-grid working conditions. The input preprocessing module performs image normalization. Video frames are sampled at 30 FPS, and each frame is resized to a unified resolution of 640 × 640 pixels by bilinear interpolation. This resolution is selected based on three practical considerations. First, YOLO-Pose is natively designed for
input resolution, at which it achieves the optimal accuracy–speed trade-off on the COCO dataset; using the native resolution avoids any accuracy penalty from resolution mismatch. Second, underground power-grid maintenance environments typically have limited camera mounting heights (2–3 m) and field-of-view angles (60–90°), resulting in human subjects occupying
to
pixels; a
input provides sufficient resolution to preserve fine-grained joint localization (typically 3–10 pixels per joint displacement for meaningful motion), while remaining computationally tractable for real-time inference on edge devices. Third, ablation validation confirms that
achieves the best accuracy–speed trade-off: reducing to
decreases keypoint localization accuracy by 3.1 percentage points due to quantization errors, while increasing to
provides only a 0.4 percentage point improvement at the cost of 40% higher inference latency. To improve robustness under complex underground conditions, multiple preprocessing strategies are adopted. RGB pixel values are first normalized from
to
:
An adaptive illumination compensation strategy is then applied based on global image statistics to address low-light conditions:
where
,
, and
is a numerical stabilizer. During training, multi-scale augmentation is used by randomly resizing images to 480, 640, and 800 pixels, which improves scale invariance.
The pose estimation and feature extraction module is built on an improved YOLO-Pose model. It enhances keypoint detection accuracy while maintaining real-time speed and is particularly optimized for occlusion caused by dense electrical equipment. The neck structure is strengthened by introducing attention-guided feature selection on top of PAFPN:
Keypoint postprocessing incorporates anatomical priors. Limb-length constraints ensure that distances between adjacent joints remain within physiologically reasonable ranges, joint-angle constraints limit the angles of elbows and knees (e.g., for elbows and for knees, based on the standard biomechanical literature; without angle constraints, the keypoint detector may produce anatomically implausible configurations that corrupt the skeletal representation and mislead the downstream GRU classifier; empirically, this reduces anatomically impossible pose estimates by 67.3% on the SKPose test set and improves downstream action classification accuracy by 1.8 percentage points), and motion smoothness constraints suppress excessive frame-to-frame displacement.
For feature encoding, a hierarchical representation is adopted. Spatial features are represented in polar coordinates to improve rotational invariance, which is especially useful for multi-view monitoring in underground operations:
where
is used for normalization. The mechanism of rotation invariance works as follows: given a person facing direction
, the absolute coordinates of a joint
transform as
, where
is a rotation matrix and
t is a translation vector. In our polar representation, the distance
(Equation (
5)) is invariant to both rotation and translation because it measures the relative distance between the joint and the pelvis. The angle
(Equation (
6)) transforms as
, i.e., it shifts by a constant offset that depends only on body orientation, not on the action performed. We compensate this offset through
based on torso alignment, effectively canceling the rotation effect. Therefore, the same action performed under different orientations produces identical
feature vectors, providing intrinsic rotation invariance that Cartesian coordinates lack and that ST-GCN must learn implicitly through data augmentation. Motion features are computed from inter-frame changes:
where
introduces a small perturbation to improve robustness. The spatial and motion descriptors are concatenated into a 68-dimensional feature vector:
The temporal modeling module adopts a bidirectional GRU to capture action dependencies across time. The hidden dimension is set to 128, the number of layers is 2, and dropout is set to 0.2 after systematic ablation: dropout rates of 0.1, 0.2, 0.3, and 0.5 were evaluated; a rate of 0.1 provides insufficient regularization (overfitting gap of 4.3%); a rate of 0.3 and 0.5 introduces excessive regularization (degrading accuracy by 1.7 and 3.2 percentage points, respectively); the rate of 0.2 achieves the optimal balance (overfitting gap of 2.1% and highest validation accuracy of 95.04%). A sliding-window strategy is used with window length and stride , which balances long-range temporal dependency modeling and computational efficiency.
How does a two-layer GRU capture behavioral dynamics? At each time step t, the forward GRU hidden state encodes information from the past sequence , while the backward GRU hidden state encodes information from the future sequence . The concatenation produces a context-rich representation that captures both the preceding context and the anticipated outcome of the current action. The two-layer stacking enables hierarchical temporal abstraction: the first layer captures low-level motion features (e.g., joint velocity and acceleration), while the second layer synthesizes these into higher-level behavioral patterns (e.g., reaching, bending, crouching). Empirically, the two-layer Bi-GRU with hidden dimension 128 achieves 95.04% accuracy on SKPose, whereas a single-layer Bi-GRU achieves only 91.7% (3.34 percentage points lower), confirming the benefit of hierarchical temporal modeling.
Justification for GRU-Based Temporal Modeling: Why was GRU chosen over other models like Transformers and TCN? The choice of a two-layer bidirectional GRU for temporal modeling is driven by four complementary considerations with quantitative evidence.
Parameter Efficiency (Big-O Analysis): As reported in Table 7, the proposed method contains approximately 8.7 M parameters in total, of which the GRU module accounts for approximately 0.4 M parameters, representing a 33% parameter reduction compared with an LSTM-based counterpart (13.0 M parameters). In contrast, ST-GCN requires 2.9 M parameters for graph convolution modules alone. The space complexity of GRU is per layer, where is the hidden dimension, resulting in approximately 0.4 M parameters for two-layer Bi-GRU.
Computational Efficiency (FLOPs Analysis): A two-layer GRU with hidden dimension incurs time complexity per layer, where T denotes the sequence length. For a typical window size , this results in approximately 6.6 M FLOPs per forward pass. In contrast, a Transformer with attention heads incurs time complexity due to full pairwise self-attention, which for results in approximately 102.4 M FLOPs—a 15.5× computational overhead compared with GRU. A TCN with receptive field size requires FLOPs per layer, which, while lower than Transformers, still demands more parameters than the lightweight GRU due to its wider hidden dimensions.
Inference Speed (FPS Analysis): The proposed method achieves 48 FPS on NVIDIA RTX 3080, compared with ST-GCN at 35 FPS and 2s-AGCN at 28 FPS. This real-time capability is critical for industrial safety monitoring where sub-50 ms latency is required.
Biomechanical Alignment: GRU’s gating mechanism enables selective information propagation through reset and update gates, which mirrors how the human nervous system filters redundant motion cues through proprioceptive feedback loops. Unlike Transformers that apply uniform attention weights across all temporal positions, GRU gates adaptively control information flow based on the current hidden state, effectively suppressing noisy keypoint detections and emphasizing discriminative temporal segments.
The decision module further introduces temporal attention to adaptively weight the importance of different time steps. The attention score at time step
t is computed as
and the normalized attention coefficient is obtained through
The context vector is then given by
and the final classification output is produced by
Algorithm 1 presents the action recognition pipeline based on YOLO-Pose and GRU, and Algorithm 2 presents the keypoint correction algorithm.
| Algorithm 1 Action recognition pipeline based on YOLO-Pose and GRU |
- Require:
Input image sequence , number of keypoints - Ensure:
Predicted action labels , where - 1:
Initialization - 2:
Load the YOLO-Pose model and GRU model - 3:
Initialize an empty feature queue ▹ Sliding window of length L - 4:
Initialize a Kalman filter set - 5:
for each frame in V do - 6:
// Stage 1: pose estimation and filtering - 7:
- 8:
if detection fails then - 9:
- 10:
end if - 11:
for each instance n in do - 12:
- 13:
- 14:
- 15:
- 16:
end for - 17:
// Stage 2: temporal modeling - 18:
if then - 19:
- 20:
- 21:
- 22:
end if - 23:
end for
|
| Algorithm 2 Keypoint correction algorithm |
- 1:
function KeypointCorrection(K) - 2:
for do - 3:
- 4:
if then - 5:
▹ Outlier correction - 6:
end if - 7:
- 8:
end for - 9:
return - 10:
end function
|
3.3. Key Techniques
To improve spatiotemporal consistency under common challenges in underground power-grid environments, such as equipment occlusion and poor illumination, a three-stage adaptive keypoint filtering strategy is introduced.
Why a three-stage filtering strategy? Single-stage filtering methods are insufficient for industrial monitoring scenarios for three reasons. First, noise diversity: Keypoint detection errors arise from multiple sources—low illumination causing localization noise, equipment occlusion causing missing detections, and motion blur causing trajectory jitter—each requiring different correction mechanisms. A single Kalman filter can handle Gaussian measurement noise but cannot detect systematic outliers caused by occlusion. Second, complementary error sources: Stage 1 (Kalman filter) addresses temporal trajectory smoothness by modeling motion dynamics, but cannot detect spatially implausible keypoint configurations. Stage 2 (anatomical constraints) addresses this by enforcing physical plausibility, but cannot distinguish between legitimate fast motion and erroneous jumps. Stage 3 (motion consistency) addresses this by analyzing displacement statistics. Third, ablation evidence: As shown in the ablation study (Table 3), removing Stage 1 alone reduces accuracy from 95.04% to 91.2%, removing Stage 2 reduces it to 89.7%, and removing Stage 3 reduces it to 90.5%. The full three-stage cascade achieves the optimal 95.04% accuracy.
The first stage applies a linear Kalman filter to smooth each keypoint trajectory. The state and observation equations are defined as
where the state vector
includes both position and velocity. The second stage enforces spatial structural constraints based on anatomical priors:
where
,
, and
H denotes the height of the human bounding box. The third stage detects abnormal motion by measuring inter-frame displacement:
The historical displacement standard deviation is estimated as
If the displacement exceeds three standard deviations, linear interpolation is used for correction:
An enhanced GRU is further designed by incorporating hierarchical attention, with particular emphasis on hazardous postures in power-grid maintenance operations, such as climbing and bending. Temporal attention gating adjusts the importance of the current hidden state according to state variation:
In addition, feature importance weighting adaptively emphasizes more discriminative joints:
To capture action patterns at different temporal resolutions, a multi-scale temporal modeling scheme is adopted:
The optimal temporal scale is then selected adaptively according to
where the conditional probability
P is estimated by a learned classifier.
LowLightConv: Contrast-Aware Feature Extraction. To enhance feature extraction robustness under non-ideal illumination conditions, we integrate LowLightConv modules into the CSPDarknet backbone, replacing standard convolutional layers. The LowLightConv operation is defined as
where
is a contrast attention mechanism:
where
is sigmoid activation,
is ReLU activation, GAP is global average pooling, and
,
are learnable weight matrices with reduction ratio
. This contrast-aware mechanism dynamically enhances features in low-contrast regions typical of underground power-grid environments, improving keypoint localization accuracy under non-ideal illumination.
3.4. Training Strategy
A progressive multi-stage training strategy is adopted to ensure stable convergence and to accommodate the characteristics of underground power-grid data. Stage 1 performs pose-estimation pretraining on the COCO-Keypoints dataset, which contains 250,000 images and 17 annotated keypoints. SGD is used with momentum 0.9 and weight decay , while the learning rate follows a cosine annealing schedule from 0.01 to 0.001 over 100 epochs. Stage 2 trains the behavior recognition model by freezing the YOLO-Pose backbone and optimizing only the GRU and classification head. AdamW is used with , , and , and a triangular cyclic learning-rate schedule is adopted with a peak of for 50 epochs. Stage 3 performs end-to-end joint fine-tuning by unfreezing the full network. The learning rate starts at and is halved every 10 epochs over 30 epochs.
The total loss jointly considers classification accuracy and temporal consistency:
The classification loss adopts cross-entropy with label smoothing:
where
is the smoothing factor. Temporal smoothness encourages continuity between adjacent frames belonging to the same action:
The regularization loss combines L2 weight decay and feature-distribution regularization:
The hyperparameters are set to
,
, and
.
Spatiotemporal data augmentation is further used to improve generalization in challenging industrial environments. Spatial augmentation includes random rotation with , random translation with pixels, random scaling with , and Gaussian keypoint jittering . Temporal augmentation includes random sampling rates with , random frame dropping with probability , and sequence reversal with probability .
3.5. Edge Deployment Optimization
To improve deployability on edge devices in power-grid applications, a mixed-precision quantization strategy is adopted to balance accuracy and efficiency. Weights are compressed from 32-bit floating point to 8-bit integers:
where the scaling factor is
Activations are quantized using dynamic range quantization with calibration-based scaling:
Different precisions are assigned according to layer sensitivity: the backbone uses INT8, the GRU hidden layers use FP16, and the classification head remains in FP32.
Computational graph optimization and operator fusion are also performed to reduce memory access and computation overhead. Conv–BN fusion merges a convolution layer and a batch-normalization layer into a single equivalent convolution:
which yields the fused computation
Similarly, GRU gate fusion combines the input and recurrent transformations into a single matrix multiplication:
Finally, the memory layout is optimized using the NHWC (Number–Height–Width–Channel) format to better exploit parallelism on GPUs and NPUs. The NHWC format aligns with the memory access patterns of modern GPUs and NPUs (e.g., NVIDIA Jetson series, NVIDIA Corporation, Santa Clara, CA, USA), which process channel-wise operations in contiguous memory blocks. The default NCHW format requires frequent channel-wise data transposition, incurring a data-reordering overhead estimated at approximately 8–12% of total inference time. By adopting the NHWC layout and fusing transposed operations into adjacent convolutions, we reduce memory access latency and achieve a measured 9.3% reduction in end-to-end inference time (from 38.5 ms to 35 ms per frame on Jetson AGX Orin, NVIDIA Corporation, Santa Clara, CA, USA), directly contributing to the observed 48 FPS throughput on high-end GPUs.