Silkworm breeding, as a pivotal economic activity across various regions of China, plays a crucial role in promoting rural revitalization. Notably, the early stage of silkworm development, during which the larvae are most vulnerable and environmentally sensitive, poses significant challenges due to their high pathogenicity and mortality rates. To enhance the efficiency of silkworm breeding, it is imperative to accurately and rapidly identify the physiological state of these small silkworms, ensuring timely feedback to farmers. By using the manually labeled data set, we trained a neural network model to identify the age of the small silkworm through the external characteristics and body length of different instars, and the model used the output center point coordinates to evaluate whether the silkworm entered the dormancy period. If the small silkworm enters the dormant period, the small silkworm will not move. By comparing the maximum difference of the coordinates of the center point of the small silkworm in the experimental group during the dormant period and the feeding period, a certain threshold is set. If the maximum difference of the coordinates of the center point is less than the threshold, the small silkworm is judged to enter the dormant period. To further enhance the model's performance, we introduced an improved target detection network model, building upon the established YOLOv5 architecture. This enhanced model integrates the C3-SE attention mechanism, enabling the network to focus more intently on the target of interest, thus improving detection accuracy. Additionally, we replaced the CIoU loss function in the original target detection network model with the Focal-EIoU loss function. This adjustment effectively mitigates the issue of imbalanced positive and negative samples, accelerating the convergence speed of the network and ultimately enhancing the model's accuracy and recall rate. To validate the accuracy of the proposed model, we randomly selected sample pictures from the curated small silkworm dataset, constituting the test and verification sets. This dataset comprised images and videos capturing different developmental stages of small silkworms. The test results demonstrate that the improved YOLOv5 model achieves an average accuracy of 92.2%, surpassing the preimproved network model by 2.29%. Specifically, the model exhibits a 0.3% increase in accuracy, a 3.4% improvement in recall rate, and a significant 7.7% enhancement in frames per second. These findings indicate that the enhanced YOLOv5 model is capable of accurately and efficiently identifying the physiological state of small silkworms.
Keywords: Focal-EIoU; Physiological recognition of small silkworm; SE module; YOLOv5.