Edge AI-Enabled Chicken Health Detection Based on Enhanced FCOS-Lite and Knowledge Distillation

Qiang Tong,Jinrui Wang,Wenshuang Yang,Songtao Wu,Wenqi Zhang,Chen Sun,Kuanhong Xu
DOI: https://doi.org/10.1016/j.compag.2024.109432
2024-10-10
Abstract:The utilization of AIoT technology has become a crucial trend in modern poultry management, offering the potential to optimize farming operations and reduce human workloads. This paper presents a real-time and compact edge-AI enabled detector designed to identify chickens and their healthy statuses using frames captured by a lightweight and intelligent camera equipped with an edge-AI enabled CMOS sensor. To ensure efficient deployment of the proposed compact detector within the memory-constrained edge-AI enabled CMOS sensor, we employ a FCOS-Lite detector leveraging MobileNet as the backbone. To mitigate the issue of reduced accuracy in compact edge-AI detectors without incurring additional inference costs, we propose a gradient weighting loss function as classification loss and introduce CIOU loss function as localization loss. Additionally, we propose a knowledge distillation scheme to transfer valuable information from a large teacher detector to the proposed FCOS-Lite detector, thereby enhancing its performance while preserving a compact model size. Experimental results demonstrate the proposed edge-AI enabled detector achieves commendable performance metrics, including a mean average precision (mAP) of 95.1$\%$ and an F1-score of 94.2$\%$, etc. Notably, the proposed detector can be efficiently deployed and operates at a speed exceeding 20 FPS on the edge-AI enabled CMOS sensor, achieved through int8 quantization. That meets practical demands for automated poultry health monitoring using lightweight intelligent cameras with low power consumption and minimal bandwidth costs.
Computer Vision and Pattern Recognition,Image and Video Processing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to realize the automation of chicken health detection by using edge AI technology in modern poultry management. Specifically, the paper focuses on developing a real - time, compact and efficient edge AI detector that can identify chickens and their health states. This detector needs to be able to run on memory - constrained but cost - effective edge AI CMOS sensors to meet the requirements of practical AIoT applications. ### Main problems 1. **Balance between high precision and model size**: How to maintain high detection precision while ensuring that the model is compact (suitable for deployment on edge devices). 2. **Efficient deployment under resource constraints**: How to efficiently deploy deep - learning models on edge devices with limited memory and computing power, especially for the task of chicken health detection. 3. **Real - time performance**: How to ensure that the detector runs at a speed exceeding 20 FPS on edge devices to meet the real - time requirements in practical applications. ### Solutions 1. **FCOS - Lite detector**: - **Backbone network**: Use MobileNetV2 instead of ResNet to achieve a more compact and lightweight model. - **Feature Pyramid Network (FPN)**: Reduce the number of FPN levels from 5 to 3 to further reduce the model complexity. - **Shared - head component**: Modify the shared - head component and remove the center - point prediction head to reduce the model complexity. 2. **Improved loss function**: - **Gradient - weighted loss function**: Used for classification tasks, it improves classification accuracy by adjusting the loss weights of samples, especially assigning lower weights to easy samples and abnormal samples. - **CIOU loss function**: Used for localization tasks. Compared with the traditional IoU loss, the CIOU loss takes more geometric factors into account, improving the localization accuracy and training convergence speed. 3. **Knowledge distillation**: - **Teacher model and student model**: Through the knowledge distillation technique, the knowledge of a large teacher model (such as the original FCOS detector) is transferred to a compact student model (FCOS - Lite), thereby improving the model performance without increasing the inference cost. ### Experimental results - **Performance metrics**: The experimental results show that the proposed edge AI detector achieves satisfactory performance on memory - constrained CMOS sensors, including an average precision (mAP) of 95.1% and an F1 - score of 94.2%. - **Real - time performance**: Through int8 quantization, the detector can run at a speed exceeding 20 FPS on CMOS sensors, meeting the requirements of practical applications. ### Conclusion This paper proposes a real - time, compact and efficient edge AI detector that can realize the automation of chicken health detection on edge devices with limited memory and computing power. By optimizing the model structure, improving the loss function and applying the knowledge distillation technique, this detector achieves efficient real - time performance while maintaining high precision, which is suitable for practical AIoT scenarios.