Papers
Topics
Authors
Recent
Search
2000 character limit reached

TACR-YOLO: Real-Time Abnormal Behavior Detector

Updated 8 July 2026
  • The paper introduces TACR-YOLO, a real-time abnormal behavior detector that improves mAP to 91.92% by addressing small object detection, classification–regression conflict, and multi-scale fusion issues.
  • It leverages a Coordinate Attention Module and a Task-Aware Attention Module to enhance spatial sensitivity and task-specific feature modulation.
  • The framework further integrates a Strengthen Neck Network, K-means optimized anchors, and DIoU-Loss to boost localization precision and multi-scale feature aggregation.

TACR-YOLO is a real-time framework for abnormal human behavior detection (AHBD) under special scenarios. It is built on YOLOv7-X and is intended for abnormal personnel behavior detection in construction sites, subway stations, shopping malls, and other crowded natural scenes. The framework is designed around three difficulties identified for YOLO-style detectors in this setting: small objects are common, classification–regression conflict, and insufficient multi-scale fusion. To address these issues, TACR-YOLO introduces a Coordinate Attention Module, a Task-Aware Attention Module, and a Strengthen Neck Network, and also applies K-means clustering for anchor box optimization and DIoU-Loss for bounding-box regression. The associated Personnel Abnormal Behavior Detection dataset contains 8,529 samples across four behavior categories, and the reported performance is 91.92% mAP with 0.040 s/image and 24.88 FPS (Yin et al., 15 Aug 2025).

1. Problem domain and detection objective

The task formulation is abnormal human behavior detection in special or public scenarios. The target behaviors or categories are phone, smoke, drink, and face. The stated application contexts include construction sites, subway stations, shopping malls, and other natural public settings, where behaviors such as using a phone during work or smoking in restricted areas are treated as operationally relevant abnormalities (Yin et al., 15 Aug 2025).

The paper characterizes the problem as difficult for one-stage detectors for three reasons. First, small objects are common: examples include cigarettes, phone-held hands, small cups, and cigarette butts. Second, single-stage detectors expose a classification–regression conflict because classification and bounding-box regression share features and parameters. Third, abnormal behavior objects appear at different scales, so a weak neck or fusion design may fail to combine shallow and deep features effectively. TACR-YOLO is presented as a real-time detector specifically configured to mitigate these three issues.

A recurrent source of nomenclature ambiguity is the string “YOLO.” In TACR-YOLO, the term denotes a detector derived from the YOLOv7-X computer-vision lineage. It is distinct from the unrelated Terahertz-band integrated sensing and communications method titled “YOLO: An Efficient Terahertz Band Integrated Sensing and Communications Scheme with Beam Squint,” where “YOLO” stands for “You Only Listen Once” (Luo et al., 2023).

2. Macro-architecture and processing pipeline

The framework modifies YOLOv7-X in four main places. At input preprocessing, images are resized to 640×640, converted to RGB normalization, and paired with dataset-specific anchor boxes obtained by K-means clustering. In the backbone, the model retains the YOLOv7-X design based on MP-Conv and ELAN, while inserting the Coordinate Attention (CA) module into backbone feature extraction. In the neck, a Strengthen Neck Network replaces a single convolution before neck input with a three-convolution structure. In the head, the detector introduces a Task-Aware Attention Module (TAM) and uses DY-ReLU-A to alleviate classification–regression conflict. The regression objective is further refined with DIoU-Loss (Yin et al., 15 Aug 2025).

The paper specifies that CA is inserted at multiple scales in backbone feature maps: feat1: 80 × 80 × 512, feat2: 40 × 40 × 1024, and feat3: 20 × 20 × 1024. This placement distributes coordinate-aware enhancement across shallow, intermediate, and deep levels. The overall architectural pattern is therefore a layered intervention: coordinate-sensitive backbone refinement, stronger pre-fusion processing in the neck, task-aware modulation in the prediction head, and dataset-specific localization adjustments through anchor optimization and DIoU-based regression.

This design suggests an integrated response to the three motivating failure modes rather than a single-module remedy. Small-object sensitivity is mainly assigned to CA, classification–regression inconsistency to TAM, and scale-sensitive representation aggregation to the strengthened neck, while anchors and DIoU act as complementary localization refinements.

3. Coordinate and task-aware representations

The Coordinate Attention Module is introduced to improve small object detection while preserving positional information. Instead of ordinary global pooling, CA performs two one-dimensional pooled summaries: zch(h)=1Ww=1Wxc(h,w)z_c^h (h) = \frac{1}{W}\sum_{w=1}^{W} x_c(h,w)

zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)

where H,WH, W are feature map height and width, and xc(h,w)x_c(h,w) is the input feature at channel cc and location (h,w)(h,w). The descriptors are concatenated and transformed as

f=δ(F1[Zh,Zw])f = \delta(F_1[Z^h, Z^w])

with F1F_1 as a 1×11\times1 convolution, δ\delta as ReLU, and channel dimension reduced to zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)0. After branch-specific transformations,

zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)1

the output is

zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)2

The stated effect is to encode long-range dependency and precise coordinate information, thereby strengthening attention to relevant spatial regions without losing location cues. In ablation, adding CA improves mAP by 0.82% (Yin et al., 15 Aug 2025).

The Task-Aware Attention Module is inserted in the prediction head to reduce classification–regression conflict. Its core mechanism is DY-ReLU-A (Dynamic ReLU with Attention), which dynamically adjusts the shape of activation based on global context. The paper describes the generation of task-dependent parameters from global average pooling, fully connected layers, and normalization. The dynamic activation is written as

zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)3

where zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)4 is the channel-wise feature subset and zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)5 are learnable modulation coefficients. The intended consequence is a piecewise linear adaptive activation whose parameters depend on the input feature context.

The paper attributes the largest single ablation gain to TAM: +1.22% mAP. Within the paper’s interpretation, this indicates that resolving task inconsistency is highly beneficial in this detection setting. A plausible implication is that the abnormal-behavior categories, particularly when represented by small or partially occluded objects, require stronger task-conditioned feature selection than a fixed shared head can provide.

4. Multi-scale fusion, anchor adaptation, and regression loss

The Strengthen Neck Network is motivated by the claim that the original YOLOv7-X neck can struggle with small objects, low-texture regions, cluttered scenes, and insufficient convolutional depth before fusion. The concrete architectural change is to replace the single convolution before feeding zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)6, zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)7, and zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)8 into the neck with three convolution operations. The stated purpose is deeper feature transformation, stronger hierarchical representation, improved receptive field, and better fusion of multi-level semantic and spatial information. The reported ablation gain is +0.50% mAP, and the paper states that this improves accuracy without increasing computational cost significantly (Yin et al., 15 Aug 2025).

Anchor box optimization is implemented with K-means clustering on the training set. The clustering objective is

zcw(w)=1Hh=1Hxc(h,w)z_c^w (w) = \frac{1}{H}\sum_{h=1}^{H} x_c(h,w)9

where H,WH, W0 is the number of clusters, H,WH, W1 is the number of samples, H,WH, W2 is the H,WH, W3-th box dimension sample, and H,WH, W4 is the centroid of cluster H,WH, W5. The paper uses K = 9. The motivation is that default anchors may not match the dataset well, whereas customized anchors improve scale matching, localization, generalization, and convergence stability. The ablation contribution is +0.45% mAP.

For bounding-box regression, TACR-YOLO replaces IoU-based regression with DIoU-Loss. The paper gives

H,WH, W6

and

H,WH, W7

where H,WH, W8 and H,WH, W9 are the center points of predicted and ground-truth boxes, xc(h,w)x_c(h,w)0 is the Euclidean distance between centers, and xc(h,w)x_c(h,w)1 is the diagonal length of the smallest enclosing box. The motivation is that IoU loss is weak when predicted and ground-truth boxes do not overlap, cannot distinguish boxes with the same overlap but different centers, and may yield unstable learning for small or distant boxes. The final ablation increment from DIoU is +0.25% mAP.

5. PABD dataset and experimental protocol

The paper introduces PABD = Personnel Abnormal Behavior Detection dataset. It was built because existing datasets were considered insufficient for abnormal behavior detection in special scenarios. Images were collected from public platforms and web crawlers; the scenes include subway stations, shopping malls, and other natural public settings. Low-quality, blurry, and redundant images were removed by automated review and manual review. Annotation was performed with labelImg in Pascal VOC format, with multiple verification rounds for consistency. Data augmentation was applied to improve diversity, robustness, and class balance, including geometric transformations, color adjustments, and noise addition (Yin et al., 15 Aug 2025).

PABD contains 4 categories: drink, face, phone, and smoke. The paper reports Total images: 8,529, with Train: 6,908, Validation: 768, and Test: 853. The category counts are drink: 1,128, face: 7,959, phone: 3,413, and smoke: 3,300. The dataset is described as being designed for abnormal behavior recognition, real-time tracking, and special-scene detection.

The training and testing setup is explicitly specified. The input size is 640×640; training lasts 100 epochs on two NVIDIA V100 GPUs with SGD, base learning rate: 0.01, weight decay: 5e-4, and Cosine Annealing LR. Mosaic enabled is used for augmentation. The training strategy consists of 30 frozen epochs followed by 70 unfrozen epochs. Batch size is 8 during frozen training and 4 during unfrozen training. Under this tuning, the YOLOv7-X baseline achieved 88.68% mAP, which is the starting point for TACR-YOLO.

6. Reported performance, ablation evidence, and practical scope

The headline result is 91.92% mAP on PABD. The paper compares TACR-YOLO with representative detectors and reports the following mAP values: YOLOv3: 78.32%, YOLOv4: 72.50%, SSD: 71.02%, Faster R-CNN: 78.76%, YOLOv7-Tiny: 80.52%, YOLOv8-L: 90.53%, YOLOv7-X baseline: 88.68%, and TACR-YOLO: 91.92%. The best class APs for TACR-YOLO are drink: 95.97%, face: 95.64%, phone: 86.68%, and smoke: 89.38%. The paper identifies the major improvement on phone as consistent with the claim that small-object detection is a key challenge (Yin et al., 15 Aug 2025).

The reported inference speed is 0.040 s/image and 24.88 FPS, compared with 0.039 s/image and 25.65 FPS for YOLOv7-X. The intended interpretation is that TACR-YOLO improves accuracy while largely preserving real-time throughput. The paper also claims robustness on the grounds that the detector works across multiple real-world scenarios, handles small objects better, fuses multiscale features more effectively, and improves detection stability through DIoU and optimized anchors.

The ablation study isolates each contribution:

Configuration mAP Gain
YOLOv7-X 88.68%
+ K-means clustering 89.13% +0.45%
+ Task-Aware Attention Module 90.35% +1.22%
+ Coordinate Attention Module 91.17% +0.82%
+ Strengthen Neck Network 91.67% +0.50%
+ DIoU Loss 91.92% +0.25%

From 88.68% to 91.92%, the total gain is +3.24%. The paper notes that the two most important improvements are the Task-Aware Attention Module and the Coordinate Attention Module. The framework is described as suitable for surveillance systems, workplace safety monitoring, public-area anomaly detection, and real-time detection + tracking systems, and the paper further demonstrates integration with DeepSORT for multi-object tracking. The explicit future direction is further pruning and optimization of the model while maintaining strong performance and improving efficiency.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TACR-YOLO.