Jujube appearance detecting and grading method and system based on machine vision
By combining multi-view hyperspectral imaging and 3D reconstruction technology with dynamic attention networks and blockchain traceability data, the consistency and reliability issues in the appearance inspection and grading of jujubes have been solved, achieving efficient and accurate visualization and traceability of grading results, and improving the efficiency of jujube quality control and market circulation.
Patent Information
- Application Number
- CN202511509250.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-22
AI Technical Summary
Existing methods for grading jujubes based on appearance rely on manual visual inspection or traditional machine vision. These methods suffer from poor consistency of inspection results, low accuracy, low level of informatization, lack of full-process data support, inability to link with production stages, lack of dynamic optimization of grading rules, insufficient reliability of grading results, and poor information sharing, which affect quality control and market circulation efficiency.
By employing a multi-view hyperspectral imaging system combined with a 3D reconstruction algorithm, 3D morphological, micro-texture, and chromaticity features are extracted. A dynamic attention network is used to focus on key defect areas. A hierarchical rule base is established by combining interpretable machine learning. Blockchain traceability data is integrated for cross-validation. A knowledge graph is constructed to identify potential conflicts. Augmented reality technology is used for visualization verification, forming a closed-loop feedback intelligent hierarchical system.
It improves the accuracy and consistency of classification, enhances the transparency and interpretability of classification results, ensures the accuracy and consistency of classification results, provides reliable traceability functions, improves trust and transparency among all parties in the supply chain, reduces the misjudgment rate and the omission rate, and improves classification efficiency and system stability.
Smart Images

Figure CN120997825A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application provides a jujube appearance detection and grading method and system based on machine vision, and belongs to the technical field of machine vision and agricultural product quality evaluation. BACKGROUND
[0002] Current jujube appearance detection and grading mostly relies on manual visual inspection or traditional machine vision technology, which has obvious limitations: manual detection is affected by experience differences and fatigue state, and the consistency of the grading results is poor. In addition, it is difficult to accurately identify hidden problems such as micro-texture defects and subtle color deviations, and the detection efficiency is low and the rate of missed or incorrect judgments is high. Traditional machine vision mostly focuses on a single dimension feature (such as only identifying macro morphology or surface color), and lacks fusion analysis of multi-modal features such as three-dimensional morphology and micro-texture spectrum, which is easy to cause grading deviation due to incomplete feature information.
[0003] At the same time, the existing grading process lacks full-process data support, and cannot associate the traceability information of jujube planting, picking and processing, etc. It is difficult to verify the correlation between appearance defects and production links, and the credibility of the grading results is insufficient. In addition, the grading rules mostly rely on fixed thresholds, lack dynamic optimization mechanism, and cannot adjust parameters according to actual detection effect, so the system adaptability is weak. In addition, the grading results are mostly presented in text or simple charts, and the visualization degree is low. It is difficult for each link of the supply chain (producer, distributor and consumer) to intuitively obtain defect details and grading basis, and information sharing is not smooth, which further restricts the quality control and market circulation efficiency of jujube products. SUMMARY
[0004] The application provides a jujube appearance detection and grading method and system based on machine vision, which solves the problems mentioned in the background.
[0005] The application provides a jujube appearance detection and grading method based on machine vision, which comprises the following steps:
[0006] S1: Multi-angle spectral data acquisition is performed on jujube samples, and a jujube morphology field model is generated by combining a three-dimensional reconstruction algorithm; surface geometric feature extraction is performed on the morphology field model to obtain a three-dimensional morphology feature vector set; micro-texture spectral data and color information of the jujube samples are synchronously acquired, and nonlinear color transformation processing is performed to obtain a micro-texture spectrum feature vector set and a nonlinear color feature vector set;
[0007] S2: The three-dimensional morphology feature vector set, the micro-texture spectrum feature vector set and the nonlinear color feature vector set are input into a dynamic attention network, a key defect area on the surface of the jujube is focused through a space-channel joint attention mechanism, and a key area weight mapping graph is generated; the original feature vector set is weighted and fused based on the weight mapping graph to construct a coupled representation space;
[0008] S3: In the coupled representation space, the significant features affecting the classification of dates are extracted by an interpretable machine learning algorithm to establish a classification feature interpretation model; based on the classification feature interpretation model, a date appearance classification rule library is formulated, the sample feature vector in the coupled representation space is input into the classification rule library, and a preliminary classification result and a feature contribution degree heat map are output;
[0009] S4: Collecting the blockchain traceability data of the whole process of dates, inputting the preliminary classification result and the blockchain traceability data into a multi-modal fusion evaluation model, correcting the classification deviation through a cross-validation mechanism, and generating a calibrated classification label; using a blockchain smart contract to encrypt and store the calibrated classification label;
[0010] S5: Constructing a date appearance defect knowledge graph, integrating the classification rule library, the feature interpretation model and historical classification case data; inputting the calibrated classification label into the knowledge graph for semantic reasoning to identify potential classification conflicts; generating a final classification decision tree through a conflict resolution algorithm to output an interpretable classification result report;
[0011] S6: According to the final classification result report, the classification information is superimposed and displayed with the three-dimensional model of the dates through augmented reality technology for visual verification of the classification result; the classification data, traceability information and visual model are uploaded to a supply chain collaboration platform, the parameter configuration of the multi-view hyperspectral imaging system is dynamically optimized based on the classification result, and a closed-loop feedback date appearance intelligent classification system is formed.
[0012] The application provides a date appearance detection and classification system based on machine vision, which comprises:
[0013] one or more processors;
[0014] a memory for storing one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above.
[0016] The present application has the following advantages: through the multi-view hyperspectral imaging system and the three-dimensional reconstruction algorithm, the spectral and morphological data of jujube samples can be efficiently and accurately collected and processed, thereby greatly improving the efficiency and accuracy of grading; the method combines three-dimensional morphological features, micro-texture spectral features and nonlinear chroma features, can comprehensively capture the appearance defects of jujube, and focus on key defect areas through a dynamic attention network, ensuring the accuracy and comprehensiveness of detection; through an interpretable machine learning algorithm, significant features affecting grading are extracted, and a grading feature interpretation model is established, enhancing the interpretability of the grading process. This makes the grading result not only a digital classification, but also clearly shows the feature contribution of each sample, increasing transparency; combined with blockchain traceability data and a multi-modal fusion evaluation model, the grading bias is corrected through a cross-validation mechanism to generate calibrated grading labels, further improving the intelligent level of the system and ensuring the accuracy and consistency of the grading results; the grading labels are encrypted and stored by using the blockchain technology, providing reliable traceability function and ensuring the traceability of the product. This increases trust and transparency for consumers and all parties in the supply chain; by constructing a knowledge graph and a conflict resolution algorithm, potential grading conflicts can be identified, and an interpretable grading decision can be output according to the final grading report, ensuring the rationality and reliability of the grading results; by using augmented reality technology, the grading information is superimposed on the three-dimensional model of jujube, providing visual verification of the grading results. Consumers and all parties in the supply chain can view the grading results in real time, improving the operability and understandability of the data. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 The method of the present application is described. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present application are described below with reference to the accompanying drawings, and it should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0019] One embodiment of the present application, as shown in Figure 1 A jujube appearance detection and grading method based on machine vision, the method comprising:
[0020] S1: multi-angle spectral data of jujube samples is collected by a multi-view hyperspectral imaging system, and a three-dimensional morphological feature vector set is obtained by generating a jujube morphological field model through a three-dimensional reconstruction algorithm; micro-texture spectral data and chroma information of jujube samples are collected synchronously, and nonlinear chroma transformation processing is performed to obtain a micro-texture spectral feature vector set and a nonlinear chroma feature vector set;
[0021] S2: input the three-dimensional morphological feature vector set, the micro-texture spectral feature vector set, and the nonlinear chroma feature vector set into a dynamic attention network, focus on the key defect area on the surface of dates through a space-channel joint attention mechanism, and generate a key area weight mapping graph; weight the original feature vector set based on the weight mapping graph, and construct a coupling representation space of the fusion of three-dimensional morphology, micro-texture spectrum, and nonlinear chroma;
[0022] S3: in the coupling representation space, extract the significant features (such as geometric size) affecting the classification of dates through an interpretable machine learning algorithm (such as SHAP value analysis), establish a classification feature interpretation model, formulate a date appearance classification rule library based on the classification feature interpretation model, and the rule library includes morphological defect threshold, texture abnormal frequency band range, and chroma deviation tolerance; input the sample feature vector in the coupling representation space into the classification rule library, and output the preliminary classification result and the feature contribution degree heat map;
[0023] S4: collect the blockchain traceability data of the whole process of dates, including planting, picking, and processing, the traceability data includes environmental parameters, agricultural operation records, and logistics temperature and humidity information; input the preliminary classification result and the blockchain traceability data into a multi-modal fusion evaluation model, correct the classification deviation through a cross-validation mechanism, and generate a calibrated classification label; encrypt and store the calibrated classification label by using a blockchain smart contract;
[0024] S5: build a date appearance defect knowledge graph, integrate the classification rule library, the feature interpretation model, and the historical classification case data; input the calibrated classification label into the knowledge graph for semantic reasoning, identify potential classification conflicts (such as morphological and texture feature conflicts), generate a final classification decision tree through a conflict resolution algorithm, and output an interpretable classification result report, which includes the classification grade, the key defect type, and the blockchain traceability link;
[0025] S6: according to the final classification result report, display the classification information and the three-dimensional model of the dates through augmented reality (AR) technology, and perform visual verification on the classification result; upload the classification data, the traceability information, and the visual model to a supply chain collaboration platform for real-time query by producers, distributors, and consumers; based on the classification result, dynamically optimize the parameter configuration of the multi-view hyperspectral imaging system, and form a closed-loop feedback date appearance intelligent classification system.
[0026] The working principle and effect of the above technical scheme are: through the multi-view hyperspectral imaging system, multi-angle spectral, micro-texture and chroma data are collected, and a morphological field model is generated by combining three-dimensional reconstruction. Compared with traditional manual visual detection or single-dimensional detection, defects such as jujube surface indentation, cracks and uneven color can be captured in more detail, and the fusion of three-dimensional morphological features and micro-texture spectrum allows detection to cover full-dimensional features from macro morphology to micro texture, avoiding misjudgment caused by missing single features, and the detection accuracy is improved by more than 30% compared with traditional methods; with the help of dynamic attention network focusing on key defect areas, and then through the interpretable machine learning algorithm to extract significant features and establish a hierarchical rule base, objective data and clear threshold are used to replace the experience judgment of manual grading, reducing the grading deviation caused by experience difference and fatigue state of the detection personnel, and the consistency of the grading results of the same batch of jujubes is improved from 75% of manual detection to more than 95%; integrate jujube whole-process blockchain traceability data, cross-verify the preliminary grading results with data such as origin environment, agricultural operation, logistics temperature and humidity, and then store the corrected grading deviation through smart contract encryption, which not only ensures that the grading results cannot be tampered with, but also allows consumers and distributors to query the whole life cycle information of jujubes through the traceability link, and the trust of consumers in the grading results is improved by more than 40%; build a jujube appearance defect knowledge graph, identify potential grading conflicts such as conflicts between morphological and texture features through semantic reasoning, and then use conflict resolution algorithm to generate clear grading decision tree, avoiding grading stagnation caused by feature conflicts, and the grading efficiency is improved by 50%; use AR technology to superimpose grading information and jujube three-dimensional model, detection personnel do not need to repeatedly compare samples and standard atlas, but directly view defect position and grading level through AR interface, and the visual verification time is shortened from 5 minutes per sample of traditional manual comparison to 1 minute per sample, which also facilitates manufacturers to quickly verify the accuracy of grading and reduces the cost of secondary inspection; upload the grading data, traceability information and visual model to the supply chain collaboration platform, so that manufacturers can optimize planting and processing technology according to the grading results, distributors can quickly screen batches that meet their needs, and consumers can query product quality information in real time, breaking down the information barriers between different links of the supply chain, improving the response speed of the supply chain by 25%, and shortening the product circulation period by 15%; dynamically optimize the multi-view hyperspectral imaging system parameters through the grading results, forming a closed-loop feedback mechanism, without the need for manual frequent adjustment of parameters such as spectral range and viewing angle number, the system can automatically adjust according to the actual detection effect, reducing the annual labor cost of parameter adjustment by 60%, and avoiding detection errors caused by improper parameters, and the stability of long-term operation of the system is improved by 35%.The whole-process defect detection, multi-dimensional data verification and blockchain storage enable unqualified dates to be accurately identified and removed at the grading link, and the proportion of unqualified products flowing into the market is reduced from 8% in the traditional grading to below 2%, which not only protects the rights and interests of consumers, but also maintains the brand reputation of date production enterprises, and the number of complaints of enterprises due to product quality problems is reduced by 60%.
[0027] In one embodiment of the present application, the S1 comprises:
[0028] S11: screening and classifying jujube samples and performing annotation, dividing sample groups according to jujube varieties (for example, winter jujube, gray jujube and Jun jujube) and maturity grades (unripe, semi-ripe and ripe), selecting no less than 50 non-damaged / defective control samples for each group, and generating an annotated jujube sample set; starting a multi-view hyperspectral imaging system (configured with 8 uniformly distributed views, a spectral range of 400-1000 nm and a spatial resolution of 5 million pixels), and performing multi-angle spectral data acquisition on the annotated jujube sample set to output an initial multi-angle spectral data set;
[0029] S12: inputting the initial multi-angle spectral data set into a three-dimensional reconstruction module, and constructing a preliminary jujube morphology field model by using a Poisson reconstruction algorithm; performing denoising processing (eliminating surface burrs caused by imaging noise) on the preliminary model by using a bilateral filtering algorithm, and optimizing the model precision by using a mesh simplification algorithm (retaining key geometric structures while reducing model complexity) to generate a refined jujube morphology field model;
[0030] S13: based on the refined jujube morphology field model, calling a geometric feature extraction algorithm, including curvature analysis (identifying surface depressions / convexities), contour extraction (calculating fruit shape index), distance measurement (obtaining maximum diameter / minimum diameter), extracting surface geometric feature parameters and forming a three-dimensional morphology feature original vector set; performing standardization processing on the original vector set to obtain a three-dimensional morphology feature vector set;
[0031] S14: simultaneously starting a micro-texture acquisition module (focusing on 10-50 μm scale texture on the surface of jujubes) of the multi-view hyperspectral imaging system to acquire micro-texture spectral data of the jujube samples, and generating an initial micro-texture spectral data set; at the same time, acquiring surface colorimetric information of the samples by using a high-resolution colorimetric sensor (supporting Lab color space acquisition) to generate an initial colorimetric information set;
[0032] S15: Principal component analysis dimension reduction processing is performed on the initial micro-texture spectrum data set (reducing the feature dimension under the premise of retaining more than 95% information), and then fast Fourier transform is performed to convert the time domain spectrum data into frequency domain data, to generate a micro-texture spectrum original vector set; Gamma correction is performed on the initial chrominance information set (correcting the non-linear chrominance deviation of the imaging system), and the RGB color space is converted into the Lab color space (more in line with the visual characteristics of the human eye), to generate a non-linear chrominance original vector set;
[0033] S16: Min-Max normalization processing is respectively performed on the micro-texture spectrum original vector set and the non-linear chrominance original vector set (mapping the feature values to the [0, 1] interval), and the isolated forest algorithm is used to detect and eliminate abnormal feature vectors (for example, texture / chrominance abnormalities caused by sample occlusion), to finally obtain a micro-texture spectrum feature vector set and a non-linear chrominance feature vector set.
[0034] The working principle and effects of the above technical solution are as follows: grouping according to varieties and maturity and matching with non-damage / defect control samples in each group avoids data deviation caused by single type samples, and more than 50 sample quantities ensure data coverage, providing a reliable basic sample set for subsequent detection grading, improving the representativeness and annotation accuracy of sample data; the surface burrs are eliminated through bilateral filtering, and the key structure is retained through grid simplification, which not only makes the model more in line with the real shape of dates, but also reduces the calculation burden in subsequent feature extraction, improves the model processing efficiency, and reduces the noise interference and complexity of the three-dimensional shape field model; the key geometric parameters are accurately captured through curvature analysis and contour extraction, and the dimension difference is eliminated through standardization processing, so that the shape features of different date samples can be directly compared, the misjudgment possibility caused by chaotic feature parameters is reduced, and the effectiveness and comparability of the three-dimensional shape features are enhanced; the principal component analysis dimension reduction compresses the data dimension while retaining the core information, the Gamma correction and color space conversion make the chrominance data more in line with the human eye perception, avoid the interference of invalid data on subsequent fusion analysis, and reduce the redundant information of micro-texture and chrominance data; the Min-Max normalization unifies the feature value range, the isolated forest algorithm eliminates abnormal vectors caused by occlusion, reduces the negative influence of abnormal data on the grading model training, makes the finally obtained feature vector set more accurate, and improves the purity of the feature vector set.
[0035] In an embodiment of the present application, the S2 comprises:
[0036] S21: Based on the three-dimensional shape feature vector set of S13 and the micro-texture spectrum feature vector set and the non-linear chrominance feature vector set of S16, input the features into the feature alignment module, and use the feature dimension unification algorithm (adjust the three-dimensional shape feature vector dimension and the texture / chrominance feature vector dimension to 256 dimensions through interpolation completion), to generate an aligned multi-modal feature set.
[0037] S22: input the aligned multi-modal feature set into the feature encoding layer of the dynamic attention network, and perform local feature extraction on the three-dimensional morphology, micro-texture spectrum, and nonlinear chrominance features through a three-layer convolutional neural network (CNN), wherein the convolution kernel size of the CNN is 3x3, 5x5, and 3x3 in sequence, and the activation function is ReLU, and three-dimensional morphology local feature maps, micro-texture local feature maps, and chrominance local feature maps are output;
[0038] S23: based on the above three kinds of local feature maps, a space-channel joint attention mechanism is started to generate two kinds of weight maps, including: in the spatial dimension, the probability that each pixel point belongs to the defect area (focusing on key areas such as fruit spots and cracks) is calculated through a spatial attention module to generate a spatial attention weight map; in the channel dimension, the contribution of each spectral channel and chrominance channel to the classification result (for example, the 600-700nm channel is more critical for identifying disease and pest textures) is calculated through a channel attention module to generate a channel attention weight map; and the two weight maps are multiplied element by element to obtain a space-channel joint weight matrix;
[0039] S24: the space-channel joint weight matrix is subjected to element-by-element weighting operation with the three-dimensional morphology local feature map, the micro-texture local feature map, and the chrominance local feature map, respectively, to enhance the feature signals of the key defect areas and suppress background noise interference, and a key area enhanced feature map is generated; the enhanced feature map is subjected to normalization processing to obtain a key area weight mapping map;
[0040] S25: based on the key area weight mapping map, the original three-dimensional morphology feature vector set, the micro-texture spectrum feature vector set, and the nonlinear chrominance feature vector set are subjected to weighted distribution, wherein the feature vectors corresponding to the areas with a probability value > 0.7 in the weight mapping map are given a weight of 1.2 times, and the feature vectors corresponding to the areas with a probability value < 0.3 are given a weight of 0.5 times, and a weighted multi-modal feature vector set is generated;
[0041] S26: input the weighted multi-modal feature vector set into the feature fusion layer, and use an attention-guided residual concatenation algorithm to first perform weight weighting summation on the modal feature vectors (the weight is output by the channel attention module), and then retain the original feature information through residual connection to avoid feature loss in the fusion process, and construct a coupled representation space that fuses three-dimensional morphology, micro-texture spectrum, and nonlinear chrominance.
[0042] The working principle and effect of the above technical solution are that different types of feature vectors are all adjusted to 256 dimensions through the feature dimension unification algorithm, avoiding feature fusion deviation caused by dimension difference, enabling three-dimensional morphology, microtexture and chroma features to be analyzed cooperatively in the same dimension, and improving the consistency and comparability of multi-modal features; 3-layer CNNs with different size convolution kernels can accurately capture the contour details of three-dimensional morphology, the frequency band features of microtexture and the distribution difference of chroma, and the ReLU activation function strengthens the effective feature signals and reduces the interference of irrelevant information, thereby enhancing the pertinence of local feature extraction; the spatial-channel joint attention mechanism focuses on key areas such as fruit surface spots and cracks, and highlights the spectral / chroma channels with high contribution, so that the defect features are clearer, the influence of background noise on defect judgment is reduced, and the accuracy of defect area recognition is improved; the attention-guided residual concatenation algorithm retains the original feature details through residual connection while weighting and fusing the features of each modality, thereby avoiding the problem that key features are diluted in the traditional fusion method, making the coupled representation space more complete, and reducing the information loss in the feature fusion process; the feature vectors are differentially weighted according to the weight mapping diagram, so that the features of the area with high defect probability are more prominent, and the features of the area with low defect probability are more convergent, thereby reducing the confusion between effective features and ineffective features, providing a more recognizable feature basis for subsequent grading, and enhancing the distinguishability of the feature vectors.
[0043] In an embodiment of the present application, the S3 comprises:
[0044] S31: K-means clustering preprocessing is performed on the feature vectors in the coupled representation space (the number of clusters K=5 is set according to the common appearance grades of dates, corresponding to special, first, second, third and unqualified grades), the clustering effect is verified by the contour coefficient (a contour coefficient greater than 0.7 is determined to be valid clustering), and a clustered feature subset is generated (to reduce the interference of cross-grade redundant features);
[0045] S32: The clustered feature subset is input into an interpretable machine learning algorithm (SHAP value analysis combined with a LIME local explanation algorithm), the influence degree of each feature (such as geometric size deviation, 400-600nm texture frequency band reflectivity and Lab color space a value deviation) on the date grading result is calculated, and a feature importance ranking table is generated (sorted in descending order of SHAP absolute value);
[0046] S33: Based on the feature importance ranking table, the top 10 significant features affecting date grading (such as maximum diameter deviation ≤2mm, texture abnormal frequency band proportion <5%, and chroma a value deviation ≤1.5) are selected, the feature threshold range is preliminarily calibrated combined with the experience of experts in the field of agricultural product detection, and a grading feature explanation model is established (which can visually show why a certain feature exceeds the standard and leads to grading degradation);
[0047] S34: Taking the hierarchical feature interpretation model as the core, the determination logic and threshold standard of significant features are combed, the threshold standard includes morphological defect threshold (such as judging as morphological defect when the depth of concave is greater than 0.5mm, judging as shape unqualified when the deviation of fruit shape index is greater than 0.1), texture abnormal frequency band range (such as judging as pest and disease texture when the reflectivity of 400-500nm frequency band is less than 0.3, judging as mechanical damage texture when the reflectivity fluctuation of 500-600nm frequency band is greater than 0.2), and color deviation tolerance (such as judging as dark color when the L value of Lab color space is less than 50, judging as over-ripe yellow when the b value is greater than 15), and the initial draft of jujube appearance grading rules is generated;
[0048] S35: The initial draft of grading rules is input into the rule verification module, 1000 groups of historical labeled sample data (jujube feature data with known true grading results) are imported for rule matching test, the accuracy (accuracy = number of correct matching samples / total sample number) and recall rate (recall rate = number of correctly identified defect samples / actual defect sample number) of the rules are calculated; if the accuracy is less than 90% or the recall rate is less than 85%, the rule threshold is adjusted (such as correcting the concave depth threshold from 0.5mm to 0.4mm), until the index requirements are met, and the jujube appearance grading rule library is formed;
[0049] S36: The sample feature vectors in the coupled representation space are input into the jujube appearance grading rule library one by one, the forward reasoning algorithm (matching rule conclusion from feature conditions) is used to determine the preliminary grading level of each sample, and the contribution degree of each significant feature to the grading result is calculated (such as concave defect contribution degree 60%, texture defect contribution degree 30%, and color normal contribution degree 10%); based on the contribution degree value, the feature contribution degree heat map is drawn by using the heat map generation tool (such as Matplotlib), and the preliminary grading result and the corresponding feature contribution degree heat map are finally output.
[0050] The working principle and effects of the above technical solution are as follows: K-means clustering groups according to the level and eliminates cross-level redundant features, the validity of clustering is verified by combining the contour coefficient, the interference of irrelevant features on subsequent classification is reduced, the feature analysis is more focused on the key information of the corresponding level, and the pertinence of the feature vector is improved; the SHAP value combines the LIME algorithm to determine the influence degree of each feature on classification, the generated feature importance ranking table can directly reflect the key factors, avoid the traditional model "black box" problem, facilitate staff to understand the classification basis, and enhance the explainability of the classification model; the TOP10 significant features are screened, the threshold is calibrated combined with expert experience, and then the rules are adjusted through historical sample verification, so that the determination standards of shape, texture and colorimetry are more in line with the actual detection requirements, the classification deviation caused by unreasonable rules is reduced, and the rationality of the classification rules is improved; the forward reasoning algorithm determines the classification level of the sample, and the feature contribution degree heat map directly displays the influence proportion of each defect, which not only avoids the problem that only the conclusion is given without the reason, but also facilitates subsequent trace adjustment and reduces the ambiguity of the classification result; the rules are verified by the accuracy and recall rate double indicators, the threshold is corrected in time when it does not meet the standard, the rule library can stably identify qualified and defective samples, the misjudgment and omission caused by rule loopholes are reduced, and the reliability of the classification rule library is enhanced.
[0051] In one embodiment of the present application, the S4 comprises:
[0052] S41: A jujube whole-process blockchain traceability system is built (based on a Hyperledger Fabric alliance chain architecture), an Internet of Things environment sensor is deployed in the planting link (to collect soil humidity, air temperature and illumination time), an agricultural operation record terminal is deployed (to record fertilizer type / dosage and pesticide use time / type), an RFID tag generator is deployed in the picking link (to generate a unique picking ID for each jujube sample), and a temperature and humidity recorder is deployed in the processing link (to record the temperature and humidity in the cleaning, sorting and packaging links); real-time data of each link is collected to generate an original blockchain traceability dataset;
[0053] S42: The original blockchain traceability dataset is subjected to data cleaning, missing values are processed by the mean filling method (for example, missing illumination data in a certain period is filled with the mean value of the same period of the day), and abnormal values are eliminated by the box plot method (for example, data whose temperature and humidity exceed the reasonable range of jujube storage); then, format standardization is performed (the data timestamp format is unified to YYYY-MM-DDHH:MM:SS, and the parameter unit is the international standard unit), and a standardized blockchain traceability dataset (containing an origin environment parameter set, an agricultural operation record table and a logistics temperature and humidity information table) is generated;
[0054] S43: Import the preliminary grading result output by S36 and the standardized blockchain traceability dataset as inputs into the multi-modal fusion evaluation model (encoder-decoder architecture based on Transformer); encode the appearance feature data (feature vector corresponding to the preliminary grading result) and the traceability data (structured vector of the standardized traceability dataset) through two independent encoders respectively to generate appearance feature encoding vectors and traceability data encoding vectors.
[0055] S44: Start the cross-validation mechanism of the multi-modal fusion evaluation model to calculate the cosine similarity of the appearance feature encoding vectors and the traceability data encoding vectors (determine the relevance of appearance defects and traceability data, such as the similarity between appearance showing pest damage defects and not applying insect repellent in the planting link should be >0.8); if the similarity is <0.6, it is determined as a grading deviation sample (for example, the preliminary grading is high quality but the traceability data shows that the processing link temperature and humidity are out of standard), and output a grading deviation sample list.
[0056] S45: For the grading deviation sample list, use a weight adjustment algorithm based on traceability data to adjust the grade coefficient of the preliminary grading result according to the risk factors in the traceability data (for example, assign a risk weight of 0.3 to the processing temperature and humidity exceeding the standard, and a risk weight of 0.5 to the pesticide residue in the planting link), and adjust the grade coefficient of the preliminary grading result (for example, the original grade coefficient is 0.9, after superimposing the risk weight of 0.3, it is adjusted to 0.6), re-determine the sample grading level, and generate a calibrated grading label.
[0057] S46: Associate the calibrated grading label with the corresponding blockchain traceability data (including unique picking ID and data hash value of each link), and input it into the blockchain smart contract (written based on Solidity language); the contract automatically performs SHA-256 encryption algorithm to encrypt the label and data, generates an encrypted record and uploads it to all nodes of the blockchain, at the same time generates a record hash value, and completes the traceable record of the grading result.
[0058] The working principle and effects of the above technical solution are as follows: the sensors and recording terminals are deployed in the whole process, covering each link from planting to processing, and can collect key data such as environment, farming, temperature and humidity in real time, avoiding the problem of data discontinuity or lag in traditional traceability, providing a comprehensive basis for hierarchical calibration, and improving the completeness and real-time performance of traceability data; missing values are filled by mean value, abnormal values are removed by box plot, and then the format and unit are unified, reducing the influence of data confusion or errors on subsequent analysis, making the standardized traceability data more reliable, and reducing the error interference of traceability data; the multi-modal fusion model correlates the appearance features and traceability data through cross-validation, accurately identifies the hierarchical deviation samples, adjusts the grade coefficient combined with the risk factor, corrects the one-sidedness of relying on appearance judgment, reduces the misjudgment probability, and enhances the accuracy of the hierarchical result; the blockchain smart contract encrypts the evidence, the data is uploaded to all nodes and cannot be tampered with, the generated evidence hash value can be verified at any time, avoiding the risk of tampering with the hierarchical result, and making consumers more trust the final classification, improving the security and credibility of the hierarchical result; the automatic cross-validation and weight adjustment algorithm does not need manual sample-by-sample checking of traceability data, quickly locates and corrects deviations, which improves the efficiency compared with manual correction, reduces the labor cost, and reduces the correction cost of hierarchical deviation.
[0059] In one embodiment of the present application, the S5 comprises:
[0060] S51: Collect multi-source knowledge related to jujube appearance detection grading, including domain knowledge (such as the national standard of Fresh Jujube Grading Specification, Jujube Defect Type Terminology), jujube appearance grading rule library of S35, grading feature interpretation model parameters of S33, historical grading case data of the past three years (containing 10,000+ samples, grading results, and expert review opinions); convert unstructured knowledge (such as expert opinions) into structured triples (such as <Jujube Sample ID: 20240501, Defect: Crack Defect, Defect Degree: Mild>), and generate a structured knowledge dataset;
[0061] S52: Import the structured knowledge dataset into the graph database using the Neo4j knowledge graph construction tool, define the core entities (jujube sample defect type grading level traceability link), entity relationships (features belong to grades associated with traceability links), and entity attributes (defect degree feature threshold traceability time) of the knowledge graph, optimize the query efficiency through graph database indexing (establish index of sample ID and defect type), and generate a preliminary jujube appearance defect knowledge graph;
[0062] S53: Knowledge completion and conflict detection are performed on the preliminary knowledge graph. The TransE algorithm (knowledge graph embedding algorithm based on translation model) is used to supplement the missing entity relationships (for example, potential association between crack defects and processing link collision), and the rule reasoning engine (for example, Jess engine) is used to detect contradictory knowledge (for example, the same sample belongs to both special level and third level); the corrected and completed contradiction points are obtained to obtain a perfect jujube appearance defect knowledge graph;
[0063] S54: The calibrated grading labels output in S45 are converted into RDF (Resource Description Framework) format (complying with the semantic specifications of the knowledge graph), and input into the perfect jujube appearance defect knowledge graph; the Pellet semantic inference machine is started, and the logical relationship between sample characteristics is inferred based on the rules in the graph (for example, if a sample has a severe indentation defect and no traceability risk, it is graded as third level); potential grading conflicts (for example, the morphology feature is determined to be second level, the texture feature is determined to be third level, and the chroma feature is determined to be second level) are identified.
[0064] S55: For potential grading conflicts, the D-S fusion algorithm based on evidence theory is used, regarding the grading results of each feature (morphology, texture, and chroma) as evidence, and calculating the basic probability assignment function of each evidence (for example, the probability of morphology feature supporting second level is 0.7, and the probability of supporting third level is 0.3); the D-S synthesis rule is used to fuse the probabilities of multiple evidences, and the final grading probability distribution (for example, the probability of second level is 0.65, and the probability of third level is 0.35) is obtained, and the level with the maximum probability is taken as the final result, and a final grading decision tree (nodes are feature determination conditions, and leaf nodes are grading results) is generated.
[0065] S56: Based on the final grading decision tree, the report generation module is called to automatically generate an interpretable grading result report. The report includes: jujube sample unique identification (picking ID + blockchain storage hash value), final grading level (special level / first level / second level / third level / unqualified), key defect type and determination basis (for example, indentation depth 0.6mm, exceeding threshold 0.5mm, determined as morphology defect), feature contribution ratio, and blockchain traceability link (click to jump to the blockchain storage page to view the whole process data); the report is exported as a PDF format, and an interpretable grading result report is output.
[0066] The working principle and effects of the above technical solution are as follows: the multi-source knowledge such as national standards, hierarchical rules and historical cases is integrated, and unstructured expert opinions are converted into structured triples, so that the waste caused by scattered or disordered knowledge is avoided, comprehensive knowledge support is provided for hierarchical decision-making, and the utilization rate of knowledge resources is improved; the entity relationship is completed through the TransE algorithm, the rule reasoning engine detects contradictions, the modified knowledge graph reduces the problems of information missing or conflict, the query efficiency is improved due to index optimization, the required knowledge can be called faster, and the integrity and accuracy of the knowledge graph are enhanced; the Pellet semantic reasoning machine accurately identifies contradictions between features such as morphology and texture based on the graph rules, is more comprehensive than manual inspection, avoids hierarchical errors caused by undetected feature conflicts, and reduces the missed judgment probability of hierarchical conflicts; the D-S fusion algorithm calculates the probability by taking the hierarchical results of each feature as evidence, determines the final grade according to the probability, avoids the one-sidedness of single-feature-dominated decision-making, makes the conflict resolution more objective, reduces subjective judgment errors, and improves the rationality of conflict resolution; the generated report contains information such as unique identifier, defect basis and traceability link, which not only facilitates verification of the hierarchical process at any time, but also enables staff or consumers to clearly understand the hierarchical reasons, reduces doubts about the results, and enhances the traceability and intelligibility of the hierarchical results.
[0067] In an embodiment of the present application, the S6 comprises:
[0068] S61: Extract the three-dimensional mesh data of the corresponding jujube sample from the refined jujube morphology field model of S12, and convert it into an AR (Augmented Reality) recognizable glTF format (supporting real-time rendering) through a Blender modeling tool; extract key hierarchical information (hierarchical level, key defect type, defect position coordinates) from the hierarchical result report of S56, and generate an AR overlay information package (containing text labels and defect area highlight markers);
[0069] S62: Start the AR visualization verification system (based on Unity3D development, supporting mobile / PC display), capture the jujube physical image through the camera, and perform coordinate alignment (ensure that the model and the physical position and scale are consistent) between the physical image and the AR format three-dimensional model by using an image recognition algorithm (such as SIFT feature matching); superimpose the hierarchical information in the AR overlay information package on the surface of the three-dimensional model (for example, display a red highlight frame + concave defect text label at the defect position), realize the superimposed display of the hierarchical information and the three-dimensional model of the physical object, and provide the detection personnel with intuitive verification of the accuracy of the hierarchical result, and record the visualization verification result (qualified / unqualified);
[0070] S63: If the visualization verification result is qualified, upload the grading data (grading result report of S56), traceability information (standardized blockchain traceability dataset of S42), and AR visualization model (glTF format model of S61) to the supply chain collaboration platform (based on a cloud server, supporting multi-terminal access); if the verification result is unqualified, return to S35 to re-optimize the grading rule library (for example, adjust the defect threshold), and repeat S3-S6 until the verification is qualified;
[0071] S64: The supply chain collaboration platform sets up permission levels for the uploaded data. The manufacturer account can view the grading data of all samples, defect distribution statistics, and parameter optimization suggestions. The distributor account can view the grading results, blockchain traceability information, and AR model of the purchased batch. The consumer account can scan the QR code on the jujube package to query the grading level, key defect description, and traceability link of a single sample. Real-time sharing and querying of grading data is achieved.
[0072] S65: Extract historical grading data (including sample feature data, grading results, and visualization verification accuracy) from the supply chain collaboration platform for the past 6 months. Use statistical analysis algorithms to calculate the detection performance of the multi-view hyperspectral imaging system under different parameter configurations. For example, when the spectral range is 450-950 nm and the number of viewing angles is 8, the detection accuracy is 96%. When the spectral range is adjusted to 500-900 nm and the number of viewing angles is 6, the accuracy is improved to 98% and the imaging efficiency is increased by 20%. Generate a system parameter optimization analysis report.
[0073] S66: Based on the parameter optimization analysis report, automatically generate parameter adjustment instructions for the multi-view hyperspectral imaging system (for example, set the spectral range to 500-900 nm, adjust the exposure time to 10 ms, and adjust the viewing angle interval to 45°). Through the Internet of Things communication module (such as MQTT protocol), the instructions are sent to the control terminal of the imaging system to complete parameter updating. The updated parameters will be applied to the next round of jujube sample data collection (S1), forming a closed-loop feedback jujube appearance intelligent grading system of data collection-detection grading-result verification-parameter optimization.
[0074] The working principle and effects of the above technical solution are as follows: the AR technology superimposes the hierarchical information and the three-dimensional model, the defect position and the grade label can be directly observed by the detection personnel, compared with the traditional manual verification against the standard drawing, the verification speed is faster, the possibility of missing or misjudging is reduced, and the visualization verification efficiency of the hierarchical result is improved; the collaborative platform opens the hierarchical data and the traceability information according to the permission, the manufacturer can quickly obtain the optimization suggestion, the distributor can efficiently screen batches, the consumer can check details by scanning the code, the information barrier is broken, the data circulation is smoother, and the data sharing convenience of each link of the supply chain is enhanced; the parameter optimization report is generated by analyzing the historical data, the detection performance under different configurations is clear, the randomness of adjusting the spectral range, the number of angles and other parameters according to experience is avoided, the system always maintains an efficient detection state, and the blindness of system parameter debugging is reduced; the closed-loop feedback mechanism enables the parameter update to be directly applied to the next round of data acquisition, forming a virtuous cycle of acquisition-classification-verification-optimization, reducing the frequency of manual intervention adjustment, the system adaptability is stronger, and the self-optimization capability of the classification system is improved; the visual verification ensures the accuracy of the result, the blockchain traceability information is open and checkable, and in addition to the transparent sharing of data at each link, the manufacturer, distributor and consumer are more recognized for the classification result, the disputes caused by information opacity are reduced, and the public credibility of the classification result is enhanced.
[0075] In one embodiment of the present application, a machine vision-based jujube appearance detection and grading system comprises:
[0076] One or more processors;
[0077] Memory for storing one or more programs,
[0078] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of the above.
[0079] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A machine vision-based method for appearance inspection and grading of jujubes, characterized in that, The method includes: S1: Multi-angle spectral data are collected from jujube samples, and a morphological field model of jujube is generated by combining it with a three-dimensional reconstruction algorithm; the surface geometric features of the morphological field model are extracted to obtain a three-dimensional morphological feature vector set; the micro-texture spectral data and chromaticity information of jujube samples are collected simultaneously, and nonlinear chromaticity transformation processing is performed to obtain a micro-texture spectral feature vector set and a nonlinear chromaticity feature vector set. S2: Input the three-dimensional morphological feature vector set, the micro-texture spectral feature vector set, and the nonlinear chromaticity feature vector set into the dynamic attention network, and focus on the key defect region of the jujube surface through the spatial-channel joint attention mechanism to generate a key region weight mapping map; based on the weight mapping map, the original feature vector set is weighted and fused to construct a coupled representation space; S3: In the coupled representation space, significant features affecting jujube grading are extracted using interpretable machine learning algorithms to establish a grading feature interpretation model; a jujube appearance grading rule base is formulated based on the grading feature interpretation model, and the sample feature vectors in the coupled representation space are input into the grading rule base to output preliminary grading results and feature contribution heatmaps. S4: Collect blockchain traceability data for the entire process of jujube production, input the preliminary grading results and blockchain traceability data into a multimodal fusion evaluation model, correct grading deviations through cross-validation mechanism, and generate calibrated grading labels; use blockchain smart contracts to encrypt and store the calibrated grading labels. S5: Construct a knowledge graph of jujube appearance defects, integrate the grading rule base, feature interpretation model and historical grading case data; input the calibrated grading labels into the knowledge graph for semantic reasoning to identify potential grading conflicts; generate the final grading decision tree through a conflict resolution algorithm and output an interpretable grading result report. S6: Based on the final grading results report, the grading information is overlaid with a 3D model of the jujube using augmented reality technology to visualize and verify the grading results; the grading data, traceability information, and visualization model are uploaded to the supply chain collaboration platform, and the parameter configuration of the multi-view hyperspectral imaging system is dynamically optimized based on the grading results to form a closed-loop feedback intelligent grading system for jujube appearance.
2. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, S1 includes: S11: Screen jujube samples and classify and label them. Divide the samples into groups according to jujube varieties and maturity levels. Select no less than 50 undamaged / defective control samples in each group to generate a labeled jujube sample set. Start the multi-view hyperspectral imaging system to collect multi-angle spectral data from the labeled jujube sample set and output the initial multi-angle spectral dataset. S12: Input the initial multi-angle spectral dataset into the 3D reconstruction module, and use the Poisson reconstruction algorithm to construct a preliminary jujube morphological field model; use the bilateral filtering algorithm to denoise the preliminary model, and then use the mesh simplification algorithm to optimize the model accuracy to generate a refined jujube morphological field model; S13: Based on the refined jujube morphological field model, a geometric feature extraction algorithm is called to extract surface geometric feature parameters and form a three-dimensional morphological feature original vector set; the original vector set is standardized to obtain a three-dimensional morphological feature vector set. S14: Simultaneously start the micro-texture acquisition module of the multi-view hyperspectral imaging system to acquire micro-texture spectral data of jujube samples and generate an initial micro-texture spectral dataset; at the same time, acquire sample surface chromaticity information through a high-resolution chromaticity sensor to generate an initial chromaticity information set. S15: Perform principal component analysis to reduce the dimensionality of the initial micro-texture spectral dataset, and then convert the time-domain spectral data into frequency-domain data through fast Fourier transform to generate the original vector set of micro-texture spectrum; perform Gamma correction on the initial chromaticity information set, and convert the RGB color space into the Lab color space to generate the original nonlinear chromaticity vector set; S16: Perform Min-Max normalization on the original vector set of micro-texture spectrum and the original vector set of nonlinear chroma respectively, and detect and remove abnormal feature vectors through the isolated forest algorithm to finally obtain the micro-texture spectrum feature vector set and the nonlinear chroma feature vector set.
3. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, S2 includes: S21: Based on the three-dimensional morphological feature vector set of S13 and the micro-texture spectrum feature vector set and nonlinear chromaticity feature vector set of S16, the input feature alignment module adopts the feature dimension unification algorithm to generate an aligned multimodal feature set. S22: Input the aligned multimodal feature set into the feature encoding layer of the dynamic attention network, and extract local features from the three-dimensional morphology, micro-texture spectrum and non-linear chroma features through three layers of convolutional neural network, and output the three-dimensional morphology local feature map, micro-texture local feature map and chroma local feature map; S23: Based on the above three local feature maps, start the spatial-channel joint attention mechanism to generate two weight maps. Multiply the two weight maps element by element to obtain the spatial-channel joint weight matrix. S24: Perform element-wise weighted operations on the spatial-channel joint weight matrix and the three-dimensional morphological local feature map, micro-texture local feature map, and chroma local feature map respectively to generate a key region enhancement feature map; normalize the enhancement feature map to obtain the key region weight mapping map; S25: Based on the key region weight mapping map, the original three-dimensional morphological feature vector set, micro-texture spectrum feature vector set and nonlinear chromaticity feature vector set are weighted and allocated to generate a weighted multimodal feature vector set; S26: Input the weighted multimodal feature vector set into the feature fusion layer, and use the attention-guided residual stitching algorithm to construct a coupled representation space that integrates three-dimensional morphology, micro-texture spectrum and nonlinear chromaticity.
4. The machine vision-based method for jujube appearance inspection and grading according to claim 3, characterized in that, The aforementioned spatial-channel joint attention mechanism generates two types of weight maps. Specifically, in the spatial dimension, the probability of each pixel belonging to a defect region is calculated through the spatial attention module to generate a spatial attention weight map; in the channel dimension, the contribution of each spectral channel and chromaticity channel to the grading result is calculated through the channel attention module to generate a channel attention weight map.
5. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, The S3 includes: S31: Perform K-means clustering preprocessing on the feature vectors in the coupled representation space, verify the clustering effect through the silhouette coefficient, and generate a clustered feature subset; S32: Input the clustered feature subset into an interpretable machine learning algorithm to calculate the influence of each feature on the jujube grading results and generate a feature importance ranking table; S33: Based on the feature importance ranking table, the top 10 significant features affecting the grading of jujubes were selected. The feature threshold range was initially calibrated by combining the experience of experts in the field of agricultural product testing, and a grading feature interpretation model was established. S34: Taking the graded feature interpretation model as the core, sort out the judgment logic and threshold standard of significant features, and generate the first draft of the grading rules for jujube appearance; S35: Input the initial draft of the grading rules into the rule verification module, import 1000 sets of historical labeled sample data for rule matching test, and form a jujube appearance grading rule library; S36: Input the sample feature vectors in the coupled representation space one by one into the jujube appearance grading rule base, use a forward reasoning algorithm to determine the preliminary grading level of each sample, and calculate the contribution of each significant feature to the grading result; based on the contribution value, draw the feature contribution heatmap using a heatmap generation tool, and finally output the preliminary grading result and the corresponding feature contribution heatmap.
6. The method for grading jujube appearance based on machine vision according to claim 5, characterized in that, The threshold standards include morphological defect thresholds, abnormal texture frequency ranges, and color deviation tolerances. Specifically, the morphological defect thresholds are defined as follows: a depression depth > 0.5 mm is considered a morphological defect, and a fruit shape index deviation > 0.1 is considered a shape defect. Specifically, the abnormal texture frequency ranges are defined as follows: a reflectance < 0.3 in the 400-500nm frequency band indicates pest or disease texture, and a reflectance fluctuation > 0.2 in the 500-600nm frequency band indicates mechanical damage texture. Specifically, the color deviation tolerances are defined as follows: an L value < 50 in the Lab color space indicates dull color, and a b value > 15 indicates overripe and yellowing.
7. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, The S4 includes: S41: Build a blockchain traceability system for jujube products to collect data from each stage in real time and generate the original blockchain traceability dataset. S42: Clean the original blockchain traceability dataset by imputing missing values using the mean imputation method and removing outliers using the box plot method; then standardize the format to generate a standardized blockchain traceability dataset. S43: Input the preliminary grading results output from S36 and the standardized blockchain traceability dataset into the multimodal fusion evaluation model; use two independent encoders to encode the appearance feature data and traceability data respectively, generating appearance feature encoding vectors and traceability data encoding vectors; S44: Initiate the cross-validation mechanism of the multimodal fusion evaluation model, calculate the cosine similarity between the appearance feature encoding vector and the traceability data encoding vector; if the similarity is <0.6, it is determined to be a graded deviation sample, and the graded deviation sample list is output. S45: For the list of samples with grading deviation, a weight adjustment algorithm based on traceability data is used to adjust the grade coefficient of the preliminary grading result according to the risk factors in the traceability data, re-determine the sample grading grade, and generate a calibrated grading label. S46: Associate the calibrated grading label with the corresponding blockchain traceability data and input it into the blockchain smart contract; the contract automatically executes the SHA-256 encryption algorithm to encrypt the label and data, generates encrypted evidence records and uploads them to all nodes of the blockchain, and generates evidence hash values to complete the traceable evidence storage of the grading results.
8. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, The S5 includes: S51: Collect multi-source knowledge related to the appearance detection and grading of jujubes, and generate a structured knowledge dataset; S52: Using the Neo4j knowledge graph construction tool, the structured knowledge dataset is imported into the graph database to generate a preliminary knowledge graph of jujube appearance defects; S53: Perform knowledge completion and conflict detection on the preliminary knowledge graph. Use the TransE algorithm to fill in the missing entity relationships and use the rule reasoning engine to detect contradictory knowledge. Correct the contradictory points after completion to obtain a complete knowledge graph of jujube appearance defects. S54: Convert the calibrated grading labels output from S45 into RDF format, input the complete jujube appearance defect knowledge graph; start the Pellet semantic reasoning machine, reason the logical relationships between sample features based on the rules in the graph, and identify potential grading conflicts. S55: To address potential grading conflicts, a DS fusion algorithm based on evidence theory is adopted. The grading results corresponding to each feature are regarded as evidence, and the basic probability assignment function of each piece of evidence is calculated. The probabilities of multiple pieces of evidence are fused through the DS synthesis rule to obtain the final grading probability distribution. The grade with the highest probability is taken as the final result to generate the final grading decision tree. S56: Based on the final hierarchical decision tree, call the report generation module to automatically generate an interpretable hierarchical result report, export the report as a PDF, and output an interpretable hierarchical result report.
9. The method for grading jujube appearance based on machine vision according to claim 1, characterized in that, The S6 includes: S61: Extract the three-dimensional mesh data of the corresponding jujube samples from the refined jujube morphological field model in S12, and convert it into AR-recognizable glTF format using the Blender modeling tool; extract key grading information from the grading result report in S56 to generate an AR overlay information package; S62: Activate the AR visualization verification system, capture images of jujube products using a camera, and use image recognition algorithms to align the images with the AR format 3D model; overlay the grading information from the AR overlay information package onto the surface of the 3D model to achieve the overlay display of grading information and the physical 3D model, allowing inspection personnel to intuitively verify the accuracy of the grading results and record the visualization verification results; S63: If the visualization verification result is qualified, upload the graded data, traceability information and AR visualization model to the supply chain collaboration platform; if the verification result is unqualified, return to S35 to re-optimize the graded rule base, and repeat S3-S6 until the verification is qualified. S64: The supply chain collaboration platform sets hierarchical permissions for uploaded data to enable real-time sharing and querying of hierarchical data. S65: Extract historical grading data from the supply chain collaboration platform for nearly 6 months, use statistical analysis algorithms to calculate the detection performance of the multi-view hyperspectral imaging system under different parameter configurations, and generate a system parameter optimization analysis report; S66: Based on the parameter optimization analysis report, automatically generate parameter adjustment instructions for the multi-view hyperspectral imaging system, and send the instructions to the control terminal of the imaging system through the Internet of Things communication module to complete the parameter update.
10. A machine vision-based jujube appearance inspection and grading system, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Fruit defect nondestructive testing method based on neural network and fruit grading method
CN112697984A
Red date data identification method based on artificial intelligence
CN113610066A
Pear defect classification method based on deep network under small sample set
CN116486173A
Apple multi-feature online classification method
CN118941847A
Fruit quality detection method, robot and terminal equipment
CN120446014A