Improved ResNet-50 deep learning algorithm for identifying chicken gender

Dihua Wu,Yibin Ying,Mingchuan Zhou,Jinming Pan,Di Cui
DOI: https://doi.org/10.1016/j.compag.2023.107622
IF: 8.3
2023-01-08
Computers and Electronics in Agriculture
Abstract:Accurate identification of chicken gender helps farms to optimize breeding sex ratios and programs. A chicken gender identification method based on an improved ResNet-50 deep learning algorithm was proposed in this study. The Squeeze-and-Excitation ( SE ) attention was introduced to improve the residual units of ResNet-50, and the Swish function and Ranger optimizer were combined for ensuring feature learning and training effectiveness to further enhance the model performance. A public dataset acquired from a commercial farm was used to train and test the algorithm, which has a total of 960 images of chickens with different genders, scenes, and behaviors. The ablation tests were performed to verify the contribution of the SE module, Swish, and Ranger optimizer to the algorithm. The deep features of the proposed algorithm were visualized with heat maps to show the contribution of different body parts to gender identification. Moreover, the algorithm was compared with five typical recognition algorithms including AlexNet, GoogleNet, VGG-16, ResNet-18, and DenseNet-201, as well as four state-of-the-art (SOTA) animal gender identification methods. The results showed that the ranger optimizer, Swish activation function, and SE attention improved the accuracy of gender recognition by 0.14%, 0.35%, and 1.81%, and the heat maps indicated that the head and tail contributed more to gender recognition. More specifically, the algorithm achieved better overall performance than the five algorithms and four gender identification methods with the Accuracy , Precision , Recall, F 1 , and Inference time of 98.42%, 97.92%, 98.95%, 98.43%, and 4.79 ms, respectively. Furthermore, tests on the private dataset collected in a real chicken farm by the poultry house inspection robot revealed that the algorithm could identify chicken gender well, and initially reflected that it was feasible to develop a gender recognition function on an inspection robot. The code and dataset of this study will be released on GitHub ( https://github.com/PuristWu/Identifying-gender ) as soon as the study is published, and new data would be updated as well in the future.
agriculture, multidisciplinary,computer science, interdisciplinary applications
What problem does this paper attempt to address?