Method and system for lossless classification of ginseng seeds
The ORBMO-RF model, which fuses image and hyperspectral data, solves the problem of low ginseng seed classification efficiency, achieves efficient and accurate seed classification, and improves recognition performance and model stability.
Patent Information
- Application Number
- CN202511269523.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-08
AI Technical Summary
The existing technology lacks a classification method for ginseng seeds based on image and spectral features of ginseng seeds, resulting in low classification efficiency, high cost and difficulty in achieving fast and accurate identification.
The ORBMO-RF model was constructed by combining the image and hyperspectral data fusion method with the improved RBMO algorithm and RF model. By introducing the circle chaos mapping mechanism, golden sine search strategy and adaptive simulated annealing, the hyperparameters were optimized to achieve accurate and lossless classification of ginseng seeds.
It improves the accuracy and efficiency of ginseng seed classification, reduces the randomness and subjectivity of manual parameter adjustment, achieves the recognition performance of multi-source heterogeneous data, and fills the gap in the field of ginseng seed classification.
Smart Images

Figure CN120808048A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer image detection, in particular to a ginseng seed nondestructive classification method and system. BACKGROUND
[0002] The seeds for ginseng planting circulating in the market at present are mainly garden ginseng seeds, under-forest ginseng seeds, American ginseng seeds and Korean ginseng seeds. These seeds are similar in appearance and are not easy to distinguish, especially garden ginseng seeds, under-forest ginseng seeds and Korean ginseng seeds are highly similar in morphological characteristics and are difficult to be distinguished by naked eyes. Moreover, the four types of seeds are significantly different in planting methods suitable for the variety characteristics, and the ginseng produced correspondingly is also significantly different in economic value due to the differences in quality, yield and market positioning. Therefore, the accurate and nondestructive classification of ginseng seeds is an important task in ginseng production and is of great significance.
[0003] The traditional seed classification methods mainly include morphological identification method and chemical identification method. The morphological identification method mainly includes seed classification based on morphological characteristics and seed classification by relying on naked eyes to identify external characteristics, which has good classification effect, but also has the disadvantages of non-uniform classification, slow classification speed, high misjudgment rate and waste of manpower. The chemical identification method utilizes fluorescence scanning technology, chemical composition analysis, molecular biology technology such as DNA detection, and electrophoresis analysis. Among them, the fluorescence scanning, chemical analysis and DNA detection method (genetic detection method) have high recognition accuracy, but the process is complex, time-consuming and high in cost, which requires experienced operators and expensive equipment, and is difficult to be applied to rapid identification of large-scale seeds. Limited by the deficiencies of the above methods in efficiency, cost or operation complexity, it is urgent to develop a rapid identification and nondestructive detection technology for ginseng seeds.
[0004] With the development of computer technology, computer vision means and spectral technology are considered as important solutions. These methods have been widely applied in crop breeding, agricultural product quality detection and pest diagnosis. Although there are many studies on the classification of seeds of major crops such as corn, wheat and rice, some literatures also discuss the application of hyperspectral or image technology in agricultural product identification, but there is no research on the classification of ginseng seeds. From the existing researches at home and abroad, the related work is mostly focused on the root quality evaluation, medicinal ingredient detection or origin traceability of ginseng, and the image and spectral characteristics of ginseng seeds have not been deeply mined and modeled.
[0005] In summary, the prior art lacks a classification method for ginseng seeds based on the image and spectral characteristics of ginseng seeds. SUMMARY
[0006] The present application solves the problem that the prior art lacks a classification method for ginseng seeds based on the image and spectral characteristics of ginseng seeds.
[0007] The ginseng seed non-destructive classification method comprises the following steps: Step S1, respectively collecting image data of ginseng seeds and hyperspectral data of ginseng seeds; Step S2, respectively pre-processing the image data of ginseng seeds and the hyperspectral data of ginseng seeds; Step S3, respectively performing feature screening on the pre-processed image data of ginseng seeds and the pre-processed hyperspectral data of ginseng seeds; Step S4, fusing the feature-screened image data of ginseng seeds and the feature-screened hyperspectral data of ginseng seeds; Step S5, improving the RBMO algorithm and combining with the RF model to construct an ORBMO-RF model; Step S6, inputting the fused image data of ginseng seeds and the fused hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thereby completing the classification of ginseng seeds.
[0008] Further, in an embodiment of the present application, in step S5, the RBMO algorithm is improved, specifically: In the population initialization stage of the RBMO algorithm, an improved circle chaotic mapping mechanism is introduced; In the attack prey stage of the RBMO algorithm, an improved golden sine search strategy is introduced; In the late search stage of the RBMO algorithm, an adaptive simulated annealing is introduced.
[0009] Further, in an embodiment of the present application, the improved circle chaotic mapping mechanism is specifically: ; Wherein, the parameter , the parameter , is the next chaotic value, is the current chaotic, is the modulo operation.
[0010] Further, in an embodiment of the present application, the improved golden sine search strategy is specifically: An Lévy Flight disturbance mechanism is introduced to improve the golden sine search strategy.
[0011] Further, in an embodiment of the present application, the Lévy Flight disturbance mechanism is introduced to improve the golden sine search strategy, specifically: ; Wherein, is a distribution step, is a disturbance intensity, is a golden ratio constant, is a uniform distribution random number, is a sine disturbance angle, is a position of a current optimal individual, is an updated position of an i th individual, is a current position of an i th individual, is a position vector of i th individual.
[0012] Further, in one embodiment of the present application, the adaptive simulated annealing is specifically: ; wherein, is a current temperature, is an initial temperature, is a control cooling rate, is a current iteration number.
[0013] The ginseng seed nondestructive classification system is realized by using the ginseng seed nondestructive classification method, and comprises the following modules: An acquisition module acquires image data and hyperspectral data of ginseng seeds respectively; A preprocessing module pre-processes the image data and the hyperspectral data of ginseng seeds respectively; A screening module screens features of the pre-processed image data and the pre-processed hyperspectral data of ginseng seeds respectively; A fusion module fuses the screened image data and the screened hyperspectral data of ginseng seeds; A construction module constructs an ORBMO-RF model by combining an improved RBMO algorithm with an RF model; A classification module inputs the fused image data and the fused hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thereby completing classification of ginseng seeds.
[0014] The present application solves the problem of lack of classification method of ginseng seeds based on image and spectral characteristics of ginseng seeds in the prior art. Specific beneficial effects include: 1. The ginseng seed non-destructive classification method, the prior art lacks the classification method based on the image and spectral characteristics of the ginseng seed, in order to solve the above technical problems, aiming at the blank of ginseng seed variety classification, a method of fusing image and hyperspectral characteristics based on the construction of ORBMO-RF model is proposed, which realizes the accurate and non-destructive classification of ginseng seeds; 2. The ginseng seed non-destructive classification method, considering the defect that the RBMO algorithm is easy to fall into local optimum, a hybrid optimization framework is constructed by introducing the improved circle chaotic mapping mechanism, golden sine search strategy and adaptive simulated annealing mechanism, the improved RBMO algorithm has a significant influence on the accuracy of the RF model, the randomness and subjectivity of manual parameter adjustment are reduced, and the recognition performance of the model on multi-source heterogeneous data is improved, which provides a novel method for realizing non-destructive detection and accurate classification in seed sorting application; 3. The ginseng seed non-destructive classification method, the ORBMO-RF model finds the optimal parameters through multiple iterations, thereby improving the classification accuracy. This method not only improves the accuracy and efficiency of the super parameter tuning, but also finally obtains better classification performance. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which: Figure 1 It is a ginseng seed sample image according to the first embodiment, wherein (a) is a ginseng seed, (b) is a ginseng seed, (c) is a ginseng seed, and (d) is a ginseng seed; Figure 2 It is a ginseng seed image data acquisition device diagram according to the first embodiment; Figure 3 It is a ginseng seed hyperspectral data acquisition device diagram according to the first embodiment; Figure 4 It is a single ginseng seed extraction process diagram according to the first embodiment, wherein (a) is the image data of the ginseng seed, (b) is the gray image, (c) is the denoised image, (d) is the binary image, (e) is the single ginseng seed mask image, and (f) is the single ginseng seed segmentation image; Figure 5 It is a different seed category morphological feature mean value diagram according to the first embodiment, wherein the left side is a texture feature mean value diagram, and the right side is a geometric feature mean value diagram; Figure 6is the scatter plot and frequency distribution histogram of embodiment two, wherein (a) is the scatter plot of the circle chaotic mapping mechanism, (b) is the scatter plot of the improved circle chaotic mapping mechanism, (c) is the frequency distribution histogram of the circle chaotic mapping mechanism, and (d) is the frequency distribution histogram of the improved circle chaotic mapping mechanism. Figure 7 is a comparison diagram of the search path of the golden sinusoidal search strategy and the golden sinusoidal search strategy with the introduction of the Lévy Flight disturbance mechanism in a certain two-dimensional target function space. DETAILED DESCRIPTION
[0016] Various embodiments of the present application will be described below in detail with reference to the accompanying drawings. The embodiments described by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0017] Embodiment one, the ginseng seed non-destructive classification method described in this embodiment comprises the following steps: Step S1, respectively collecting image data of ginseng seeds and hyperspectral data of ginseng seeds; Step S2, pre-processing the image data of ginseng seeds and the hyperspectral data of ginseng seeds respectively; Step S3, respectively performing feature screening on the pre-processed image data of ginseng seeds and the hyperspectral data of ginseng seeds; Step S4, fusing the image data of ginseng seeds and the hyperspectral data of ginseng seeds after feature screening; Step S5, combining the improved RBMO algorithm with the RF model to construct an ORBMO-RF model; Step S6, inputting the fused image data of ginseng seeds and the hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thereby completing the classification of ginseng seeds.
[0018] The prior art lacks a classification method for ginseng seeds based on image and spectral characteristics of ginseng seeds.
[0019] In order to solve the technical problems existing in the prior art, the present embodiment proposes a ginseng seed classification method based on image and spectral characteristics of ginseng seeds, comprising the following steps: The four types of seeds used in actual production and planting of ginseng are mainly targeted, and the ginseng seed samples are purchased from ginseng seed sales enterprises and accurately classified by expert identification. They are garden ginseng seeds, Korean ginseng seeds, forest ginseng seeds and American ginseng seeds, as shown in Figure 1
[0020] To ensure the quality of samples, manual screening method was used during the collection process to remove broken, worm-eaten and impurity seeds, and only high-quality ginseng seeds with full grains and appropriate size were reserved. 2000 seeds of each variety were finally selected as the research objects.
[0021] Step S1, collecting image data of ginseng seeds, specifically: As shown in Figure 2 , the image data collection device of ginseng seeds includes a camera, a computer, a light source, ginseng seeds and a black box. In order to ensure the consistency of environmental conditions during image collection, avoid external light interference and minimize the influence of environmental factors on image quality, all ginseng seeds are photographed in the same black box. During the camera shooting process, the ginseng seeds are placed on a black background board, and the camera is vertically fixed using a bracket to ensure that the shooting height and position are unchanged. Two stable LED (Light Emitting Diode) lamps are used as light sources to maintain uniformity of illumination. The arrangement of each ginseng seed is randomly distributed in the direction, 100 seeds are photographed for each group, and a total of 20 groups of images are photographed for a single variety. The resolution of all images is set to 3024*4032 pixels.
[0022] Collecting hyperspectral data of ginseng seeds, specifically: As shown in Figure 3 , the hyperspectral data collection device of ginseng seeds includes a black box, a halogen lamp, an integrating sphere, a computer, ginseng seeds, a probe and a spectrometer, and the measurement wavelength range covers 350-2500 nm. During testing, the distance between the hyperspectral probe and the surface of the ginseng seeds is kept at 10 cm, the wavelength accuracy of the instrument is 0.5 nm, and the repeatability is 0.1 nm. A halogen lamp with a power of 20 W is used as the light source. Before formal measurement, a standard white plate is used for hyperspectral calibration. Each hyperspectral data is obtained by averaging 10 scans, and the integration time is set to 100 ms. One disc of ginseng seeds is a group, and each time it is rotated 30 degrees clockwise, a total of 13 times. Each group is collected 130 times (0-129), a total of two groups, and the spectrometer is recalibrated before each measurement to ensure the consistency and accuracy of the data. All measurements are carried out in the same laboratory environment to minimize the interference of environmental light sources on the measurement.
[0023] Step S2, pre-processing the image data of ginseng seeds, and selecting features from the pre-processed image data of ginseng seeds, specifically: In order to fully retain the image data of ginseng seeds, as Figure 4As shown, the image data of ginseng seeds is first converted into a grayscale image, and Gaussian filtering is used to reduce noise in the grayscale image. Next, Otsu's Adaptive Thresholding Method is used to determine the binarization threshold of the denoised grayscale image, and after generating a binary image, small holes in the binary image are removed through an opening operation. Subsequently, a boundary tracking algorithm is used to extract the contour of each ginseng seed and calculate its minimum bounding rectangle. On this basis, the contour area of each ginseng seed is expanded outward by 15 pixels to ensure that the ginseng seed image information is complete.
[0024] Using image processing techniques, the geometric and texture features of each ginseng seed were extracted from 2000 seeds of each variety to represent their morphological characteristics. As key indicators reflecting the genetic and biological characteristics of ginseng seeds, 16 main parameters were extracted, including S (perimeter), A (area), L (major axis length), W (minor axis length), r (inscribed circle radius), K (aspect ratio), e (dispersion), C (circularity), E (stretch length), R (rectangularity), Ed (equivalent circle diameter), and Hu (invariant moment). Texture features were used to describe the overall properties of the image surface structure, and 16 main parameters were extracted, including Contrast (contrast), Dissimilarity (dissimilarity), Homogeneity (homogeneity), ASM (angular second moment), Energy (energy), Correlation (correlation), and LBP (local binary pattern), to fully capture the texture information of ginseng seeds.
[0025] 32 morphological features were extracted from ginseng seeds, which can be clearly seen, Figure 5 The left side of the figure shows the average texture features of different seed types. American ginseng seeds show lower contrast and dissimilarity, while Korean ginseng seeds show higher average values on hist0 (homogeneity mode 0), hist1 (homogeneity mode 1), and hist2 (homogeneity mode 2). Figure 5 The right side of the figure shows the average geometric features of different seed types. Compared with other categories, the geometric features of forest ginseng seeds are significantly smaller, while the features of American ginseng seeds are larger. Therefore, it is feasible to distinguish different ginseng seed varieties based on morphological features.
[0026] The hyperspectral data of ginseng seeds was preprocessed, and the preprocessed hyperspectral data of ginseng seeds was feature-selected, specifically: The diffuse reflection, light scattering and other factors on the surface of ginseng seeds can cause interference in the process of hyperspectral data acquisition, resulting in differences in hyperspectral data among the same ginseng seeds, thereby affecting the accuracy and stability of the classification model. The original hyperspectral data covers the 350-2500 nm band, but due to significant noise below 400 nm and above 2400 nm and insufficient detector response, only the effective band of 400-2400 nm is retained for subsequent analysis to improve signal quality and model robustness. Therefore, hyperspectral preprocessing is necessary, which can effectively reduce the influence of noise, improve the quality of data, and improve the classification performance of the model. In this embodiment, the hyperspectral data is preprocessed, and SG (Savitzky-Golay smoothing filter), MSC (multivariate scatter correction) and the combination of SG and MSC are used to effectively reduce noise interference. The experimental results are shown in Table 1. It is found that in the three classification models of RF model, SVM model (support vector machine model) and KNN model (K nearest neighbor model), the classification effect of RF model (random forest classification model) combined with SG processing is the most superior, so RF is used as the basic model.
[0027] Table 1 Comparison of preprocessing methods under different models
[0028] Step S3, the image data of the ginseng seeds after feature screening and the hyperspectral data of the ginseng seeds are fused; Step S4, the RBMO algorithm (Red-Billed Blue Magpie Optimization algorithm) is improved and combined with the RF model to construct the ORBMO-RF model (RBMO model driven random forest optimization model).
[0029] Step S5, the fused image data and hyperspectral data of the ginseng seeds are input into the ORBMO-RF model for processing, and the classification of the ginseng seeds is completed.
[0030] Therefore, to realize the effective classification of different varieties of ginseng seeds, the morphological features of ginseng seeds are first extracted from the image data of ginseng seeds. Then, the extracted morphological features and hyperspectral data are preprocessed, and further key feature screening is performed on the image information and spectral bands. The morphological features and spectral features of the ginseng seeds are used as the input of the classification model, and the output results are fused, thereby not only completing the high-precision classification of the ginseng seeds, but also filling the gap in the field of ginseng seed classification.
[0031] In this embodiment, the RBMO algorithm is improved, specifically as follows: In the population initialization stage of the RBMO algorithm, an improved circle chaotic mapping mechanism is introduced. In the attack prey stage of the RBMO algorithm, an improved golden sine search strategy is introduced. In the late search stage of the RBMO algorithm, an adaptive simulated annealing is introduced.
[0032] In this embodiment, the improved circle chaotic mapping mechanism is specifically: ; Wherein, the parameter , the parameter , is the next chaotic value, is the current chaotic, is the modulo operation.
[0033] In this embodiment, the improved golden sine search strategy is specifically: An Lévy Flight disturbance mechanism is introduced to improve the golden sine search strategy.
[0034] In this embodiment, the Lévy Flight disturbance mechanism is introduced to improve the golden sine search strategy, specifically: ; Wherein, is the Lévy distribution step, is the disturbance intensity, is the golden ratio constant, is a uniformly distributed random number, is the sine disturbance angle, is the position of the current optimal individual, is the updated position of the th individual, is the current position of the th individual, is the position vector of the individual.
[0035] In this embodiment, the adaptive simulated annealing is specifically: ; Wherein, is the current temperature, is the initial temperature, is the control cooling rate, is the current iteration number.
[0036] In this embodiment, the RBMO algorithm is selected because it is an intelligent optimization method that simulates the collective behavior of magpie birds. The algorithm is inspired by the search, pursuit, attack, and food storage behaviors exhibited by magpie birds during foraging. The optimization process includes four stages: population initialization, group foraging, cooperative hunting, and food storage.
[0037] The RBMO algorithm has the advantages of efficient global search capability and dynamic competition-cooperation mechanism. However, in the later iterations of the algorithm, the magpie bird population is easily affected by the inertia search mode, which can lead to uneven population distribution, falling into local optimal solutions, and mismatching the search direction with the feature space topology in complex classification tasks.
[0038] To solve the above technical problems, the RBMO algorithm is improved in this embodiment, and the ORBMO algorithm is proposed, which is enhanced by the following strategies.
[0039] In the population initialization stage of the RBMO algorithm, the individual positions are randomly distributed, which can lead to uneven distribution of the search space.
[0040] To solve the above technical problems and enhance the initial diversity of the population, this embodiment introduces a circle chaotic mapping mechanism (two-dimensional chaotic mapping mechanism). This mapping can ensure uniform distribution of the population under certain constraints and has good ergodicity, which can ensure a relatively uniform initial distribution of the population in the search space, thereby improving the global exploration ability of the algorithm in the early search stage and helping to find the global optimal solution. The mathematical expression is as follows: ; where the parameter , the parameter , the mapping generates a sequence with chaotic characteristics in the interval [0, 1] for initializing the individual position of the population, is the next chaotic state value, is the current chaotic state value, is the modulo operation.
[0041] As can be seen from Figure 6 (a) and Figure 6 (c), the initial particles generated by the circle chaotic mapping mechanism are mainly concentrated in the interval [0.2, 0.5]. However, too concentrated initial candidate solution distribution will significantly reduce the population diversity of the RBMO algorithm.
[0042] To solve the above technical problems, the circle chaotic mapping mechanism is improved in this embodiment, and the mathematical expression is as follows: ; where the parameter ,parameter , which generates a sequence with chaotic characteristics in the interval [0,1] and is used to initialize the individual positions of the population.
[0043] Therefore, by introducing the improved circle chaos mapping operator, the RBMO algorithm can generate a more uniform initial population, effectively improve the distribution diversity of individuals in the search space, and thus significantly enhance the global search capability of the algorithm.
[0044] It should be noted that the improved mathematical expression of the circle chaos mapping mechanism in this embodiment cannot be obtained through simple adjustments or a limited number of experiments. Instead, this improved mapping is obtained through a complete innovative process based on nonlinear dynamics theory → bio-feature space matching → orthogonal experimental optimization → industrial field verification, which solves the limitations of traditional methods that rely on empirical parameter adjustment.
[0045] In the attack-prey phase of the RBMO algorithm, the ability to develop search paths plays a key role in the accuracy of the solution.
[0046] To address the above technical issues, and to enhance local search accuracy while taking into account global search capabilities, this implementation introduces a golden sine search strategy. This strategy combines the golden ratio coefficient with a sine perturbation mechanism, ensuring both accuracy in the search direction and increased diversity through the introduction of nonlinear perturbations. The position update formula is as follows: ; in, is the golden ratio constant, is a uniformly distributed random number, is the sinusoidal disturbance angle, is the current optimal individual position, For the The updated position of each individual, For the The current location of each individual, for Individual position vectors.
[0047] Although the golden sine search strategy has a certain jumping ability, it is still easy to fall into repeated searches in local areas when approaching the optimal solution. Figure 7 As shown in Figure 3, the search path of the golden sine search strategy shown by the solid line shows that it still has the problems of short path and limited search range after approaching the target area.
[0048] To address the above technical issues and enhance its ability to escape boundary regions and local extreme value traps, this implementation introduces the Lévy Flight perturbation mechanism and constructs a hybrid update strategy as follows: ; wherein, represents distribution step, is the disturbance intensity. The distribution has a long tail characteristic, and intermittent large step jumps can be achieved.
[0049] Figure 7 The search path of the golden sine search strategy and the golden sine search strategy with the introduction of Lévy Flight disturbance mechanism (dotted line) in a certain two-dimensional target function space. It can be seen that although the golden sine search strategy can quickly converge to the vicinity of the optimal region, the overall path is biased towards regular contraction; while the golden sine search strategy with the introduction of Lévy Flight disturbance mechanism shows stronger spatial exploration ability, and its trajectory still jumps around the vicinity of the optimal solution, thus having fine search ability. From the perspective of algorithm performance, that is, the Lévy Flight disturbance mechanism does not destroy the convergence trend of the original golden sine, but by controlling the jump probability or disturbance amplitude, the boundary exploration and local refinement ability is continuously improved in the later stage. Therefore, the golden sine search strategy with the introduction of Lévy Flight disturbance mechanism is introduced into the golden sine stage in the RBMO algorithm, which has good algorithm compatibility and fusion, and is expected to improve the overall optimization precision and stability.
[0050] In addition, in order to enhance the ability of the RBMO algorithm to jump out of the local optimum in the later search stage, the embodiment introduces a simulated annealing strategy as a disturbance mechanism. This mechanism refers to the Metropolis criterion (acceptance-rejection criterion for Monte Carlo simulation) in the physical annealing process. When the new fitness value of the current individual after updating is worse than the original solution, the inferior solution is accepted with a certain probability, thereby preserving the diversity of the search space, and the acceptance probability function is as follows: ; wherein, is the inferior solution acceptance probability, the probability of the current individual accepting the inferior new solution , is the difference between the new and old solution fitness, is the current temperature, satisfying the linear annealing process: ; wherein, is the initial temperature, is the current iteration number, is the maximum iteration number. The simulated annealing strategy can effectively jump out of the local optimum trap in the convergence stage, improve the diversity and global optimal probability of the final solution, and thus improve the overall optimization performance.
[0051] However, there is a problem with directly introducing the simulated annealing strategy into the RBMO algorithm framework: the temperature decay strategy is fixed and difficult to adapt to the search rhythm at different stages.
[0052] To solve the above technical problems, this embodiment adopts adaptive simulated annealing to replace the simulated annealing strategy. Adaptive simulated annealing introduces a dynamic adjustment mechanism in temperature update, so that the temperature decay rate can be automatically adjusted according to the current search state. Specifically, adaptive simulated annealing dynamically adjusts the annealing temperature based on the gap between the current individual fitness and the global optimal solution: ; in, To control the cooling rate and avoid early convergence.
[0053] Therefore, compared to the simulated annealing strategy, adaptive simulated annealing retains more feasible solution paths during the global exploration phase and avoids premature freezing during the local convergence phase, making the overall optimization process more stable and robust. In image classification scenarios in particular, adaptive simulated annealing effectively enhances the diversity of solutions in high-dimensional parameter spaces, significantly improving the generalization ability of the classifier. When combined with the RBMO algorithm, adaptive simulated annealing complements the Blue Magpie behavioral model, effectively avoiding problems such as early convergence and insufficient jump amplitude, validating its potential for integration and performance improvement in complex classification tasks.
[0054] This implementation introduces an improved circle chaos mapping mechanism, an improved golden sine search strategy, and adaptive simulated annealing into the RBMO algorithm to construct the ORBMO-RF model. Experiments were conducted using each of these strategies individually and in pairs, comparing the classification accuracy of the models under different strategy configurations. The optimal combination was ultimately determined. The optimization results are detailed in Table 2.
[0055] Table 2 Comparison of three strategy mechanism combination optimization
[0056] According to the results in Table 2, the combination of the three strategies performs best among all strategies. The A (accuracy), P (precision), R (recall), and F1 scores on the test set are 0.9750, 0.9757, 0.9750, and 0.9750, respectively, indicating that the introduction of the improved circle chaotic mapping mechanism, the improved golden section search strategy, and the adaptive simulated annealing mechanism and their reasonable combination effectively improve the global search ability and optimization efficiency of the RBMO algorithm. In particular, the combination of the improved golden section search strategy and the adaptive simulated annealing and the combination of the improved circle chaotic mapping mechanism and the improved golden section search strategy also achieve high accuracy, further verifying the important role of multi-strategy collaborative optimization in improving the model generalization ability. Therefore, the ORBMO-RF model can be used as a more stable and robust optimization model scheme for ginseng seed classification tasks.
[0057] Therefore, the above three mechanisms optimize the search ability and stability of the RBMO algorithm at different stages: the improved circle chaotic mapping mechanism improves the distribution quality of the initialized population, the improved golden section search strategy enhances the local development and path diversity, and the adaptive simulated annealing effectively improves the ability of the algorithm to jump out of the local optimum. Under the overall action, the global optimization ability and convergence precision of the RBMO algorithm are significantly improved. The RF model exhibits excellent performance in classification tasks due to its random sampling strategy and voting-based decision-making mechanism in the ensemble learning mechanism. Existing research shows that the classification accuracy of the RF model depends largely on two key hyperparameters: the number of learners (i.e., the number of decision trees) and the sampling dimension of the feature space (i.e., the maximum proportion of feature subsets available to each tree). However, the optimal configuration of these hyperparameters usually depends on the specific application scenario. If the number of decision trees is too small, it may lead to insufficient model diversity, making it difficult to effectively capture complex data distributions. On the other hand, too many trees will significantly increase the computational overhead and reduce the operational efficiency. Similarly, the setting of the feature subset dimension needs to balance between information preservation and feature redundancy: too low a sampling ratio may result in the loss of key information, while too high a ratio may reduce the diversity between sub-models, thereby increasing model bias and affecting classification performance.
[0058] To solve the above technical problems, the RBMO algorithm of the present embodiment realizes the adaptive optimization of hyperparameters and constructs the ORBMO-RF model, including the following steps: Step S301, initialize the population, set the population size , the maximum number of iterations , the dimension of the problem to be solved , the lower limit of the search interval and the upper limit .
[0059] Step S302, the improved circle chaos mapping mechanism is used to initialize the population position, a chaotic sequence is generated in the interval [0, 1], and is mapped to the interval corresponding to each dimension parameter, thereby achieving uniform coverage of the parameter space and ensuring initial diversity, and the fitness of each individual is calculated, and the current optimal individual is recorded.
[0060] Step S303, according to the hierarchical cooperation mechanism of the blue-billed magpie, the population is divided into “leaders” and “followers”, and the search direction is dynamically adjusted through the position update formula to simulate the cooperative prey searching behavior of leaders and followers in the population.
[0061] Step S304, in order to prevent premature convergence of the search, based on the adaptive switching probability, a golden sine search strategy combined with a Lévy Flight disturbance mechanism is introduced to finely develop the neighborhood of the current optimal solution, so as to strengthen the local search ability and improve the convergence accuracy.
[0062] Step S305, the boundary of the updated individual position is limited to ensure that all hyperparameter values are always within the predefined search range, preventing the occurrence of illegal solutions.
[0063] Step S306, adaptive simulated annealing is added to the current global optimal individual, and a Gaussian disturbance is superimposed through dynamic temperature control to guide the individual to accept poor solutions to escape from local optimality, thereby enhancing the fine search ability in the later period and the global optimization ability of the algorithm.
[0064] Step S307, if the fitness of the disturbed new individual is better than that of the original global optimal solution, the new individual is updated; otherwise, the original solution is retained to prevent excessive disturbance from destroying the existing optimal solution and maintain the convergence stability.
[0065] Step S308, the “food storage” mechanism is executed: the optimal hyperparameter combination obtained in the current iteration and its fitness value are recorded, and the historical optimal solution set is updated.
[0066] Step S309, steps S303 to S308 are executed in a loop until the maximum number of iterations is reached, or there is no significant improvement in fitness for a certain number of consecutive generations, triggering the early stopping criterion.
[0067] Step S310, the optimization process is terminated, and the optimal RF model hyperparameters are output to construct a high-performance random forest classification model and improve the classification accuracy and generalization ability.
[0068] As shown in Table 3, the ORBMO-RF model exhibits better recognition ability than the RF model in distinguishing highly similar seed samples, indicating that it has strong application potential and development prospects in non-destructive seed identification tasks.
[0069] Table 3 Comparison of classification performance of ginseng seed varieties by RF model and ORBMO-RF model
[0070] Therefore, the present embodiment provides theoretical and methodological support for the classification of seed varieties with subtle morphological differences. The successful application demonstrates the feasibility of multi-source data fusion strategy in solving seed classification problems, providing a new paradigm for addressing the problem of insufficient discrimination of single features and promoting the development of related classification theories. The proposed RBMO algorithm effectively improves the efficiency and stability of the RBMO algorithm by introducing an improved circle chaotic mapping mechanism, an improved golden sine search strategy, and a module adaptive simulated annealing. The design idea provides a new theoretical perspective for the field of model parameter optimization and is universally applicable, which can be extended to more classification tasks. The research results have important practical value for ginseng industry and agricultural breeding. The high-precision non-destructive classification method constructed directly serves the key demand of ensuring the purity of ginseng seed varieties, which is the basis for standardized planting, stability of medicinal components, and high yield and high quality. The ORBMO-RF model can achieve rapid and accurate seed variety identification, effectively avoiding problems such as reduced germination rate, uneven plant growth, and inconsistent medicinal components caused by mixed varieties; at the same time, it can ensure seedling survival rate and growth consistency, optimize resource utilization efficiency, ultimately improve yield and economic benefits, and reduce the time, cost, and professional dependence of manual feature screening and model parameter tuning.
[0071] Embodiment three, a ginseng seed non-destructive classification system according to the present embodiment, the system is realized by using the ginseng seed non-destructive classification method according to the first embodiment, comprising the following modules: An acquisition module acquires image data and hyperspectral data of ginseng seeds, respectively; A preprocessing module preprocesses the image data and hyperspectral data of ginseng seeds, respectively; A screening module performs feature screening on the preprocessed image data and hyperspectral data of ginseng seeds, respectively; A fusion module fuses the feature-screened image data and hyperspectral data of ginseng seeds; A construction module improves the RBMO algorithm and combines it with the RF model to construct an ORBMO-RF model; A classification module inputs the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thereby completing the classification of ginseng seeds.
[0072] The above describes in detail the ginseng seed nondestructive classification method and system of the present application. The principles and implementation manners of the present application are described by using specific examples. The above examples are only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges will be changed according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A non-destructive classification method for ginseng seeds, characterized in that: The following steps are involved: Step S1, collecting image data and hyperspectral data of ginseng seeds respectively; Step S2, preprocessing the image data and hyperspectral data of the ginseng seeds respectively; Step S3, performing feature screening on the pre-processed ginseng seed image data and the ginseng seed hyperspectral data respectively; Step S4, fusing the image data of the ginseng seeds after feature screening with the hyperspectral data of the ginseng seeds; Step S5, after improving the RBMO algorithm, it is combined with the RF model to construct the ORBMO-RF model; Step S6: Input the fused ginseng seed image data and the ginseng seed hyperspectral data into the ORBMO-RF model for processing, thereby completing the classification of the ginseng seeds.
2. The non-destructive classification method for ginseng seeds according to claim 1, characterized in that: In step S5, the RBMO algorithm is improved as follows: In the population initialization phase of the RBMO algorithm, an improved circle chaos mapping mechanism is introduced; In the attack-prey phase of the RBMO algorithm, an improved golden sine search strategy is introduced; In the later search phase of the RBMO algorithm, adaptive simulated annealing is introduced.
3. The non-destructive classification method for ginseng seeds according to claim 2, characterized in that: The improved circle chaotic mapping mechanism is specifically as follows: ; Among them, the parameters ,parameter , is the next chaos value, For the current chaos, It is a modulo operation.
4. The non-destructive classification method for ginseng seeds according to claim 2, characterized in that: The improved golden sine search strategy is specifically as follows: The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy.
5. The non-destructive classification method for ginseng seeds according to claim 4, characterized in that: The LévyFlight perturbation mechanism is introduced to improve the golden sine search strategy, specifically: ; in, for Distribution step size, is the disturbance intensity, is the golden ratio constant, is a uniformly distributed random number, is the sinusoidal disturbance angle, is the current optimal individual position, For the The updated position of each individual, For the The current location of each individual, for Individual position vectors.
6. The non-destructive classification method for ginseng seeds according to claim 4, characterized in that: The adaptive simulated annealing is specifically as follows: ; in, is the current temperature, is the initial temperature, To control the cooling rate, is the current iteration number.
7. A ginseng seed non-destructive classification system, said system being implemented by the ginseng seed non-destructive classification method according to claim 1, characterized in that: Includes the following modules: an acquisition module for respectively acquiring image data and hyperspectral data of ginseng seeds; A preprocessing module, which preprocesses the image data and hyperspectral data of ginseng seeds respectively; A screening module performs feature screening on the pre-processed ginseng seed image data and the ginseng seed hyperspectral data respectively; A fusion module is used to fuse the image data of ginseng seeds after feature screening with the hyperspectral data of ginseng seeds; Building module, after improving the RBMO algorithm, it is combined with the RF model to construct the ORBMO-RF model; The classification module inputs the fused ginseng seed image data and the ginseng seed hyperspectral data into the ORBMO-RF model for processing, thereby completing the classification of ginseng seeds.
Citation Information
Patent Citations
Improved sparrow intelligent optimization method based on chaotic mapping and golden sine strategy
CN112926139A
Network coverage enhancement method and device of sparrow algorithm based on hybrid strategy improvement
CN117692913A
Fan blade fault diagnosis method based on voiceprint signal
CN118998005A
Cited By
Multistage image segmentation method
CN121010619A
A multi-level image segmentation method
CN121010619B
Ginseng age lossless classification model construction method and ginseng age lossless classification system
CN121982414A
Ginseng seed emergence rate prediction method and system and ginseng seed emergence rate model construction method and system
CN122021366A