| In recent years,people’s yearning for a better life has led to a rising demand for fresh cut flowers.The fresh cut flower market brings enormous economic benefits,but also puts forward higher requirements for the quality of fresh cut flowers.As the key link to ensure the quality of fresh cut flowers,the classification task of fresh cut flowers is mainly completed by manual work.The manual classification is high-cost and inefficient,and there are few quantitative indicators in the current industry classification standards,which makes the classification more subjective and the results inaccurate.In view of this,this paper takes fresh cut roses as the research objects,which are the first of the four fresh cut flowers.Based on machine vision and deep transfer learning,the classification standard of fresh cut roses is studied as follows.First of all,the image acquisition box is designed,and the fresh cut rose images are collected from the main view and top view.The main view and top view of the flower bud of fresh cut flowers were cut by Python-Opencv,and median filter was used to eliminate image noise.Secondly,the extraction of flower buds in the top view is studied.By observing and analyzing the top view of the flower bud,it is found that the flower buds cannot be separated from the complex leaf background information by setting a single threshold of a gray image,so grab cut is selected as the background segmentation algorithm of the top view.In the process of interactive segmentation using the grab cut algorithm,it is found that the algorithm can remove the background information of the blade in the top view better.However,the interactive mode increases the computational efforts.Therefore,the algorithm is automatically initialized by extracting the primary color of the flower bud part in the image and the rectangular fitting of the outer contour.Then the segmentation result is optimized by making the background mask.Finally,the flower bud extraction in the top view is completed in batch.Finally,the classification model of fresh cut roses was constructed based on deep transfer learning.The preprocessed images of fresh cut rose flowers are made into data sets that can be connected to the neural network.The self-made data set was divided into training set and test set,and images in the training set are enhanced by the PythonAlbumentations.The Mobile Netv2 network,which is pre-trained on the Image Net dataset,is migrated as the basic model,and a new model is built as the hierarchical model by adding some custom layers to it.The self-made rose fresh cut flower data set was put into the constructed model for training,and the model was fine-tuned to make it have higher accuracy in the test set.Finally,the average accuracy of the model on the test set is 92.81%. |