基于移动端ANE的改进YOLO26纸箱破损检测算法

田蕾, 詹翠丽, 朱毅

包装工程(技术栏目) ›› 2026, Vol. 47 ›› Issue (19) : 161-174.

PDF(2114 KB)
PDF(2114 KB)
包装工程(技术栏目) ›› 2026, Vol. 47 ›› Issue (19) : 161-174. DOI: 10.19554/j.cnki.1001-3563.2026.19.017
自动化与智能化技术

基于移动端ANE的改进YOLO26纸箱破损检测算法

  • 田蕾*, 詹翠丽, 朱毅
作者信息 +

Improved YOLO26 Carton Damage Detection Algorithm Based on Mobile Apple Neural Engine

  • TIAN Lei*, ZHAN Cuili, ZHU Yi
Author information +
文章历史 +

摘要

目的 本文针对智能仓储场景下纸箱破损检测精度不足且轻量化算法移植至iOS端易出现苹果神经网络引擎(Apple Neural Engine,ANE)硬件加速失效的问题,提出一种兼顾检测精度与端侧运行性能的轻量化目标检测方法YOLO26n-DCA。方法 首先,在YOLO26n特征融合网络末端嵌入高效通道注意力机制以强化模型对多尺度破损缺陷的特征表征能力;其次,借助Xcode Instruments开展时序分析,明确传统注意力模块在ANE上的加速瓶颈,进而设计零重塑稠密通道注意力(Zero-Reshape Dense Channel Attention,DCA)模块,实现优化网络与ANE底层算子原生对齐;最后,基于Roboflow Universe平台公开数据集与实地采样构建含11 600张工业纸箱破损图像的自建数据集开展验证。结果 改进模型的平均精度均值(mean Average Precision at IoU=0.5,mAP50)达0.829,较基线模型提升2.6%;部署于搭载A18芯片的iPhone 16终端,多破损目标端到端检测耗时17.1 ms,端侧实时帧率达58.5帧/s(Frame/S,FPS),ANE算子原生映射率从0%提升至94.2%,推理速度较高效通道注意力机制(Efficient Channel Attention,ECA)的基准模型提升1.77倍;模型总参数量为3.23 MB,量化后CoreML格式体积仅5.54 MB。结论 该方法满足物流仓储行业对实时性、检测精度与轻量化的硬性要求,为YOLO26n架构在iOS边缘端的工业落地提供了核心技术支撑。

Abstract

Addressing the insufficient accuracy of carton damage detection in intelligent warehousing scenarios and the frequent hardware acceleration failure of the Apple Neural Engine (ANE) when lightweight algorithms are migrated to iOS devices, the work aims to propose a lightweight object detection method named YOLO26n-DCA that achieves a balance between detection accuracy and end-side performance. Firstly, an efficient channel attention module was embedded at the end of the feature fusion network of the YOLO26n architecture to enhance the model's representation capability for multi-scale damage defects. Secondly, timing analysis was performed via Xcode Instruments to identify the acceleration bottleneck of traditional attention modules on ANE, and a Zero-Reshape Dense Channel Attention (DCA) module was designed to realize native alignment between the optimized network and the underlying operators of ANE. Furthermore, a self-built dataset containing 11 600 industrial carton damage images was constructed based on public datasets from the Roboflow Universe platform and on-site sampling for experimental validation. The mAP50 (mean Average Precision at IoU=0.5) of the improved model reached 0.829, up by 2.6 percentage points compared with the baseline model. When deployed on an iPhone 16 terminal equipped with the A18 chip, the end-to-end detection latency for multi-damage targets was 17.1 ms, with a real-time on-device frame rate of 58.5 frames per second (FPS). The native ANE operator mapping rate rose from 0% to 94.2%, and the inference speed was 1.77 times that of the baseline model with the Efficient Channel Attention (ECA) mechanism. The total number of model parameters was only 3.23 MB, and the quantized CoreML model occupied a mere 5.54 MB of storage space. It is concluded that the proposed method satisfies the rigid requirements of the logistics and warehousing industry for real-time performance, detection accuracy and lightweight deployment, and provides core technical support for the industrial deployment of the YOLO26n architecture on iOS edge terminals.

关键词

纸箱破损检测 / YOLO26n / 零重塑稠密通道注意力 / 苹果神经网络引擎 / 轻量化

Key words

carton damage detection / YOLO26n / Zero-Reshape Dense Channel Attention (DCA) / Apple Neural Engine (ANE) / lightweight

引用本文

导出引用
田蕾, 詹翠丽, 朱毅. 基于移动端ANE的改进YOLO26纸箱破损检测算法[J]. 包装工程. 2026, 47(19): 161-174 https://doi.org/10.19554/j.cnki.1001-3563.2026.19.017
TIAN Lei, ZHAN Cuili, ZHU Yi. Improved YOLO26 Carton Damage Detection Algorithm Based on Mobile Apple Neural Engine[J]. Packaging Engineering. 2026, 47(19): 161-174 https://doi.org/10.19554/j.cnki.1001-3563.2026.19.017
中图分类号: TB487   

参考文献

[1] LIU Y, ZHANG C S, DONG X J.A Survey of Real-Time Surface Defect Inspection Methods Based on Deep Learning[J]. Artificial Intelligence Review, 2023, 56(10): 12131-12170.
[2] 李建明, 杨挺, 王惠栋. 基于深度学习的工业自动化包装缺陷检测方法[J]. 包装工程, 2020, 41(7): 175-184.
LI J M, YANG T, WANG H D.An Industrial Automation Packaging Defect Detection Method Based on Deep Learning[J], Packaging Engineering, 2020, 41(7): 175-184.
[3] ZHUO S L, BAI H, JIANG L F, et al.SCL-YOLOv11: A Lightweight Object Detection Network for Low-Illumination Environments[J]. IEEE Access, 2025(13): 47653-47662.
[4] CHEN H, WANG D A W, FANG J, et al. LW-YOLOv8: A Lightweight Object Detection Algorithm for UAV Aerial Imagery[C]//Proceedings of the 2024 6th International Conference on Natural Language Processing. Xi'an: IEEE, 2024: 446-450.
[5] WEN Y H, WANG L.YOLO-SD: Simulated Feature Fusion for Few-Shot Industrial Defect Detection Based on YOLOv8 and Stable Diffusion[J]. International Journal of Machine Learning and Cybernetics, 2024, 15(10): 4589-4601.
[6] ZHAI H Z, DU J W, AI Y H, et al.Edge Deployment of Deep Networks for Visual Detection: a Review[J]. IEEE Sensors Journal, 2025, 25(11): 18662-18683.
[7] 洪旗, 孔鸣宇, 贺磊磊, 等. 基于YOLO 26n-seg和沙漏神经网络模型的草莓相对轮廓预测[J]. 农业机械学报, 2026, 57(12): 264-274.
HONG Q, KONG M Y, HE L L, et al.Strawberry Relative Contour Prediction Based on YOLO 26n-seg and Hourglass Network Model[J]. Transactions of the Chinese Society for Agricultural Machinery, 2026, 57(12): 264-274.
[8] SHUVO M M H, ISLAM S K, CHENG J L, MORSHED B I. Efficient Acceleration of Deep Learning Inference on Resource-Constrained Edge Devices: A Review[J]. Proceedings of the IEEE, 2023, 111(1): 42-91.
[9] WANG Q, WU B, ZHU P, LI P, ZUO W, HU Q.ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 11534-11542.
[10] PONZINA F, MACHETTI S, RIOS M, et al.A Hardware/Software Co-Design Vision for Deep Learning at the Edge[J]. IEEE MICRO, 2022, 42(6): 48-54.
[11] 李方方, 雷鸣, 郭森海. MDWF-YOLO: 多尺度双路加权融合的航拍小目标检测网络[J/OL]. (2026-01-09)[2026-06-15]. https://link.cnki.net/urlid/11.2127.TP.20260709.0934.012.
LI F F, LEI M, GUO S H. MDWF-YOLO: Multi-Scale Dual-Path Weighted Fusion Network for Aerial Small Target Detection[J/OL]. (2026-01-09)[2026-06-15]. https://link.cnki.net/urlid/11.2127.TP.20260709.0934.012.
[12] WANG C Y, BOCHKOVSKIY A, LIAO H Y M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 7464-7475.
[13] SELVAM P, RAJASEKAR R, GUNASUNDARI C, et al.YOLO-DefXpert: An Advanced Defect Detection on PCB Surfaces Using Improved YOLOv11 Algorithm[J]. IEEE Access, 2025, 13: 143085-143101.
[14] LIU L S, MENG L M, LI A C, et al.PD-YOLOv11: A Power Distribution Enabled YOLOv11 Algorithm for Power Transmission Tower Component Detection in UAV Inspection[J]. Alexandria Engineering Journal, 2025(131): 312-324.
[15] YANG Y H, MIAO Z L, ZHANG H, et al.Lightweight Attention-Guided YOLO with Level Set Layer for Landslide Detection from Optical Satellite Images[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2024(17): 3543-3559.
[16] GUO M H, XU T X, LIU J J, et al.Attention Mechanisms in Computer Vision: A Survey[J]. Computational Visual Media, 2022, 8(3): 331-368.
[17] 张文杰, 韩松, 潘杨, 等. 基于改进YOLO11的锻件表面缺陷检测算法[J]. 仪表技术与传感器, 2026(6): 97-103.
ZHANG W J, HAN S, PAN Y, et al.Algorithm for Detecting Surface Defects in Forgings Based on Improved YOLO11[J]. Instrument Technique and Sensor, 2026(6): 97-103.
[18] 谭会生, 张杰, 吴文志. 改进YOLOv4-tiny 芯片表面缺陷检测算法及其硬件加速器实现[J]. 半导体技术, 2026, 51(5): 459-468.
TAN H S, ZHANG J, WU W Z.Improved YOLOv4-tiny Chip Surface Defect Detection Algorithm and Its Hardware Accelerator Implementation[J]. Semiconductor Technology, 2026, 51(5): 459-468.
[19] 徐相华, 周德靖, 余超然, 等. 基于DCA-YOLO 的受病虫害侵染树木农业无人机低空检测模型[J]. 农业机械学报, 2025, 56(10): 479-491.
XU X H, ZHOU D J, YU C R, et al.Low Altitude Detection Model of Pest and Disease Infected Trees by Agricultural UAV Based on DCA-YOLO[J]. Transactions of the Chinese Society for Agricultural Machinery, 2025, 56(10): 479-491.
[20] HNEWA M, RADHA H.Integrated Multiscale Domain Adaptive YOLO[J]. IEEE Transactions on Image Processing, 2023(32): 1857-1867.
[21] ZENG Z, TAO L K, SU R Z, et al.Residual Self-Calibrated Network with Multi-Scale Channel Attention for Accurate EOG-Based Eye Movement Classification[J]. IEEE Journal of Biomedical and Health Informatics, 2025, 29(1): 118-127.
[22] LI Y W, ZHU E, SHEN L, et al.Cross-Dimension Feature Fusion for Real-Time Object Detection[C]//Pattern Recognition and Computer Vision, PRCV 2025, PT XVI. Shanghai: Springer, 2026: 421-435.
[23] BAKIRCI M.Real-Time Vehicle Detection Using YOLOv8-Nano for Intelligent Transportation Systems[J]. Traitement Du Signal, 2024, 41(4): 1727-1740.
[24] WU J Q, ZHOU J J, ZHANG T.YOLO-SO: Small Object Detection Research Based on YOLOv5s for Crack Detection[J]. Journal of Internet Technology, 2025, 26(3): 415-422.
[25] LIN T Y, GOYAL P, GIRSHICK R, et al.Focal Loss for Dense Object Detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2): 318-327.
[26] YI H, LIU B, ZHAO B, et al.Small Object Detection Algorithm Based on Improved YOLOv8 for Remote Sensing[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2024(17): 1734-1747.
[27] YAN H, GUO H B, WEI L S, et al.A Global Feature Fusion and Adaptive Optimization Method to Enhance Detection Accuracy and Computational Efficiency Based on YOLOv8[J]. Alexandria Engineering Journal, 2025(129): 538-552.

基金

湖北省自然科学基金(2025AFB901)

PDF(2114 KB)

Accesses

Citation

Detail

段落导航
相关文章

/

〈 〉