Food sorting linkage control method based on X-ray detection result
Patent Information
- Application Number
- CN202611005125.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-09-25
AI Technical Summary
但由于芋头块在输送线上处于高速运动状态,检测模块完成特征提取的计算耗时与执行机构的机械响应延迟叠加,使得执行机构到达预设分选位置时目标已发生位移,传统方法难以在有限的时间窗口内完成高精度位置预测与执行指令的精准同步,导致缺陷品与合格品的混料现象频发,无法实现可靠的分选效果
1.通过构建预测位置模型对芋头块的未来位置进行精确预测,并根据执行机构的机械响应特性参数动态调整分选触发时刻,有效解决检测结果输出时刻与执行机构响应时刻之间的时间延迟导致的分选精度劣化问题;
Smart Images

Figure CN122806771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and in particular to a food sorting linkage control method based on X-ray inspection results. Background Technology
[0002] In the field of food sorting, the automatic sorting of taro chunks based on X-ray detection results for defects, weight, shape, and foreign objects has become a core technology for ensuring product quality. However, there is an inherent contradiction between the target feature data acquired by the X-ray detection device and the sorting execution mechanism. That is, there is a time delay that is difficult to eliminate between the output time of the detection result and the response time of the execution mechanism, which leads to a significant deviation in the execution mechanism's determination of the actual position of the target and a serious deterioration in sorting accuracy.
[0003] Common food sorting and linkage control methods generally employ a serial processing architecture of detection followed by writing. Target features are extracted using independent image processing algorithms, and the feature results are then transmitted to the execution controller to trigger the sorting action. However, because the taro chunks move at high speed on the conveyor line, the computation time for feature extraction by the detection module is compounded by the mechanical response delay of the execution mechanism. This means that by the time the execution mechanism reaches the preset sorting position, the target has already shifted. Traditional methods struggle to achieve high-precision position prediction and accurate synchronization of execution commands within a limited time window, leading to frequent mixing of defective and qualified products and failing to achieve reliable sorting results. Summary of the Invention
[0004] The purpose of this invention is to provide a food sorting linkage control method based on X-ray detection results to solve the technical problems mentioned in the background art.
[0005] The present invention provides a food sorting linkage control method based on X-ray detection results, comprising: Real-time X-ray detection image data of taro chunks on the conveyor line is acquired, and the real-time X-ray detection image data is preprocessed to obtain preprocessed standard format image data. The preprocessed standard format image data is input into the defect feature extraction network to obtain the defect feature vector of the taro block; Based on the defect feature vector and the movement speed parameters of the taro block, a model for predicting the future position of the taro block is constructed. The transmission time required for the taro chunks to reach the sorting station is calculated based on the predicted position model, and the optimal sorting trigger time is determined according to the transmission time and the mechanical response characteristic parameters of the actuator. At the optimal sorting trigger time, a sorting instruction is sent to the sorting execution mechanism so that the sorting execution mechanism completes the sorting action when the taro block reaches the preset sorting position.
[0006] In some embodiments, the preprocessing operation includes contrast enhancement and noise filtering.
[0007] In some embodiments, the defect feature extraction network is a deep convolutional neural network; the defect feature vector includes defect category features, defect location features, and defect size features.
[0008] In some embodiments, constructing a predictive position model of the taro block at future moments based on the defect feature vector and the taro block's motion velocity parameters includes: Extract the coordinates of the center position of the taro block at the current detection time from the defect feature vector; Based on the real-time movement speed obtained by the speed sensor of the conveyor line, the theoretical transmission time required for the taro block to move from the current detection time to the sorting station is calculated. Based on the theoretical transmission time and the center coordinates of the taro block at the current detection time, and combined with the historical data of the linear velocity fluctuation of the conveyor line, a position correction model based on time series prediction is established. The theoretical transmission time is compensated and corrected using the location correction model to obtain the corrected predicted transmission time. Based on the corrected predicted transmission time and the center coordinates of the taro block at the current detection time, the predicted center coordinates of the taro block when it arrives at the sorting station are calculated.
[0009] In some embodiments, determining the optimal sorting trigger time based on the transmission time and the mechanical response characteristic parameters of the actuator includes: Obtain the mechanical response characteristic parameters of the actuator, including the inherent response delay time of the actuator, the stroke time of the actuator, and the positioning accuracy parameters of the actuator; Based on the predicted transmission time minus the inherent response delay time, the advance time required for the sorting execution mechanism to start is calculated. Based on the travel time of the actuator and the predicted center position coordinates of the taro block, the pre-start position of the sorting actuator is determined; Taking into account the lead time, pre-start position, and positioning accuracy parameters of the actuator, the optimal sorting trigger time is determined through an optimization algorithm.
[0010] In some embodiments, before sending the sorting instruction to the sorting execution mechanism at the optimal sorting trigger time, the method further includes: The defect feature vector is classified to determine the defect level of the taro block; Based on the defect level and the sorting capability parameters of the sorting actuator, determine the corresponding sorting action type; The sorting action types include rejection action, recycling action, and release action; Based on the predicted center position coordinates of the taro block and the execution position of the sorting execution mechanism, a spatial mapping relationship is established to determine in which direction the sorting execution mechanism needs to perform the sorting operation at the predicted center position coordinates.
[0011] In some embodiments, the method further includes acquiring the weight parameters of the taro chunks, which are acquired in real time by a weight sensor integrated with the conveyor line. The weight parameters are compared with a preset weight threshold to determine the weight grade of the taro chunks. The weight grade is used as an auxiliary parameter for sorting decision and is combined with the defect grade to obtain the final sorting action type.
[0012] In some embodiments, the method further includes obtaining shape parameters of taro chunks, wherein the shape parameters are extracted from the preprocessed standard format image data using an image processing algorithm; comparing the shape parameters with a preset shape standard to determine the shape grade of the taro chunks; and using the shape grade as an auxiliary parameter for sorting decision, and making a joint decision with the defect grade and the weight grade to obtain the final sorting action type.
[0013] In some embodiments, the X-ray detection image data is further subjected to foreign object identification processing to determine whether a foreign object exists; the foreign object includes metallic foreign objects, non-metallic high-density foreign objects, and inedible foreign objects; when a foreign object is detected, the sorting action type of the taro block is forcibly set to rejection action, and the foreign object identification result is sent to the sorting execution mechanism as a priority processing signal.
[0014] Compared with the prior art, the present invention has the following advantages: 1. By constructing a predictive position model, the future position of taro blocks can be accurately predicted, and the sorting trigger time can be dynamically adjusted according to the mechanical response characteristic parameters of the actuator, effectively solving the problem of deterioration in sorting accuracy caused by the time delay between the output time of the detection result and the response time of the actuator; 2. Improve sorting accuracy by introducing a joint decision-making mechanism that includes defect level, weight level, shape level, and foreign object identification. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the food sorting linkage control method based on X-ray detection results of the present invention; Figure 2 This is a diagram showing the actual application results of the food sorting linkage control method of the present invention. Detailed Implementation
[0017] The following will be based on embodiments of the present invention. Figures 1-2 The technical solutions in the embodiments of the present invention will be clearly and completely described together. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0018] This invention relates to a food sorting linkage control method based on X-ray detection results, applied to an automated sorting production line for taro chunks. Throughout the control process, through collaborative work, real-time detection, defect identification, position prediction, and precise sorting control of moving taro chunks on the conveyor line are achieved. Specifically, the method includes image acquisition and preprocessing, defect feature extraction, position prediction, timing synchronization control, and sorting command execution. Image acquisition and preprocessing acquires real-time X-ray detection image data of the taro chunks and performs standardization processing; defect feature extraction utilizes a deep neural network to identify defects and extract features from the preprocessed images; position prediction combines motion speed parameters to construct a future position prediction model for the taro chunks; timing synchronization control determines the optimal trigger time based on the prediction results and the mechanical response characteristics of the actuator; and sorting command execution sends sorting commands to the actuator at precise times to achieve accurate sorting.
[0019] Example 1 First, real-time X-ray detection image data of taro chunks on the conveyor line is acquired, and the real-time X-ray detection image data is preprocessed to obtain preprocessed standard format image data.
[0020] Specifically, image acquisition utilizes an X-ray inspection device installed at a specific location on the conveyor line. This device is responsible for irradiating the taro blocks passing through that location with X-rays and acquiring transmission images. The core components of the X-ray inspection device include an X-ray source, a detector, and a signal conversion unit. The X-ray source generates an X-ray beam of specific energy, which penetrates the taro blocks on the conveyor line and is received by the detector. The detector converts the received X-ray signal into an electrical signal, and the signal conversion unit further digitizes this electrical signal into digital image data. The resolution of the image acquisition is set according to the sorting accuracy requirements; under typical configuration, the image pixel size is large enough to clearly distinguish minute defects on the surface of the taro blocks. The acquired raw X-ray image data undergoes subsequent preprocessing.
[0021] Further, the preprocessing operation includes three steps: contrast enhancement, noise removal, and size normalization. Contrast enhancement improves the visual effect of the image, making the gray-level difference between defective and normal areas more significant. This operation uses a histogram equalization algorithm or an adaptive contrast enhancement algorithm to adjust the gray-level distribution of the original image, fully utilizing the image's dynamic range. During histogram equalization, the gray-level histogram distribution of the original image is statistically analyzed, and the gray-level mapping relationship is calculated. The gray-level values of the original image are then redistributed according to this mapping relationship, resulting in a more uniform gray-level distribution in the processed image. The contrast-enhanced image is then sent to noise removal for denoising. Noise removal employs spatial domain filtering or frequency domain filtering methods. Spatial domain filtering includes mean filtering, Gaussian filtering, and median filtering, among which median filtering is effective in removing salt-and-pepper noise and effectively preserves edge information. Frequency domain filtering transforms the image to the frequency domain and uses a low-pass filter to remove high-frequency noise components. The noise-removed image then undergoes size normalization. Size normalization is used to resize input images of different sizes to a standard size for subsequent feature extraction networks. The normalization process employs bilinear or bicubic interpolation algorithms to perform the size transformation while preserving image features. The standard size needs to balance computational efficiency and feature preservation, typically using a square size such as pixels or pixels. The normalized image data is converted to a standard format and stored in a predefined data structure, awaiting further processing.
[0022] Next, the preprocessed standard format image data is input into the defect feature extraction network to obtain the defect feature vector of the taro block.
[0023] Specifically, the defect feature extraction network uses a deep convolutional neural network (CNN) or a visual Transformer network as its backbone architecture. The CNN consists of multiple convolutional layers, pooling layers, and fully connected layers. Convolutional layers extract local features from the image by sliding convolution kernels across the input image; each kernel learns a specific feature pattern. Pooling layers downsample the output of the convolutional layers, reducing the spatial size of the feature map while preserving important feature information. Common pooling methods include max pooling and average pooling. Multiple convolutional and pooling layers are stacked alternately to progressively extract image features from low to high levels. As the number of network layers increases, the extracted features become increasingly abstract, capable of representing semantic information such as the defect type, location, and size of the taro block. Fully connected layers map the extracted high-level features to the defect feature vector space, outputting the final defect feature vector.
[0024] The defect feature vector output by the defect feature extraction network includes three dimensions of feature information: defect category features, defect location features, and defect size features.
[0025] The defect category features are multi-dimensional vectors representing the network's predicted probability distribution for various defects. Defect categories include rot, sprouting, insect damage, mechanical damage, and mold. Rot defects manifest as softening and darkening of the taro tuber's internal tissue, appearing as areas of reduced density in X-ray images; sprouting defects are characterized by the presence of buds, appearing as high-density areas of a specific shape in X-ray images; insect damage defects are characterized by wormholes or tunnels, appearing as irregular low-density channels in X-ray images; mechanical damage defects are characterized by surface damage or cracks, appearing as shadowed areas with discontinuous edges in X-ray images; and mold defects are characterized by mold spots, appearing as areas of uneven density in X-ray images. The defect location feature includes the two-dimensional coordinates of the defect area in the taro tuber image. A coordinate system is established with the top-left corner of the image as the origin, and the defect location feature includes the coordinates of the center point of the defect area and the boundary of the defect area. The defect size feature includes the area and equivalent diameter of the defect area in the image, used to quantify the size of the defect.
[0026] As another option in this embodiment, the visual Transformer network employs a self-attention mechanism for feature extraction. This network first divides the input image into a fixed number of image patches, treating each patch as a token, which is then input into the Transformer encoder for processing. The Transformer encoder consists of alternating multi-head self-attention layers and feedforward neural network layers. The multi-head self-attention layers calculate the correlation between image patches, capturing global feature dependencies. The feedforward neural network layers perform a non-linear transformation on the output of the self-attention layer, extracting deeper feature representations. Through the stacking of multiple Transformer encoder layers, the network can learn long-distance dependencies between image patches, ultimately outputting a defect feature vector equivalent to that of a deep convolutional network.
[0027] Next, based on the defect feature vector and the movement velocity parameters of the taro block, a model for predicting the future position of the taro block is constructed.
[0028] Specifically, the motion speed parameters are acquired in real time by speed sensors mounted on the drive rollers of the conveyor line. The linear speed of the conveyor line is calculated by detecting the rotational speed of the rollers. The output signal of the speed sensor is a pulse signal, with each pulse corresponding to a fixed distance traveled by the conveyor line. The current linear speed value is calculated by counting the number of pulses per unit time. Speed data is sampled at fixed time intervals, and the sampling frequency is set according to the sorting accuracy requirements.
[0029] The process of building a predictive location model includes: First, the center coordinates of the taro block at the current detection time are extracted from the defect feature vector. The current detection time is the moment when the X-ray inspection device completes image acquisition; this time information is recorded and appended to the image data. The center coordinates of the taro block are calculated based on the contour information of the taro block in the image. The boundary contour of the taro block is located using an edge detection algorithm, and the centroid coordinates of the contour are calculated as the center position.
[0030] Then, based on the real-time movement speed obtained from the speed sensor on the conveyor line, the theoretical transmission time required for the taro block to move from the current detection moment to the sorting station is calculated. The formula for calculating the theoretical transmission time is the distance between the sorting station and the current detection position divided by the current movement speed. The position of the sorting station is determined during the system calibration phase, using the starting point of the conveyor line as a reference point, and the distance of the sorting station along the conveyor line direction is measured.
[0031] Next, based on the theoretical transmission time and the coordinates of the taro block's center position at the current detection moment, combined with historical data on the linear velocity fluctuations of the conveyor line, a position correction model based on time-series prediction is established. The historical linear velocity fluctuation data includes a sequence of speed sensor measurements over a past period, reflecting the stability of the conveyor line's motion. When the conveyor line load changes or the drive motor speed fluctuates, the linear velocity will change accordingly. The position correction model uses a Long Short-Term Memory (LSTM) network or a Convolutional Neural Network (CNN) as its backbone structure. The LSM network has memory units and gating mechanisms, enabling it to learn long-term dependencies in time-series data and capture trends and periodic patterns in velocity changes. The CNN extracts local temporal feature patterns by sliding convolutional kernels across the time series. The historical velocity sequence and the current velocity value are input into the trained position correction model, and the model outputs a correction amount for the theoretical transmission time. This correction amount reflects the impact of future velocity changes predicted based on historical data on the transmission time.
[0032] Finally, the theoretical transmission time is compensated and corrected using a position correction model to obtain the corrected predicted transmission time. The correction process involves adding or multiplying the theoretical transmission time by the correction amount to obtain a more accurate predicted transmission time value. Based on the corrected predicted transmission time and the center coordinates of the taro block at the current detection time, the predicted center coordinates of the taro block when it arrives at the sorting station are calculated. The predicted center coordinates are calculated using the position of the sorting station as a reference point, combined with the displacement of the taro block from its current position to the sorting station.
[0033] It should be noted that the specific type of location prediction model can be either a temporal prediction model based on Long Short-Term Memory (LSTM) networks or a spatial prediction model based on Convolutional Neural Networks (CNNs). LSM models take velocity time series data as input and output predicted velocity values for future times, then calculate the transmission time correction. CNN models take velocity time series data and image location data as multi-channel input, extract spatiotemporal features through convolution operations, and output the location prediction result.
[0034] Next, the transmission time required for the taro blocks to reach the sorting station is calculated based on the predicted position model, and the optimal sorting trigger time is determined according to the transmission time and the mechanical response characteristic parameters of the actuator.
[0035] Specifically, the mechanical response characteristic parameters of the actuator are obtained through calibration tests, including inherent response delay time, stroke time, and positioning accuracy parameters. The inherent response delay time is the time interval from receiving the sorting command to the actuator starting to move; this parameter is determined by the response characteristics of the actuator's cylinder or motor. The stroke time is the time required for the actuator to move from its initial position to the sorting position; this parameter is determined by the actuator's mechanical structure and drive power. The positioning accuracy parameter is the error range of the actuator's stopping position; this parameter is determined by the control accuracy and mechanical backlash of the drive system.
[0036] The specific steps to determine the optimal sorting trigger time are as follows: First, the mechanical response characteristic parameters of the actuator are obtained. These parameters are stored in the system configuration database and are loaded into the controller during the system initialization phase.
[0037] Then, based on the predicted transmission time minus the inherent response delay time, the advance time required for the sorting actuator to start is calculated. This advance time ensures that the actuator completes its action or reaches the predetermined sorting position just as the taro block arrives at the sorting station.
[0038] Next, based on the actuator's travel time and the predicted center coordinates of the taro block, the pre-start position of the sorting actuator is determined. The pre-start position is the intermediate position that the actuator needs to reach in advance so that it can quickly complete the remaining travel when the taro block arrives.
[0039] Finally, considering the lead time, pre-start position, and positioning accuracy parameters of the actuator, the optimal sorting trigger time is determined through an optimization algorithm. The objective function of the optimization algorithm is to minimize the time error between the actuator's action time and the arrival time of the taro block, while constraints include the physical limitations of the actuator and sorting accuracy requirements. Commonly used optimization algorithms include gradient descent, Newton's method, and genetic algorithms.
[0040] Before sending the sorting instruction to the sorting execution mechanism at the optimal sorting trigger time, sorting decision processing is required. This involves classifying the defect feature vectors to determine the defect level of the taro block. The defect level is divided according to a preset defect classification standard, and different defect levels correspond to different sorting strategies.
[0041] Defect classification standards are typically based on the severity of the defect and its impact on food safety, categorizing defects into serious, moderate, and minor defects. Serious defects include extensive rot and severe mold, which are directly classified as non-conforming products. Moderate defects include localized rot and insect infestation, and are judged based on a comprehensive assessment of other factors. Minor defects include minor mechanical damage, which are considered acceptable. The corresponding sorting action type is determined based on the defect level and the sorting capacity parameters of the sorting actuator. Sorting action types include rejection, recycling, and release. Rejection removes the taro pieces from the conveyor line and sends them to the non-conforming product collection area; recycling sends the taro pieces to a specific recycling process; release allows the taro pieces to continue moving along the conveyor line to the next process.
[0042] Based on the predicted center coordinates of the taro block and the execution position of the sorting actuator, a spatial mapping relationship is established to determine in which direction the sorting actuator needs to perform the sorting operation at the predicted center coordinates. This spatial mapping relationship transforms the positional information from the image coordinate system to the motion coordinate system of the actuator, ensuring that the actuator's actions are accurately applied to the taro block.
[0043] Furthermore, in addition to defect detection, a weight detection function is integrated to obtain the weight parameters of the taro blocks. The weight parameters are acquired in real time through a weight sensor integrated with the conveyor line; this sensor is either a strain gauge type or a strain beam type. The weight sensor is installed in a specific section of the conveyor line. When a taro block passes through this section, the sensor outputs a weight signal, which is amplified and converted from analog to digital to obtain a digitized weight value. The weight parameter is compared with a preset weight threshold to determine the weight grade of the taro block. The weight threshold is set according to product specifications, classifying taro blocks into large, medium, and small weight grades. The weight grade is used as an auxiliary parameter in the sorting decision, and is combined with the defect grade to determine the final sorting action type. The rules for this combined decision can be expressed as logical judgment statements or a lookup table, for example... When the defect level is severe and the weight level is small, the rejection action is performed; When the defect level is minor and the weight level is major, perform the release action.
[0044] Furthermore, shape detection functionality is integrated to obtain the shape parameters of the taro chunks. These parameters are extracted from preprocessed standard-format image data using image processing algorithms. The extraction methods include edge detection and contour fitting algorithms. The edge detection algorithm employs the Canny or Sobel operator to detect the boundary pixels of the taro chunks.
[0045] The Canny operator outputs a binarized edge image through steps such as Gaussian filtering for noise reduction, calculating gradient magnitude and direction, non-maximum suppression, and double threshold detection. The boundary pixels obtained from edge detection form the contour boundary of the taro block. Contour fitting algorithms perform curve fitting on the boundary pixels; commonly used fitting methods include polynomial fitting and spline fitting.
[0046] Among these methods, polynomial fitting fits boundary pixels into high-order polynomial curves, while spline fitting uses piecewise low-order polynomials to better preserve the detailed features of the contour. The fitted contour parameters include contour area, contour perimeter, compactness, roundness, and aspect ratio. The shape parameters are compared with preset shape standards to determine the shape grade of the taro block. The shape standards are set according to product appearance requirements, classifying them into superior, qualified, and unqualified grades. The shape grade is used as an auxiliary parameter in the sorting decision, jointly decided with the defect grade and weight grade to obtain the final sorting action type. The joint decision-making process comprehensively considers the grade information from the three dimensions, determining the final sorting strategy through preset weights or scoring mechanisms.
[0047] Furthermore, it also has a foreign object recognition function, which performs foreign object recognition processing on X-ray detection image data to determine whether there are foreign objects. Foreign object types include metallic foreign objects, non-metallic high-density foreign objects, and inedible foreign objects.
[0048] Metallic foreign objects such as iron filings and copper filings appear as bright areas in X-ray images, exhibiting distinct density characteristics.
[0049] Non-metallic high-density foreign objects, such as glass fragments and stones, also appear as highlighted areas, but their shape and texture characteristics differ from those of metallic foreign objects.
[0050] Inedible foreign objects such as plastic fragments and paper appear as areas of medium brightness and need to be identified in conjunction with their shape characteristics.
[0051] Foreign object recognition algorithms also employ deep convolutional neural networks for image classification or object detection. The classification network determines whether a foreign object exists in the input image and outputs a binary classification result: presence or absence. The object detection network locates the position and category of the foreign object in the image and outputs the bounding box and category label of the foreign object.
[0052] When a foreign object is detected, the sorting action of the taro chunks is forcibly set to rejection, and the foreign object identification result is sent to the sorting execution mechanism as a priority processing signal. The priority processing signal ensures that foreign objects can be removed in a timely manner, thus protecting food safety.
[0053] Finally, at the optimal sorting trigger time, a sorting command is sent to the sorting execution mechanism, so that the sorting execution mechanism completes the sorting action when the taro block reaches the preset sorting position. After receiving a sorting instruction, the sorting actuator performs the corresponding sorting action. The types of actuators include pneumatic actuators and electric actuators.
[0054] The pneumatic actuator uses compressed air to drive a cylinder piston to perform the sorting action; the electric actuator uses a motor to drive a lead screw or pulley mechanism to perform the sorting action. A sorting baffle or sorting fork is installed at the end of the actuator, which moves to the corresponding position according to the sorting instructions, pushing the taro blocks to the corresponding collection channel. The actuator is controlled using a closed-loop feedback control method. A position sensor monitors the actuator's current position in real time, compares it with the target position, and adjusts the drive signal based on the error signal to achieve precise positioning.
[0055] The training process of the defect feature extraction network, the prediction location model, and the sorting decision model adopts a supervised learning method.
[0056] First, X-ray inspection image data of multiple sample taro blocks are acquired, and the X-ray inspection image data of each sample are input into the initial defect feature extraction network to obtain the sample defect feature vector of each sample taro block.
[0057] Then, the defect feature vectors and motion velocity parameters of each sample are input into the initial prediction location model to obtain the predicted location data of each taro block.
[0058] Next, the actual arrival location data of each sample taro block is acquired using photoelectric or visual sensors installed at the sorting station. The predicted location data is compared with the actual arrival location data to determine the location prediction error. Based on the location prediction error, the model parameters of the initial prediction location model are adjusted. A common parameter update method is backpropagation combined with a gradient descent optimizer. The updated prediction location model continues training until the location prediction error converges to below a preset threshold, resulting in the adjusted prediction location model.
[0059] It should be noted that the training process of the sorting decision model is as follows: The sample defect feature vector, sample weight parameter, sample shape parameter, and foreign object identification result of each taro block are input into the initial sorting decision model to obtain the predicted sorting action of each taro block.
[0060] The sorting decision model uses a deep neural network as its backbone architecture, with multimodal feature vectors as input and sorting action categories as output. The actual sorting results for each sample of taro chunks are obtained, either through manual sorting or expert annotation. The predicted sorting action is compared with the actual sorting results to determine the sorting decision error. Common error metrics include cross-entropy loss and classification accuracy. Based on the sorting decision error, the model parameters of the initial sorting decision model are adjusted, and the network weights are updated using the backpropagation algorithm. Training continues on the adjusted predicted location model and the adjusted sorting decision model until training stops. Training stops when the number of training epochs reaches a preset maximum, the validation set error no longer decreases for several consecutive epochs, or the error falls below a preset threshold. After training, the trained target predicted location model and target sorting decision model are obtained and used in actual sorting production.
[0061] Furthermore, the specific type of sorting decision model can be a classification model based on deep neural networks. The deep neural network classification model adopts a multilayer perceptron or convolutional neural network architecture and directly outputs the predicted probability of various sorting actions.
[0062] Example 2 In a specific application scenario, suppose a taro processing company uses the sorting control method of this invention to sort and process taro chunks. The conveyor line operates at a speed of several tons per hour, and the X-ray detection device detects images at a frequency of several frames per second.
[0063] After preprocessing, the received taro block samples are input into a defect feature extraction network for feature extraction. Assuming that some taro blocks in a batch have localized rot defects, the defect feature extraction network identifies the category and location characteristics of the rot defects. Combining the movement speed data and historical speed fluctuation data of this batch of taro blocks, the position prediction calculates the predicted transmission time for the taro block to reach the sorting station. Timing synchronization control determines the optimal sorting trigger time based on the response characteristic parameters of the actuator. Simultaneously, the weight sensor detects that the weight of the taro block is at a moderate level, and the shape detection algorithm determines that its shape is acceptable. Based on the joint decision result of defect level, weight level, and shape level, the taro block is determined to be a recyclable product.
[0064] At the optimal sorting trigger moment, a recycling action command is sent to the sorting actuator, which then pushes the taro block into the recycling channel. For products that detect foreign objects, a rejection action command is forcibly sent, and the actuator pushes it to the non-conforming product collection area.
[0065] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0066] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A food sorting and linkage control method based on X-ray detection results, characterized in that, include: Real-time X-ray detection image data of taro chunks on the conveyor line is acquired, and the real-time X-ray detection image data is preprocessed to obtain preprocessed standard format image data. The preprocessed standard format image data is input into the defect feature extraction network to obtain the defect feature vector of the taro block; Based on the defect feature vector and the movement speed parameters of the taro block, a model for predicting the future position of the taro block is constructed. The transmission time required for the taro chunks to reach the sorting station is calculated based on the predicted position model, and the optimal sorting trigger time is determined according to the transmission time and the mechanical response characteristic parameters of the actuator. At the optimal sorting trigger time, a sorting instruction is sent to the sorting execution mechanism so that the sorting execution mechanism completes the sorting action when the taro block reaches the preset sorting position.
2. The method according to claim 1, characterized in that, The preprocessing operations include contrast enhancement and noise filtering.
3. The method according to claim 1, characterized in that, The defect feature extraction network is a deep convolutional neural network; the defect feature vector includes defect category features, defect location features, and defect size features.
4. The method according to claim 1, characterized in that, The step of constructing a predictive position model for the taro block at future moments based on the defect feature vector and the movement velocity parameters of the taro block includes: Extract the coordinates of the center position of the taro block at the current detection time from the defect feature vector; Based on the real-time movement speed obtained by the speed sensor of the conveyor line, the theoretical transmission time required for the taro block to move from the current detection time to the sorting station is calculated. Based on the theoretical transmission time and the center coordinates of the taro block at the current detection time, and combined with the historical data of the linear velocity fluctuation of the conveyor line, a position correction model based on time series prediction is established. The theoretical transmission time is compensated and corrected using the location correction model to obtain the corrected predicted transmission time. Based on the corrected predicted transmission time and the center coordinates of the taro block at the current detection time, the predicted center coordinates of the taro block when it arrives at the sorting station are calculated.
5. The method according to claim 1, characterized in that, Based on the transmission time and the mechanical response characteristic parameters of the actuator, the optimal sorting trigger time is determined, including: Obtain the mechanical response characteristic parameters of the actuator, including the inherent response delay time of the actuator, the stroke time of the actuator, and the positioning accuracy parameters of the actuator; Based on the predicted transmission time minus the inherent response delay time, the advance time required for the sorting execution mechanism to start is calculated. Based on the travel time of the actuator and the predicted center position coordinates of the taro block, the pre-start position of the sorting actuator is determined; Taking into account the lead time, pre-start position, and positioning accuracy parameters of the actuator, the optimal sorting trigger time is determined through an optimization algorithm.
6. The method according to claim 1, characterized in that, Before sending the sorting instruction to the sorting execution mechanism at the optimal sorting trigger time, the following is also included: The defect feature vector is classified to determine the defect level of the taro block; Based on the defect level and the sorting capability parameters of the sorting actuator, determine the corresponding sorting action type; The sorting action types include rejection action, recycling action, and release action; Based on the predicted center position coordinates of the taro block and the execution position of the sorting execution mechanism, a spatial mapping relationship is established to determine in which direction the sorting execution mechanism needs to perform the sorting operation at the predicted center position coordinates.
7. The method according to claim 1, characterized in that, It also includes acquiring the weight parameters of taro chunks, which are acquired in real time by a weight sensor integrated with the conveyor line. The weight parameters are compared with a preset weight threshold to determine the weight grade of the taro chunks. The weight grade is used as an auxiliary parameter for sorting decision-making and is combined with the defect grade to obtain the final sorting action type.
8. The method according to claim 7, characterized in that, It also includes obtaining the shape parameters of taro chunks, which are extracted from the preprocessed standard format image data using an image processing algorithm; comparing the shape parameters with a preset shape standard to determine the shape grade of the taro chunks; The shape grade is used as an auxiliary parameter for sorting decision, and is combined with the defect grade and the weight grade to obtain the final sorting action type.
9. The method according to claim 1, characterized in that, It also includes performing foreign object identification processing on the X-ray detection image data to determine whether there are foreign objects; the foreign objects include metallic foreign objects, non-metallic high-density foreign objects, and inedible foreign objects; when a foreign object is detected, the sorting action type of the taro block is forcibly set to rejection action, and the foreign object identification result is sent to the sorting execution mechanism as a priority processing signal.