王美华,王安邦,肖德琴,等. 改进YOLOv5s对病理学图像中猪只小肠绒毛的检测[J]. 农业工程学报,2024,40(5):207-215. DOI: 10.11975/j.issn.1002-6819.202311043
    引用本文: 王美华,王安邦,肖德琴,等. 改进YOLOv5s对病理学图像中猪只小肠绒毛的检测[J]. 农业工程学报,2024,40(5):207-215. DOI: 10.11975/j.issn.1002-6819.202311043
    WANG Meihua, WANG Anbang, XIAO Deqin, et al. Detection of small intestinal villus of pigs from pathological images using improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(5): 207-215. DOI: 10.11975/j.issn.1002-6819.202311043
    Citation: WANG Meihua, WANG Anbang, XIAO Deqin, et al. Detection of small intestinal villus of pigs from pathological images using improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(5): 207-215. DOI: 10.11975/j.issn.1002-6819.202311043

    改进YOLOv5s对病理学图像中猪只小肠绒毛的检测

    Detection of small intestinal villus of pigs from pathological images using improved YOLOv5s

    • 摘要: 为解决传统小肠绒毛需要专业人员手动检测耗时耗力且存在主观性和不稳定性等问题,同时提高在复杂病理学图像中小肠绒毛检测的准确率和效率,该研究提出基于改进YOLOv5s检测复杂病理学图像下猪只小肠绒毛的方法。首先,采用串联形式的混合池化对空间金字塔进行优化,增强特征提取与特征表达,提升检测精度;然后引入一种基于注意力机制的网络模块(simple attention mechanism, SimAM)与Bottleneck中的残差连接相结合,使用SimAM对Bottleneck中的特征图进行加权,得到加权后的特征表示,利用注意力机制加强模型对目标的感知。试验结果表明,该研究算法的平均精度(average precision)和每秒传输帧数(frame per second,FPS)达到92.43%和40帧/s。改进后的YOLOv5s在召回率和平均精度上相较改进前提高2.49和4.62个百分点,在不增加模型参数量的情况下, 每帧图片的推理时间缩短1.04 ms 。与经典的目标检测算法SSD、Faster R-CNN、YOLOv6s、YOLOX相比,平均精度分别提高15.16、10.56、2.03和4.07个百分点。结果表明,该方法能够实现病理学图像中猪只小肠绒毛自动化检测,保证复杂图像检测速度的同时,提高了小肠绒毛的检测精度。

       

      Abstract: Object detection of small intestinal villus in pathology images of pigs is of practical use in the agricultural and veterinary fields. However, manual detection cannot fully meet the large-scale production at present, due to the time-consuming, and labor-intensive task. In this study, an improved YOLOv5s model was proposed to rapidly and accurately detect the specific location of small intestinal villus in pathology images. The source of experimental data was taken as the pathology images of small intestinal villus in pigs provided by the Institute of Animal Husbandry, Guangdong Academy of Agricultural Sciences. To train the model, 64 high-resolution images of intact small intestinal villus were also collected and then cropped into 626 images with a size of 640×640. According to the ratio of 8:2, these images were divided into the training and validation sets. Firstly, the spatial pyramid was optimized in the backbone network of YOLOv5s using hybrid pooling in the form of tandem. The feature extraction and representation further improved the detection accuracy. This optimization was used to better capture the feature information at different scales. The model was trained to more accurately learn the content. Secondly, a network module called SimAM (A Simple, Parameter-Free Attention Module) was introduced to combine the attention mechanism and residual connectivity of the Bottleneck. A weighted feature representation was then obtained to weight the feature maps in Bottleneck. Thereby the model was enhanced to perceive the target. Compared with the traditional attention module, the SimAM module featured simplicity without the parameter tuning, leading to a more efficient model and easy to implement. The spatial pyramid and the attention mechanism after improvement were better utilized to enhance the detection performance of small intestinal villus in pigs. This improved approach reduced the model parameters and computation with the high detection accuracy, indicating a more lightweight and efficient model. The enhancing ability to perceive the target was used to more accurately locate and identify small intestinal villus in pathology images. More reliable tools and support were provided in the agricultural and veterinary fields. According to the experimental results, the improved model achieved significant performance in detecting the small intestinal villus in pathology images of pigs. The average precision value reached 92.43%, while the detection speed was 40 frames per second. Compared with the original YOLOv5s model, the improved model reduced the inference time by 1.04 ms per frame without increasing the number of parameters. Also, the average precision was improved by 4.62 percentage points. Compared with other common target detection models, significant advantages were found in the detection accuracy, detection speed, and the number of model parameters. There were significant improvements in both speed and accuracy. The network structure was optimized to introduce an attention mechanism, in order to more accurately detect the small bowel villus in pathology images with the higher detection speed. In addition, the improved model was also more efficient and feasible for practical applications, in terms of the number of parameters.

       

    /

    返回文章
    返回