# Research on the Classification of Sun-Dried Wild Ginseng Based on an Improved ResNeXt50 Model
## 6 Discussion  
By classifying ginseng, a scientific quality evaluation system can be established to help the ginseng industry with quality control, ensuring product quality and safety. Using deep learning technology dramatically saves labor and avoids the subjectivity of manual classification, thereby improving the efficiency of ginseng classification and enabling sustainable development of the ginseng industry. This paper proposes an improved ResNeXt50 network model tailored to the features of forest-grown ginseng. The conclusions drawn from the experiments are as follows:  
1. A ginseng dataset was constructed and classified into four different grades: premium-class, first-class, second-class, and ordinary ginseng. Data augmentation was performed on the dataset to enhance its diversity. ResNeXt50 was chosen as the base model, with the Ghost module replacing the three-layer convolution of the Bottleneck structure, maintaining excellent performance while reducing computational load. The ReLU activation functions after the three-layer convolution were replaced with ELU activation functions to avoid dead neurons and accelerate convergence. SE attention mechanisms were added to the second and third layers of the model to capture key ginseng features more accurately, improving the model's accuracy and generalization ability. 2. The improved ResNeXt50 model achieved an accuracy of 93.14% and a recall of 91.75% on the self-constructed dataset. Its parameter size was 74.47 MB, and each training epoch took only 76 s. The accuracy and F1 score improved by 9.76% and 8.99%, respectively. 3. The misclassification rate for ordinary ginseng is relatively high. Through an objective model analysis, the primary direction for future experiments is to enhance the model's expressive capabilities further and balance the quantity of each class in the dataset, thereby increasing the correct classification rate for ordinary ginseng. The improved model shows significant accuracy parameter size advantages and commendable convergence speed, contributing to the development of ginseng classification. In summary, the improvements positively enhance the model, demonstrating the feasibility of modifying the original model. Conceptualization, D.L. ; methodology, Z.Z. ; software, Z.Z. and D.L. ; validation, Y.Y. ; formal analysis, C.Z. ; investigation, Z.Z. ; resources, Y.Y. ; data curation, D.L. ; writing--original draft preparation, Z.Z. ; writing--review and editing, Z.Z., C.Z. and Y.Y. ; visualization, D.L. ; supervision, Z.Z. ; project administration, C.Z. ; funding acquisition, C.Z. All authors have read and agreed to the published version of the manuscript. This work is supported by National Natural Science Foundation of China (61806024, 62206257); Jilin Province Science and Technology Development Plan Key Research and Development Project (20210204050 YY); Wuxi University Research Start-up Fund for Introduced Talents (2023r004, 2023r006); Jiangsu Engineering Research Center of Hyperconvergence application and security of IoT devices; Jiangsu Foreign Expert Workshop; Wuxi City Internet of Vehicles Key Laboratory. Not applicable. \begin{table}
\begin{tabular}{c l c c c} \hline \hline
**Classification** & **Model** & **Recall\%** & **Accuracy \%** & **F1\%** \\ \hline \multirow{3}{*}{Premium} & ResNeXt50 & 85.13 & 82.89 & 83.99 \\  & Our Model & 86.38 & 94.81 & 90.39 \\  & ResNeXt50 & 81.48 & 85.71 & 83.54 \\ \multirow{3}{*}{First-Class} & Our Model & 97.34 & 94.81 & 96.05 \\  & ResNeXt50 & 82.50 & 85.71 & 84.07 \\ \multirow{3}{*}{Second-Class} & Our Model & 92.21 & 96.10 & 94.11 \\  & ResNeXt50 & 84.72 & 79.22 & 81.87 \\ \multirow{3}{*}{Ordinary} & Our Model & 91.10 & 86.84 & 88.91 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Recall, Precision, and F1 Scores for each type of ginseng before and after model improvement. Data Availability Statement: The data presented in this study are available on request from the corresponding author.