The traditional manual methods for measuring Mongolian horse body parameters are not very safe, have low levels of automation, and cannot effectively ensure animal welfare. This research proposes a method for extracting target Mongolian horse body parameters based on deep learning and machine vision technology. Firstly, Swin Transformer is used as the backbone feature extraction network of Mask R-CNN model, and the CNN-based differentiated feature clustering model is added to minimize the loss of similarity and spatial continuity between pixels, thereby improving the robustness of the model while reducing error pixels and optimizing the rough mask boundary output. Secondly, an improved Harris algorithm and a polynomial fitting method based on contour curves are applied to determine the positions of various measurement points on the horse mask and calculate various body parameters. The accuracy of the proposed method was tested using 20 Mongolian horses. The experimental results show that compared with the original Mask R-CNN network, the PA (pixel accuracy) and MIoU (mean intersection over union) of the optimized model results increased from 91.46% and 84.72% to 98.72% and 95.36%, respectively. The average relative errors of shoulder height, withers height, chest depth, body length, croup height, shoulder angle, and croup angle were 4.01%, 2.98%, 4.86%, 2.97%, 3.06%, 4.91%, and 5.21%, respectively. The research results can provide technical support for assessing body parameters related to the performance of horses under natural conditions, which is of great significance for improving the refinement and welfare of Mongolian horse breeding techniques.
Read full abstract