The quality of silkworm cocoons affects the quality and cost of silk processing. It is necessary to sort silkworm cocoons prior to silk production. Cocoon images consist of fine-grained images with large intra-class differences and small inter-class differences. The subtle intra-class features pose a serious challenge in accurately locating the effective areas and classifying silkworm cocoons. To improve the perception of intra-class features and the classification accuracy, this paper proposes a bilinear pooling classification model (B-Res41-ASE) based on adaptive multi-scale feature fusion and enhancement. B-Res41-ASE consists of three parts: a feature extraction module, a feature fusion module, and a feature enhancement module. Firstly, the backbone network, ResNet41, is constructed based on the bilinear pooling algorithm to extract complete cocoon features. Secondly, the adaptive spatial feature fusion module (ASFF) is introduced to fuse different semantic information to solve the problem of fine-grained information loss in the process of feature extraction. Finally, the squeeze and excitation module (SE) is used to suppress redundant information, enhance the weight of distinguishable regions, and reduce classification bias. Compared with the widely used classification network, the proposed model achieves the highest classification performance in the test set, with accuracy of 97.0% and an F1-score of 97.5%. The accuracy of B-Res41-ASE is 3.1% and 2.6% higher than that of the classification networks AlexNet and GoogLeNet, respectively, while the F1-score is 2.5% and 2.2% higher, respectively. Additionally, the accuracy of B-Res41-ASE is 1.9% and 7.7% higher than that of the Bilinear CNN and HBP, respectively, while the F1-score is 1.6% and 5.7% higher. The experimental results show that the proposed classification model without complex labelling outperforms other cocoon classification algorithms in terms of classification accuracy and robustness, providing a theoretical basis for the intelligent sorting of silkworm cocoons.
The co-rearing model for young silkworms (Bombyx mori) utilizing artificial feed is currently undergoing significant promotion within the sericulture industry in China. Within this model, accurately counting the number of young silkworms serves as a crucial foundation for achieving precision rearing and high-quality breeding. Currently, manual counting remains the prevalent method for enumerating young silkworms, yet it is highly subjective. A dataset of young silkworm bodies has been constructed, and the Young Silkworm Counting (YSC) method has been proposed. This method combines an improved detector, incorporating an optimized multi-scale feature fusion module and the Efficient Multi-Scale Attention Fusion Cross Stage Partial (EMA-CSP) mechanism, with an optimized tracker (based on ByteTrack with improved detection box matching), alongside the implementation of a ‘detection line’ approach. The experimental results demonstrate that the recall, precision, and average precision (AP50:95) of the improved detection algorithm are 87.9%, 91.3% and 72.7%, respectively. Additionally, the enhanced ByteTrack method attains a multiple-object tracking accuracy (MOTA) of 88.3%, an IDF1 of 90.2%, and a higher-order tracking accuracy (HOTA) of 78.1%. Experimental validation demonstrates a counting accuracy exceeding 90%. The present study achieves precise counting of young silkworms in complex environments through an improved detection-tracking method combined with a detection line approach.