Next Article in Journal
Probabilistic and Interpretable Machine Learning Framework for Predicting Pile Unit Base Resistance in Soft Soil
Previous Article in Journal
Electromechanical Coupling Modeling and LQG Active Vibration Control of CFRP Cantilever Plates Using MFCs
Previous Article in Special Issue
Rotor Imbalance Classification in Wind Turbines Using Multichannel Vibration Analysis and a DWT–LDA Framework
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

YOLO with Multi-Module Fusion for Prohibited Item Detection in X-Ray Security Images

1
School of Mechanical Engineering, Dalian Jiaotong University, No. 794 Huanghe Road, Shahekou District, Dalian 116028, China
2
Neusoft Reach Automotive Technology (Dalian) Co., Ltd., No. 549 Huangpu Road, Ganjingzi District, Dalian 116028, China
*
Authors to whom correspondence should be addressed.
Modelling 2026, 7(5), 178; https://doi.org/10.3390/modelling7050178
Submission received: 6 July 2026 / Revised: 19 August 2026 / Accepted: 24 August 2026 / Published: 25 August 2026
(This article belongs to the Special Issue Machine Learning and Artificial Intelligence in Modelling)

Abstract

Deploying prohibited-item detectors on resource-constrained X-ray security inspection terminals is not equivalent to selecting the smallest available YOLO scale: excessive compression can reduce feature capacity, whereas medium-scale detectors may retain avoidable computational redundancy. This study therefore investigates a deployment-oriented operating point through coordinated backbone compression, feature compensation, and class-sensitive optimization. YOLO-SMV and YOLO-EMV are developed from YOLOv8m and YOLO11m by combining MobileNetV3-Small backbone reconstruction, SE/ECA-based channel recalibration, and a VF-BCE objective for difficult and underrepresented categories. A three-seed full-factorial study on YOLO11m shows that VF-BCE provides the largest individual accuracy gain and that ECA repeatedly recovers part of the performance lost in the compressed VF-BCE pathway. The accuracy-oriented ECA+VF-BCE configuration reaches 0.93842 ± 0.00720 mAP50, whereas the deployment-oriented YOLO-EMV reaches 0.92744 ± 0.00768 ; the latter trades 1.098 ± 0.061 percentage points of mAP50 for a reduction from 20.03 M to 12.04 M parameters and from 67.9 G to 28.8 G FLOPs. Under the common seed-41 SIXray protocol, YOLO-EMV also achieves higher mAP50 than standard YOLO11n, YOLO11s, and YOLO11m, demonstrating that the selected operating point is not reproduced simply by choosing a smaller baseline. Published SIXray results are reported separately as protocol-aware literature context rather than as a cross-paper ranking. Additional OPIXray and PIDray experiments provide multi-benchmark evidence for the component interactions under heavy occlusion and long-tailed class distributions. The deployment-oriented YOLO-EMV model has also been integrated into customs security inspection equipment.

1. Introduction

The exponential growth in global logistics and population mobility has placed unprecedented pressure on modern security screening systems. To prevent the circulation of prohibited items, X-ray security screening equipment has become standard equipment at critical checkpoints such as airports and train stations. The detection process primarily depends on the subjective interpretation of scanned images by security personnel. This reliance poses challenges in maintaining stability and reliability during high-volume inspections, consequently generating potential risks to public safety. In recent years, the development of intelligent prohibited item recognition systems to replace or assist manual interpretation has become a core focus in the development of security inspection technology [1]. Among these, object detection algorithms based on convolutional neural networks (CNNs) can automatically learn hierarchical image features and effectively capture subtle feature differences of prohibited items under conditions of low resolution and strong noise, providing a reliable technical path for high-precision, automated security inspection [2,3,4].
Object detection in X-ray images faces two main challenges: First, X-ray imaging has low contrast and blurred object boundaries, and the strong penetration effect of X-rays tends to cause overlapping appearances of upper and lower objects in the image, greatly increasing background complexity [5]. Second, the wide variety of prohibited items and their vast size differences require the model not only to have strong recognition capabilities but also high detection robustness for multi-scale objects and severely occluded scenes [6].
This led to the selection of the YOLO (You Only Look Once) model as the primary framework for task processing. As a single-stage detection model, YOLO directly predicts bounding boxes and categories, with fewer learning parameters and a more streamlined detection flow, making it suitable for terminal deployment [7]. To further improve recognition performance, researchers have made specialized improvements to the YOLO detection model based on the characteristics of X-ray images, achieving significant progress.
For edge deployment, however, model scale and model suitability are not interchangeable. A nano or small detector minimizes absolute complexity, but its reduced representational capacity may be inadequate for low-contrast, overlapping X-ray targets. Conversely, a medium detector may contain enough redundancy to permit substantial structural compression while retaining useful feature capacity. This motivates the central question of this study: whether a medium-scale YOLO can be transformed into a more favorable accuracy–efficiency operating point than simply adopting an off-the-shelf nano or small model, and which components are responsible for that operating point.
The remainder of this paper is organized as follows: Section 2 reviews related work on X-ray prohibited-item detection, lightweight networks, attention mechanisms, and imbalance-oriented optimization. Section 3 presents the materials and methods, including SIXray training-set rebalancing, scale-aware MobileNetV3 backbone reconstruction, attention-based channel recalibration, and VF-BCE design. Section 4 reports the multi-seed factorial study, direct comparison with standard lightweight YOLO variants, protocol-aware literature comparison, controlled re-evaluation of representative public detectors, and external-benchmark results. Section 5 discusses the identified compression–compensation mechanism, the deployment operating point, protocol dependence, and limitations, and Section 6 concludes the paper.

2. Related Work

2.1. Algorithm Optimization for X-Ray Equipment Terminal Inspection Tasks

Improvements to the YOLO model focused on X-ray image characteristics primarily proceed in two directions:
On the one hand, to enhance recognition performance in complex backgrounds, attention mechanisms have been introduced to strengthen the model’s feature extraction capability. For example, Mu et al. [8] incorporated channel and spatial attention modules into YOLOv4 to suppress irrelevant background interference; Shao et al. [9] used an attention module to achieve foreground-background separation, improving recognition accuracy for occluded objects. Wang et al. [10] achieved an mAP of 92.7% on the SIXray dataset by introducing modules such as an Efficient Multi-scale Attention (EMA) module. However, such performance enhancing strategies often come with a significant increase in model complexity and computational overhead (e.g., the ASFF module increases FLOPs by approximately 18%), which is detrimental to terminal deployment.
On the other hand, to achieve terminal deployment, model lightweighting has become another important research direction. Researchers have adopted lightweight networks (e.g., MobileNetV3, FasterNet) to replace the backbone network and have used techniques like depthwise separable convolution to compress the model. For instance, the work of Ren et al. [11] reduced the computational load (FLOPs) and number of parameters (Params) to 1/5 and 1/3 of the original YOLOv4, respectively, with only a 0.2 percentage point drop in accuracy. The improved model by Zhang et al. [12] achieved reductions of over 12% in model size, computational complexity, and parameter count. However, purely lightweight designs often come at the cost of reduced feature extraction capability, leading to limited accuracy improvements when dealing with extremely small objects or complex scenes.
The recent literature also illustrates that lightweight X-ray detection is evaluated under heterogeneous SIXray settings. Wang et al. [13] evaluated nano-scale YOLO baselines and an improved lightweight detector on several X-ray benchmarks, while Zhao et al. [14] compared multiple nano/small YOLO variants with a lightweight Mamba-based detector on CLCXray, OPIXray, and SIXray. Cani et al. [15] subsequently reported a broad CNN/Transformer comparison using the extended SIXray-D benchmark. These studies are valuable references, but differences in dataset variants, partitions, and training schedules make their absolute values unsuitable for an uncontrolled ranking against the present experiments. We therefore separate literature-level context from matched within-protocol comparisons in Section 4.
Recently, Transformer-based architectures and hybrid CNN-transformer networks have been explored to reshape the broader landscape of object detection, including X-ray security imaging. For instance, recent state-of-the-art hybrid models leverage self-attention mechanisms to achieve robust accuracy, reaching up to 0.898 mAP50 on challenging benchmarks like the PIDray dataset [16]. However, as explicitly noted in the recent literature, this superior representational capacity typically comes at a severe cost: such models demand substantial computational overhead, which critically limits their adoption in high-throughput, real-time X-ray inspection systems. In the specific context of real-world edge deployment, terminal equipment is strictly constrained by low power budgets, limited memory, and the necessity for ultra-real-time inference latency.

2.2. Dataset Structure Optimization

Adaptation improvements for X-ray image detection tasks are not only made in the algorithmic models; research on rationally optimizing datasets to enhance model training effectiveness is also underway. For example, to address the limitation of model accuracy caused by class imbalance in datasets, Cheng and Li [17] proposed a few-shot detection algorithm called FPID based on a Model-Agnostic Meta-Learning (MAML) framework, combined with ECA-Net and multiscale feature fusion technology, to overcome the performance degradation in detecting new categories of prohibited items due to insufficient samples. Experiments showed that while this method reduced computational load by 70%, the detection accuracy for unseen fewshot categories reached only 81.72%. Wu [18] designed an Asymmetric Autoencoder (AAE) network to handle data imbalance, constructing an anomaly detection model by training only on normal samples and combining it with knowledge distillation to enhance the model’s feature reconstruction capability for few-shot prohibited items. Experiments indicated that this method significantly improved detection accuracy in overlapping object scenarios, but the more complex network incurred greater computational costs. Feng et al. [19] proposed a directly improved Focal Loss function that dynamically adjusts the weights of hard and easy samples, strengthening focus on minority classes such as scissors and lighters. Combined with a Multi-Scale Feature Fusion Network (MSFFN), the average AP on the SIXray dataset increased by 4.5%, providing inspiration for our model improvements. Although these methods alleviate the class imbalance problem to some extent, they either introduce excessive additional computational costs or perform poorly in generalizing to new categories.
Existing research often optimizes detection accuracy, model size, or imbalance handling as separate objectives. This makes it difficult to determine whether an observed gain comes from greater capacity, stronger optimization, or a genuine improvement in the deployment trade-off. Accordingly, this study does not present MobileNetV3, SE/ECA, BCE, or Varifocal Loss as standalone inventions. Instead, it uses controlled experiments to identify how compression, feature recalibration, and class-sensitive optimization interact in X-ray prohibited-item detection. The main contributions are as follows:
(1) Capacity-dependent deployment analysis: The same MobileNetV3-Small backbone reconstruction is evaluated across YOLO11n/s/m/l. The resulting non-monotonic behavior shows that direct backbone replacement is not universally beneficial and identifies the medium-scale model as the most favorable observed starting point for further deployment-oriented optimization.
(2) Compression–compensation mechanism:A complete three-seed factorial study separates the contributions of ECA, MobileNetV3, and VF-BCE. The experiments distinguish the accuracy-oriented ECA+VF-BCE configuration from the deployment-oriented YOLO-EMV configuration and quantify how ECA recovers part of the performance lost after compression of the VF-BCE pathway.
(3) Protocol-aware evaluation of the operating point:The final model is compared directly with standard YOLO11 nano, small, and medium variants under the same SIXray protocol, while previously published SIXray results are reported separately with their protocol context. OPIXray and PIDray experiments further test the component interactions under heavy occlusion and long-tailed class distributions. This evaluation design supports deployment-oriented conclusions without relying on a heterogeneous cross-paper state-of-the-art claim.

3. Materials and Methods

3.1. Augmentation of the SIXray Dataset

The SIXray dataset is a dedicated object detection dataset designed for X-ray security screening scenarios [20]. It comprises luggage images collected from Beijing subway security checkpoints, aiming to locate and classify prohibited items with a focus on five frequently occurring categories: guns, knives, wrenches, pliers, and scissors [21,22].
Figure 1 presents an overview of the data augmentation methods applied to the SIXray dataset. The original dataset did not include a dedicated validation set. To address this, we constructed a validation set by randomly sampling 5546 images from the original training set, which initially comprised 74,960 images in total. The remaining 69,414 images formed a new training set, while the original 13,412 images were retained as the test set to prevent data leakage.
As shown in Figure 2, to mitigate the issue of insufficient sample size, images containing wrenches, pliers, and scissors were randomly rotated and scaled. The generated augmented samples were incorporated into the training set. After increasing the sample size for these three categories, the total number of training images reached 74,392. Since negative samples constituted over 85% of the dataset, potentially causing the model to favor “safe predictions,” the number of negative samples was halved to mitigate data bias, reducing the training set from 74,392 to 43,358 images. Unlike traditional methods that rely solely on oversampling or undersampling to adjust data distribution, this approach combines rotation-scaling augmentation with negative sample reduction. This optimizes the positive-to-negative sample ratio from 1:6 to 1:3, better accommodating complex scene requirements.
To evaluate data augmentation effectiveness, we compared the accuracy of two models on both the original and augmented datasets (Table 1).
As detailed in Table 1, the data augmentation strategy yielded a substantial surge in rare category instances. Specifically, initially scarce samples such as Scissors (increasing from 709 to 1490), Wrench (from 1532 to 3734), and Pliers experienced a twofold or greater increase. Concurrently, background samples were rigorously suppressed, plummeting from 62,068 to 31,034. This augmentation approach successfully rectified the extreme inherent data imbalance, effectively breaking the model’s bias towards background dominance and compelling it to extract features from historically rare contraband items. Observing the precision variations of YOLOv8m before and after augmentation, easily identifiable or majority classes experienced a marginal precision drop (e.g., Gun decreased from 0.96223 to 0.95341). Conversely, extremely challenging rare classes demonstrated notable gains, with Scissors improving from 0.78019 to 0.79909. For YOLOv8m, data augmentation served as a pivotal rebalancing mechanism. Sacrificing a negligible amount of precision in head classes to secure significant improvements in difficult tail classes constitutes a highly advantageous trade-off for real-world security screening scenarios. In contrast to YOLOv8m, YOLO11m exhibited exceptional performance post-augmentation: all foreground target classes (Gun, Knife, Wrench, Pliers, and Scissors) achieved positive precision growth. Most notably, the precision of Knife saw a dramatic leap from 0.91549 to 0.96014. Under this data-rebalancing protocol, the YOLO11m baseline accommodates the augmented training distribution more favorably than YOLOv8m for the reported foreground categories.
For the prohibited-item detection task considered in this study, Precision, Recall, F1-score, and mAP50 were selected as the core evaluation metrics. Precision, Recall, and F1-score summarize classification reliability under imbalanced conditions [23], while mAP50 evaluates the combined localization and classification quality at an intersection-over-union threshold of 0.5. Together, these metrics reflect the trade-off between false alarms, missed detections, and overall detection performance.

3.2. Scale-Aware MobileNetV3 Backbone Reconstruction

The computational capacity, memory bandwidth, and energy budget of edge-based X-ray inspection equipment are substantially lower than those of workstation GPUs. Direct deployment of a conventional YOLO backbone may therefore impose excessive storage and arithmetic costs, even when the detector satisfies the required recognition accuracy. To reduce this deployment burden, the original backbone is reconstructed using MobileNetV3-Small, while the neck and detection heads are retained so that the structural effect of backbone replacement can be evaluated independently.
MobileNet factorizes a standard convolution into channel-wise spatial filtering and pointwise channel mixing, thereby establishing an explicit trade-off between recognition accuracy and resource consumption [24]. This operator has subsequently been adopted in lightweight detection and structured compression frameworks to reduce the cost of feature extraction [25,26]. These studies also indicate that a reduction in theoretical FLOPs does not automatically guarantee an equivalent detector-level acceleration, because the interaction between depthwise and pointwise operations, memory access, and the target hardware must also be considered.
The preservation of information becomes more critical as model capacity decreases. MobileNetV2 introduced inverted residuals and linear bottlenecks because nonlinear transformations in narrow feature spaces may destroy information that cannot be recovered by subsequent layers [27]. MobileNetV3 further combined these principles with hardware-aware neural architecture search and NetAdapt-based platform adaptation, and separately optimized its Large and Small variants for different resource regimes [28,29]. Its hard-swish activation is intended as a hardware-oriented approximation of swish rather than an assertion of universally superior nonlinear representation [30]. The low arithmetic burden of MobileNetV3 has consequently motivated its use in power-constrained vision systems and lightweight YOLO detectors [31,32]. In the X-ray inspection domain, LightRay replaced the YOLOv4 backbone with MobileNetV3 and introduced shallow-feature enhancement and attention-based fusion to compensate for information loss affecting small and occluded targets [11]. These findings motivate the research sequence adopted here: the lightweight backbone is first evaluated as an isolated structural intervention, and attention-based compensation is then examined separately in Section 3.3.
The detailed reconstruction paths are shown in Figure 3 and Figure 4. In the implemented YOLOv8m and YOLO11m definitions, the original backbone portion corresponding to layers 0–8 is replaced by three cascaded MobileNetV3-Small stages, denoted MobileNet1, MobileNet2, and MobileNet3. MobileNet1 extracts shallow, high-resolution features and routes them to the second concatenation path of the neck, located at layer 8 in Figure 3 and layer 9 in Figure 4. MobileNet2 produces intermediate features describing object shape and occlusion relationships and connects them to the first concatenation path, located at layer 5 in Figure 3 and layer 6 in Figure 4. MobileNet3 supplies the deep semantic representation to the original top-down and bottom-up feature-fusion path. The upsampling, concatenation, multiscale fusion, and detection-head structures are otherwise retained. This arrangement preserves three-level feature delivery while allowing the original convolutional stack to be replaced by inverted-residual and depthwise-separable operations.
To determine whether the same reconstruction behaves consistently at different detector capacities, the experiment was extended from the principal YOLO11m model to the n, s, and l variants. YOLOv8m is retained as a cross-generation reference. For every YOLO11 baseline–MobileNet pair, the data split, image resolution, optimization protocol, evaluation procedure, and random seed were held constant. All scale-wise results reported in Table 2 use random seed 41. The absolute change in mAP50 is reported in percentage points, while parameter and FLOP changes are calculated relative to the corresponding baseline.
Table 2 shows that the effect of MobileNetV3 reconstruction is scale dependent rather than uniformly beneficial. For YOLO11n, FLOPs decrease by 20.28%, but mAP50 decreases from 0.79751 to 0.78164, corresponding to a loss of 1.587 percentage points. The parameter count also increases from 2.591 M to 2.847 M. Thus, the adopted reconstruction does not constitute effective parameter compression at the n scale. Because the original nano model is already highly compact, the fixed cost of stage interfaces and channel adaptation occupies a larger fraction of the network, while the reduced cross-channel interaction of depthwise convolution becomes more consequential. The result is therefore treated as a capacity-limited failure case rather than being concealed as a successful lightweighting result. This interpretation is compatible with the information-preservation motivation behind the linear bottlenecks of MobileNetV2 [27]. YOLO11s occupies a more favorable operating region. Its mAP50 changes from 0.83121 to 0.83254, an increase of only 0.133 percentage points, while parameters and FLOPs decrease by 30.22% and 46.03%, respectively.
The strongest observed accuracy–efficiency result occurs at the m scale. YOLO11m-MobileNet improves mAP50 from 0.87235 to 0.88469 under seed 41, corresponding to a gain of 1.234 percentage points, while reducing parameters from 20.03 M to 12.00 M and FLOPs from 67.3 G to 28.8 G. Because YOLO11m was selected as the principal architecture, the baseline–MobileNet comparison was additionally repeated using seeds 42 and 43. As shown in Table 3, the MobileNetV3-reconstructed model improves mAP50 under all three evaluated seeds. The complete downstream module-ablation study was subsequently conducted using seeds 41, 42, and 43, following the statistical reporting protocol described in Section 4.1.3.
For YOLO11l, the parameter count and FLOPs decrease by 39.73% and 56.13%, respectively, whereas mAP50 rises by 0.297 percentage points. The l-scale model therefore retains sufficient absolute capacity after compression, and much of its original computation appears redundant for the present five-category SIXray task. However, the accuracy difference is small and has not yet been verified by repeated-seed experiments. In addition, the compressed l model still requires 15.258 M parameters and 38.298 G FLOPs, exceeding the cost of YOLO11m-MobileNet and weakening its suitability for constrained deployment.
The YOLOv8m comparison provides cross-generation evidence that MobileNet-based reconstruction can also preserve or improve detection performance outside the YOLO11 family. The reconstructed model increases mAP50 from 0.88009 to 0.89615, corresponding to a gain of 1.606 percentage points, while reducing the parameter count from 33.94 M to 20.07 M and FLOPs from 85.4 G to 67.7 G.
The observed non-monotonic pattern agrees with the broader model-scaling literature without being directly implied by it. EfficientNet demonstrated that depth, width, and input resolution should be balanced rather than changed independently [33]; EfficientDet extended this principle to the joint scaling of the backbone, feature-fusion network, and prediction heads in an object detector [34]. In the present experiment, the same MobileNetV3 reconstruction interacts with neck and head configurations of different capacities. At the n scale, the representational bottleneck and fixed interface overhead dominate; at the s scale, accuracy is maintained under compression; at the m scale, redundancy removal and retained capacity are most favorably balanced; and at the l scale, large computational redundancy can be removed, but the remaining deployment cost is still comparatively high.
Accordingly, MobileNetV3 should not be described as a universally beneficial drop-in replacement for every YOLO scale. The experiments instead identify a capacity-dependent operating range. YOLO11n approaches the lower representational boundary, YOLO11s offers accuracy-preserving compression, and YOLO11l retains unnecessary deployment cost despite strong compression. YOLO11m provides the most favorable observed balance among detection accuracy, parameter count, and arithmetic complexity, and the positive effect of its backbone reconstruction is reproduced across the three evaluated seeds. It is therefore selected as the principal YOLO11 architecture for the attention-compensation experiments in Section 3.3 and the subsequent VF-BCE optimization.
The scale-wise experiment above is a backbone-reconstruction study and should not be confused with the final-model comparison requested for lightweight deployment. A direct comparison of the complete YOLO-EMV model against the standard YOLO11n, YOLO11s, and YOLO11m baselines under the common seed-41 protocol is reported separately in Section 4.4.

3.3. Attention Mechanism for Enhanced Feature Extraction

Complex X-ray scenes contain overlapping objects, low-contrast boundaries, and substantial background interference, which can weaken the detector response to small or partially occluded prohibited items [35,36,37]. Three representative attention mechanisms were therefore compared. CBAM combines sequential channel and spatial attention to refine feature responses [38]; SE models global channel dependencies through squeeze and excitation operations [39]; and ECA performs lightweight local cross-channel interaction using one-dimensional convolution without dimensionality reduction [40]. Their structures are summarized in Figure 5.
The three mechanisms were first screened on the original YOLOv8m and YOLO11m backbones under the unified seed-41 protocol. This screening stage was designed to compare the relative behavior of CBAM, SE, and ECA before the selected mechanisms were transferred to the corresponding lightweight feature pathways. In both baseline architectures, the candidate attention module was inserted after the eighth backbone block. At an input resolution of 640 × 640 , this position corresponds to a 20 × 20 deep semantic feature map, allowing the attention candidates to be compared at the same feature level while leaving the neck and detection heads unchanged. Figure 6 and Figure 7 show the insertion points in YOLOv8m and YOLO11m, respectively.
All attention candidates were trained for 100 epochs using an input resolution of 640 × 640 , a batch size of 64, and an initial learning rate of 0.01. The learning rate, data partition, training schedule, baseline architecture, and evaluation procedure were held constant within each screening experiment so that the observed differences primarily reflected the selected attention mechanism.
As shown in Table 4 and Table 5, under seed 41, SE achieves the highest mAP50 among the YOLOv8m candidates, increasing mAP50 from 0.88009 to 0.89080. ECA achieves the highest mAP50 among the YOLO11m candidates, increasing mAP50 from 0.87235 to 0.88505. These single-seed tables are used for attention-candidate selection rather than for claims of run-to-run robustness. SE and ECA are subsequently integrated into the corresponding YOLO-SMV and YOLO-EMV lightweight pathways, and their interactions with MobileNetV3 and VF-BCE are evaluated in Section 4.2. In particular, the repeatability of the ECA contribution is assessed through the complete three-seed YOLO11m factorial ablation.

3.4. Class-Sensitive VF-BCE Loss Design and Parameter Selection

The SIXray training set presents two related optimization difficulties: a large number of background candidates relative to prohibited-item targets, and marked differences in recognition difficulty among the five prohibited-item categories. BCE provides stable binary classification supervision, but it does not explicitly reduce the accumulated contribution of easy negative samples. Focal Loss addresses this issue by down-weighting well-classified examples [41], while Varifocal Loss (VFL) further learns an IoU-aware classification score and applies asymmetric weighting to positive and negative samples [42]. These properties motivate the use of VFL for quality-aware and hard-sample optimization, with BCE retained as a complementary classification term.
Before determining the fusion coefficient, the category-compensation strategy is fixed so that only the influence of β is varied in the subsequent ablation. Class reweighting is a common approach to mitigating category imbalance [43]; however, direct inverse-frequency weighting is not adopted here because category frequency alone does not fully describe detection difficulty. On the augmented SIXray data, the YOLO11m BCE baseline obtains Precision values of 0.97431, 0.96014, 0.79116, 0.86040, and 0.77570 for Gun, Knife, Wrench, Pliers, and Scissors, respectively. Gun and Knife therefore retain unit weights; Wrench and Pliers receive moderate compensation because of their lower baseline performance; and Scissors receives the largest weight because it combines the lowest baseline Precision with the smallest augmented instance count among the five categories. The fixed weight vector is
ω = [ 1.0 , 1.0 , 1.5 , 1.5 , 2.0 ] ,
corresponding to Gun, Knife, Wrench, Pliers, and Scissors. These weights remain unchanged in all β experiments.
Following the original VFL formulation, the class-weighted VFL term used in this study is defined as
L VFL , c = ω c q c q c log ( p c ) + ( 1 q c ) log ( 1 p c ) , q c > 0 , ω c α p c γ log ( 1 p c ) , q c = 0 ,
where p c ( 0 , 1 ) is the predicted classification score and q c [ 0 , 1 ] is the IoU-aware target. For a matched positive sample, q c is the IoU between the predicted box and the corresponding ground-truth box; for a negative sample, q c = 0 . The parameters α = 0.75 and γ = 2.0 control negative-sample scaling and focusing strength, respectively. The total VFL term is
L VFL = c = 1 K L VFL , c ,
where K = 5 .
The BCE term is defined as
L BCE = 1 K c = 1 K y c log ( p c ) + ( 1 y c ) log ( 1 p c ) ,
where y c { 0 , 1 } is the binary class label. The proposed composite loss is then written as
L VF BCE = β L VFL + ( 1 β ) L BCE , 0 β 1 .
A linear mixing coefficient is also used in other compound-loss formulations to balance complementary supervision objectives [44]. In Equation (5), β = 0 is exactly the BCE endpoint, whereas β = 1 is the class-weighted VFL endpoint.
The expected influence of β can be examined from the class-wise loss. For a positive sample ( q c > 0 and y c = 1 ), Equation (5) becomes
L c + = β ω c q c 2 + 1 β K log ( p c ) β ω c q c ( 1 q c ) log ( 1 p c ) .
This can be interpreted as a scaled BCE with the effective target
t c eff = β ω c q c 2 + ( 1 β ) / K β ω c q c + ( 1 β ) / K .
Thus, t c eff = 1 at β = 0 , while t c eff q c as β 1 . Increasing β therefore makes the classification score more strongly reflect localization quality. For a negative sample, the corresponding term is
L c = β ω c α p c γ + 1 β K log ( 1 p c ) .
For an easy negative with p c 0 , this term approaches
L c 1 β K log ( 1 p c ) ,
showing that increasing β progressively suppresses easy-background gradients. At the same time, the fixed category weights amplify the VFL term more strongly for Wrench and Pliers ( ω c = 1.5 ) and Scissors ( ω c = 2.0 ). For these categories, the nominal coefficients β ω c are 1.05/1.40 at β = 0.7 , 1.20/1.60 at β = 0.8 , and 1.35/1.80 at β = 0.9 . Therefore, the principal search interval is set to 0.7 β 0.9 : lower values may provide insufficient focusing, whereas values close to 1 may leave limited complementary BCE supervision. The two endpoints are retained to identify the effect of each single loss.
The fusion coefficient was screened under a controlled seed-41 protocol. All candidate values of β were evaluated using the same random seed, data partition, training schedule, and evaluation procedure, so that between-seed variation did not confound the coefficient comparison. This table is therefore treated as a single-seed exploratory coefficient ablation rather than as a multi-seed robustness analysis. After fixing β = 0.8 , the selected VF-BCE configuration was subsequently evaluated using seeds 41, 42, and 43 as part of the complete factorial ablation in Section 4.2.
Accordingly, the following settings are evaluated on the YOLO11m baseline:
β { 0 , 0.7 , 0.8 , 0.9 , 1 } .
The class weights in Equation (1) are fixed in every experiment, and the remaining training configuration is kept unchanged to isolate the effect of the fusion coefficient.
As shown in Table 6 and Figure 8, the seed-41 mAP50 increases from 0.87235 at the BCE endpoint to 0.91926 at β = 0.7 , and reaches the maximum value of 0.92710 at β = 0.8 . Relative to the BCE and class-weighted VFL endpoints within this controlled single-seed comparison, the selected setting is higher by 5.475 and 3.448 percentage points, respectively. Increasing β to 0.9 or 1 does not produce a further gain under the same seed, indicating that a larger VFL coefficient is not monotonically beneficial under the fixed class-weight scheme.
The category-level Precision values provide complementary evidence for this selection. The weighted categories respond differently to the fusion coefficient: Wrench reaches its highest seed-41 Precision at β = 0.7 , whereas Scissors reaches its highest value at β = 0.8 . When β rises to 0.9 and 1, Pliers continues to improve, but Scissors decreases to 0.75671 and 0.72594, respectively.
Figure 9 compares the classification-loss curves of the BCE, class-weighted VFL, and VF-BCE variants during training. All three settings exhibit stable within-objective convergence. Because BCE, VFL, and VF-BCE use different sample-weighting mechanisms and therefore have different numerical scales, neither their absolute magnitudes nor their apparent decay rates are directly comparable. The curves are consequently used only to examine optimization stability within each loss setting; the selected VF-BCE configuration shows no evident oscillatory behavior during training.

4. Results

4.1. Datasets, Implementation Details, and Reporting Protocol

4.1.1. Datasets

All experiments on SIXray used the same training, validation, and test partitions described in Section 3.1. The augmented training set was used throughout the subsequent module comparisons so that differences between configurations could be attributed to the evaluated architectural or loss-function changes rather than to changes in the data distribution. OPIXray and PIDray were used only in the external-validation experiments described in the corresponding subsections.

4.1.2. Implementation Details

The experiments were implemented in Python 3.8 using PyTorch 2.0.0, CUDA 11.8, and the Ultralytics detection framework. Training was conducted on a workstation equipped with two NVIDIA GeForce RTX 4090D GPUs, each with 24 GB of memory, and an AMD EPYC 9754 processor with 128 physical cores and 256 threads. The operating system was Ubuntu 20.04.
Unless otherwise stated, the principal YOLOv8m and YOLO11m experiments were trained for 100 epochs with an input resolution of 640 × 640 pixels and a batch size of 64. The YOLO11l scale experiment used a batch size of 32 because of its higher memory demand. SGD was used with a momentum of 0.937 and a weight decay of 0.0005. Experiment-specific learning-rate settings are reported in the corresponding methodological subsections rather than treated as a single global value. Within each controlled comparison, the data split, augmentation protocol, optimization settings, evaluation procedure, and test set were kept unchanged.

4.1.3. Random-Seed Protocol and Statistical Reporting

The complete factorial module-ablation study on YOLO11m was independently conducted using random seeds 41, 42, and 43. For these experiments, mAP50 is reported as the mean and sample standard deviation over the three runs. Performance changes were first calculated separately between configurations trained with the same random seed. The reported Δ mAP50 therefore represents the mean and sample standard deviation of paired, within-seed differences.
YOLOv8m was retained as a cross-generation auxiliary validation model and was evaluated using seed 41. The YOLO11n, YOLO11s, and YOLO11l scale-wise comparisons were also conducted using a unified single-seed protocol. These single-seed results are interpreted descriptively and are not used to support claims of run-to-run statistical robustness. Parameter counts and FLOPs are deterministic properties of the inference architecture and are therefore reported once for each configuration rather than as multi-run statistics.

4.2. Multi-Seed Ablation on YOLO11m and Auxiliary Validation on YOLOv8m

Following the protocol defined in Section 4.1.3, the principal ablation study was performed on YOLO11m using all eight combinations of ECA, MobileNetV3, and VF-BCE. YOLOv8m was retained as a single-seed auxiliary model to examine whether the same qualitative interaction pattern also appears in an earlier YOLO generation. The two result groups therefore serve different purposes: the YOLO11m experiments support the main repeatability analysis, whereas the YOLOv8m experiments provide descriptive cross-generation evidence.
As shown in Table 7, the original YOLO11m achieves an average mAP50 of 0.86779 ± 0.00823 . When evaluated individually, ECA and MobileNetV3 provide mean paired gains of 1.339 ± 0.221 and 1.399 ± 0.223 percentage points, respectively. VF-BCE produces the largest individual improvement, increasing mAP50 by 5.479 ± 0.090 percentage points. The positive within-seed changes observed for all three individual modules indicate that the direction of improvement is consistent across the evaluated initializations.
The highest average detection accuracy is obtained by the ECA+VF-BCE configuration, which reaches 0.93842 ± 0.00720 . This result identifies ECA+VF-BCE as the accuracy-oriented configuration. The complete YOLO-EMV model achieves a lower mAP50 of 0.92744 ± 0.00768 , but it still improves upon the original YOLO11m by 5.965 ± 0.093 percentage points while reducing the parameter count from 20.03 M to 12.04 M and FLOPs from 67.3 G to 28.8 G. These changes correspond to reductions of 39.9% and 57.2%, respectively. YOLO-EMV is therefore interpreted as the deployment-oriented configuration rather than as the configuration with the highest absolute accuracy.
The paired module comparisons further clarify the compression–compensation relationship. Replacing the original backbone with MobileNetV3 and then applying VF-BCE yields an average mAP50 of 0.90636 ± 0.00571 , which is 1.622 ± 0.182 percentage points lower than applying VF-BCE to the uncompressed backbone. Adding ECA to the MobileNetV3+VF-BCE configuration increases mAP50 by 2.108 ± 0.214 percentage points, producing the complete YOLO-EMV model. ECA therefore provides a repeatable compensatory contribution after lightweight reconstruction, although it does not completely eliminate the accuracy difference between the complete model and the uncompressed ECA+VF-BCE configuration. Indeed, YOLO-EMV remains 1.098 ± 0.061 percentage points below ECA+VF-BCE, in exchange for substantially lower inference complexity.
The same results also show that the three modules are not simply additive. ECA improves the original baseline and also improves the compressed MobileNetV3 pathway, whereas the magnitude of its contribution depends on the accompanying loss and backbone configuration. Similarly, VF-BCE is the dominant source of accuracy improvement, but the lightweight backbone changes the capacity available for learning the strongly reweighted hard samples. The final architecture therefore reflects a controlled trade-off among feature capacity, channel recalibration, hard-sample optimization, and deployment cost.
The auxiliary YOLOv8m results in Table 8 exhibit a qualitatively similar pattern. Under seed 41, SE+VF-BCE achieves the highest mAP50 of 0.93856, whereas the complete YOLO-SMV model obtains 0.92929 with substantially lower inference complexity. Relative to the original YOLOv8m, YOLO-SMV improves mAP50 by 4.920 percentage points while reducing the parameter count from 33.94 M to 20.14 M and FLOPs from 85.4 G to 68.1 G, corresponding to reductions of 40.7% and 20.3%, respectively.

4.3. Impact of Various Improved Modules on Different Categories of Prohibited Items

To examine class-specific behavior, Precision, Recall, and F1-score were compared across Gun, Knife, Wrench, Pliers, and Scissors. The category-level values in this subsection and in Appendix A Table A3 and Table A4 correspond to the representative seed-41 runs and are not multi-seed averages. Figure 10 visualizes the YOLO11m variants, while the appendix tables provide the complete YOLOv8m and YOLO11m results.
For YOLOv8m, VF-BCE increases Precision for the weighted categories Wrench and Scissors from 0.84375 and 0.79909 to 0.92254 and 0.94570, respectively. The complete YOLO-SMV model obtains Precision values of 0.90706, 0.88163, and 0.99465 for Wrench, Pliers, and Scissors, although Knife Precision decreases from 0.95341 in the baseline to 0.90970. Thus, the class-specific changes are favorable for several difficult categories but are not uniformly positive across all classes.
For YOLO11m, VF-BCE increases Precision for Wrench, Pliers, and Scissors from 0.79117, 0.86043, and 0.77570 to 0.88732, 0.88650, and 0.97087, respectively. The complete YOLO-EMV model further raises Wrench and Pliers Precision to 0.94472 and 0.89186, while Scissors Precision remains high at 0.95939. Gun and Knife Precision are slightly lower than those of the original YOLO11m, indicating an accuracy redistribution rather than a uniform improvement for every category.
The Recall and F1-score results show a similar trade-off. Both complete models improve the difficult-category Recall and F1-score relative to their corresponding baselines, but the relative ranking between YOLO-SMV and YOLO-EMV depends on the metric. Across the five categories, YOLO-EMV has a higher macro-averaged Precision (0.93838 versus 0.92929) and a slightly higher macro-averaged F1-score (0.90358 versus 0.90174), whereas YOLO-SMV has a higher macro-averaged Recall (0.87928 versus 0.87320).
Figure 11 presents representative qualitative comparisons in the order YOLOv8m, YOLO-SMV, YOLO11m, and YOLO-EMV. The changes are not uniformly positive for every predicted box. For the top-left knife, the confidence increases from 0.86 to 0.87 and from 0.83 to 0.91 in the two model families, respectively. For the lower-left wrench, the corresponding confidence increases from 0.81 to 0.85 and from 0.75 to 0.78.
The lower-right example provides a clearer missed-detection comparison. YOLOv8m does not detect the gun, whereas YOLO-SMV recovers it with a confidence of 0.61. YOLO11m detects the same gun with a confidence of 0.54, while YOLO-EMV increases the confidence to 0.85. In the heavily overlapped gun scene in the upper-right part of the figure, the models retain different sets of overlapping detections. Consequently, some confidence values increase whereas others remain unchanged or decrease slightly, and the individual boxes cannot always be matched one-to-one. The figure is therefore used only as qualitative illustration. The overall performance conclusions are based on the complete test-set mAP50, Precision, Recall, and F1-score results.

4.4. Direct Comparison with Standard Lightweight YOLO Variants

The scale-aware reconstruction study in Section 3.2 asks whether the same compression operation behaves consistently across detector capacities. Here, the question is more directly deployment-oriented: why use the proposed medium-derived configuration instead of simply selecting a standard nano or small detector? Table 9 therefore compares the standard YOLO11n/s/m baselines with two operating points identified by the factorial study. All entries use the common seed-41 SIXray split, input resolution, and evaluation procedure so that accuracy and complexity can be interpreted within a single controlled setting.
Figure 11. Representative qualitative comparisons between each baseline and its complete deployment-oriented model: (A) YOLOv8m vs. YOLO-SMV; (B) YOLO11m vs. YOLO-EMV.
Figure 11. Representative qualitative comparisons between each baseline and its complete deployment-oriented model: (A) YOLOv8m vs. YOLO-SMV; (B) YOLO11m vs. YOLO-EMV.
Modelling 07 00178 g011
Table 9. Direct seed-41 comparison of standard YOLO11 nano, small, and medium baselines with the accuracy-oriented and deployment-oriented operating points identified in this study. All models use the common SIXray experimental protocol.
Table 9. Direct seed-41 comparison of standard YOLO11 nano, small, and medium baselines with the accuracy-oriented and deployment-oriented operating points identified in this study. All models use the common SIXray experimental protocol.
Model/Operating PointmAP50 (Seed 41)Params (M)FLOPs (G)
YOLO11n0.797512.5916.445
YOLO11s0.831219.43021.557
YOLO11m0.8723520.03067.300
ECA+VF-BCE (accuracy-oriented)0.9427120.03067.900
YOLO-EMV (deployment-oriented)0.9324012.04028.800
The results show why the deployment problem cannot be reduced to selecting the smallest baseline. Relative to YOLO11s, YOLO-EMV uses moderately more computation but increases mAP50 by 10.119 percentage points under the same protocol. Relative to YOLO11m, it increases mAP50 by 6.005 percentage points while reducing parameters by 39.9% and FLOPs by 57.2%. The accuracy-oriented ECA+VF-BCE configuration reaches 0.94271 under seed 41, but retaining the original backbone keeps its complexity at 20.03 M parameters and 67.9 G FLOPs. YOLO-EMV therefore represents a deliberate movement away from the absolute-accuracy operating point: under seed 41 it gives up 1.031 percentage points relative to ECA+VF-BCE while reducing parameters by 39.9% and FLOPs by 57.6%. The corresponding three-seed comparison in Table 7 shows the same interpretation, with a mean accuracy difference of 1.098 ± 0.061 percentage points. Thus, the principal claim is not that YOLO-EMV is the smallest detector, but that the medium-scale starting point permits a substantially different accuracy–efficiency operating point from the standard nano/small alternatives.

4.5. Protocol-Aware Comparison with Previously Published SIXray Results

The reviewer requested comparison with results reported in prior publications on the same public benchmark. We therefore reproduce representative published SIXray results in Table 10. However, the term “SIXray” does not necessarily correspond to an identical effective benchmark across publications. Different studies select different subsets from the original dataset, adopt different train–validation–test partitions, retain or omit different numbers of background-only images, and use substantially different training schedules and augmentation strategies. These differences affect the statistical composition and difficulty of the evaluated detection task. For this reason, Table 10 reports the available dataset-processing and training settings together with the reported mAP50, rather than presenting the numerical values as a common leaderboard.
Wang et al. [13] evaluated YOLOv8n, YOLOv8s, and YOLOv8n-GEMA on SIXray and reported mAP50 values of 0.908, 0.940, and 0.944, respectively. Their models were trained for 300 epochs and used Mosaic, MixUp, horizontal flipping, and scale augmentation. The publication does not explicitly report the SIXray train/validation/test image counts or the number of background-only images retained in the SIXray experiments; these fields are therefore identified as not explicitly reported rather than inferred.
Zhao et al. [14] define their SIXray experimental data as 8929 manually annotated images of prohibited items and divide these images into training, validation, and testing sets at an 8:1:1 ratio. Their models are trained from scratch for 600 epochs at an input resolution of 640 × 640 , using SGD with a batch size of 64 together with Mosaic and MixUp augmentation. The reported experimental description does not state that the original million-scale negative-image pool is incorporated into this 8929-image experimental subset. Under this protocol, YOLO11n and YOLO11s achieve mAP50 values of 0.923 and 0.934, respectively, and Xray-YOLO-Mamba reaches 0.940.
The protocol used in the present study is different. The original SIXray training partition contains 74,960 images. We randomly select 5546 images from this partition to construct the validation set and retain the original 13,412-image test set unchanged. After class-targeted augmentation and negative-sample reduction, the final training set contains 43,358 images, including 31,034 background images. The principal experiments use an input resolution of 640 × 640 , 100 training epochs, SGD, and a batch size of 64. The YOLO11n/s/m direct comparison uses seed 41, whereas the final YOLO-EMV result is reported over seeds 41, 42, and 43.
The differences summarized in Table 10 are not minor implementation details. They alter the effective data distribution on which the detector is trained and evaluated. In particular, Zhao et al. [14] construct their SIXray experiments from 8929 manually annotated prohibited-item images and repartition that subset at an 8:1:1 ratio. By contrast, the present study retains the original 13,412-image test set and preserves 31,034 background images in the final training set even after negative-sample reduction. The two studies therefore differ in the number of training and test images, foreground–background composition, training duration, and augmentation protocol. We do not infer from these differences that one protocol is intrinsically more difficult, nor do we attribute the performance gap to a single factor such as negative-image handling. The appropriate conclusion is that the source-reported values are produced under different experimental conditions.
The magnitude of this protocol dependence can be observed from nominally identical lightweight baseline scales. Zhao et al. [14] report mAP50 values of 0.923 and 0.934 for YOLO11n and YOLO11s, whereas the same nominal model scales obtain 0.79751 and 0.83121 under the protocol used in this study. The corresponding differences are 12.549 and 10.279 percentage points. These differences are much larger than the apparent cross-paper difference between Xray-YOLO-Mamba (0.940 in the same study) and YOLO-EMV ( 0.92744 ± 0.00768 in this study). This observation does not establish which proposed detector is intrinsically superior; instead, it shows that absolute source-reported SIXray mAP50 is strongly protocol dependent and should not be interpreted without the associated data-processing conditions.
Accordingly, Table 10 is used for contextual comparison rather than for a superiority ranking. It documents the performance range reported in representative recent SIXray studies and, at the same time, makes the associated experimental conditions visible. Direct claims regarding model improvement, parameter reduction, FLOP reduction, and the position of YOLO-EMV relative to nano, small, and medium YOLO baselines are based exclusively on the matched experiments conducted within this study in Table 2, Table 7, and Table 9. The separately controlled re-evaluation in Section 4.6 provides an additional head-to-head comparison under the fixed protocol adopted here.

4.6. Controlled Re-Evaluation of Representative Public Detectors

To complement the source-reported literature comparison, three representative publicly available detectors were re-evaluated using the same SIXray training, validation, and held-out test partitions adopted in this study. YOLOv8-L+CSPDarkNet53 provides a high-capacity convolutional reference, YOLOv8-L+CHR provides an X-ray-specific CNN reference derived from the CHR design family evaluated in the recent comparative literature [15], and D-FINE-S provides a recent lightweight Transformer/DETR-family reference [45]. Architecture-specific implementations were retained, while the common data split, input resolution, and evaluation procedure were held fixed. Consequently, the mAP50 values in Table 11 can be used for direct comparison within this study.
Within these completed unified runs, YOLO-EMV achieves a three-seed mean mAP50 of 0.92744 ± 0.00768 , exceeding the YOLOv8-L+CSPDarkNet53, YOLOv8-L+CHR, and D-FINE-S runs by 2.130, 5.419, and 1.507 percentage points, respectively. The comparison also exposes the intended trade-off rather than a universal dominance claim. YOLO-EMV is far less costly than the two large CNN references, whereas D-FINE-S is slightly smaller in absolute complexity (10.20 M parameters and 25.2 GFLOPs versus 12.04 M and 28.8 GFLOPs) but obtains lower mAP50 under the common evaluation. These matched results provide the basis for direct quantitative statements in this study; the heterogeneous source-reported values in Table 10 are used only as literature context.

4.7. Validation on the OPIXray Dataset

OPIXray is a benchmark for occluded prohibited-item detection in X-ray security inspection. It contains 8885 high-resolution images covering five controlled-knife categories: folding knife (1,993), straight knife (1044), scissors (1863), utility knife (1978), and multi-tool knife (2042). The dataset is divided into training and test sets at an approximately 4:1 ratio, and its heavily occluded samples provide a complementary setting to SIXray.
To examine whether the module-interaction patterns observed on SIXray also appear on a different X-ray benchmark, additional ablation experiments were conducted on OPIXray, with the results reported in Table 12 and Table 13.
In the YOLOv8m experiments, applying VF-BCE to the MobileNetV3 configuration changes mAP50 from 0.85954 to 0.84915, while the complete SE+MobileNetV3+VF-BCE configuration reaches 0.86953. The reduced feature capacity of the lightweight backbone makes optimization under strongly reweighted hard samples more difficult. The recovery observed after introducing SE is consistent with a compensatory feature-recalibration effect.
The YOLO11m results in Table 13 show that VF-BCE alone increases mAP50 from 0.87190 to 0.88327. Replacing the backbone with MobileNetV3 reduces FLOPs from 67.3 G to 28.8 G but lowers mAP50 to 0.85461; adding ECA to this lightweight configuration raises mAP50 to 0.86435 with only a 0.04 M increase in parameters. The ECA+VF-BCE configuration obtains the highest mAP50 in Table 13, reaching 0.90463. This result indicates a complementary interaction between feature recalibration and hard-sample weighting under the evaluated OPIXray protocol. The experiment supports the applicability of the two mechanisms on a second benchmark.

4.8. Decoupled Evaluation of VF-BCE Loss on the PIDray Benchmark

PIDray is a large-scale X-ray dataset for real-world contraband detection, whose most distinctive features are its focus on intentionally concealed object scenarios and its extremely long-tailed data distribution. In the training set, the number and corresponding proportion of each object category are: Baton (1513, 3.81%), Pliers (4236, 10.67%), Hammer (3546, 8.93%), Powerbank (5171, 13.02%), Scissors (4352, 10.96%), Wrench (4350, 10.95%), Gun (2178, 5.49%), Bullet (1837, 4.63%), Sprayer (2970, 7.48%), HandCuffs (2096, 5.28%), Knife (3290, 8.29%), and Lighter (4169, 10.50%). Such characteristics, including extreme data imbalance and considerable difficulty in feature extraction, are well suited for conducting decoupling experiments on our VF-BCE loss function.
As shown in Table 14, the decoupled PIDray ablation separates the dynamic focusing component of VF-BCE from explicit class reweighting. Compared with the baseline mAP50 of 0.83508, VF-BCE with uniform weights reaches 0.84563. Because no class-balancing weights are used in this configuration, the improvement indicates that the dynamic focusing component contributes independently of explicit class reweighting. Introducing data-driven inverse weights further increases mAP50 to 0.85176, suggesting that static class compensation provides a complementary benefit under the long-tailed PIDray distribution.

5. Discussion

The experiments indicate that the main value of the proposed design lies in identifying and explaining a deployment operating point rather than maximizing a single benchmark score. The scale study first shows that compression is capacity dependent: the same MobileNetV3 reconstruction is ineffective at the nano scale, largely accuracy-preserving at the small scale, most favorable at the medium scale, and still leaves comparatively high absolute cost at the large scale. This non-monotonic result provides the rationale for starting from YOLO11m instead of simply adopting the smallest YOLO variant.
The factorial study then explains what happens after that starting point is selected. VF-BCE is the dominant source of detection-accuracy improvement, whereas MobileNetV3 provides the principal reduction in inference complexity. These two effects do not combine additively: MobileNetV3+VF-BCE reaches 0.90636 ± 0.00571 , which is lower than VF-BCE on the uncompressed backbone. Adding ECA raises the compressed VF-BCE pathway by 2.108 ± 0.214 percentage points across the paired seeds, producing YOLO-EMV. ECA therefore acts as a repeatable compensation mechanism in the compressed pathway, although the recovery is incomplete.
This incomplete recovery is itself central to the deployment interpretation. ECA+VF-BCE gives the highest mean mAP50, 0.93842 ± 0.00720 , whereas YOLO-EMV obtains 0.92744 ± 0.00768 . The latter is 1.098 ± 0.061 percentage points lower, but reduces the parameter count from 20.03 M to 12.04 M and FLOPs from 67.9 G to 28.8 G. The final architecture is therefore not selected because it maximizes accuracy; it is selected because the experiments identify a reproducible accuracy–efficiency compromise suitable for the deployment objective.
The direct lightweight comparison reinforces this point. Under the common seed-41 protocol, standard YOLO11n and YOLO11s are substantially smaller but also markedly less accurate, while YOLO11m is more computationally expensive. YOLO-EMV lies between the standard small and medium models in complexity but above all three standard baselines in mAP50 under the matched evaluation. Consequently, the practical question addressed by the study is not “how small can the detector become?” but “how much capacity should be retained before compression and compensation cease to be beneficial?” The observed results place the favorable operating region near the medium scale for the present X-ray task and implementation.
The literature comparison should be interpreted at a different evidence level. The central limitation of cross-paper SIXray comparison is not merely a difference in optimizer settings or training duration; different studies may evaluate detectors on different effective data distributions under the same dataset name. In Zhao et al. [14], the SIXray experiments are constructed from 8929 manually annotated prohibited-item images and repartitioned at an 8:1:1 ratio, whereas the present study retains the original 13,412-image test set and preserves 31,034 background images in the final training set. The protocol effect is visible even for nominally identical YOLO11n/s baselines, whose source-reported mAP50 values differ by more than 10 percentage points between the two protocols. This observation does not demonstrate that our protocol is intrinsically more difficult, nor does it explain the difference through any single factor. It demonstrates that absolute source-reported SIXray mAP50 is strongly protocol dependent. We therefore use the literature table to document prior performance and protocol context, while direct claims about accuracy gains and deployment efficiency are restricted to matched comparisons conducted within this study.
The external benchmark results add a complementary form of evidence. On OPIXray, compression is more sensitive to strong hard-sample weighting under heavy occlusion, and attention partially restores the compressed pathway. On PIDray, uniform VF-BCE and inverse-frequency weighting provide successive improvements under a long-tailed distribution. These results do not establish zero-shot cross-dataset transfer because each benchmark is trained and evaluated under its own procedure. They instead show that the roles identified on SIXray—hard-sample optimization, compression sensitivity, and attention-based compensation—remain relevant under different X-ray data conditions.

Limitations and Future Work

The proposed models still have room for improvement in detecting amorphous and highly transparent prohibited items, such as liquids, because these targets often lack stable texture and boundary features. Future work may investigate multimodal information fusion and dual-energy imaging features. Category-level performance also remains variable, and the influence of texture, occlusion pattern, and object geometry has not been quantified in depth. More detailed error analysis, including confusion matrices, missed-detection case studies, and feature visualization, would help identify category-specific failure modes.
Although VF-BCE improves performance on the evaluated imbalanced datasets, the quantitative relationship among category frequency, recognition difficulty, and the optimal reweighting strength has not yet been systematically established. In addition, the OPIXray and PIDray experiments in this work are multi-benchmark validations rather than strict source-to-target transfer tests. A stronger generalization study would train on one X-ray benchmark or scanner domain and evaluate directly on an unseen target benchmark without target-domain fine-tuning. Analysis using operational customs data is further constrained by confidentiality and data-privacy requirements. Future research will therefore investigate domain-generalized and unsupervised domain-adaptation settings, together with privacy-preserving and federated learning for heterogeneous X-ray inspection environments.

6. Conclusions

This study develops YOLO-SMV and YOLO-EMV as deployment-oriented X-ray prohibited-item detectors and uses controlled experiments to analyze the interaction among model capacity, lightweight reconstruction, attention-based compensation, and class-sensitive optimization. The main conclusions are as follows:
  • The scale-wise reconstruction study shows that lightweight backbone replacement is capacity dependent rather than universally beneficial. YOLO11n approaches the lower-capacity boundary, YOLO11s supports accuracy-preserving compression, and YOLO11m provides the most favorable observed starting point for the subsequent deployment-oriented design.
  • In the three-seed YOLO11m factorial study, VF-BCE provides the largest individual accuracy gain, MobileNetV3 supplies the main reduction in inference complexity, and ECA repeatedly compensates for part of the loss introduced when the VF-BCE pathway is compressed.
  • The accuracy-oriented ECA+VF-BCE configuration reaches 0.93842 ± 0.00720 mAP50. YOLO-EMV reaches 0.92744 ± 0.00768 , trading 1.098 ± 0.061 percentage points for a reduction from 20.03 M to 12.04 M parameters and from 67.9 G to 28.8 G FLOPs. The final model is therefore interpreted as the deployment operating point rather than the absolute-accuracy optimum.
  • Under the common seed-41 SIXray protocol, YOLO-EMV achieves higher mAP50 than standard YOLO11n, YOLO11s, and YOLO11m. Together with the scale study, this shows that the selected operating point cannot be reproduced simply by choosing an off-the-shelf nano or small detector.
  • Previously published SIXray results are reported together with their available data-processing and training conditions. The large cross-protocol differences observed for nominally identical YOLO11n/s baselines show that source-reported mAP50 values should be used as contextual evidence rather than as a strict cross-paper ranking. Direct performance claims are therefore restricted to matched experiments. OPIXray and PIDray provide additional multi-benchmark evidence for the identified component interactions, while strict source-to-target cross-dataset generalization remains future work.

Author Contributions

Conceptualization, X.S. and J.Z.; methodology, X.S. and X.L.; software, X.L. and S.Z.; validation, X.L. and S.Z.; formal analysis, X.L.; investigation, X.L.; resources, X.S., J.Z. and S.J.; data curation, X.L. and S.Z.; writing—original draft preparation, X.S. and X.L.; writing—review and editing, S.Z., J.Z. and S.J.; supervision, X.S. and J.Z.; project administration, X.S.; funding acquisition, X.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China, grant number 51605069.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The public benchmark datasets used in this study are available through the original SIXray, OPIXray, and PIDray publications cited in the manuscript. Processed experimental records, configuration files, and source code are available from the corresponding author upon reasonable request, subject to restrictions associated with operational customs deployment data.

Conflicts of Interest

Author Jicun Zhang was employed by the company Neusoft Reach Automotive Technology (Dalian) Co., Ltd. The remaining author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A. Appendix Tables

Table A1. Seed-wise mAP50 results for the complete YOLO11m factorial ablation on SIXray. The mean and sample standard deviation correspond to the three runs reported in the main text.
Table A1. Seed-wise mAP50 results for the complete YOLO11m factorial ablation on SIXray. The mean and sample standard deviation correspond to the three runs reported in the main text.
ConfigurationSeed 41Seed 42Seed 43Mean ± SD
Baseline0.872350.872730.85829 0.86779 ± 0.00823
ECA0.885050.884340.87415 0.88118 ± 0.00610
MobileNetV30.884690.885830.87481 0.88178 ± 0.00606
VF-BCE0.927100.926640.91400 0.92258 ± 0.00743
ECA+MobileNetV30.896280.897210.88458 0.89269 ± 0.00704
ECA+VF-BCE0.942710.942440.93011 0.93842 ± 0.00720
MobileNetV3+VF-BCE0.909320.909980.89978 0.90636 ± 0.00571
YOLO-EMV0.932400.931320.91860 0.92744 ± 0.00768
Table A2. Summary of related works and their advantages/disadvantages in X-ray security inspection.
Table A2. Summary of related works and their advantages/disadvantages in X-ray security inspection.
ReferenceMain MethodKey AdvantagesInherent Limitations
Mu et al. [8]YOLOv4 + Channel and spatial attentionEffectively suppresses irrelevant background noise.High computational overhead and model complexity; unfriendly for edge deployment.
Shao et al. [9]Attention for foreground-background separationImproves recognition accuracy specifically for occluded objects.
Wang et al. [10]Efficient Multi-scale Attention (EMA)Achieves high absolute accuracy (e.g., 92.7% mAP).
Ren et al. [11]Lightweight backbone with depthwise convolutionDrastically reduces Params and computational FLOPs.Weakened feature extraction capability; limited gains on extremely small or occluded items.
Zhang et al. [12]Extreme lightweight model compressionAchieves >12% reduction in model size and complexity.
Cani et al. [16]Hybrid CNN-transformer architecturesAchieves robust accuracy on challenging datasets (e.g., 0.898 mAP50 on PIDray).Severe computational overhead; highly impractical for low-power, real-time edge deployment.
Ours (YOLO-SMV/EMV)Lightweight backbone + SE/ECA + VF-BCEBalances deployment efficiency and detection accuracy; evaluated on occluded and long-tailed X-ray benchmarks.Performance may slightly fluctuate under extreme physical metal occlusion without Dual-Energy priors.
Table A3. Comparison of detection metrics for the representative seed-41 YOLOv8m runs under individual and mixed improvement schemes. These values are not multi-seed averages. F1 scores are calculated from the Precision and Recall values in the same table using F 1 = 2 P R / ( P + R ) .
Table A3. Comparison of detection metrics for the representative seed-41 YOLOv8m runs under individual and mixed improvement schemes. These values are not multi-seed averages. F1 scores are calculated from the Precision and Recall values in the same table using F 1 = 2 P R / ( P + R ) .
ModelGunKnifeWrenchPliersScissors
Precision
YOLOv8m0.953410.953410.843750.850790.79909
YOLOv8m+SE0.956760.963370.847390.861840.82465
YOLOv8m+MobileNet0.962300.940140.836280.867040.87500
YOLOv8m+VF-BCE Loss0.953740.946620.922540.875000.94570
YOLO-SMV0.953410.909700.907060.881630.99465
Recall
YOLOv8m0.810980.828660.805970.871310.81776
YOLOv8m+SE0.809450.819320.787310.878020.81308
YOLOv8m+MobileNet0.817070.831780.705220.821720.75234
YOLOv8m+VF-BCE Loss0.817070.828660.977610.994640.97664
YOLO-SMV0.810980.847350.910450.958450.86916
F1
YOLOv8m0.876440.886670.824430.860930.80831
YOLOv8m+SE0.876960.885520.816250.869850.81882
YOLOv8m+MobileNet0.883750.882650.765180.843770.80905
YOLOv8m+VF-BCE Loss0.880130.883720.949280.930990.96092
YOLO-SMV0.876440.877420.908750.918430.92768
Table A4. Comparison of detection metrics for the representative seed-41 YOLO11m runs under individual and mixed improvement schemes. These values are not multi-seed averages. F1 scores are calculated from the Precision and Recall values in the same table using F 1 = 2 P R / ( P + R ) .
Table A4. Comparison of detection metrics for the representative seed-41 YOLO11m runs under individual and mixed improvement schemes. These values are not multi-seed averages. F1 scores are calculated from the Precision and Recall values in the same table using F 1 = 2 P R / ( P + R ) .
ModelGunKnifeWrenchPliersScissors
Precision
YOLO11m0.974310.960150.791170.860430.77570
YOLO11m+ECA0.961880.959110.831930.860470.81188
YOLO11m+MobileNet0.949640.921230.821430.847830.88333
YOLO11m+VF-BCE Loss0.950440.940350.887320.886500.97087
YOLO-EMV0.955570.940350.944720.891860.95939
Recall
YOLO11m0.809450.825550.735080.851210.77570
YOLO11m+ECA0.807930.803740.738810.843160.76636
YOLO11m+MobileNet0.804880.838010.686570.836460.74299
YOLO11m+VF-BCE Loss0.818060.834890.940300.994640.93458
YOLO-EMV0.827650.834890.880600.939680.88318
F1
YOLO11m0.884260.887770.762090.855800.77570
YOLO11m+ECA0.878210.874580.782610.851730.78846
YOLO11m+MobileNet0.871290.877650.747970.842110.80711
YOLO11m+VF-BCE Loss0.879300.884490.913040.937460.95238
YOLO-EMV0.887020.884490.911530.915140.91971

References

  1. Fang, Y.; Xu, C.; Zhang, Y. Research on X-ray security contraband identification technology based on lightweight YOLOv8. Sci. Rep. 2024, 14, 25031. [Google Scholar] [CrossRef] [Scilit]
  2. Tayara, H.; Chong, K.T. Object detection in very high-resolution aerial images using one-stage densely connected feature pyramid network. Sensors 2018, 18, 3341. [Google Scholar] [CrossRef] [Scilit]
  3. Lu, X.; Chen, Y.; Li, X. Hierarchical recurrent neural hashing for image retrieval with hierarchical convolutional features. IEEE Trans. Image Process. 2017, 27, 106–120. [Google Scholar] [CrossRef] [Scilit]
  4. Bilal, A.; Jourabloo, A.; Ye, M.; Liu, X.; Ren, L. Do convolutional neural networks learn class hierarchy? IEEE Trans. Vis. Comput. Graph. 2017, 24, 152–162. [Google Scholar] [CrossRef] [Scilit]
  5. Cui, H.; Wang, X.; Zhou, J.; Gong, G.; Eberl, S.; Yin, Y.; Wang, L.; Feng, D.; Fulham, M. A topo-graph model for indistinct target boundary definition from anatomical images. Comput. Methods Programs Biomed. 2018, 159, 211–222. [Google Scholar] [CrossRef] [Scilit]
  6. Liu, M.; Chen, Y.; Xie, J.; He, L.; Zhang, Y. LF-YOLO: A lighter and faster YOLO for weld defect detection of X-ray image. IEEE Sens. J. 2023, 23, 7430–7439. [Google Scholar] [CrossRef] [Scilit]
  7. Hussain, M. Yolov1 to v8: Unveiling each variant–a comprehensive review of yolo. IEEE Access 2024, 12, 42816–42833. [Google Scholar] [CrossRef] [Scilit]
  8. Mu, S.; Lin, J.; Wang, H.; Wei, X. An Algorithm for Detection of Prohibited Items in X-ray Images Based on Improved YOLOv4. Acta Armamentarii 2021, 42, 2675–2683. [Google Scholar]
  9. Shao, F.; Liu, J.; Wu, P.; Yang, Z.; Wu, Z. Exploiting foreground and background separation for prohibited item detection in overlapping X-Ray images. Pattern Recognit. 2022, 122, 108261. [Google Scholar] [CrossRef] [Scilit]
  10. Wang, B.; Ding, H.; Chen, C. AC-YOLOv4: An object detection model incorporating attention mechanism and atrous convolution for contraband detection in x-ray images. Multimed. Tools Appl. 2024, 83, 26485–26504. [Google Scholar] [CrossRef] [Scilit]
  11. Ren, Y.; Zhang, H.; Sun, H.; Ma, G.; Ren, J.; Yang, J. LightRay: Lightweight network for prohibited items detection in X-ray images during security inspection. Comput. Electr. Eng. 2022, 103, 108283. [Google Scholar] [CrossRef] [Scilit]
  12. Zhang, H.; Teng, W.; He, X.; Que, H.; Zhang, Y. Lightweight prohibited items detection model in X-ray images based on improved YOLOv7-tiny. J. Frankl. Inst. 2025, 362, 107421. [Google Scholar] [CrossRef] [Scilit]
  13. Wang, A.; Yuan, P.; Wu, H.; Iwahori, Y.; Liu, Y. Improved YOLOv8 for Dangerous Goods Detection in X-ray Security Images. Electronics 2024, 13, 3238. [Google Scholar] [CrossRef] [Scilit]
  14. Zhao, K.; Peng, S.; Li, Y.; Lu, T. A lightweight Xray-YOLO-Mamba model for prohibited item detection in X-ray images using selective state space models. Sci. Rep. 2025, 15, 13171. [Google Scholar] [CrossRef] [Scilit]
  15. Cani, J.; Diou, C.; Evangelatos, S.; Argyriou, V.; Radoglou-Grammatikis, P.; Sarigiannidis, P.; Varlamis, I.; Papadopoulos, G.T. Illicit Object Detection in X-Ray Imaging Using Deep Learning Techniques: A Comparative Evaluation. IEEE Access 2026, 14, 27171–27208. [Google Scholar] [CrossRef] [Scilit]
  16. Cani, J.; Diou, C.; Evangelatos, S.; Radoglou-Grammatikis, P.; Argyriou, V.; Sarigiannidis, P.; Varlamis, I.; Papadopoulos, G.T. X-ray illicit object detection using hybrid CNN-transformer neural network architectures. arXiv 2025, arXiv:2505.00564. [Google Scholar]
  17. Cheng, Z.; Li, X. Prohibited Item Detection in Small-sample X-ray Images Based on FPID. Radio Eng. 2023, 53, 1836–1843. [Google Scholar]
  18. Wu, B. Research on Contraband Detection Algorithm in X-Ray Scanning Images Based on Deep Learning. Master’s Thesis, University of Electronic Science and Technology of China, Chengdu, China, 2023. [Google Scholar]
  19. Feng, X.; Wei, X.; Liu, C.; He, X. Contraband classification method for X-ray security images considering sample imbalance. J. Beijing Univ. Aeronaut. Astronaut. 2023, 49, 3215–3221. [Google Scholar] [CrossRef]
  20. Miao, C.; Xie, L.; Wan, F.; Su, C.; Liu, H.; Jiao, J.; Ye, Q. Sixray: A large-scale security inspection x-ray benchmark for prohibited item discovery in overlapping images. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 2119–2128. [Google Scholar]
  21. Fang, C.; Liu, J.; Han, P.; Chen, M.; Liao, D. Fsvm: A few-shot threat detection method for x-ray security images. Sensors 2023, 23, 4069. [Google Scholar] [CrossRef] [Scilit]
  22. Hassan, T.; Bettayeb, M.; Akçay, S.; Khan, S.; Bennamoun, M.; Werghi, N. Detecting prohibited items in X-ray images: A contour proposal learning approach. In Proceedings of the 2020 IEEE International Conference on Image Processing (ICIP); IEEE: New York, NY, USA, 2020; pp. 2016–2020. [Google Scholar]
  23. Powers, D.M. Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv 2020, arXiv:2010.16061. [Google Scholar]
  24. Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar] [CrossRef] [Scilit]
  25. Xu, X.; Hou, W.; Li, X. Detection method of small size defects on pipeline weld surface based on improved YOLOv7. PLoS ONE 2024, 19, e0313348. [Google Scholar] [CrossRef] [Scilit]
  26. Tu, C.H.; Lee, J.H.; Chan, Y.M.; Chen, C.S. Pruning depthwise separable convolutions for mobilenet compression. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK, 19–24 July 2020; pp. 1–8. [Google Scholar]
  27. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
  28. Howard, A.; Sandler, M.; Chu, G.; Chen, L.C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for mobilenetv3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1314–1324. [Google Scholar]
  29. Yang, T.J.; Howard, A.; Chen, B.; Zhang, X.; Go, A.; Sandler, M.; Sze, V.; Adam, H. NetAdapt: Platform-Aware Neural Network Adaptation for Mobile Applications. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 285–300. [Google Scholar] [CrossRef] [Scilit]
  30. Choi, K.; Kim, S.; Kim, J.; Park, I.C. Hardware-friendly approximation for swish activation and its implementation. IEEE Trans. Circuits Syst. II Express Briefs 2024, 71, 4516–4520. [Google Scholar] [CrossRef] [Scilit]
  31. Guan, S.; Shi, M.; Wang, F.; Li, J. Power transformer fault diagnosis method based on multi source signal fusion and fast spectral correlation. Sci. Rep. 2025, 15, 6984. [Google Scholar] [CrossRef] [Scilit]
  32. Yang, T.; Ling, D.; Shi, Q.; Jiang, T. YOLOv8-MCDE for lightweight detection of small instruments in complex backgrounds from inspection robots’ perspective. Sci. Rep. 2025, 15, 32060. [Google Scholar] [CrossRef] [Scilit]
  33. Tan, M.; Le, Q.V. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA, 9–15 June 2019; pp. 6105–6114. [Google Scholar]
  34. Tan, M.; Pang, R.; Le, Q.V. EfficientDet: Scalable and Efficient Object Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 10781–10790. [Google Scholar] [CrossRef] [Scilit]
  35. Wang, Z.; Men, S.; Bai, Y.; Yuan, Y.; Wang, J.; Wang, K.; Zhang, L. Improved small object detection algorithm CRL-YOLOv5. Sensors 2024, 24, 6437. [Google Scholar] [CrossRef] [Scilit]
  36. Deng, Z.; Sun, H.; Zhou, S.; Zhao, J.; Lei, L.; Zou, H. Multi-scale object detection in remote sensing imagery with convolutional neural networks. ISPRS J. Photogramm. Remote Sens. 2018, 145, 3–22. [Google Scholar] [CrossRef] [Scilit]
  37. Jiao, L.; Wang, M.; Liu, X.; Li, L.; Liu, F.; Feng, Z.; Yang, S.; Hou, B. Multiscale deep learning for detection and recognition: A comprehensive survey. IEEE Trans. Neural Netw. Learn. Syst. 2024, 36, 5900–5920. [Google Scholar] [CrossRef] [Scilit]
  38. Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
  39. Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
  40. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
  41. Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollar, P. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
  42. Zhang, H.; Wang, Y.; Dayoub, F.; Sunderhauf, N. VarifocalNet: An IoU-Aware Dense Object Detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021; pp. 8514–8523. [Google Scholar]
  43. Cui, Y.; Jia, M.; Lin, T.Y.; Song, Y.; Belongie, S. Class-Balanced Loss Based on Effective Number of Samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 9268–9277. [Google Scholar]
  44. Yeung, M.; Sala, E.; Schönlieb, C.B.; Rundo, L. Unified Focal Loss: Generalising Dice and Cross Entropy-Based Losses to Handle Class Imbalanced Medical Image Segmentation. Comput. Med. Imaging Graph. 2022, 95, 102026. [Google Scholar] [CrossRef] [Scilit]
  45. Peng, Y.; Li, H.; Wu, P.; Zhang, Y.; Sun, X.; Wu, F. D-FINE: Redefine Regression Task of DETRs as Fine-Grained Distribution Refinement. In Proceedings of the International Conference on Learning Representations (ICLR), Singapore, 24–28 April 2025. [Google Scholar]
Figure 1. Data augmentation and architectural optimizations. (a) Data preparation; (b) Model optimization; (c) Experiment.
Figure 1. Data augmentation and architectural optimizations. (a) Data preparation; (b) Model optimization; (c) Experiment.
Modelling 07 00178 g001
Figure 2. Data augmentation diagram. Panels (a,c,e) are examples of the original images; panels (b,d,f) are the corresponding augmented results.
Figure 2. Data augmentation diagram. Panels (a,c,e) are examples of the original images; panels (b,d,f) are the corresponding augmented results.
Modelling 07 00178 g002
Figure 3. Detailed architecture of the YOLOv8m-MobileNet network after backbone replacement.
Figure 3. Detailed architecture of the YOLOv8m-MobileNet network after backbone replacement.
Modelling 07 00178 g003
Figure 4. Detailed architecture of the YOLO11m-MobileNet network after backbone replacement.
Figure 4. Detailed architecture of the YOLO11m-MobileNet network after backbone replacement.
Modelling 07 00178 g004
Figure 5. Schematic diagrams of the attention mechanisms: (A) CBAM; (B) ECA; (C) SE.
Figure 5. Schematic diagrams of the attention mechanisms: (A) CBAM; (B) ECA; (C) SE.
Modelling 07 00178 g005
Figure 6. Baseline YOLOv8m architecture with the attention-screening insertion point.
Figure 6. Baseline YOLOv8m architecture with the attention-screening insertion point.
Modelling 07 00178 g006
Figure 7. Baseline YOLO11m architecture with the attention-screening insertion point.
Figure 7. Baseline YOLO11m architecture with the attention-screening insertion point.
Modelling 07 00178 g007
Figure 8. Class precision for different loss functions.
Figure 8. Class precision for different loss functions.
Modelling 07 00178 g008
Figure 9. Training classification-loss curves for the loss-function ablation experiments: (a) YOLOv8m; (b) YOLO11m.
Figure 9. Training classification-loss curves for the loss-function ablation experiments: (a) YOLOv8m; (b) YOLO11m.
Modelling 07 00178 g009
Figure 10. Comparison of Precision, Recall, and F1-score for the representative seed-41 YOLOv8m variants and YOLO11m variants. (a) YOLOv8m variants (b) YOLO11m variants.
Figure 10. Comparison of Precision, Recall, and F1-score for the representative seed-41 YOLOv8m variants and YOLO11m variants. (a) YOLOv8m variants (b) YOLO11m variants.
Modelling 07 00178 g010
Table 1. Effect of data augmentation on the recognition precision of YOLOv8m and YOLO11m.
Table 1. Effect of data augmentation on the recognition precision of YOLOv8m and YOLO11m.
ModelDataGunKnifeWrenchPliersScissorsBackground
(2495/3330)(1625/2066)(1532/3734)(2956/6330)(709/1490)(62,068/31,034)
YOLOv8moriginal-dataset0.962230.947550.838460.850250.780190.97215
data-augmented-dataset0.953410.953410.843750.850790.799090.97010
YOLO11moriginal-dataset0.956990.915490.781530.853000.772830.96762
data-augmented-dataset0.974310.960140.791160.860430.775700.96657
Note: Numbers in parentheses indicate box counts (original/augmented).
Table 2. Scale-wise comparison of the original and MobileNetV3-reconstructed detectors on the SIXray test set.
Table 2. Scale-wise comparison of the original and MobileNetV3-reconstructed detectors on the SIXray test set.
Family/ScaleModelmAP50ParamsFLOPs Δ mAP50 Δ Params Δ FLOPs
(M)(G)(pp)(%)(%)
YOLOv8mYOLOv8m0.8800933.94085.400
YOLOv8m-MobileNet0.8961520.07067.700+1.606−40.87−20.73
YOLO11nYOLO11n0.797512.5916.445
YOLO11n-MobileNet0.781642.8475.138−1.587+9.88−20.28
YOLO11sYOLO11s0.831219.43021.557
YOLO11s-MobileNet0.832546.58011.635+0.133−30.22−46.03
YOLO11mYOLO11m0.8723520.03067.300
YOLO11m-MobileNet0.8846912.00028.800+1.234−40.09−57.21
YOLO11lYOLO11l0.9096125.31487.291
YOLO11l-MobileNet0.9125815.25838.298+0.297−39.73−56.13
Table 3. Three-seed repeatability of the YOLO11m MobileNetV3 backbone-replacement experiment. The paired change is calculated between runs using the same random seed.
Table 3. Three-seed repeatability of the YOLO11m MobileNetV3 backbone-replacement experiment. The paired change is calculated between runs using the same random seed.
ModelSeed 41Seed 42Seed 43Mean ± SD
YOLO11m0.872350.872730.858290.86779 ± 0.00823
YOLO11m-MobileNet0.884690.885830.874810.88178 ± 0.00606
Paired Δ mAP50+0.01234+0.01310+0.01652+0.01399 ± 0.00223
Table 4. Seed-41 attention-screening results for YOLOv8m on the SIXray test set.
Table 4. Seed-41 attention-screening results for YOLOv8m on the SIXray test set.
YOLOv8mmAP50Params (M)FLOPs (G)
Baseline0.8800933.9485.4
+ CBAM0.8827534.5385.8
+SE (selected)0.8908034.0185.4
+ECA0.8761033.9485.7
Table 5. Seed-41 attention-screening results for YOLO11m on the SIXray test set.
Table 5. Seed-41 attention-screening results for YOLO11m on the SIXray test set.
YOLO11mmAP50Params (M)FLOPs (G)
Baseline0.8723520.0367.3
+CBAM0.8835720.3067.9
+SE0.8751120.0767.7
+ECA (selected)0.8850520.0367.9
Table 6. Seed-41 exploratory ablation of the VF-BCE fusion coefficient on YOLO11m. All coefficient settings use the same random seed and experimental protocol. P denotes class-wise Precision. The settings β = 0 and β = 1 correspond to the BCE and class-weighted VFL endpoints, respectively.
Table 6. Seed-41 exploratory ablation of the VF-BCE fusion coefficient on YOLO11m. All coefficient settings use the same random seed and experimental protocol. P denotes class-wise Precision. The settings β = 0 and β = 1 correspond to the BCE and class-weighted VFL endpoints, respectively.
β Loss SettingmAP50Gun PKnife PWrench PPliers PScissors P
0BCE endpoint0.872350.974310.960140.791160.860400.77570
0.7VF-BCE0.919260.950420.933860.965300.874240.94647
0.8VF-BCE0.927100.950440.940350.887320.886500.97087
0.9VF-BCE0.889170.962780.941890.889670.910960.75671
1Class-weighted VFL endpoint0.892620.964720.942830.889650.917450.72594
Table 7. Three-seed factorial ablation results for YOLO11m on the SIXray test set. The seed-wise mAP50 values are provided in Appendix A Table A1.
Table 7. Three-seed factorial ablation results for YOLO11m on the SIXray test set. The seed-wise mAP50 values are provided in Appendix A Table A1.
BaselineECAMobileNetV3VF-BCEmAP50 Δ mAP50ParamsFLOPs
Mean ± SDMean ± SD (pp)(M)(G)
0.86779 ± 0.00823 20.0367.3
0.88118 ± 0.00610 + 1.339 ± 0.221 20.0367.9
0.88178 ± 0.00606 + 1.399 ± 0.223 12.0028.8
0.92258 ± 0.00743 + 5.479 ± 0.090 20.0367.3
0.89269 ± 0.00704 + 2.490 ± 0.123 12.0428.8
0.93842 ± 0.00720 + 7.063 ± 0.108 20.0367.9
0.90636 ± 0.00571 + 3.857 ± 0.253 12.0028.8
0.92744 ± 0.00768 + 5.965 ± 0.093 12.0428.8
Table 8. Auxiliary single-seed ablation results for YOLOv8m on the SIXray test set. All configurations were evaluated using seed 41.
Table 8. Auxiliary single-seed ablation results for YOLOv8m on the SIXray test set. All configurations were evaluated using seed 41.
BaselineSEMobileNetV3VF-BCEmAP50 Δ mAP50ParamsFLOPs
(pp)(M)(G)
0.8800933.9485.4
0.89080+1.07134.0185.4
0.89615+1.60620.0767.7
0.92872+4.86333.9485.4
0.90343+2.33420.1468.1
0.93856+5.84734.0185.4
0.90867+2.85820.0767.7
0.92929+4.92020.1468.1
Table 10. Protocol-aware comparison with representative previously published SIXray results. Source-reported values are reproduced from the cited publications. Dataset-processing and training settings are listed for each row because the effective SIXray protocols differ substantially across studies. The numerical values are therefore not interpreted as a controlled cross-paper ranking.
Table 10. Protocol-aware comparison with representative previously published SIXray results. Source-reported values are reproduced from the cited publications. Dataset-processing and training settings are listed for each row because the effective SIXray protocols differ substantially across studies. The numerical values are therefore not interpreted as a controlled cross-paper ranking.
StudyModelSIXray Data UsedTrain/Val/Test SettingBackground/Negative HandlingTraining SettingmAP50
Wang et al. [13]YOLOv8nSIXray; exact image counts not explicitly reportedNot explicitly reportedNumber of background-only images not explicitly reported300 epochs; Mosaic; MixUp; horizontal flip; scale augmentation0.908
Wang et al. [13]YOLOv8sSIXray; exact image counts not explicitly reportedNot explicitly reportedNumber of background-only images not explicitly reported300 epochs; Mosaic; MixUp; horizontal flip; scale augmentation0.940
Wang et al. [13]YOLOv8n-GEMASIXray; exact image counts not explicitly reportedNot explicitly reportedNumber of background-only images not explicitly reported300 epochs; Mosaic; MixUp; horizontal flip; scale augmentation0.944
Zhao et al. [14]YOLO11n8929 manually annotated prohibited-item images8:1:1 split of the 8929 imagesOriginal million-scale negative pool not reported as included in the experimental subset 640 × 640 ; 600 epochs; scratch; SGD; batch 64; Mosaic+MixUp0.923
Zhao et al. [14]YOLO11s8929 manually annotated prohibited-item images8:1:1 split of the 8929 imagesOriginal million-scale negative pool not reported as included in the experimental subset 640 × 640 ; 600 epochs; scratch; SGD; batch 64; Mosaic+MixUp0.934
Zhao et al. [14]Xray-YOLO-Mamba8929 manually annotated prohibited-item images8:1:1 split of the 8929 imagesOriginal million-scale negative pool not reported as included in the experimental subset 640 × 640 ; 600 epochs; scratch; SGD; batch 64; Mosaic+MixUp0.940
This studyYOLO11n43,358 final training images; 5546 validation images; original 13,412-image test set retained43,358/5546/13,41231,034 background images retained after negative-sample reduction 640 × 640 ; 100 epochs; SGD; batch 64; seed 410.79751
This studyYOLO11s43,358 final training images; 5546 validation images; original 13,412-image test set retained43,358/5546/13,41231,034 background images retained after negative-sample reduction 640 × 640 ; 100 epochs; SGD; batch 64; seed 410.83121
This studyYOLO11m43,358 final training images; 5546 validation images; original 13,412-image test set retained43,358/5546/13,41231,034 background images retained after negative-sample reduction 640 × 640 ; 100 epochs; SGD; batch 64; seed 410.87235
This studyYOLO-EMV43,358 final training images; 5546 validation images; original 13,412-image test set retained43,358/5546/13,41231,034 background images retained after negative-sample reduction 640 × 640 ; 100 epochs; SGD; batch 64; seeds 41/42/43 0.92744 ± 0.00768
Table 11. Controlled re-evaluation of representative public detectors on the held-out SIXray test set using the common data partition and evaluation protocol adopted in this study. The YOLO-EMV result is the mean ± sample standard deviation over seeds 41, 42, and 43; the external detector entries are the completed unified evaluation runs.
Table 11. Controlled re-evaluation of representative public detectors on the held-out SIXray test set using the common data partition and evaluation protocol adopted in this study. The YOLO-EMV result is the mean ± sample standard deviation over seeds 41, 42, and 43; the external detector entries are the completed unified evaluation runs.
ConfigurationUnified mAP50Params (M)GFLOPs
YOLOv8-L+CSPDarkNet530.9061443.61164.8
YOLOv8-L+CHR0.8732537.91102.3
D-FINE-S0.9123710.2025.2
YOLO-EMV (Ours) 0.92744 ± 0.00768 12.0428.8
Table 12. Single-seed factorial ablation of SE, MobileNetV3, and VF-BCE on OPIXray using YOLOv8m.
Table 12. Single-seed factorial ablation of SE, MobileNetV3, and VF-BCE on OPIXray using YOLOv8m.
BaselineSEMobileNetV3VF-BCEmAP50Params(M)FLOPs(G)
0.8762033.9485.4
0.8813934.0185.4
0.8595420.0767.7
0.8839633.9485.4
0.8715920.1468.1
0.8927634.0185.4
0.8491520.0767.7
0.8695320.1468.1
Note: A checkmark indicates that the corresponding component is included in the model configuration.
Table 13. Single-seed factorial ablation of ECA, MobileNetV3, and VF-BCE on OPIXray using YOLO11m.
Table 13. Single-seed factorial ablation of ECA, MobileNetV3, and VF-BCE on OPIXray using YOLO11m.
BaselineECAMobileNetV3VF-BCEmAP50Params(M)FLOPs(G)
0.8719020.0367.3
0.8862920.0367.9
0.8546112.0028.8
0.8832720.0367.3
0.8643512.0428.8
0.9046320.0367.9
0.8385212.0028.8
0.8646712.0428.8
Note: A checkmark indicates that the corresponding component is included in the model configuration.
Table 14. Decoupled evaluation of uniform and inverse-frequency class weighting in VF-BCE on the PIDray dataset.
Table 14. Decoupled evaluation of uniform and inverse-frequency class weighting in VF-BCE on the PIDray dataset.
YOLO11mmAP50Params (M)FLOPs (G)
Baseline0.8350820.0367.3
Uniform weights0.8456320.0367.3
Inverse-frequency weights0.8517620.0367.3
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Song, X.; Liao, X.; Zhang, S.; Zhang, J.; Jiang, S. YOLO with Multi-Module Fusion for Prohibited Item Detection in X-Ray Security Images. Modelling 2026, 7, 178. https://doi.org/10.3390/modelling7050178

AMA Style

Song X, Liao X, Zhang S, Zhang J, Jiang S. YOLO with Multi-Module Fusion for Prohibited Item Detection in X-Ray Security Images. Modelling. 2026; 7(5):178. https://doi.org/10.3390/modelling7050178

Chicago/Turabian Style

Song, Xueping, Xi Liao, Shuyu Zhang, Jicun Zhang, and Shanglei Jiang. 2026. "YOLO with Multi-Module Fusion for Prohibited Item Detection in X-Ray Security Images" Modelling 7, no. 5: 178. https://doi.org/10.3390/modelling7050178

APA Style

Song, X., Liao, X., Zhang, S., Zhang, J., & Jiang, S. (2026). YOLO with Multi-Module Fusion for Prohibited Item Detection in X-Ray Security Images. Modelling, 7(5), 178. https://doi.org/10.3390/modelling7050178

Article Metrics

Back to TopTop