• Spectroscopy and Spectral Analysis
  • Vol. 43, Issue 1, 280 (2023)
ZHANG Qian1, YANG Ying1, LIU Gang1、2、3, WU Xiao1, and NING Yuan-lin1
Author Affiliations
  • 1[in Chinese]
  • 2[in Chinese]
  • 3[in Chinese]
  • show less
    DOI: 10.3964/j.issn.1000-0593(2023)01-0280-09 Cite this Article
    ZHANG Qian, YANG Ying, LIU Gang, WU Xiao, NING Yuan-lin. Detection of Dairy Cow Mastitis From Thermal Images by Data Enhancement and Improved ResNet34[J]. Spectroscopy and Spectral Analysis, 2023, 43(1): 280 Copy Citation Text show less

    Abstract

    Mastitis is one of the most serious diseases in dairy production and breeding. The early detection of cow mastitis can provide the basis for follow-up treatment to improve the efficiency of disease treatment and reduce the risk of breeding. In order to realize fast and high-precision “one-step” mastitis disease detection for naturally walking dairy cows, a dairy cow mastitis disease detection method based on the thermal infrared image, data enhancement and improved ResNet34 is proposed in this paper. Compared with the existing “multi-step” dairy cow infrared image mastitis detection method, this method does not need the positioning of key parts of dairy cows, such as breast and eyes and temperature extraction, which can effectively avoid the error accumulation caused by “multi-step”, to achieve more efficient mastitis detection. Firstly, this method horizontally splices the local pictures containing the key parts of the cow into an overall picture with complete information and expands the training samples combined with the RandAugment data enhancement method; Secondly, the ResNet34 residual network is used as the basic network of the experiment, and the model is improved as follows according to the characteristics of thermal infrared image: (1) simplify the redundant internal layer of the network to make the model lighter; (2) Auxiliary classifiersare added in the middle layer to make up for the feature loss caused by model simplification; (3) The improved multi fusion pool layer is used to replace the original single pool layer, which makes the content of feature extraction richer. Finally, 3 298 thermal infrared images (66 cows) were randomly selected as the experimental objects, and multiple groups of comparative experiments were set. The results showed that compared with the traditional ResNet34, the classification accuracy of the improved ResNet34 model was improved by 3.4%, the model verification accuracy based on the improved ResNet34 combined with transfer learning and data enhancement was 90.3%, the test accuracy was 88.4%, and the classification time was only 3.39×10-3 seconds. In addition, to ensure theindependence of the experimental data set, this paper further divides it into the training set, verification set and test set according to the number of dairy cows in 3∶1∶1. The test accuracy of the model was 80.3%, which proves that the proposed model has good robustness. According to the test results, it is calculated that the precision rate, recall rate and F1 score of the model are 91.2%, 91.6% and 91.4%. Compared with previous experiments, the accuracy is improved by 5.1% and the specificity is improved by 5.3%. In conclusion, this research method can provide a reference for screening and medical diagnosis of breast diseases in early dairy cows.
    ZHANG Qian, YANG Ying, LIU Gang, WU Xiao, NING Yuan-lin. Detection of Dairy Cow Mastitis From Thermal Images by Data Enhancement and Improved ResNet34[J]. Spectroscopy and Spectral Analysis, 2023, 43(1): 280
    Download Citation