## 4 Conclusions  
In this research, by establishing two detection models, namely, the Shine-Muscat image segmentation model using Mask R-CNN based on deep learning and the SSC prediction model based on near-infrared hyperspectral images (400-1000 nm), the existing non-destructive detection method of grape SSC was improved. The high-efficiency non-destructive detection of the SSC of bunch-harvested grapes was realized. The main conclusions are as follows:  
1. The \(F_{1}\) score of the Shine-Muscat segmentation model is 95.34%, and it can effectively identify and segment single fruits from bunch-harvested grapes so as to realize automatic and efficient RoI selection using hyperspectral images. 2. The SSC prediction model is established using 35 characteristic wavelengths, the R\({}^{2}\) of the modeling set and the test set reach 0.8705 and 0.8755, respectively, and the RMSE values are 0.5696 Brix% and 0.9177 Brix%, respectively. Accurate prediction of grape SSC based on HSI is realized. 3. Using eight bunches of grapes for verification, the prediction error of the average SSC value of the whole bunch is between 0.09 and 1.05 Brix%, the prediction error \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multirow{2}{*}{
\begin{tabular}{c} **Speed** \\ **(Grapes/Sec)** \\ \end{tabular} } & \multicolumn{2}{c}{**Model Accuracy**} \\ \cline{3-4}  & & **R\({}_{\text{P}}\)** & **RMSE(Brix\%)** \\ \hline Article [14] method & 0.074 & 0.9620 & 0.3720 \\ Improved method & 1.227 & 0.9357 & 0.9177 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison between existing and improved methods. Figure 15: Method for obtaining grape spectral data. (**a**) Existing method (different colors represent different RoIs). (**b**) Improved method. of the minimum SSC value of the whole bunch is between 0.04 and 1.34 Brix%, and the prediction error of the maximum SSC value of the whole bunch is between 0.04 and 1.34 Brix%. This shows that this method can provide accurate reference data for actual production. 4. Using eight bunches of grapes to compare the existing method and the improved method in terms of efficiency, the average detection speed of the existing method is 0.074 grapes per second, and that of the improved method is 1.227 grapes per second, which is 16.6 times that of the former. The results prove that the improved method can greatly improve the efficiency of non-destructive detection based on HSI. This method overcomes the shortcomings of the traditional SSC detection method, which requires one to destroy the sample, and improves the existing non-destructive detection method using HSI, saving manpower and material resources. In addition, the visual display of SSC directly reflects the differences in the SSCs of different grape grains within the same bunch, which helps one to grade the grape quality. However, the study still had the following shortcomings: it is difficult to integrate all functions in a single device; the portability is insufficient; and the degree of automation is low. In order to be applied to production and sales, the method needs to be improved: from an algorithm perspective, it is necessary to integrate the functions of hyperspectral imaging, spectral correction, image segmentation, and SSC prediction into one project (currently, the integration of image segmentation and SSC prediction has been achieved). From a hardware perspective, a hyperspectral imager and computer can be installed on a field inspection robot to achieve unmanned automatic data collection and analysis in the field, and the data analysis results can be uploaded to a cloud server. Conceptualization, J.Z., Q.H. and H.L. ; Methodology, J.Z., Q.H. and H.L. ; Validation, Q.H. and Y.X. ; Resources, Y.X. ; Data curation, Q.H. ; Writing--original draft, Q.H. ; Writing--re-view & editing, B.L. and S.X. ; Visualization, Q.H. ; Supervision, B.L. and S.X. All authors have read and agreed to the published version of the manuscript.