<p>Accurate sheep breed classification is critical for modern livestock management, supporting decisions on breeding, productivity, and profitability in the farming industry. Traditional methods based on visual inspection or body measurements are often subjective, time-consuming, and unsuitable for large-scale operations. To address these challenges, this study proposes SheepFormers, a Vision Transformer (ViT)-based framework for automatic sheep breed identification, specifically designed to operate effectively even with small datasets. A balanced dataset of 1,680 sheep face images representing four breeds was preprocessed and used to evaluate multiple transformer variants, including ViT-Google, ViT-MAE, ViT-VAN, BEiT, ViT-ResNet50, and DiT. Through systematic hyperparameter optimization and ablation studies covering epochs, batch size, learning rate, positional encoding, patch size, data augmentation, and 5-fold cross-validation, the ViT-Google model achieved the best performance with 98.21% validation accuracy and an Area Under the Curve (AUC) of 0.9987, outperforming both traditional CNN architectures and ensemble baselines reported in previous studies. Despite these strong results, the study is limited by the relatively small dataset size and controlled image acquisition conditions, which may affect generalization under diverse real-world farm environments. To ensure practical applicability, the trained model was deployed into a user-friendly mobile application, enabling farmers, buyers, and sellers to classify breeds in real time. These findings demonstrate that Vision Transformers can achieve state-of-the-art performance even with limited agricultural datasets, marking a significant advancement in smart farming technologies and precision livestock management.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

SheepFormers: vision transformer-based sheep breed classification on small datasets for smart farming

  • Galib Muhammad Shahriar Himel,
  • Md. Masudul Islam,
  • Mijanur Rahaman

摘要

Accurate sheep breed classification is critical for modern livestock management, supporting decisions on breeding, productivity, and profitability in the farming industry. Traditional methods based on visual inspection or body measurements are often subjective, time-consuming, and unsuitable for large-scale operations. To address these challenges, this study proposes SheepFormers, a Vision Transformer (ViT)-based framework for automatic sheep breed identification, specifically designed to operate effectively even with small datasets. A balanced dataset of 1,680 sheep face images representing four breeds was preprocessed and used to evaluate multiple transformer variants, including ViT-Google, ViT-MAE, ViT-VAN, BEiT, ViT-ResNet50, and DiT. Through systematic hyperparameter optimization and ablation studies covering epochs, batch size, learning rate, positional encoding, patch size, data augmentation, and 5-fold cross-validation, the ViT-Google model achieved the best performance with 98.21% validation accuracy and an Area Under the Curve (AUC) of 0.9987, outperforming both traditional CNN architectures and ensemble baselines reported in previous studies. Despite these strong results, the study is limited by the relatively small dataset size and controlled image acquisition conditions, which may affect generalization under diverse real-world farm environments. To ensure practical applicability, the trained model was deployed into a user-friendly mobile application, enabling farmers, buyers, and sellers to classify breeds in real time. These findings demonstrate that Vision Transformers can achieve state-of-the-art performance even with limited agricultural datasets, marking a significant advancement in smart farming technologies and precision livestock management.