| 总结: | The classification of <i>silkworm cocoons</i> is essential prior to silk reeling and serves as a key step in improving the quality of raw silk. At present, <i>cocoon</i> classification mainly relies on manual sorting, which is labor-intensive and inefficient. In this paper, a <i>cocoon</i> detection algorithm S-YOLOv8_c based on the cooperation of MobileSAM and YOLOv8 for the <i>mountage cocoons</i> was proposed. The MobileSAM with a designed area thresholding algorithm was used for the semantic segmentation of <i>mountage cocoon</i> images, which could mitigate the effect of complex backgrounds and maximize the discriminability of <i>cocoon</i> features. Subsequently, the BiFPN was added to the neck of YOLOv8 to improve the multiscale feature fusion capability. The loss function was replaced with the WIoU, and a dynamic non-monotonic focusing mechanism was introduced to improve the generalization ability. In addition, the GAM was incorporated into the head to focus on detailed <i>cocoon</i> information. Finally, the S-YOLOv8_c achieved a good detection accuracy on the test set, with a mAP of 95.8%. Furthermore, to experimentally validate the sorting ability, we deployed the proposed model onto the self-developed Cartesian coordinate automatic <i>cocoon</i> harvester, which indicated that it would effectively meet the requirements of accurate and efficient <i>cocoon</i> sorting.
|