Abstract:In order to overcome the problem of low efficiency and high cost in the manual acquisition of phenotypic parameters of Agaricus bisporus, an instance segmentation-based method for calculating phenotypic parameters for modern industrial environments was proposed. Firstly, the YOLO v8n-Seg instance segmentation model was improved through the introduction of faster neural network (FasterNet), including the employment of partial convolutions (PConv) to reduce redundant computations and memory accesses. The squeeze-and-excitation (SE) attention mechanism was incorporated into the feature fusion network to enhance the model’s focus on the critical target components, minimizing interference from irrelevant background. The improved model successfully performed instance segmentation on Agaricus bisporus. Based on the segmentation results, four phenotypic parameters of the mushroom sub-entities were figured out: cap diameter, cap roundness, cap whiteness, and the color spots on the surface. Experimental results demonstrated that the YOLO v8-ABSeg model achieved a 1.6 percentage points improvement in mask accuracy on proposed custom-built Agaricus bisporus dataset, with reductions of 38.7%, 25.0%, and 36.8% in the number of parameters, floating-point operations, and weight file size, respectively,frames per second was increased by 11.3%. Additionally, the calculated phenotypic parameters exhibited a measurement error of no more than 10% when compared with manual measurement results. This method provided a foundation for the automation of phenotypic parameter extraction and can be applied to other applications like the development of growth models and real-time environmental control systems, and so on.