BarnSeg-ECA-Lite: A Lightweight Instance Segmentation Model for Feed, Buffalo Heads, and Mineral Lick Blocks in Buffalo Barn Environments
Tahsin Uygun, Hasan Yılmaz, Mesut Çoşlu, Nicoleta Ungureanu, İlker ÜnalReliable and computationally efficient visual perception is essential for autonomous systems operating in complex livestock barns, where animals and operational objects must be accurately identified under variable illumination and occlusion conditions. This study developed BarnSeg-ECA-Lite, a lightweight instance segmentation model for the simultaneous segmentation of Buffalo Heads, Feed, and Mineral Lick Blocks (MLBs) in real buffalo barn environments. The model was developed based on YOLOv8n-seg by incorporating P2-to-P3 feature assistance, Efficient Channel Attention (ECA), a lightweight neck with GhostConv operations, targeted resampling of challenging instances, and higher-resolution mask supervision. An original dataset of 1703 NoIR images was used for training, validation, and independent testing. BarnSeg-ECA-Lite achieved an mAP@0.50 of 0.9313, mAP@0.50:0.95 of 0.7988, and an F1-score of 0.9300, with 2.7276 million parameters, 10.1108 GFLOPs, 10.3 ms inference time, and 74 FPS. It also achieved mAP@0.50 values of 0.9177, 0.9299, and 0.9464 for Buffalo Head, Feed, and MLB, respectively. These results demonstrate a favorable balance between segmentation accuracy and computational efficiency, providing a practical computer-vision foundation for future livestock and barn-resource monitoring applications, including autonomous feed-pushing robots and intelligent livestock management systems.