With the intelligent development of animal husbandry, computer-vision-based individual cattle recognition is playing an increasingly important role in modern cattle farming. However, in practical applications, the rapid changes in the angles of cattle faces, frequent fluctuations in the number of cattle, and limitations in model recognition speed severely affect the accuracy and efficiency of recognition. To address these challenges, an individual recognition method for Simmental cattle was proposed based on improved YOLO v8 keypoint detection. The method consisted of two stages: in the cattle face detection stage, the improved YOLO v8 model automatically detected keypoints in cattle face images and performed correction alignment and background cropping to make the angles of the cattle face images more consistent. In the cattle face recognition stage, depthwise separable convolution was firstly introduced to reduce the number of parameters, and then residual connections and attention mechanisms were utilized to enhance the model's feature extraction capabilities, thereby improving recognition accuracy and speed. To validate the effectiveness of the method, a dataset of cattle face images containing 159 Simmental cattle was constructed. Experimental results showed that the proposed model had significant improvements in the number of parameters and inference speed, with processing time for a single image reduced to within 39 ms and a recognition accuracy of 95.8%, an average improvement of 4.8 percentage points compared with that of other models. Additionally, the proposed method supported real-time updates to the cattle database, maintaining high accuracy even after adding new cattle face images.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |