Lung nodule detection based on the improved YOLOv7 model
10.3760/cma.j.cn121382-20231009-00607
- VernacularTitle:基于改进YOLOv7模型的肺结节检测
- Author:
Dongsheng YIN
1
;
Lingyan DU
;
Xiaoru XU
Author Information
1. 四川轻化工大学自动化与信息工程学院,自贡 643000
- Keywords:
Pulmonary nodules;
YOLOv7 model;
CARAFE operator;
Enhanced small-scale detection layer;
Multi-head self-attention machanism
- From:
International Journal of Biomedical Engineering
2023;46(6):521-528
- CountryChina
- Language:Chinese
-
Abstract:
Objective:To design a lung nodule detection algorithm based on the improved YOLOv7 model.Methods:Firstly, in the PAFPN structure, a lightweight upsampling operator CARAFE is introduced to improve the lung nodule detection accuracy. Then an enhanced small-scale detection layer is added to enhance the detection performance for small-target lung nodules, while the number of trained parameters can be reduced and the model complexity can be lowered. An enhanced small-scale detection layer is added to the YOLOv5 model algorithm while comparing it with the original YOLOv5 model algorithm, the original YOLOv7 model algorithm, and the improved YOLOv7 model algorithm in terms of the total loss of the training set of the improvement points, while ensuring that the parameter indexes remain unchanged. The original YOLOv7 model algorithm and the improved YOLOv7 model algorithm are used to process the 2 test set images and compare them with other classical lung nodule detection algorithms Mask R-CNN, YOLOv3, YOLOv5s and YOLOv7.Results:Compared with the original YOLOv5 model algorithm, the improved YOLOv5 model algorithm with the addition of an enhanced small-scale detection layer has a 1.3% increase in precision, a 3.5% increase in recall, a 3.1% increase in mean average precision (mAP), a 25.3% decrease in parameters amount, and a decrease in the complexity of the network; whereas the improved YOLOv7 model algorithm has a 1.8% increase in mAP, a 28.3% decrease in parameters amount, and the model complexity decreased by 5 G. Adding the enhanced small-scale detection layer with replacement of the special diagnostic fusion network as a lightweight up-sampling operator CARAFE algorithm can minimize the total loss of the model during the training process. The original YOLOv7 model algorithm is more accurate but still has missed detections and false positives. When reasoning about image 1, the original YOLOv7 model has a missed detection. And when reasoning about image 2, the original YOLOv7 model has a false positive. The improved YOLOv7 model is well improved in both missed detection and false positives. Compared with the classical model algorithm, the precision, recall, and mAP of the improved YOLOv7 model algorithm were 91.7%, 89.1%, and 93.5%, respectively.Conclusions:The improved YOLOv7 model has stronger feature expression ability and uses fewer parameters, which can effectively improve the detection precision of lung nodules.