Аңдатпа
Background: Poultry farming is essential for food security, but traditional disease detection is inefficient, making AI-driven CNN models a powerful solution for accurate and automated diagnosis. Aims: This study aims to develop and evaluate an enhanced deep learning-based framework for the automated classification of poultry diseases using fecal images to address the limitations of traditional manual inspection. Study Design: The research utilizes a comparative experimental design, evaluating two distinct deep learning architectures; ResNet50 and Vision Transformer (ViT) on a multiclass dataset. Methodology: A dataset of 8,067 annotated fecal images representing four classes (Coccidiosis, Healthy, Newcastle Disease, and Salmonella) was partitioned using a stratified 80/20 split. Both models were initialized with pretrained ImageNet weights and subjected to selective fine-tuning (unfreezing the last two layers of ResNet50 and the last two encoder blocks of ViT) alongside data augmentation and 5-fold cross-validation. Results: The Vision Transformer (ViT) outperformed the ResNet50 model, achieving a state-of-the-art accuracy of 96.16% and a macro F1-score of 0.96, compared to 94.49% accuracy and a 0.94 F1-score for ResNet50. Notably, ViT showed superior performance in detecting Newcastle Disease (NCD), increasing recall to 0.91, a 6% improvement over ResNet50. Conclusion: The results demonstrate that while traditional CNNs like ResNet50 provide strong baselines, transformer-based architectures excel at capturing global contextual relationships, making them more robust for accurate real-time poultry disease diagnostics. Our code is available on https://github.com/NedumCares/Chicken-Disease-Prediction.