Prompt-Driven Approach for Cattle Image Segmentation Based on SAM
摘要
Cattle detection in image segmentation tasks has taken a new dimension with the explosion of SAM (Segment Anything Model). Cattle’s productivity relies on their individual health/welfare monitoring which requires real-time information about individual cattle. Monitoring individual cattle is beyond the capability of existing models due to shortage of contextual datasets to train them. In this paper, SAM, unlike the existing related models, is proposed for cattle instance detection and segmentation in an image with its prompt-based approach for contextual dataset. By applying the SAM, individual cattle instances are detected and segmented from each other and their background for proper monitoring. The following steps are involved in the proposed approach from which accurate results are obtained: (1) Prompt-able segmentation of cattle image by prompt encoder (2) Extraction and encoding of cattle image features by image encoder (3) Results and confidence scores generation from segmentation task by light-weight mask decoder. The datasets from challenging cattle images were employed for training and testing the proposed approach. The experimental results from the proposed model were compared to the existing instance segmentation models of Mask R-CNN and YOLOv8. The practical implications of the findings in this paper are essential for the livestock industry. Precision livestock farming systems that incorporate deep learning not only enhance the productivity of livestock but also ensure their welfare management and monitoring, reducing their vulnerability to disease and loss.