Zhang Qian, Yang Ying, Liu Gang, Ning Yuanlin, Li Jianquan
College of Information and Electrical Engineering, China Agricultural University, Beijing 100083, China.
Key Laboratory of Modern Precision Agriculture System Integration Research, Ministry of Education, Beijing 100083, China.
Animals (Basel). 2023 Jul 5;13(13):2211. doi: 10.3390/ani13132211.
Thermal infrared technology is utilized for detecting mastitis in cows owing to its non-invasive and efficient characteristics. However, the presence of surrounding regions and obstacles can impede accurate temperature measurement, thereby compromising the effectiveness of dairy mastitis detection. To address these problems, we proposed the CLE-UNet (Centroid Loss Ellipticization UNet) semantic segmentation algorithm. The algorithm consists of three main parts. Firstly, we introduced the efficient channel attention (ECA) mechanism in the feature extraction layer of UNet to improve the segmentation accuracy by focusing on more useful channel features. Secondly, we proposed a new centroid loss function to facilitate the network's output to be closer to the position of the real label during the training process. Finally, we used a cow's eye ellipse fitting operation based on the similarity between the shape of the cow's eye and the ellipse. The results indicated that the CLE-UNet model obtained a mean intersection over union (MIoU) of 89.32% and an average segmentation speed of 0.049 s per frame. Compared to somatic cell count (SCC), this method achieved an accuracy, sensitivity, and F1 value of 86.67%, 82.35%, and 87.5%, respectively, for detecting mastitis in dairy cows. In conclusion, the innovative use of the CLE-UNet algorithm has significantly improved the segmentation accuracy and has proven to be an effective tool for accurately detecting cow mastitis.
热红外技术因其非侵入性和高效性的特点而被用于检测奶牛乳腺炎。然而,周围区域和障碍物的存在会阻碍精确的温度测量,从而影响奶牛乳腺炎检测的效果。为了解决这些问题,我们提出了CLE-UNet(质心损失椭圆化UNet)语义分割算法。该算法由三个主要部分组成。首先,我们在UNet的特征提取层引入了高效通道注意力(ECA)机制,通过关注更有用的通道特征来提高分割精度。其次,我们提出了一种新的质心损失函数,以便在训练过程中使网络输出更接近真实标签的位置。最后,我们基于奶牛眼睛形状与椭圆的相似性进行奶牛眼睛椭圆拟合操作。结果表明,CLE-UNet模型的平均交并比(MIoU)为89.32%,平均分割速度为每帧0.049秒。与体细胞计数(SCC)相比,该方法在检测奶牛乳腺炎时的准确率、灵敏度和F1值分别达到了86.67%、82.35%和87.5%。总之,CLE-UNet算法的创新性应用显著提高了分割精度,并已被证明是准确检测奶牛乳腺炎的有效工具。