A method, device, equipment and storage medium for detecting seed quality
Through convolutional neural network and incremental learning algorithm, significant optimization of seed quality detection is achieved, solving the problems of cumbersome operation of traditional methods and inconsistent results, improving the accuracy and efficiency of detection, and ensuring the standardization and consistency of seed screening.
Patent Information
- Application Number
- CN202510089686.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-21
AI Technical Summary
Traditional seed quality detection methods are cumbersome to operate, and the results are easily affected by operations and experience, and it is difficult to respond quickly to large amounts of data. They lack real-time data processing and model optimization capabilities, and cannot accurately identify the microscopic defects of seeds.
Convolutional neural network is used for edge detection, and edge contrast is optimized by adjusting the image filter, separating seeds and backgrounds, extracting seed edge and texture features, calculating the aspect ratio and area of seeds, building a seed detection model, and applying cross-validation and incremental learning algorithm to optimize the model.
It improves the accuracy of edge detection, reduces artificial errors, significantly improves processing speed and accuracy, enhances the generalization ability of the detection model, improves the efficiency of seed screening, and ensures the standardization of the screening process and the consistency of high-quality seeds.
Smart Images

Figure CN119540231B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of seed detection, and in particular to a method, device, equipment and storage medium for detecting seed quality. Background Art
[0002] The field of seed testing technology focuses on evaluating and ensuring the quality of seeds, which is crucial to agricultural production. Seed testing includes a series of biological, chemical and physical methods to analyze the health status, genetic purity, disease infection, germination rate and other physiological characteristics of seeds. The specific methods involved in this technology include microscopy, biochemical testing, molecular markers, optical measurement and mechanical screening. Overall, its purpose is to ensure that the quality of seeds meets the high standards of agricultural planting and supports the healthy growth of crops and maximizes yields.
[0003] Among them, the method of detecting seed quality involves the use of various techniques and tools to evaluate whether the seeds meet the planting standards, including detecting the germination ability, purity, disease status and other key quality parameters of the seeds. High-quality seeds directly affect the yield and quality of crops. Seed quality testing not only helps to screen out the best quality seeds and improve agricultural production efficiency, but also prevents crop diseases and yield declines caused by poor seed quality. It is one of the foundations for realizing modern agriculture.
[0004] Traditional methods rely on manual inspection and biochemical analysis under a microscope, which is not only cumbersome to operate, but also easily affected by operation and experience, resulting in inconsistent results. In addition, traditional methods have difficulty responding quickly when processing large amounts of seed data, lack the ability to process real-time data and optimize models, and are difficult to adapt to the needs of modern and efficient agriculture. The existing technology lacks intelligent processing methods and cannot accurately identify microscopic defects in seeds. Defects can lead to growth problems and reduced yields in the later stages of planting, affecting the overall quality and economic benefits of crops. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a method, device, equipment and storage medium for detecting seed quality.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme: a method for detecting seed quality, comprising the following steps:
[0007] S1: Based on the image acquisition device, set the resolution and light intensity of image acquisition, adjust the focal length and exposure time of the acquisition device, collect data on seeds, and obtain a seed image data set;
[0008] S2: Based on the seed image data set, edge detection is performed using a convolutional neural network, the edge contrast of the seed image is optimized by adjusting the image filter, the seed and the background are separated, and the seed edge and texture features are extracted to generate edge texture information;
[0009] S3: using the edge texture information, calculating the aspect ratio and area of the seed, estimating the shape and size parameters of the seed by measuring the edge contour length and the internal pixel count, and obtaining the seed morphological characteristic data;
[0010] S4: Based on the seed morphological characteristic data, the seed quality standard is compared to capture the seeds whose shape or size does not meet the specification, and the data is screened to mark the seeds that do not meet the quality requirements to obtain a seed screening marker set;
[0011] S5: Based on the seed screening marker set, initial training parameters and initial weights are set, continuous training is performed, a seed detection model is constructed, cross-validation and incremental learning algorithms are applied, multiple validation feedbacks are performed on the seed detection model, seed recognition characteristics are matched, and the detection process of the model is optimized to obtain an optimized detection model;
[0012] S6: Use the optimized detection model to detect new batches of seeds, evaluate the model performance based on the screening results, compare the current output information with the expected results, verify the model accuracy, and generate seed quality assessment results.
[0013] As a further solution of the present invention, based on the seed image data set, edge detection is performed using a convolutional neural network, the edge contrast of the seed image is optimized by adjusting the image filter, the seed and the background are separated, and the seed edge and texture features are extracted. The steps of generating edge texture information are specifically as follows:
[0014] S201: Based on the seed image data set, a convolutional neural network is applied to adjust image filter parameters, highlight the boundary between the seed and the background, and optimize the visibility of the image edge to obtain an edge-enhanced image;
[0015] S202: Segmenting the image based on the edge-enhanced image, separating the background and the seed according to the adjusted brightness and color distribution differences, and obtaining a background-removed image;
[0016] S203: Based on the background-removed image, extract the seed edge and texture features, perform seed shape and texture detail analysis, identify the morphological features of the seeds, record the identification data, and generate edge texture information.
[0017] As a further solution of the present invention, the step of calculating the aspect ratio and area of the seed by using the edge texture information, estimating the shape and size parameters of the seed by measuring the edge contour length and the internal pixel count, and obtaining the seed morphological characteristic data is specifically as follows:
[0018] S301: using the edge texture information, measuring the distance of the seed outline, calculating the length and width of the seed, determining the length-width ratio of the seed by comparing the length-width data, and obtaining a seed scale index;
[0019] S302: Based on the seed scale index, statistically analyze the pixels inside the image to estimate the surface area of the seed, including converting the pixels inside the outline into area units to generate seed surface measurement data;
[0020] S303: Integrate the seed scale index and seed surface measurement data, classify and encode characteristic parameters, construct seed characteristic description information, including seed shape and size values, and obtain seed morphological characteristic data.
[0021] As a further solution of the present invention, based on the seed morphological characteristic data, the seed quality standard is compared to capture the seeds whose shape or size does not meet the specifications, and the data is screened to mark the seeds that do not meet the quality requirements. The steps of obtaining the seed screening marker set are specifically as follows:
[0022] S401: Based on the seed morphological feature data, using the seed quality standard to perform shape and size comparison analysis, identify seeds that do not match the standard, and record seed morphological deviations to generate seed deviation index information;
[0023] S402: Analyze the degree of seed deviation based on the seed deviation index information, exclude qualified seeds by marking seeds that do not meet quality requirements, and obtain a list of unqualified seeds;
[0024] S403: Based on the seed information in the unqualified seed list, a seed screening result is obtained, and the unqualified seeds after screening are listed to obtain a seed screening mark set.
[0025] As a further solution of the present invention, based on the seed screening marker set, initial training parameters and initial weights are set, continuous training is performed, a seed detection model is constructed, cross-validation and incremental learning algorithms are applied, multiple verification feedbacks are performed on the seed detection model, seed recognition characteristics are matched, and the detection process of the model is optimized. The steps of obtaining the optimized detection model are specifically as follows:
[0026] S501: Based on the seed screening marker set, set the initial model training parameters, including batch size and number of iterations, perform the first round of model training, adjust the initial model weights through the data set, and generate a basic seed detection model;
[0027] S502: Based on the basic seed detection model, a cross-validation and incremental learning algorithm is applied to perform repeated validation cycles, and after each iteration, a learning rate and associated parameters are adjusted according to the output error to continuously optimize the model accuracy and response speed to obtain a performance tuning model;
[0028] S503: Based on the performance tuning model, the model recognition accuracy is tested by comparing the model output with the correct result, and multiple rounds of performance tests are performed to verify whether the model settings meet the optimal performance standards, thereby obtaining an optimized detection model.
[0029] As a further solution of the present invention, the incremental learning algorithm is according to the formula: Calculate updated model parameters ,in, Iteration step The model parameters, is the learning rate, is the weight decay coefficient, is the gradient of the loss function, is the L1 regularization coefficient, for The symbol function of for The L1 norm of Power.
[0030] As a further solution of the present invention, the optimized detection model is used to detect a new batch of seeds, the model performance is evaluated according to the screening results, and the current output information is compared with the expected results to verify the accuracy of the model. The steps of generating seed quality evaluation results are specifically as follows:
[0031] S601: Analyze new batches of seeds using the optimized detection model, record the detection data of each batch of seeds, organize the captured data, preliminarily evaluate the seed quality, and generate preliminary seed detection data;
[0032] S602: Based on the preliminary seed test data, compare the difference with the set quality standard, identify seeds that do not meet the standard, and optimize the model for the detection efficiency and accuracy of future batches to obtain a test optimization record;
[0033] S603: Based on the detection optimization record, the model effectiveness is evaluated, the accuracy and reliability of the model in operation are verified, and it is determined whether the detection result is consistent with the expectation, and a seed quality evaluation result is generated.
[0034] A device for detecting seed quality, the device comprising:
[0035] The image acquisition module sets the resolution of the image acquisition device, adjusts the light intensity, focal length and exposure time based on the image acquisition device, acquires the seed image, and obtains the seed image data set;
[0036] The image processing module performs edge detection on the seed image data set, uses a convolutional neural network to optimize edge contrast, separates seeds from background, extracts seed edge and texture features, and generates edge texture information;
[0037] The seed morphology analysis module uses the edge texture information to calculate the aspect ratio and area of the seed, measure the edge contour length and the number of internal pixels, and estimate the shape and size parameters of the seed to obtain seed morphology feature data;
[0038] The quality assessment and screening module compares the seed morphological characteristic data with the seed quality standard, identifies seeds that do not meet the shape or size requirements, and marks seeds that do not meet the quality requirements to obtain a seed screening marker set;
[0039] The model optimization and verification module is based on the seed screening marker set, uses cross-validation and incremental learning algorithms to continuously train the model and provide multiple verification feedbacks, optimizes the seed detection process, and detects new batches of seeds to verify the accuracy of the model and obtain seed quality assessment results.
[0040] A device for detecting seed quality comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for detecting seed quality when executing the computer program.
[0041] A storage medium for detecting seed quality stores a computer program, which implements the steps of the above-mentioned method for detecting seed quality when executed by a processor.
[0042] Compared with the prior art, the advantages and positive effects of the present invention are:
[0043] In the present invention, through convolutional neural networks and incremental learning algorithms, significant optimization of seed quality detection is achieved, which not only improves the accuracy of edge detection, but also clearly separates seeds and background by optimizing image contrast, making the extraction of morphological features more accurate, and automated morphological parameter calculation, which significantly improves processing speed and accuracy and reduces human errors. Furthermore, incremental learning enables the model to continuously self-optimize and adapt to seed characteristics of different batches, enhances the generalization ability of the detection model, greatly improves the efficiency of seed screening, and ensures the standardization of the screening process and the consistency of high-quality seeds. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a main step flow chart of the present invention;
[0045] Figure 2 It is a schematic diagram of the refinement of S1 of the present invention;
[0046] Figure 3 It is a schematic diagram of the refinement of S2 of the present invention;
[0047] Figure 4 It is a schematic diagram of the refinement of S3 of the present invention;
[0048] Figure 5 It is a schematic diagram of the refinement of S4 of the present invention;
[0049] Figure 6 It is a detailed schematic diagram of S5 of the present invention;
[0050] Figure 7 It is a detailed schematic diagram of S6 of the present invention;
[0051] Figure 8 It is a device module diagram of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0053] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0054] Example 1: Please refer to Figure 1 The present invention provides a technical solution: a method for detecting seed quality, comprising the following steps:
[0055] S1: Based on the image acquisition device, set the resolution and light intensity of image acquisition, adjust the focal length and exposure time of the acquisition device, collect data on seeds, and obtain a seed image data set;
[0056] S2: Based on the seed image dataset, a convolutional neural network is used for edge detection. By adjusting the image filter, the edge contrast of the seed image is optimized, the seed and background are separated, and the seed edge and texture features are extracted to generate edge texture information.
[0057] S3: Using edge texture information, calculate the aspect ratio and area of the seeds, estimate the shape and size parameters of the seeds by measuring the edge contour length and internal pixel count, and obtain seed morphological characteristic data;
[0058] S4: Based on the seed morphological characteristic data, the seeds are compared with the seed quality standards to capture the seeds whose shapes or sizes do not meet the specifications, and the data are screened to mark the seeds that do not meet the quality requirements to obtain the seed screening marker set;
[0059] S5: Based on the seed screening marker set, set initial training parameters and initial weights, perform continuous training, build a seed detection model, apply cross-validation and incremental learning algorithms, perform multiple verification feedback on the seed detection model, match seed recognition characteristics, and optimize the detection process of the model to obtain an optimized detection model;
[0060] S6: Use the optimized detection model to test new batches of seeds, evaluate the model performance based on the screening results, compare the current output information with the expected results, verify the model accuracy, and generate seed quality assessment results.
[0061] The seed image dataset includes image clarity, color saturation, and contrast level. The edge texture information includes edge contour features, texture distribution patterns, and color distribution data. The seed morphological feature data includes shape descriptors, size measurements, and contour information. The seed screening marker set includes a list of seeds that do not meet the standards, shape abnormality data, and size abnormality data. The optimized detection model includes adjusted model parameters, learning efficiency, and error range. The seed quality assessment results include quality classification, single seed scoring, and batch consistency assessment results.
[0062] See also Figure 2 , based on the image acquisition device, set the resolution and light intensity of image acquisition, and adjust the focal length and exposure time of the acquisition device to collect data on seeds. The specific steps to obtain the seed image data set are:
[0063] S101: Based on the image acquisition device, adjust the camera parameters, set the matching resolution and light intensity, refine the focal length and exposure time, and collect preliminary seed images to generate an original seed image set;
[0064] In S101, first, by adjusting the camera parameters of the image acquisition device, such as focal length and exposure time, to adapt to the specific needs of seed image acquisition, the set resolution usually depends on the size of the seeds and the degree of detail that needs to be captured, and the light intensity is adjusted according to the ambient light to obtain the best image quality. The appropriate resolution and light intensity settings are selected through the software interface in the control room, and the picture is monitored in real time to ensure the accuracy of the focal length and exposure time, so as to acquire clear preliminary seed images, which are then saved as the original seed image set.
[0065] S102: Based on the original seed image set, adjust the color saturation and image contrast, use image processing tools to optimize the visibility of image details, and verify the recognizability of seed features to obtain an optimized image detail set;
[0066] In S102, image processing software is used to adjust the color saturation according to preset standards to enhance the color richness and layering in the image. At the same time, contrast adjustment makes the details in the image more clearly visible, especially the edges and textures of the seeds, which are crucial for the subsequent classification and analysis of seed species. By comparing the original seed image with the adjusted effect, it is ensured that the adjustment meets the requirements of seed image analysis.
[0067] S103: Based on the image detail optimization set, format and compress the image data to retain key image quality and optimize image storage and transmission efficiency to obtain a seed image data set;
[0068] In S103, an image is selected from the image detail optimization set, and a compression algorithm is applied to reduce the file size while maintaining key image quality. This process involves converting the data format to adapt to different storage and transmission requirements. In this way, the storage and transmission efficiency of the image can be improved without sacrificing image details.
[0069] See also Figure 3 Based on the seed image dataset, the convolutional neural network is used for edge detection. By adjusting the image filter, the edge contrast of the seed image is optimized, the seed and the background are separated, and the seed edge and texture features are extracted. The specific steps for generating edge texture information are as follows:
[0070] S201: Based on the seed image data set, a convolutional neural network is applied to adjust image filter parameters, highlight the boundary between the seed and the background, and optimize the visibility of the image edge to obtain an edge-enhanced image;
[0071] In S201, first, an image is selected from the seed image dataset, and a convolutional neural network is applied to process the image, which involves adjusting the filter parameters in the convolution layer, especially the size and type of the filter, so as to better capture the boundary between the seed and the background. By adjusting the parameters, the clarity and visibility of the edge can be significantly improved. The training process of the network is monitored to ensure the stability of the performance of the model on multiple images, and the parameters are adjusted to optimize the edge detection effect. The optimized image shows a more obvious seed outline, and the image is then saved as an edge enhanced image set.
[0072] S202: segmenting the image based on the edge-enhanced image, separating the background and the seed according to the adjusted brightness and color distribution differences, and obtaining a background-removed image;
[0073] In S202, based on the edge enhanced image set, the image brightness and color distribution are adjusted using image processing tools to maximize the contrast between the seed and the background. This process involves using threshold processing or clustering algorithms to separate the seeds and the background in the image. Clustering techniques (such as K-means clustering, MeanShift clustering, etc.) can be used to divide pixels into multiple classes based on features such as image brightness, color distribution or texture. The seed area and the background area usually have different distributions in the feature space, so that the background area is effectively eliminated and the key area containing the seed is retained. The processed image is called a background elimination image.
[0074] S203: extracting seed edge and texture features based on the background removal image, performing seed shape and texture detail analysis, identifying seed morphological features, and recording identification data to generate edge texture information;
[0075] In S203, image analysis software is used to extract the edge lines and texture details of the seeds from the background-removed image, which usually involves advanced image processing techniques such as edge detection algorithms and texture analysis tools. The tools can identify and quantify the shape of the seeds and the texture features of their surfaces. Through detailed analysis, the morphological features of the seeds can be accurately identified. The data is recorded by the system and used to generate edge texture information, which is crucial for seed classification and quality assessment.
[0076] See also Figure 4 , using edge texture information, calculate the aspect ratio and area of the seed, and estimate the shape and size parameters of the seed by measuring the edge contour length and internal pixel count. The specific steps to obtain the seed morphological characteristic data are as follows:
[0077] S301: using edge texture information, measuring the distance of the seed outline, calculating the length and width of the seed, determining the length-width ratio of the seed by comparing the length-width data, and obtaining the seed scale index;
[0078] In S301, first, the edge texture information is used to accurately measure the length of the seed contour line, which is usually achieved through image processing software. The software can identify and track the edge contour of the seed, so as to accurately calculate its circumference. Furthermore, by measuring the maximum length and width of the seed in the image, the aspect ratio of the seed can be calculated. This ratio is an important indicator in seed classification and evaluation because it reflects the basic morphological properties of the seed. By comparing the length and width data of different seeds, the seeds can be preliminarily classified and provide data support for subsequent more detailed analysis.
[0079] S302: Based on the seed scale index, statistically analyze the pixels inside the image to estimate the surface area of the seed, including converting the pixels inside the outline into area units to generate seed surface measurement data;
[0080] In S302, based on the obtained seed scale index, the number of pixels within the outline is counted to estimate the surface area of the seed. This process involves corresponding each pixel in the image to an actual area unit, and usually requires considering the proportional relationship between the image resolution and the actual size. Through this method, the image data can be converted into the actual seed surface area, which is critical for evaluating the growth condition and quality of the seed. The data is used to generate seed surface measurement data.
[0081] S303: Integrate seed scale indicators and seed surface measurement data, classify and encode characteristic parameters, construct seed characteristic description information, including seed shape and size values, and obtain seed morphological characteristic data;
[0082] In S303, statistical and classification methods are used to encode and classify the morphological characteristics of various seeds. By comprehensively considering parameters such as seed length, width, aspect ratio, and surface area, a comprehensive seed characteristic description information is constructed. The information is usually presented in numerical form to facilitate use in seed research and classification work. Finally, the data is integrated and recorded as seed morphological characteristic data, which helps in the classification and identification of seeds.
[0083] See also Figure 5 , based on the seed morphological characteristic data, it is compared with the seed quality standard to capture seeds whose shape or size does not meet the specifications, and the data is screened to mark the seeds that do not meet the quality requirements. The specific steps of obtaining the seed screening mark set are as follows:
[0084] S401: Based on the seed morphological feature data, using the seed quality standard, performing shape and size comparison analysis, identifying seeds that do not match the standard, and recording the seed morphological deviation, and generating seed deviation index information;
[0085] In S401, first, the obtained seed morphological characteristic data is used to match and analyze the established seed quality standards through data comparison software, which includes comparing the differences in seed shape and size with standard specifications. The software sets a specific tolerance threshold to identify seeds whose shape or size deviates significantly from the standard. The deviation data is recorded by the system and converted into seed deviation index information, which lists in detail the deviation type and degree of each seed, providing a basis for further screening and analysis.
[0086] S402: Analyze the degree of seed deviation based on the seed deviation index information, exclude qualified seeds by marking seeds that do not meet quality requirements, and obtain a list of unqualified seeds;
[0087] In S402, based on the seed deviation index information, an analysis tool is used to evaluate the degree of deviation of each seed. Through the set deviation evaluation criteria, the software automatically marks the seeds that do not meet the quality requirements, and the seeds are placed in the unqualified list. At the same time, the system automatically excludes seeds that meet the quality standards from the data set to ensure the focus and efficiency of subsequent processing.
[0088] S403: based on the seed information in the unqualified seed list, obtaining the seed screening result, and listing the screened unqualified seeds to obtain a seed screening mark set;
[0089] In S403, detailed seed information is obtained based on the list of unqualified seeds, including the morphological characteristics and degree of deviation of the seeds. This information is summarized to form the seed screening results. The system organizes the results into a list, listing all seeds that still do not meet the quality standards after screening. Finally, the information is compiled into a seed screening mark set to provide accurate data support for seed quality control and subsequent processing.
[0090] See also Figure 6 , based on the seed screening marker set, set the initial training parameters and initial weights, perform continuous training, build a seed detection model, apply cross-validation and incremental learning algorithms, perform multiple verification feedback on the seed detection model, match the seed recognition characteristics, and optimize the model's detection process. The specific steps of obtaining the optimized detection model are:
[0091] S501: Based on the seed screening marker set, set the initial model training parameters, including batch size and number of iterations, perform the first round of model training, adjust the initial model weights through the data set, and generate a basic seed detection model;
[0092] In S501, first, the initial training parameters of the model, such as batch size and number of iterations, are set according to the seed screening marker set. The parameters are the basis of the training model and affect the learning speed and processing power of the model. The parameters are input through the software interface and the first round of model training is started. In this process, the model adjusts its initial weights by analyzing the data in the marker set to generate a basic seed detection model. The model will serve as the baseline for subsequent optimization steps to ensure that the model starts further training and adjustment from a stable starting point.
[0093] S502: Based on the basic seed detection model, a cross-validation and incremental learning algorithm is applied to perform repeated validation cycles, and after each iteration, the learning rate and associated parameters are adjusted according to the output error to continuously optimize the model accuracy and response speed to obtain a performance tuning model;
[0094] In S502, a basic seed detection model is used, and a cross-validation and incremental learning algorithm are combined to improve the performance of the model. After each iteration, the learning rate and other related parameters, such as weight decay and momentum, are adjusted according to the error output by the model. The adjustment helps the model to continuously improve accuracy and response speed in different data batches, thereby obtaining a performance tuning model. After multiple verification cycles, it is ensured that it has efficient and accurate performance when processing data.
[0095] Incremental learning algorithm, according to the formula: Calculate updated model parameters ,in, Iteration step The model parameters, is the learning rate, is the weight decay coefficient, is the gradient of the loss function, is the L1 regularization coefficient, for The symbol function of for The L1 norm of Power.
[0096] Execution process:
[0097] First, the loss function is calculated based on the performance of the current batch of the model, and then the gradient of the loss function is calculated to determine the direction and magnitude of parameter adjustment. Next, the step size is optimized by adjusting the learning rate and introducing the weight decay coefficient. To reduce the size of the parameters to prevent overfitting, the newly added L1 regularization term Used to increase the generalization ability of the model, where The value of is selected through cross-validation to ensure that the regularization strength is appropriate. It can be dynamically adjusted according to the parity of the current iteration number, so that the model focuses on different parameter scales at different training stages, and finally updates the model parameters to complete one iteration.
[0098] S503: Based on the performance tuning model, the model output is compared with the correct result to verify the model recognition accuracy, and multiple rounds of performance tests are performed to verify whether the model setting reaches the optimal performance standard, thereby obtaining an optimized detection model;
[0099] In S503, the performance tuning model is subjected to multiple rounds of performance tests. The recognition accuracy of the model is verified by comparing the output of the model with the actual correct result. The test covers seed data of different types and qualities to ensure that the model can be widely adapted to different application scenarios. Through comprehensive testing, it is possible to evaluate whether the model meets the predetermined performance standards and further adjust the model parameters based on the test results. Finally, an optimized detection model is obtained through rigorous testing and tuning.
[0100] See also Figure 7 , use the optimized detection model to test the new batch of seeds, evaluate the model performance based on the screening results, and compare the current output information with the expected results to verify the model accuracy. The specific steps to generate seed quality assessment results are as follows:
[0101] S601: Analyze new batches of seeds using the optimized detection model, record the detection data of each batch of seeds, organize the captured data, preliminarily evaluate the seed quality, and generate preliminary seed detection data;
[0102] In S601, first, the new batch of seeds is inspected using the optimized detection model. This process involves loading the image data of the new batch of seeds into the detection system, running the model for analysis, monitoring the processing of the model, and recording the detection data of each batch of seeds. The data includes characteristics such as seed size, shape, and quality. Subsequently, the captured data is sorted and preliminarily evaluated to assess the quality status of each batch of seeds. The preliminary detection data is saved by the system and used to generate a preliminary seed detection data report.
[0103] S602: Based on the preliminary seed test data, compare the differences with the set quality standards, identify seeds that do not meet the standards, and optimize the model for the detection efficiency and accuracy of future batches to obtain a test optimization record;
[0104] In S602, based on the preliminary seed inspection data, a data analysis tool is used to compare the data with the preset seed quality standards. In this process, seeds that do not meet the standards are identified and the specific deviations of the seeds are recorded. In addition, based on the difference analysis results, the parameter settings of the model are optimized, such as adjusting the discrimination threshold or improving the feature extraction algorithm, so as to improve the model's detection efficiency and accuracy for future batches of seeds. Through adjustment, a detection optimization record is generated, which reflects the specific operations and effects of the model tuning.
[0105] S603: Based on the detection optimization record, the model effectiveness is evaluated, the accuracy and reliability of the model in operation are verified, and whether the detection result is consistent with the expectation is determined, and the seed quality evaluation result is generated;
[0106] In S603, the overall performance of the model is evaluated based on the detection optimization records. The accuracy and reliability of the model in actual operation are verified by comparing the detection results output by the model with the actual correct quality assessment results. This process involves multiple rounds of testing to ensure the stability and repeatability of the model. The test results are used to determine whether the detection results are consistent with expectations, and seed quality assessment results are generated accordingly. The results record the performance of the model in actual applications, including accuracy, reliability and any areas that need further optimization.
[0107] See also Figure 8 , a device for detecting seed quality, the device comprising:
[0108] The image acquisition module sets the resolution of the image acquisition device, adjusts the light intensity, focal length and exposure time based on the image acquisition device, acquires the seed image, and obtains the seed image data set;
[0109] The image processing module performs edge detection on the seed image data set, uses a convolutional neural network to optimize edge contrast, separates seeds from the background, and extracts seed edge and texture features to generate edge texture information;
[0110] The seed morphology analysis module uses edge texture information to calculate the aspect ratio and area of the seed, measure the edge contour length and the number of internal pixels, and estimate the shape and size parameters of the seed to obtain seed morphology characteristic data;
[0111] The quality assessment and screening module compares the seed morphological characteristic data with the seed quality standard, identifies seeds that do not meet the shape or size requirements, and marks seeds that do not meet the quality requirements to obtain a seed screening marker set;
[0112] The model optimization and verification module is based on the seed screening marker set, and uses cross-validation and incremental learning algorithms to continuously train the model and provide multiple verification feedbacks, optimize the seed detection process, and test new batches of seeds to verify the accuracy of the model and obtain seed quality assessment results.
[0113] A device for detecting seed quality comprises a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the above-mentioned method for detecting seed quality are implemented.
[0114] A storage medium for detecting seed quality stores a computer program, which implements the steps of the above-mentioned method for detecting seed quality when executed by a processor.
[0115] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for detecting seed quality, characterized in that: The following steps are involved: Based on the image acquisition device, the resolution and light intensity of the image acquisition are set, and the focal length and exposure time of the acquisition device are adjusted to collect data on the seeds and obtain a seed image data set; Based on the seed image data set, edge detection is performed using a convolutional neural network, the edge contrast of the seed image is optimized by adjusting the image filter, the seed and the background are separated, and the seed edge and texture features are extracted to generate edge texture information; The edge texture information is used to calculate the aspect ratio and area of the seed, and the shape and size parameters of the seed are estimated by measuring the edge contour length and the internal pixel count to obtain the seed morphological characteristic data; Based on the seed morphological characteristic data, the seed quality standard is compared to capture seeds whose shape or size does not meet the specification, and data screening is performed to mark seeds that do not meet the quality requirements to obtain a seed screening marker set; Based on the seed screening marker set, initial training parameters and initial weights are set, continuous training is performed, a seed detection model is constructed, cross-validation and incremental learning algorithms are applied, multiple validation feedbacks are performed on the seed detection model, seed identification characteristics are matched, and the detection process of the model is optimized to obtain an optimized detection model; Using the optimized detection model, a new batch of seeds is tested, the model performance is evaluated based on the screening results, and the current output information is compared with the expected results to verify the accuracy of the model and generate seed quality assessment results; Based on the seed image dataset, edge detection is performed using a convolutional neural network. By adjusting the image filter, the edge contrast of the seed image is optimized, the seed and the background are separated, and the seed edge and texture features are extracted. The steps of generating edge texture information are specifically as follows: Based on the seed image data set, a convolutional neural network is applied to adjust image filter parameters, highlight the boundary between the seed and the background, and optimize the visibility of the image edge to obtain an edge-enhanced image; Based on the edge enhanced image, the image is segmented, and the background and the seed are separated according to the adjusted brightness and color distribution differences to obtain a background removed image; Based on the background-removed image, the seed edge and texture features are extracted, the seed shape and texture detail analysis is performed, the morphological features of the seeds are identified, and the identification data is recorded to generate edge texture information.
2. The method for detecting seed quality according to claim 1, characterized in that: The steps of calculating the aspect ratio and area of the seed by using the edge texture information, estimating the shape and size parameters of the seed by measuring the edge contour length and internal pixel count, and obtaining the seed morphological characteristic data are as follows: Using the edge texture information, the distance of the seed outline is measured to calculate the length and width of the seed, and the length-width ratio of the seed is determined by comparing the length-width data to obtain the seed scale index; Based on the seed scale index, statistical analysis is performed on the pixels inside the image to estimate the surface area of the seed, including converting the pixels inside the outline into area units to generate seed surface measurement data; The seed scale index and seed surface measurement data are integrated, the characteristic parameters are classified and encoded, and the characteristic description information of the seeds is constructed, including the seed shape and size values, to obtain the seed morphological characteristic data.
3. The method for detecting seed quality according to claim 1, characterized in that: Based on the seed morphological characteristic data, the seed quality standard is compared to capture the seeds whose shape or size does not meet the specification, and the data is screened to mark the seeds that do not meet the quality requirements. The steps of obtaining the seed screening marker set are specifically as follows: Based on the seed morphological characteristic data, a shape and size comparison analysis is performed using seed quality standards to identify seeds that do not match the standards, and seed morphological deviations are recorded to generate seed deviation index information; Based on the seed deviation index information, the degree of seed deviation is analyzed, and seeds that do not meet quality requirements are marked, qualified seeds are excluded, and a list of unqualified seeds is obtained; Based on the seed information in the unqualified seed list, the seed screening result is obtained, and the unqualified seeds after screening are listed to obtain a seed screening mark set.
4. The method for detecting seed quality according to claim 1, characterized in that: Based on the seed screening marker set, initial training parameters and initial weights are set, continuous training is performed, a seed detection model is constructed, cross-validation and incremental learning algorithms are applied, multiple validation feedbacks are performed on the seed detection model, seed recognition characteristics are matched, and the detection process of the model is optimized. The steps of obtaining the optimized detection model are specifically as follows: Based on the seed screening marker set, the initial model training parameters are set, including the batch size and the number of iterations, and the first round of model training is performed. The initial model weights are adjusted through the data set to generate a basic seed detection model; Based on the basic seed detection model, cross-validation and incremental learning algorithms are applied to perform repeated validation cycles, and after each iteration, the learning rate and associated parameters are adjusted according to the output error to continuously optimize the model accuracy and response speed to obtain a performance tuning model; Based on the performance tuning model, the model recognition accuracy is tested by comparing the model output with the correct result, and multiple rounds of performance testing are performed to verify whether the model settings meet the optimal performance standards, thereby obtaining an optimized detection model.
5. The method for detecting seed quality according to claim 4, characterized in that: The incremental learning algorithm is based on the formula: Calculate updated model parameters ,in, Iteration step The model parameters, is the learning rate, is the weight decay coefficient, is the gradient of the loss function, is the L1 regularization coefficient, for The symbol function of for The L1 norm of Power.
6. The method for detecting seed quality according to claim 1, characterized in that: The optimized detection model is used to detect new batches of seeds, the model performance is evaluated based on the screening results, and the current output information is compared with the expected results to verify the accuracy of the model. The specific steps for generating seed quality assessment results are as follows: Analyze new batches of seeds using the optimized detection model, record the detection data of each batch of seeds, organize the captured data, preliminarily evaluate the seed quality, and generate preliminary seed detection data; Based on the preliminary seed test data, compare the differences with the set quality standards, identify seeds that do not meet the standards, and optimize the model for the detection efficiency and accuracy of future batches to obtain a test optimization record; Based on the detection optimization records, the model effectiveness is evaluated, the accuracy and reliability of the model in operation are verified, and it is determined whether the detection results are consistent with expectations to generate seed quality assessment results.
7. A device for detecting seed quality, characterized in that: The method for detecting seed quality according to any one of claims 1 to 6 is performed, wherein the device comprises: The image acquisition module sets the resolution of the image acquisition device, adjusts the light intensity, focal length and exposure time based on the image acquisition device, acquires the seed image, and obtains the seed image data set; The image processing module performs edge detection on the seed image data set, uses a convolutional neural network to optimize edge contrast, separates seeds from background, extracts seed edge and texture features, and generates edge texture information; The seed morphology analysis module uses the edge texture information to calculate the aspect ratio and area of the seed, measure the edge contour length and the number of internal pixels, and estimate the shape and size parameters of the seed to obtain seed morphology feature data; The quality assessment and screening module compares the seed morphological characteristic data with the seed quality standard, identifies seeds that do not meet the shape or size requirements, and marks seeds that do not meet the quality requirements to obtain a seed screening marker set; The model optimization and verification module is based on the seed screening marker set, uses cross-validation and incremental learning algorithms to continuously train the model and provide multiple verification feedbacks, optimizes the seed detection process, and detects new batches of seeds to verify the accuracy of the model and obtain seed quality assessment results.
8. A device for detecting seed quality, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor implements the steps of the method for detecting seed quality according to any one of claims 1 to 6 when executing the computer program.
9. A storage medium for detecting seed quality, on which a computer program is stored, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting seed quality according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Neural network intelligent seed identification method and system
CN118537706A
Vision-based agricultural seed screening method and system
CN119314167A