Detection of small intestinal villus of pigs from pathological images using improved YOLOv5s
-
-
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.
-
-