Nondestructive identification method, device and equipment for internal defects of kiwi fruit and storage medium

By using X-ray CT technology and machine learning methods, non-destructive identification and quantitative grading of internal defects in kiwifruit have been achieved, solving the problems of inaccurate detection and low efficiency in existing technologies, and improving the efficiency and effectiveness of kiwifruit quality testing.

CN116524494BActive Publication Date: 2026-05-08WUHAN POLYTECHNIC UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN POLYTECHNIC UNIVERSITY
Filing Date
2023-04-11
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the detection of chilling injury lignification and bruising in kiwifruit requires visual inspection by cutting the fruit, which leads to inaccurate and inefficient detection and makes it difficult to identify the damage without harming the fruit.

Method used

By combining X-ray CT technology with machine learning methods, CT images of kiwifruit are obtained through scanning, defect feature information is extracted, and a classification model is constructed to achieve non-destructive identification and quantitative grading of internal defects in kiwifruit.

Benefits of technology

It enables non-destructive automatic analysis and classification of internal defects in kiwifruit, improving detection efficiency and accuracy, and avoiding the waste and misjudgment of manual destructive testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524494B_ABST
    Figure CN116524494B_ABST
Patent Text Reader

Abstract

The present application belongs to the quality detection technical field, disclose a kind of kiwi internal defect nondestructive identification method, device, equipment and storage medium.The method includes: sample kiwi is scanned, and original scanning image is obtained;Defect feature information is obtained according to original scanning image;Defect evaluation dataset is determined according to defect feature information;Classification model is constructed according to defect evaluation dataset;The defect volume ratio of kiwi to be classified is obtained by classification model;According to the defect volume ratio, the defect quantitative classification of the kiwi to be classified is carried out.By the above-mentioned mode, the sample kiwi is scanned based, and the subsequent kiwi needing defect identification classification is automatically analyzed by the way of constructing classification model, the quantitative classification of the defect of kiwi is realized, so as to realize the method of artificial damage visual inspection, reach the purpose of internal defect nondestructive automatic analysis and classification of kiwi, improve the efficiency and effect of kiwi quality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quality inspection technology, and in particular to a method, apparatus, equipment and storage medium for non-destructive identification of internal defects in kiwifruit. Background Technology

[0002] The post-harvest quality of kiwifruit is mainly maintained through low-temperature storage. However, the adverse effects of low-temperature storage on kiwifruit include lignification of the subcutaneous tissue. Severe lignification significantly reduces the edibility of kiwifruit, leading to considerable economic losses. Bruises are unavoidable during kiwifruit harvesting and transportation. Although both chilling injury and bruising negatively impact the storage characteristics of kiwifruit, bruised kiwifruit is less resistant to storage and releases large amounts of ethylene, affecting other healthy kiwifruit during ripening.

[0003] Currently, the detection of chilling injury, lignification, and bruising in kiwifruit requires visual inspection by cutting. To ensure the accuracy and efficiency of kiwifruit processing, the industry has begun to seek better technologies to screen bruised and chilled kiwifruit.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this invention is to provide a non-destructive identification method, apparatus, equipment, and storage medium for internal defects in kiwifruit, aiming to solve the technical problem that existing technologies make it difficult to identify kiwifruit damage defects without damaging the fruit.

[0006] To achieve the above objectives, the present invention provides a non-destructive method for identifying internal defects in kiwifruit, the method comprising the following steps:

[0007] The sample kiwifruit was scanned to obtain the original scanned image;

[0008] Defect feature information is obtained from the original scanned image;

[0009] Determine the defect assessment dataset based on the defect feature information;

[0010] A classification model is constructed based on the defect assessment dataset;

[0011] The defect volume ratio of the kiwifruit to be classified is obtained through the classification model.

[0012] The defects of the kiwifruit to be classified are quantitatively graded based on the defect volume ratio.

[0013] Optionally, obtaining defect feature information based on the original scanned image includes:

[0014] A mask is created based on the kiwi fruit boundary in the original scanned image to remove the image background from the original scanned image, resulting in a background-removed image;

[0015] The background-removed image is divided into sample regions, and effective voxels are determined based on the sample regions;

[0016] The effective speed-up is segmented into grayscale abnormal regions according to preset rules to obtain multiple segmented regions;

[0017] The noise region in the segmented region is removed to obtain the feature filtering region;

[0018] The defect feature information of the sample kiwifruit is determined based on the feature screening region.

[0019] Optionally, determining the defect feature information of the sample kiwifruit based on the feature filtering region includes:

[0020] Determine the defect distance of each feature defect in the feature filtering region;

[0021] The number of defects in the sample kiwifruit is determined based on the defect distance;

[0022] The sphericity information of the sample kiwifruit is determined based on the volume and area information of each characteristic defect;

[0023] The aspect ratio information of each feature defect is determined based on the volume information;

[0024] The number of sample voxels and the number of defect voxels are determined based on the sample region and the defect feature region.

[0025] The defect volume ratio information is determined based on the number of sample voxels and the number of defect voxels.

[0026] The defect characteristic information of the sample kiwifruit is determined based on the defect quantity information, the sphericity information, the aspect ratio information, and the volume ratio information.

[0027] Optionally, determining the defect assessment dataset based on the defect feature information includes:

[0028] A destructive assessment was performed on the sample kiwifruit to obtain the true defect information of the sample kiwifruit;

[0029] By mapping the actual defect information to the defect feature information, defect comparison information is obtained;

[0030] The defect assessment dataset is obtained based on the defect comparison information.

[0031] Optionally, constructing a classification model based on the defect assessment dataset includes:

[0032] Obtain patch configuration information, convolution configuration information, and data input configuration information;

[0033] An initial neural network is constructed based on the patch configuration information, convolution configuration information, and data input configuration information.

[0034] Obtain decision tree configuration information and leaf number configuration information;

[0035] An initial random forest model is constructed based on the decision tree configuration information and the leaf number configuration information.

[0036] The defect assessment data is divided into a training set and a test set;

[0037] The initial neural network and the initial random forest model are trained using the training set and the test set to obtain a classification model.

[0038] Optionally, the step of quantitatively grading the defects of the kiwifruit to be classified based on the defect volume ratio includes:

[0039] The defect volume ratio is compared with the first defect volume ratio and the second defect volume ratio, respectively.

[0040] The degree of defect in the kiwifruit to be classified is determined based on the comparison results;

[0041] The defects of the kiwifruit to be classified are quantitatively graded based on the defect severity information.

[0042] Optionally, determining the degree of defect information of the kiwifruit to be classified based on the comparison results includes:

[0043] Based on the comparison result, determine whether the defect volume ratio is greater than or equal to the first defect volume ratio to obtain a first determination result;

[0044] Based on the comparison result, determine whether the defect volume ratio is greater than or equal to the second defect volume ratio to obtain a second determination result;

[0045] The defect classification of the kiwifruit to be classified is determined based on the first determination result and the second determination result;

[0046] The degree of defect in the kiwifruit to be classified is determined based on the defect classification.

[0047] Furthermore, to achieve the above objectives, the present invention also proposes a non-destructive identification device for internal defects of kiwifruit, the device comprising:

[0048] The sample scanning module is used to scan kiwi fruit samples to obtain raw scan images;

[0049] The information extraction module is used to obtain defect feature information based on the original scanned image;

[0050] A dataset preparation module is used to determine a defect assessment dataset based on the defect feature information.

[0051] The model building module is used to build a classification model based on the defect assessment dataset;

[0052] The parameter calculation module is used to obtain the defect volume ratio of the kiwifruit to be classified through the classification model;

[0053] The quantitative grading module is used to quantitatively grade the defects of the kiwifruit to be classified based on the defect volume ratio.

[0054] Furthermore, to achieve the above objectives, the present invention also proposes a non-destructive identification device for internal defects of kiwifruit. The non-destructive identification device for internal defects of kiwifruit includes: a memory, a processor, and a non-destructive identification program for internal defects of kiwifruit stored in the memory and executable on the processor. The non-destructive identification program for internal defects of kiwifruit is configured to implement the steps of the non-destructive identification method for internal defects of kiwifruit as described above.

[0055] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a non-destructive identification program for internal defects of kiwifruit, wherein when the non-destructive identification program for internal defects of kiwifruit is executed by a processor, the program implements the steps of the non-destructive identification method for internal defects of kiwifruit as described above.

[0056] This invention involves scanning kiwifruit samples to obtain raw scan images; obtaining defect feature information from the raw scan images; determining a defect assessment dataset based on the defect feature information; constructing a classification model based on the defect assessment dataset; obtaining the defect volume ratio of the kiwifruit to be classified using the classification model; and quantitatively grading the defects of the kiwifruit to be classified based on the defect volume ratio. This method achieves automated analysis of kiwifruit samples requiring defect identification and classification by scanning them and constructing a classification model. It eliminates the need for manual visual inspection, achieving non-destructive automatic analysis and classification of internal defects in kiwifruit, thus improving the efficiency and effectiveness of kiwifruit quality inspection. Attached Figure Description

[0057] Figure 1 This is a schematic diagram of the structure of a non-destructive identification device for internal defects of kiwifruit in the hardware operating environment involved in the embodiments of the present invention;

[0058] Figure 2This is a flowchart illustrating the first embodiment of the non-destructive identification method for internal defects in kiwifruit according to the present invention.

[0059] Figure 3 This is a schematic diagram of a CT scan image of a kiwifruit, representing the first embodiment of the non-destructive identification method for internal defects of kiwifruit according to the present invention.

[0060] Figure 4 This is a schematic diagram of kiwi fruit defects, representing the first embodiment of the non-destructive identification method for internal defects of kiwi fruit according to the present invention.

[0061] Figure 5 This is a flowchart illustrating the second embodiment of the non-destructive identification method for internal defects in kiwifruit according to the present invention.

[0062] Figure 6 This is a structural block diagram of the first embodiment of the non-destructive identification device for internal defects of kiwifruit according to the present invention.

[0063] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0064] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0065] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a non-destructive identification device for internal defects of kiwifruit in the hardware operating environment involved in the embodiments of the present invention.

[0066] like Figure 1 As shown, the non-destructive identification device for internal defects of kiwifruit may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to establish communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0067] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the non-destructive identification device for internal defects of kiwifruit, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0068] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a non-destructive identification program for internal defects of kiwifruit.

[0069] exist Figure 1 In the kiwifruit internal defect non-destructive identification device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the kiwifruit internal defect non-destructive identification device of the present invention can be set in the kiwifruit internal defect non-destructive identification device, and the kiwifruit internal defect non-destructive identification device calls the kiwifruit internal defect non-destructive identification program stored in the memory 1005 through the processor 1001 and executes the kiwifruit internal defect non-destructive identification method provided in the embodiment of the present invention.

[0070] This invention provides a non-destructive method for identifying internal defects in kiwifruit, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a non-destructive identification method for internal defects in kiwifruit according to the present invention.

[0071] In this embodiment, the non-destructive identification method for internal defects in kiwifruit includes the following steps:

[0072] Step S10: Scan the sample kiwifruit to obtain the original scanned image.

[0073] It should be noted that the executing entity in this embodiment is a control system or a smart terminal, including but not limited to a computer, smartphone, or server, or other devices capable of performing this function.

[0074] It should be understood that currently, the detection of chilling injury, lignification, and bruising in kiwifruit requires visual inspection after cutting. To ensure the accuracy and efficiency of kiwifruit processing, the industry has begun to seek better technologies to screen bruised and chilling-damaged kiwifruit. While X-ray CT technology has significant advantages in non-destructive testing of fruits and vegetables, there are no reports on the detection and classification of bruising and chilling injury defects in kiwifruit based on machine learning combined with X-ray CT technology. Furthermore, the past reliance on manual cutting and visual inspection has significant uncertainties (the cut surface may be defect-free, but defective areas may not be reached); additionally, destructive methods may cut into normal fruit, resulting in waste. The solution proposed in this application can identify and quantify internal defects (bruising, lignification) in kiwifruit without damage.

[0075] In specific implementation, such as Figure 3 As shown, X-ray CT images of kiwifruit were acquired using an X-ray CT scanner, achieving a resolution of at least micrometers. Kiwifruit can be processed individually or in batches. CT images of sample kiwifruit are acquired using X-ray computed tomography (CT) scanning equipment. These image data are represented as cumulative images from various cross-sectional planes, with a resolution at the micrometer level. The grayscale value of each voxel is represented by a 16-bit digital signal. After scanning, the image reconstruction and display process can be omitted according to the equipment program, allowing direct analysis of the digital signal to accelerate computation time and save data storage space, thus obtaining the original CT images of the sample kiwifruit as the raw scan images. The sample kiwifruit is used as a sample for building and training the model.

[0076] Step S20: Obtain defect feature information based on the original scanned image.

[0077] It should be understood that, as Figure 4 As shown, Figure 4 This is a schematic diagram of the reconstructed defects of bruising and cold damage lignification in an example of the present invention. The original scanned image is processed to obtain kiwifruit defect feature information. A mask is created on the original kiwifruit CT image with the kiwifruit as the boundary to remove the image background; the mask portion in each internal cross-section of the kiwifruit is used to divide the sample region, obtaining voxels of the sample region to obtain effective voxels; gray-level anomaly regions are segmented according to the Otsu thresholding method; gray-level anomaly regions with effective voxels less than 150 voxels are defined as noise; immature kiwifruit seeds in the gray-level anomaly regions are removed based on shape factors of volume and area to obtain the kiwifruit defect features; the defect feature information of the kiwifruit is obtained based on the number of defects, coordination number, sphericity, aspect ratio, and defect volume ratio.

[0078] Furthermore, in order to accurately obtain defect feature information, step S20 includes: establishing a mask based on the kiwi fruit boundary in the original scanned image to remove the image background in the original scanned image, obtaining a background-removed image; dividing the background-removed image to obtain sample regions, and determining effective voxels based on the sample regions; segmenting the effective voxels into gray-level abnormal regions according to preset rules to obtain multiple segmented regions; removing noise regions in the segmented regions to obtain feature-filtered regions; and determining the defect feature information of the sample kiwi fruit based on the feature-filtered regions.

[0079] In practice, the original scanned image of the sample kiwifruit includes the image background and the continuous cross-sections inside the kiwifruit. First, a mask is created on the original scanned image with the outline of the kiwifruit image as the boundary, so that the image background can be removed, resulting in a background-removed image containing only the kiwifruit image.

[0080] It should be noted that after obtaining the background-removed image, the sample region is divided according to the mask portion in the internal cross-section of each kiwifruit, and the voxels of the sample region are obtained to obtain the effective voxels. That is, the mask portion is divided to obtain the region used for training and extracting defect feature information as the sample region, and then the voxels of each sample region are determined as the effective voxels.

[0081] It should be understood that, according to preset rules, the effective speed-up is segmented into gray-level abnormal regions to obtain multiple segmented regions. This refers to: segmenting the effective voxels into gray-level abnormal regions according to the Otsu threshold method, and then defining gray-level abnormal regions with effective voxels less than 150 voxels as noise regions. After removing the noise regions, feature-selected regions are obtained. Specifically, immature kiwi seeds in the gray-level abnormal regions are removed based on shape factors of volume and area, thus obtaining the defect feature information of the sample kiwi.

[0082] In this way, the defect feature information of the sample kiwifruit can be accurately extracted.

[0083] Furthermore, in order to accurately obtain defect feature information based on the feature screening region, the defect feature information of the sample kiwifruit is determined based on the feature screening region, including: determining the defect distance of each feature defect in the feature screening region; determining the number of defects in the sample kiwifruit based on the defect distance; determining the sphericity information of the sample kiwifruit based on the volume and area information of each feature defect; determining the aspect ratio information of each feature defect based on the volume information; determining the number of sample voxels and the number of defect voxels based on the sample region and the defect feature region; determining the defect volume ratio information based on the number of sample voxels and the number of defect voxels; and determining the defect feature information of the sample kiwifruit based on the defect number information, the sphericity information, the aspect ratio information, and the volume ratio information.

[0084] In practice, the distance between each feature defect in the feature screening area is first calculated: defects that are connected together, that is, defects with a distance less than 0, are considered to be the same defect. The number of defects is obtained by marking that there are no interconnected defects, and the defect quantity information is determined based on the defect distance.

[0085] It should be noted that the sphericity of each feature defect can be calculated based on its volume and area.

[0086] It should be understood that the aspect ratio information of each feature defect is obtained based on the maximum and minimum values ​​of the defect in the three-dimensional plane.

[0087] In practice, the defect volume ratio is calculated based on the number of voxels in the sample area and the number of voxels in the characteristic defects.

[0088] In practice, the acquired defect feature information is reconstructed, showing obvious defects such as bruising and cold damage lignification. Subsequently, the kiwifruit is screened and classified based on a machine learning classification model.

[0089] It should be noted that bruised kiwifruit develops from the point of impact, resulting in large and concentrated defects, while chilling injury-induced lignification occurs at arbitrary and dispersed locations. This characteristic is described by the number of defects and the coordination number. Lignification defects are more uniform than bruised defects, and this characteristic is described by the aspect ratio and sphericity. The ratio of defect voxels to effective voxels in the sample area describes the impact of defects on the entire kiwifruit and is described by the defect volume ratio.

[0090] In this way, the parameters of five features of the sample kiwifruit can be accurately obtained through calculation and comparison, making the subsequent construction of the training sample set more targeted.

[0091] Step S30: Determine the defect assessment dataset based on the defect feature information.

[0092] It should be noted that the compilation and determination of the defect assessment sample set are based on real defect information, which is obtained through destructive assessment of the sample kiwifruit.

[0093] Furthermore, in order to obtain a defect assessment sample set, step S30 includes: performing a destructive assessment on the sample kiwifruit to obtain the true defect information of the sample kiwifruit; matching the true defect information with the defect feature information to obtain defect control information; and obtaining a defect assessment dataset based on the defect control information.

[0094] It should be understood that a destructive assessment is performed on the kiwifruit samples to determine, based on facts, whether the kiwifruit is healthy, bruised, or has lignification induced by cold damage. This yields the true defect information of the kiwifruit samples. Then, the true defect information is correlated with defect feature information to obtain defect control information, ultimately resulting in a defect assessment dataset. The correlation is performed by categorizing the true defect information and defect feature information of the same kiwifruit sample, and then determining the differences between the results of the true defect information and the defect feature information.

[0095] In this way, an accurate defect assessment dataset was obtained, and the actual defects of each sample kiwifruit were incorporated, making the defect assessment dataset more realistic.

[0096] Step S40: Construct a classification model based on the defect assessment dataset.

[0097] It should be noted that the machine learning classification methods include convolutional neural networks and random forests; the five feature parameters are used to construct convolutional neural network and random forest classification models; the data used for model training is divided into training set and test set in a 2:1 ratio; the classification results are visualized as a confusion matrix, and the classification accuracy, false positive rate, and false negative rate of the three types of kiwifruit are obtained, classifying kiwifruit into healthy, bruised, and chilled lignified kiwifruit.

[0098] Furthermore, in order to accurately construct the classification model, step S40 includes: obtaining patch configuration information, convolution configuration information, and data input configuration information; constructing an initial neural network based on the patch configuration information, convolution configuration information, and data input configuration information; obtaining decision tree configuration information and leaf number configuration information; constructing an initial random forest model based on the decision tree configuration information and leaf number configuration information; dividing the defect assessment data into a training set and a test set; and training the initial neural network and the initial random forest model based on the training set and the test set to obtain the classification model.

[0099] It should be understood that the classification model includes convolutional neural networks and random forests, and five feature parameters (number of defects, coordination number, sphericity, aspect ratio, and defect volume ratio) are used to construct the initial neural network and the initial random forest classification model.

[0100] In the specific implementation, in the convolutional neural network model, the patch size in the patch configuration information is [2,1]. The first convolutional layer in the convolution configuration information generates 16 convolutions, and the second convolutional layer generates 32 convolutions. The data input configuration information for the CNN is [5,1,1], thus enabling the construction of the initial neural network.

[0101] It should be noted that in the random forest model, 50 decision trees are set in the decision tree configuration information, and the minimum number of leaves is 1 in the leaf number configuration information. Then, the initial random forest model is constructed based on the decision tree configuration information and the leaf number configuration information.

[0102] It should be understood that the defect assessment data used for model training is divided into training and test sets in a 2:1 ratio. Finally, the training and test sets are used to train the initial neural network and the initial random forest model, and the resulting classification results are visualized as a confusion matrix.

[0103] In this way, a classification model was built and trained, including neural network models and random forest models, so that the final classification results were fully trained and machine learning-based, resulting in more accurate classification and quantitative grading.

[0104] Step S50: Obtain the defect volume ratio of the kiwifruit to be classified using the classification model.

[0105] In practice, after the classification model is trained, the images of the kiwifruit to be classified that need to be quantitatively graded for defects are input into the classification model, thereby automatically outputting the defect volume ratio of the kiwifruit to be classified.

[0106] Step S60: Quantitatively grade the defects of the kiwifruit to be classified according to the defect volume ratio.

[0107] It should be noted that after obtaining the defect volume ratio, the defect volume ratio is then compared with the first defect volume ratio and the second defect volume ratio. Based on the comparison results, the quantitative grading of defects in the kiwifruit to be classified is determined. Specifically, the quantitative grading results are divided into three categories: severe defects, moderate defects, and mild defects.

[0108] In this embodiment, the defect volume ratio is first calculated according to the formula:

[0109] Defect volume ratio:

[0110]

[0111] Where, N l N represents the number of defective voxels; N represents the number of effective voxels in the sample area.

[0112] Digital data calculations were performed on CT images of several kiwifruit without external damage. (See reference...) Figure 3 Compared to healthy kiwifruit, bruised and chilled kiwifruit with lignification showed more voxels with low grayscale values. Correspondingly, there were more lignified voxels than bruised defect voxels, consistent with CT images. Figure 3 As shown, the bruised parts of the kiwifruit are close to the epidermis, concentrated at the impact site, and gradually develop into the interior of the fruit; chilling injury-induced lignification can be detected throughout the entire fruit.

[0113] In terms of the number of defects, bruises are large and concentrated, exhibiting higher connectivity, while chilling injury lignification defects are small and scattered, mostly isolated, and therefore exhibit lower connectivity. This is reflected in the difference in the number of defects and coordination number. Furthermore, bruises and chilling injury lignification defects also differ. Bruises have a greater sphericity and a slightly higher aspect ratio than chilling injury lignification, indicating higher uniformity of lignified tissue. At the same time, while isolated bruise defects are large, their volume is relatively small relative to the effective voxels of the entire kiwifruit. Chilling injury lignification, on the other hand, is distributed throughout the flesh, and although isolated defects are smaller, their volume is relatively large.

[0114] The five parameters mentioned above were used to construct the convolutional neural network (CNN) and random forest classification models. In this example, after training, the overall classification accuracy of the CNN and random forest classifiers was 98.3%. Both models misclassified two bruised kiwis as healthy kiwis, resulting in a false positive rate of 8.7% for healthy kiwis in the CNN model and 8.3% for the random forest classification model. In the prediction set, the CNN model misclassified one bruised kiwi as healthy and two as chilling-damaged lignified kiwis, achieving an overall accuracy of 93.1%; the random forest classification model misclassified one healthy kiwi as bruised, achieving an overall accuracy of 98.3%.

[0115] Test results showed that healthy kiwifruit selected by the classification model had uniform and juicy flesh with no visible defects; bruised kiwifruit had water-soaked flesh with air gaps in the damaged area; chilled kiwifruit had lignified subcutaneous tissue with pitting, which was consistent with the classification results.

[0116] This embodiment uses image processing to extract parameters to analyze and train a machine learning model to identify internal defects in kiwifruit. Specifically, the quality of kiwifruit can be graded according to the actual needs of the user.

[0117] The defect severity is quantitatively graded based on the defect volume ratio. By matching the preset defect volume ratio with the actual kiwifruit defect severity, the classification accuracy of bruised kiwifruit reaches 93.6%, and the classification accuracy of chilling injury lignification reaches 98.3%. The judgment results are consistent with the actual situation.

[0118] This embodiment processes CT images of kiwifruit multiple times; establishes an image processing pipeline to accurately identify kiwifruit defects; acquires the defect feature information of the kiwifruit; and builds a machine learning classification model based on the defect feature information to screen and classify the kiwifruit. This replaces manual judgment, increases processing accuracy and efficiency, and eliminates the problem of difficulty in achieving uniform quality control due to large subjective differences in human factors. Results show that the X-ray CT method combined with machine learning is a promising tool for identifying and classifying kiwifruit bruising and chilling injury, and can efficiently and accurately classify the quality of kiwifruit during post-harvest storage.

[0119] This embodiment involves scanning a sample kiwifruit to obtain an original scanned image; obtaining defect feature information from the original scanned image; determining a defect assessment dataset based on the defect feature information; constructing a classification model based on the defect assessment dataset; obtaining the defect volume ratio of the kiwifruit to be classified using the classification model; and quantitatively grading the defects of the kiwifruit to be classified based on the defect volume ratio. In this way, automatic analysis of kiwifruit requiring subsequent defect identification and classification is achieved by scanning a sample kiwifruit and constructing a classification model. This enables quantitative grading of kiwifruit defects, thereby eliminating the need for manual visual inspection and achieving non-destructive automatic analysis and classification of internal defects in kiwifruit, improving the efficiency and effectiveness of kiwifruit quality inspection.

[0120] refer to Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of a non-destructive identification method for internal defects in kiwifruit according to the present invention.

[0121] Based on the first embodiment described above, the non-destructive identification method for internal defects in kiwifruit in this embodiment includes the following in step S60:

[0122] Step S601: Compare the defect volume ratio with the first defect volume ratio and the second defect volume ratio respectively.

[0123] It should be noted that the first defect volume ratio and the second defect volume ratio are preset percentage values. Specifically, the first defect volume ratio can be 10%, and the second defect volume ratio can be 5%. First, the defect volume ratios are compared with the first defect volume ratio and the second defect volume ratio respectively.

[0124] It should be understood that the defect volume ratio obtained here is the defect volume ratio calculated by inputting CT images of several undamaged kiwifruit to be classified into the classification model.

[0125] Step S602: Determine the degree of defect information of the kiwifruit to be classified based on the comparison results.

[0126] It should be understood that the defect classification of the kiwifruit to be classified is determined by combining the first judgment result, which is compared with the first defect volume, and the second judgment result, which is compared with the second defect volume.

[0127] Furthermore, in order to accurately determine the degree of defect information, step S603 includes: determining whether the defect volume ratio is greater than or equal to the first defect volume ratio based on the comparison result, to obtain a first determination result; determining whether the defect volume ratio is greater than or equal to the second defect volume ratio based on the comparison result, to obtain a second determination result; determining the defect classification of the kiwifruit to be classified based on the first determination result and the second determination result; and determining the degree of defect information of the kiwifruit to be classified based on the defect classification.

[0128] In practice, in the case of bruising, the first judgment result is: whether the defect volume ratio of the bruised kiwi is greater than or equal to 10% (first defect volume ratio). If yes, it is a severely bruised kiwi. If no, the second judgment result is considered: whether the defect volume ratio is greater than or equal to 5% (second defect volume ratio). If yes, it is a moderately bruised kiwi. If no, it is a slightly bruised kiwi.

[0129] It should be noted that, under the condition of chilling injury and lignification, the first criterion is: if the defect volume ratio of the kiwifruit is greater than or equal to 20% (preset first defect volume ratio), it is considered a severely chilling injured lignified kiwifruit; if not, then the second criterion is considered: if the defect volume ratio is greater than or equal to 10% (preset second defect volume ratio), it is considered a moderately chilling injured lignified kiwifruit; if not, it is considered a mildly chilling injured lignified kiwifruit. Referring to Table 1, the experimental samples were divided into three categories—severely defective, moderately defective, and mildly defective—based on the defect volume ratio data, and this method was found to be simple and effective.

[0130] Table 1

[0131]

[0132] In this way, the defect information of all kiwifruit to be classified can be accurately determined based on the comparison results, thereby accurately judging the quantitative classification of defects.

[0133] Step S603: Quantitatively grade the defects of the kiwifruit to be classified according to the defect severity information.

[0134] In practice, once the defect severity information is obtained, Table 1 can be used as a reference to quantitatively classify all the kiwifruit to be classified according to the degree and type of defect, thereby achieving automatic classification and storage.

[0135] This embodiment compares the defect volume ratio with a first defect volume ratio and a second defect volume ratio; determines the defect severity information of the kiwifruit to be classified based on the comparison results; and performs quantitative defect grading of the kiwifruit to be classified based on the defect severity information. This method replaces manual judgment, increases processing accuracy and efficiency, and eliminates the problem of difficulty in achieving uniform quality control due to significant subjective differences among humans.

[0136] Furthermore, this embodiment of the invention also proposes a storage medium storing a non-destructive identification program for internal defects of kiwifruit. When the non-destructive identification program for internal defects of kiwifruit is executed by a processor, it implements the steps of the non-destructive identification method for internal defects of kiwifruit as described above.

[0137] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be elaborated here.

[0138] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the non-destructive identification device for internal defects of kiwifruit according to the present invention.

[0139] like Figure 6 As shown, the non-destructive identification device for internal defects of kiwifruit proposed in this embodiment of the invention includes:

[0140] The sample scanning module 10 is used to scan the sample kiwifruit to obtain the original scanned image.

[0141] The information extraction module 20 is used to obtain defect feature information based on the original scanned image.

[0142] The dataset preparation module 30 is used to determine the defect assessment dataset based on the defect feature information.

[0143] The model building module 40 is used to build a classification model based on the defect assessment dataset.

[0144] The parameter calculation module 50 is used to obtain the defect volume ratio of the kiwifruit to be classified through the classification model.

[0145] The quantitative grading module 60 is used to quantitatively grade the defects of the kiwifruit to be classified according to the defect volume ratio.

[0146] This embodiment involves scanning a sample kiwifruit to obtain an original scanned image; obtaining defect feature information from the original scanned image; determining a defect assessment dataset based on the defect feature information; constructing a classification model based on the defect assessment dataset; obtaining the defect volume ratio of the kiwifruit to be classified using the classification model; and quantitatively grading the defects of the kiwifruit to be classified based on the defect volume ratio. In this way, automatic analysis of kiwifruit requiring subsequent defect identification and classification is achieved by scanning a sample kiwifruit and constructing a classification model. This enables quantitative grading of kiwifruit defects, thereby eliminating the need for manual visual inspection and achieving non-destructive automatic analysis and classification of internal defects in kiwifruit, improving the efficiency and effectiveness of kiwifruit quality inspection.

[0147] In one embodiment, the information extraction module 20 is further configured to: establish a mask based on the kiwi fruit boundary in the original scanned image to remove the image background in the original scanned image, thereby obtaining a background-removed image; divide the background-removed image to obtain a sample region, and determine effective voxels based on the sample region; perform grayscale anomaly region segmentation on the effective voxels according to a preset rule to obtain multiple segmented regions; remove noise regions in the segmented regions to obtain feature-filtered regions; and determine the defect feature information of the sample kiwi fruit based on the feature-filtered regions.

[0148] In one embodiment, the information extraction module 20 is further configured to: determine the defect distance of each feature defect in the feature screening region; determine the defect quantity information of the sample kiwi based on the defect distance; determine the sphericity information of the sample kiwi based on the volume and area information of each feature defect; determine the aspect ratio information of each feature defect based on the volume information; determine the number of sample voxels and the number of defect voxels based on the sample region and the defect feature region; determine the defect volume ratio information based on the number of sample voxels and the number of defect voxels; and determine the defect feature information of the sample kiwi based on the defect quantity information, the sphericity information, the aspect ratio information, and the volume ratio information.

[0149] In one embodiment, the dataset preparation module 30 is further configured to perform a destructive assessment on the sample kiwifruit to obtain the true defect information of the sample kiwifruit; to match the true defect information with the defect feature information to obtain defect control information; and to obtain a defect assessment dataset based on the defect control information.

[0150] In one embodiment, the model building module 40 is further configured to: acquire patch configuration information, convolution configuration information, and data input configuration information; construct an initial neural network based on the patch configuration information, convolution configuration information, and data input configuration information; acquire decision tree configuration information and leaf number configuration information; construct an initial random forest model based on the decision tree configuration information and leaf number configuration information; divide the defect assessment data into a training set and a test set; and train the initial neural network and the initial random forest model based on the training set and the test set to obtain a classification model.

[0151] In one embodiment, the quantitative grading module 60 is further configured to compare the defect volume ratio with the first defect volume ratio and the second defect volume ratio respectively; determine the defect degree information of the kiwifruit to be classified based on the comparison result; and perform quantitative defect grading of the kiwifruit to be classified based on the defect degree information.

[0152] In one embodiment, the quantitative grading module 60 is further configured to determine whether the defect volume ratio is greater than or equal to the first defect volume ratio based on the comparison result, thereby obtaining a first determination result; determine whether the defect volume ratio is greater than or equal to the second defect volume ratio based on the comparison result, thereby obtaining a second determination result; determine the defect classification of the kiwifruit to be classified based on the first determination result and the second determination result; and determine the defect degree information of the kiwifruit to be classified based on the defect classification.

[0153] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0154] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0155] In addition, for technical details not described in detail in this embodiment, please refer to the non-destructive identification method for internal defects of kiwifruit provided in any embodiment of the present invention, which will not be repeated here.

[0156] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0157] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0159] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A non-destructive method for identifying internal defects in kiwifruit, characterized in that, The non-destructive identification method for internal defects in kiwifruit includes: The sample kiwifruit was scanned to obtain the original scanned image; A mask is created based on the kiwi fruit boundary in the original scanned image to remove the image background from the original scanned image, resulting in a background-removed image; The background-removed image is divided into sample regions, and effective voxels are determined based on the sample regions; The effective voxels are segmented into grayscale abnormal regions according to preset rules to obtain multiple segmented regions. The noise region in the segmented region is removed to obtain the feature filtering region; Determine the defect distance of each feature defect in the feature filtering region; The number of defects in the sample kiwifruit is determined based on the defect distance; The sphericity information of the sample kiwifruit is determined based on the volume and area information of each characteristic defect; The aspect ratio information of each feature defect is determined based on the volume information; The number of sample voxels and the number of defect voxels are determined based on the sample region and the defect feature region. The defect volume ratio information is determined based on the number of sample voxels and the number of defect voxels. The defect characteristic information of the sample kiwifruit is determined based on the defect quantity information, the sphericity information, the aspect ratio information, and the volume ratio information. Determine the defect assessment dataset based on the defect feature information; A classification model is constructed based on the defect assessment dataset; The defect volume ratio of the kiwifruit to be classified is obtained through the classification model. The defects of the kiwifruit to be classified are quantitatively graded based on the defect volume ratio.

2. The method as described in claim 1, characterized in that, The step of determining the defect assessment dataset based on the defect feature information includes: A destructive assessment was performed on the sample kiwifruit to obtain the true defect information of the sample kiwifruit; By mapping the actual defect information to the defect feature information, defect comparison information is obtained; The defect assessment dataset is obtained based on the defect comparison information.

3. The method as described in claim 1, characterized in that, The step of constructing a classification model based on the defect assessment dataset includes: Obtain patch configuration information, convolution configuration information, and data input configuration information; An initial neural network is constructed based on the patch configuration information, convolution configuration information, and data input configuration information. Obtain decision tree configuration information and leaf number configuration information; An initial random forest model is constructed based on the decision tree configuration information and the leaf number configuration information. The defect assessment data is divided into a training set and a test set; The initial neural network and the initial random forest model are trained using the training set and the test set to obtain a classification model.

4. The method as described in claim 1, characterized in that, The step of quantitatively grading defects in the kiwifruit to be classified based on the defect volume ratio includes: The defect volume ratio is compared with the first defect volume ratio and the second defect volume ratio, respectively. The degree of defect in the kiwifruit to be classified is determined based on the comparison results; The defects of the kiwifruit to be classified are quantitatively graded based on the defect severity information.

5. The method as described in claim 4, characterized in that, The process of determining the degree of defect of the kiwifruit to be classified based on the comparison results includes: Based on the comparison result, determine whether the defect volume ratio is greater than or equal to the first defect volume ratio to obtain a first determination result; Based on the comparison result, determine whether the defect volume ratio is greater than or equal to the second defect volume ratio to obtain a second determination result; The defect classification of the kiwifruit to be classified is determined based on the first determination result and the second determination result; The degree of defect in the kiwifruit to be classified is determined based on the defect classification.

6. A non-destructive identification device for internal defects in kiwifruit, characterized in that, The non-destructive identification device for internal defects of kiwifruit includes: The sample scanning module is used to scan kiwi fruit samples to obtain raw scan images; An information extraction module is used to establish a mask based on the kiwi fruit boundary in the original scanned image to remove the image background from the original scanned image, obtaining a background-removed image; divide the background-removed image to obtain sample regions, and determine effective voxels based on the sample regions; segment the effective voxels into gray-level anomaly regions according to preset rules to obtain multiple segmented regions; remove noise regions in the segmented regions to obtain feature filtering regions; determine the defect distance of each feature defect in the feature filtering regions; determine the defect quantity information of the sample kiwi fruit based on the defect distance; determine the sphericity information of the sample kiwi fruit based on the volume and area information of each feature defect; determine the aspect ratio information of each feature defect based on the volume information; determine the number of sample voxels and the number of defect voxels based on the sample region and the defect feature region; determine the defect volume ratio information based on the number of sample voxels and the number of defect voxels; and determine the defect feature information of the sample kiwi fruit based on the defect quantity information, the sphericity information, the aspect ratio information, and the volume ratio information. A dataset preparation module is used to determine a defect assessment dataset based on the defect feature information. The model building module is used to build a classification model based on the defect assessment dataset; The parameter calculation module is used to obtain the defect volume ratio of the kiwifruit to be classified through the classification model; The quantitative grading module is used to quantitatively grade the defects of the kiwifruit to be classified based on the defect volume ratio.

7. A non-destructive identification device for internal defects in kiwifruit, characterized in that, The device includes: a memory, a processor, and a non-destructive identification program for internal defects of kiwifruit stored in the memory and executable on the processor, the non-destructive identification program for internal defects of kiwifruit configured to implement the non-destructive identification method for internal defects of kiwifruit as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores a non-destructive identification program for internal defects of kiwifruit, which, when executed by a processor, implements the non-destructive identification method for internal defects of kiwifruit as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Automatic segmentation method and system of three-dimensional ultrasonic image-based region of interest

    CN106408576A

  • Defect identification model training method and fruit and vegetable defect identification method

    CN115908257A

  • Non destruction detection method of apple internal quality

    CN1719238A