Abstract

The timely and accurate identification of syringe defects plays a key role in effectively improving product quality in production lines of syringes. In this article, we collected a dataset of image samples representing five common types of syringe defects found on the production line. The dataset comprises over 5000 images, with an average of three different syringe defects per image. Based on this dataset, we designed a syringe defect detection model based on an improved You Only Look Once Version 7 (YOLOv7)-Tiny proposed in this paper. The model combines the Res-PAN structure, the ACmix mixed attention mechanism, the FReLU activation function, and the SIoU loss function. The comparative experiments are conducted on the self-built dataset SYR-Dat to evaluate the performance of the proposed syringe defect detection model. The average precision of the model reaches 94.1%. To ensure the effectiveness of the model, it is compared with other models, including SSD300, Faster R-CNN, EfficientDet, RetinaNet, YOLOv5s, YOLOv6, and YOLOv7. The results demonstrate that the proposed improved YOLOv7-Tiny model can better capture the features of syringe defects. Furthermore, the generalization of the improved YOLOv7-Tiny model is validated on the VOC2012 dataset. The results indicate that the improved model continues to outperform the baseline models. The proposed syringe defect detection model shows promising application prospects, as it can reduce the rate of defective products and improve product quality.

References

1.
Zou
,
Z.
,
Chen
,
K.
,
Shi
,
Z.
,
Guo
,
Y.
, and
Ye
,
J.
,
2023
, “
Object Detection in 20 Years: A Survey
,”
Proceedings of the IEEE
,
111
(
3
), pp.
257
276
.10.1109/JPROC.2023.3238524
2.
Park
,
C.
,
Choi
,
S.
, and
Won
,
S.
,
2010
, “
Vision-Based Inspection for Periodic Defects in Steel Wire Rod Production
,”
Opt. Eng.
,
49
(
1
), pp.
017202
017210
.10.1117/1.3284779
3.
Jeon
,
Y.-J.
,
Choi
,
D.-C.
,
Lee
,
S. J.
,
Yun
,
J. P.
, and
Kim
,
S. W.
,
2014
, “
Defect Detection for Corner Cracks in Steel Billets Using a Wavelet Reconstruction Method
,”
JOSA A
,
31
(
2
), pp.
227
237
.10.1364/JOSAA.31.000227
4.
Jia
,
H.
,
Murphey
,
Y. L.
,
Shi
,
J.
, and
Chang
,
T.-S.
,
2004
, “
An Intelligent Real-Time Vision System for Surface Defect Detection
,”
Proceedings of the 17th International Conference on Pattern Recognition, ICPR 2004
, Cambridge, UK, Aug. 26–26
, pp.
239
242
.10.1109/ICPR.2004.1334512
5.
Yuan
,
X.-C.
,
Wu
,
L.-S.
, and
Peng
,
Q.
,
2015
, “
An Improved Otsu Method Using the Weighted Object Variance for Defect Detection
,”
Appl. Surf. Sci.
,
349
, pp.
472
484
.10.1016/j.apsusc.2015.05.033
6.
Chu
,
M.
,
Gong
,
R.
,
Gao
,
S.
, and
Zhao
,
J.
,
2017
, “
Steel Surface Defects Recognition Based on Multi-Type Statistical Features and Enhanced Twin Support Vector Machine
,”
Chemom. Intell. Lab. Syst.
,
171
, pp.
140
150
.10.1016/j.chemolab.2017.10.020
7.
Simonyan
,
K.
, and
Zisserman
,
A.
,
2014
, “
Very Deep Convolutional Networks for Large-Scale Image Recognition
,” preprint arXiv:1409.1556.https://www.researchgate.net/publication/265385906_Very_Deep_Convolutional_Networks_for_Large-Scale_Image_Recognition
8.
Krizhevsky
,
A.
,
Sutskever
,
I.
, and
Hinton
,
G. E.
,
2017
, “
Imagenet Classification With Deep Convolutional Neural Networks
,”
Commun. ACM
,
60
(
6
), pp.
84
90
.10.1145/3065386
9.
He
,
K.
,
Zhang
,
X.
,
Ren
,
S.
, and
Sun
,
J.
,
2016
, “
Deep Residual Learning for Image Recognition
,”
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, Las Vegas, NV, June 27–30, pp.
770
778
.10.1109/CVPR.2016.90
10.
Ren
,
S.
,
He
,
K.
,
Girshick
,
R.
, and
Sun
,
J.
,
2016
, “
Faster R-CNN: Towards Real-Time Object Detection With Region Proposal Networks
,”
IEEE Transactions on Pattern Analysis and Machine Intelligence
, 39(6), pp.
1137
1149
.10.1109/TPAMI.2016.2577031
11.
He
,
K.
,
Gkioxari
,
G.
,
Dollár
,
P.
, and
Girshick
,
R.
,
2017
, “
Mask R-CNN
,”
Proceedings of the IEEE International Conference on Computer Vision
, Venice, Italy, Oct. 22–29, pp.
2961
2969
.10.1109/ICCV.2017.322
12.
Girshick
,
R.
,
Donahue
,
J.
,
Darrell
,
T.
, and
Malik
,
J.
,
2014
, “
Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation
,”
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, Columbus, OH, June 23–28, pp.
580
587
.10.1109/CVPR.2014.81
13.
Girshick
,
R.
,
2015
, “
Fast R-CNN
,”
Proceedings of the IEEE International Conference on Computer Vision
, Santiago, Chile, Dec. 7–13, pp.
1440
1448
.10.1109/ICCV.2015.169
14.
Redmon
,
J.
, and
Farhadi
,
A.
,
2018
, “
YOLOv3: An Incremental Improvement
,” preprint
arXiv:1804.02767
.10.48550/arXiv.1804.02767
15.
Redmon
,
J.
, and
Farhadi
,
A.
,
2017
, “
YOLO9000: Better, Faster, Stronger
,”
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, Honolulu, HI, July 21–26, pp.
7263
7271
.10.1109/CVPR.2017.690
16.
Redmon
,
J.
,
Divvala
,
S.
,
Girshick
,
R.
, and
Farhadi
,
A.
,
2016
, “
You Only Look Once: Unified, Real-Time Object Detection
,”
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, Las Vegas, NV, June 27–30, pp.
779
788
.10.1109/CVPR.2016.91
17.
Bochkovskiy
,
A.
,
Wang
,
C.-Y.
, and
Liao
,
H.-Y. M.
,
2020
, “
YOLOv4: Optimal Speed and Accuracy of Object Detection
,” preprint arXiv:2004.10934.10.48550/arXiv.2004.10934
18.
Wang
,
C.-Y.
,
Bochkovskiy
,
A.
, and
Liao
,
H.-Y. M.
,
2023
, “
YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors
,”
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition
, Vancouver, BC, Canada, June 17–24, pp.
7464
7475
.10.1109/CVPR52729.2023.00721
19.
Chen
,
H.
,
Lin
,
H.
,
Xu
,
Q.
,
Li
,
Y.
,
Zheng
,
Y.
,
Fei
,
J.
,
Yang
,
K.
,
Fan
,
W.
, and
Nie
,
Z.
,
2024
, “
Cross-Domain Transfer Learning for Galvanized Steel Strips Defect Detection and Recognition
,”
ASME J. Comput. Inf. Sci. Eng.
,
24
(
1
), p.
011006
.10.1115/1.4063102
20.
Hao
,
R.
,
Lu
,
B.
,
Cheng
,
Y.
,
Li
,
X.
, and
Huang
,
B.
,
2021
, “
A Steel Surface Defect Inspection Approach Towards Smart Industrial Monitoring
,”
J. Intell. Manuf.
,
32
(
7
), pp.
1833
1843
.10.1007/s10845-020-01670-2
21.
Cheon
,
S.
,
Lee
,
H.
,
Kim
,
C. O.
, and
Lee
,
S. H.
,
2019
, “
Convolutional Neural Network for Wafer Surface Defect Classification and the Detection of Unknown Defect Class
,”
IEEE Trans. Semicond. Manuf.
,
32
(
2
), pp.
163
170
.10.1109/TSM.2019.2902657
22.
Karangwa
,
J.
,
Kong
,
L.
,
Yi
,
D.
, and
Zheng
,
J.
,
2021
, “
Automatic Optical Inspection Platform for Real-Time Surface Defects Detection on Plane Optical Components Based on Semantic Segmentation
,”
Appl. Opt.
,
60
(
19
), pp.
5496
5506
.10.1364/AO.424547
23.
Tabernik
,
D.
,
Šela
,
S.
,
Skvarč
,
J.
, and
Skočaj
,
D.
,
2020
, “
Segmentation-Based Deep-Learning Approach for Surface-Defect Detection
,”
J. Intell. Manuf.
,
31
(
3
), pp.
759
776
.10.1007/s10845-019-01476-x
24.
Zavrtanik
,
V.
,
Kristan
,
M.
, and
Skočaj
,
D.
,
2021
, “
Draem - A Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection
,”
Proceedings of the IEEE/CVF International Conference on Computer Vision
, Montreal, QC, Canada, Oct. 10–17, pp.
8330
8339
.10.1109/ICCV48922.2021.00822
25.
Wei
,
B.
,
Hao
,
K.
,
Tang
,
X.-S.
, and
Ren
,
L.
,
2019
, “
Fabric Defect Detection Based on Faster RCNN
,”
Artificial Intelligence on Fashion and Textiles: Proceedings of the Artificial Intelligence on Fashion and Textiles (AIFT) Conference
, Hong Kong, July 3–6,
pp.
45
51
.10.1007/978-3-319-99695-0_6
26.
Jeyaraj
,
P. R.
, and
Nadar
,
E. R. S.
,
2020
, “
Effective Textile Quality Processing and an Accurate Inspection System Using the Advanced Deep Learning Technique
,”
Textile Res. J.
,
90
(
9–10
), pp.
971
980
.10.1177/0040517519884124
27.
Xu
,
X.
,
Zhang
,
X.
, and
Zhang
,
T.
,
2022
, “
Lite-YOLOv5: A Lightweight Deep Learning Detector for on-Board Ship Detection in Large-Scene Sentinel-1 Sar Images
,”
Remote Sensing
,
14
(
4
), p.
1018
.10.3390/rs14041018
28.
Han
,
X.
,
Ren
,
H.
,
Qi
,
J.
, and
Ben-Tzvi
,
P.
,
2023
, “
Autonomous Cricothyroid Membrane Detection and Manipulation Using Neural Networks and a Robot Arm for First-Aid Airway Management
,”
ASME J. Med. Dev.
,
17
(
1
), p.
014502
.10.1115/1.4056505
29.
Everingham
,
M.
,
Eslami
,
S. A.
,
Van Gool
,
L.
,
Williams
,
C. K.
,
Winn
,
J.
, and
Zisserman
,
A.
,
2015
, “
The Pascal Visual Object Classes Challenge: A Retrospective
,”
Int. J. Comput. Vision
,
111
(
1
), pp.
98
136
.10.1007/s11263-014-0733-5
30.
Tan
,
M.
,
Pang
,
R.
, and
Le
,
Q. V.
,
2020
, “
Efficientdet: Scalable and Efficient Object Detection
,”
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition
, Seattle, WA, June 13–19, pp.
10781
10790
.10.1109/CVPR42600.2020.01079
31.
Schuster
,
R.
,
Battrawy
,
R.
,
Wasenmüller
,
O.
, and
Stricker
,
D.
,
2021
, “
ResFPN: Residual Skip Connections in Multi-Resolution Feature Pyramid Networks for Accurate Dense Pixel Matching
,”
2020 25th International Conference on Pattern Recognition
(
ICPR
), Milan, Italy, Jan. 10–15
, pp.
180
187
.10.1109/ICPR48806.2021.9412750
32.
Pan
,
X.
,
Ge
,
C.
,
Lu
,
R.
,
Song
,
S.
,
Chen
,
G.
,
Huang
,
Z.
, and
Huang
,
G.
,
2022
, “
On the Integration of Self-Attention and Convolution
,”
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition
, New Orleans, LA, June 18–24, pp.
815
825
.10.1109/CVPR52688.2022.00089
33.
Ma
,
N.
,
Zhang
,
X.
, and
Sun
,
J.
,
2020
, “
Funnel Activation for Visual Recognition
,”
Computer Vision–ECCV 2020: 16th European Conference
,
Glasgow, UK
, Aug. 23–28,
pp.
351
368
.10.1007/978-3-030-58621-8_21
34.
Li
,
C.
,
Li
,
L.
,
Jiang
,
H.
,
Weng
,
K.
,
Geng
,
Y.
,
Li
,
L.
,
Ke
,
Z.
,
Li
,
Q.
,
Cheng
,
M.
, and
Nie
,
W.
,
2022
, “
YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications
,” preprint arXiv:2209.02976.10.48550/arXiv.2209.02976
35.
Liu
,
W.
,
Anguelov
,
D.
,
Erhan
,
D.
,
Szegedy
,
C.
,
Reed
,
S.
,
Fu
,
C.-Y.
, and
Berg
,
A. C.
,
2016
, “
SSD: Single Shot Multibox Detector
,”
Computer Vision–ECCV 2016, 14th European Conference
,
Amsterdam, The Netherlands
, Oct. 11–14,
pp.
21
37
.10.1007/978-3-319-46448-0_2
36.
Lin
,
T.-Y.
,
Goyal
,
P.
,
Girshick
,
R.
,
He
,
K.
, and
Dollár
,
P.
,
2017
, “
Focal Loss for Dense Object Detection
,”
Proceedings of the IEEE International Conference on Computer Vision
, Venice, Italy, Oct. 22–29, pp.
2980
2988
.10.1109/TPAMI.2018.2858826
You do not currently have access to this content.