Abstract:
Objective To propose an individual cow recognition method based on the improved Mask R-CNN algorithm, and solve the problem of low efficiency and strong subjectivity of artificially identifying individual cows in traditional dairy farming.
Method This method optimizes the feature extraction network structure in Mask R-CNN, adopts ResNet-50 network embedded in SE block as backbone, and selects image channels by weighting strategy to improve feature utilization. For the problem of inaccurate target edge positioning during instance segmentation, a boundary weighted loss function is added to construct a new Mask loss function to improve the accuracy of boundary detection. A total of 3000 cow images are trained, validated and tested.
Result The improved Mask R-CNN model had an average precision (AP) of 100% and IoUMask of 91.34%. Compared with the original Mask R-CNN model, AP increased by 3.28% and IoUMask increased by 5.92%.
Conclusion The proposed method has strong segmentation accuracy and robustness, and can provide a reference for accurate recognition of cow images under complex farming environment.