RTDETR-Refa: a real-time detection method for multi-breed classification of cattle

Journal of Real-Time Image Processing, Jan 2025

In the farming industry, to cope with problems such as complex pasture environments and dense targets, which lead to increased difficulty in recognising and thus quickly classifying and automatically identifying cattle breeds to improve accuracy. In this paper, an RTDETR-Refa (RepConv Efficient Faster Attention) algorithm based on ResNet18 backbone network is proposed for cattle breed classification and identification. First, new improvements are made to the ResNet18 backbone network: the Faster-Block module is introduced to improve the feature extraction network and increase the computational speed without sacrificing the accuracy; the 1 $$\times$$ 1 convolution in the Faster-Block module is replaced by a 3 $$\times$$ 3 convolution using the RepConv reparameterised with the RepVGG block, which makes the algorithm more lightweight and improves the inference speed. Second, in order to enhance the feature transformation and classification, the Efficient Multiscale Attention (EMA) module is added after the Faster-Block module at different stages. Finally, the above improved Faster-Block module is used to replace the 4-layer BasicBlock after the 3 convolutional layers in the backbone network of ResNet18. The training test results of the RTDETR-Refa algorithm are compared with other classical models to validate the superiority of the RTDETR-Refa algorithm. The average accuracy of the RTDETR-Refa algorithm on the bovine The average accuracy of RTDETR-Refa algorithm on the classification training set is 91.6%, which is 0.8% higher than the original model and 0.9–5.2% higher than other classical models. The experimental results show that the RTDETR-Refa model proposed in this paper is able to identify and classify different breeds of cattle while guaranteeing similar detection speed, which proves the feasibility of convolutional neural networks in breed identification and classification.

Article PDF cannot be displayed. You can download it here:

https://link.springer.com/content/pdf/10.1007/s11554-024-01613-7.pdf

RTDETR-Refa: a real-time detection method for multi-breed classification of cattle

Journal of Real-Time Image Processing (2025) 22:38 https://doi.org/10.1007/s11554-024-01613-7 RESEARCH RTDETR‑Refa: a real‑time detection method for multi‑breed classification of cattle Bingxuan Li1,2,3 · Jiandong Fang1,2,3 · Yvdong Zhao2,3 Received: 14 June 2024 / Accepted: 17 December 2024 © The Author(s) 2025 Abstract In the farming industry, to cope with problems such as complex pasture environments and dense targets, which lead to increased difficulty in recognising and thus quickly classifying and automatically identifying cattle breeds to improve accuracy. In this paper, an RTDETR-Refa (RepConv Efficient Faster Attention) algorithm based on ResNet18 backbone network is proposed for cattle breed classification and identification. First, new improvements are made to the ResNet18 backbone network: the Faster-Block module is introduced to improve the feature extraction network and increase the computational speed without sacrificing the accuracy; the 1×1 convolution in the Faster-Block module is replaced by a 3×3 convolution using the RepConv reparameterised with the RepVGG block, which makes the algorithm more lightweight and improves the inference speed. Second, in order to enhance the feature transformation and classification, the Efficient Multiscale Attention (EMA) module is added after the Faster-Block module at different stages. Finally, the above improved Faster-Block module is used to replace the 4-layer BasicBlock after the 3 convolutional layers in the backbone network of ResNet18. The training test results of the RTDETR-Refa algorithm are compared with other classical models to validate the superiority of the RTDETR-Refa algorithm. The average accuracy of the RTDETR-Refa algorithm on the bovine The average accuracy of RTDETR-Refa algorithm on the classification training set is 91.6%, which is 0.8% higher than the original model and 0.9–5.2% higher than other classical models. The experimental results show that the RTDETR-Refa model proposed in this paper is able to identify and classify different breeds of cattle while guaranteeing similar detection speed, which proves the feasibility of convolutional neural networks in breed identification and classification. Keywords RT-DETR classification model · Classification of varieties · Toolkit for Identifying Detection and segmentation Errors(TIDE) · Practical Scenario Application 1 Introduction * Jiandong Fang Bingxuan Li Yvdong Zhao 1 College of Information Engineering, Inner Mongolia University of Technology, Hohhot 010080, Inner Mongolia, China 2 Inner Mongolia Key Laboratory of Perceptive Technology and Intelligent Systems, Hohhot 010080, Inner Mongolia, China 3 Inner Mongolia Synergy Innovation Center of Perception Technology in Intelligent Agriculture and Animal Husbandry, Hohhot 010080, Inner Mongolia, China In the cattle breeding industry, as different breeds of cattle produce different values, the accurate identification of cattle classification and numbers in unrestricted environments can, to a certain extent, realise individualised and refined management [1], and can also effectively solve the problems of slowness, low accuracy, and subjectivity when manually determining cattle breeds [2]. Some studies [3–6] have pointed out that the multiple behavioural postures of cattle (lying, ruminating, crawling and straddling, etc.) lead to an increase in the difficulty of recognition, and the problems of multiple types and scales of target cattle within a single picture, easy to stick when the recognition targets are dense, and the existence of non-targets in the recognition map also exist in the real environment. Therefore, not only is there a high demand for recognition accuracy, but also the problems Vol.:(0123456789) 38 Page 2 of 16 of target sticking and non-target misrecognition occurring in practical applications need to be solved urgently. In order to solve the current technical problems, deep learning counting techniques can be used instead of human vision for classification detection and recognition of cattle images. At the same time, these image recognition-based methods also have high requirements for image quality and lighting conditions, which may be limited in practical applications [7, 8]. Therefore, a more accurate, cost-effective, and intelligent method for cattle breed classification and detection is now needed [9, 10]. Duraiswami et al [11] suggested the use of different cattle picture datasets to identify cattle breeds. Photographs will be taken of the front, back and side of the cattle to extract key features and these feature extraction will be used to uniquely identify each cow. After image preprocessing, the image of each cow will be categorised by breed. Based on the preprocessed cattle breed image dataset, another category of rare cattle breeds will be identified. Yılmaz et al [12] aimed to evaluate the performance of cattle detection and breed classification based on specific regions on cattle that vary by breed. In order to demonstrate the effectiveness of the proposed cattle detection and classification technique, a customised dataset was created using images collected from the Google image library. The experimental results show that the YOLO algorithm is successful in cattle image detection and breed classification with an accuracy of 92.85%. Manoj et al [13] In order to identify cattle breeds, it is proposed to use several cattle image datasets for identification. Images of cattle will be taken to obtain salient features of their front, back and flanks and then these features will be extracted to identify each cattle and its information. Rare breed of cattle will be individually classified using preprocessed cattle breed image dataset. CNN deep learning method is used for recognising different shapes of face and whole body of the cattle using CNN deep learning method. Gupta et al [14] proposed a computer vision based approach to identify cattle breeds. They customised a dataset using web mining techniques and evaluated the performance of the YOLOv4 algorithm by training the model on different sets of training parameters. A comprehensive analysis of the experimental results shows that the proposed method achieves 81.07% accuracy on the test dataset. Chen et al. [15] proposed a system for image segmentation and recognition of Angus cattle using a deep learning approach. Two databases of cattle were first collected and annotated, one was a frontal image taken on the same day in a laboratory setting with controlled lighting and pose. The second database was taken on a farm on three different days using natural light and background. The entire body of the cow was photographed from different angles. Multiple design alternatives for cattle recognition were evaluated using three popular networks PrimNet, VGG16 and Journal of Real-Time Image Processing (2025) 22:38 ResNet50, with the VGG85 network achieving an accuracy of 45.16%. Shanthakumari et al [16] A high-pre (...truncated)


This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007/s11554-024-01613-7.pdf
Article home page: https://link.springer.com/article/10.1007/s11554-024-01613-7

Li, Bingxuan, Fang, Jiandong, Zhao, Yvdong. RTDETR-Refa: a real-time detection method for multi-breed classification of cattle, Journal of Real-Time Image Processing, 2025, pp. 1-16, Volume 22, Issue 1, DOI: 10.1007/s11554-024-01613-7