A chopstick sorting method and device based on image recognition
By using structural response analysis and a multi-task coupling mechanism, the problems of background interference and insufficient information exchange between tasks in chopstick detection were solved, achieving high stability and automated sorting of chopsticks detection, and improving the accuracy and robustness of detection.
Patent Information
- Application Number
- CN202611386400.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, general object detection frameworks rely on fixed scales or anchor frames, which makes it difficult for chopsticks detection to stably cover the complete structural region, introduces background interference, and lacks effective information interaction and constraints among multiple detection tasks, affecting the stability and accuracy of chopsticks detection.
By introducing structural response analysis, structural geometric constraint encoding, and a multi-task structural coupling mechanism, and adopting a structural consistency constraint and risk potential function evaluation model, high stability and robustness of chopstick detection are achieved, and the unified mapping and automation level of detection results are improved.
It significantly improves the stability and automation level of the chopsticks detection system in complex industrial scenarios, enhances the positioning stability and feature representation accuracy of the chopsticks target area, and reduces the impact of single task errors on the overall judgment results.
Smart Images

Figure CN123160850A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and apparatus for sorting chopsticks based on image recognition. Background Technology
[0002] As a daily consumer good, the quality of disposable chopsticks directly affects the user experience. Typical testing for disposable chopsticks production includes appearance quality, structural integrity, dimensional consistency, and the presence of foreign matter on the surface. Traditional manual testing is inefficient and unsuitable for high-speed industrial production.
[0003] Deep learning-based object detection models or traditional machine vision algorithms can meet the requirements for sorting chopsticks by capturing images or extracting video frames and analyzing them. However, since this method is based on a general object detection framework, when random rotation, slight bending, or overlapping occlusion occur during the detection process, the general object detection framework often relies on a fixed scale or anchor frame mechanism to generate candidate regions. This makes it difficult to stably cover the complete structural region of the target and easily introduces background interference regions, thereby affecting the accuracy of subsequent feature extraction.
[0004] Furthermore, the detection of disposable chopsticks involves multiple tasks, and current methods typically employ multiple independent models or simple multi-branch structures to complete these tasks separately. The lack of effective information exchange and constraint mechanisms between these tasks prevents them from forming effective complementary relationships. For example, posture changes affect the accuracy of size estimation, and information on defect areas fails to effectively assist in size or classification judgments. Summary of the Invention
[0005] This invention provides a chopsticks sorting method and apparatus based on image recognition. It addresses the shortcomings of existing general target detection frameworks that rely on fixed scales or anchor frames for candidate region generation, leading to difficulties in stably covering the complete structural region of the target and easily introducing background interference regions, thus affecting the accuracy of subsequent feature extraction. Furthermore, it addresses the deficiencies of existing frameworks that typically employ multiple independent models for multiple detection tasks, lacking effective information interaction and constraint mechanisms between tasks, resulting in a failure to form effective complementary relationships. By introducing structural response analysis, structural geometric constraint encoding, and a multi-task structural coupling mechanism, this invention achieves highly stable visual representation and multi-dimensional collaborative discrimination for slender, rigid targets. Simultaneously, through structural consistency constraints and a risk potential function evaluation model, it realizes a unified mapping of detection results to quality grading and industrial sorting control, thereby significantly improving the stability, robustness, and automation level of chopsticks detection systems in complex industrial scenarios.
[0006] This invention provides a chopsticks sorting method based on image recognition, comprising the following steps.
[0007] Structural response analysis is performed on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of slender targets;
[0008] Feature extraction is performed on the candidate detection region guided by the structure to obtain visual features;
[0009] Structural geometric constraints are introduced to encode visual features, resulting in structural enhancement features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio;
[0010] The structural enhancement features are input into a multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism;
[0011] The discrimination result is input into the quality evaluation function to obtain the quality grade result;
[0012] The chopsticks are sorted according to the quality grade results.
[0013] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein the structural coupling feedback mechanism includes:
[0014] Weighted enhancement of feature responses based on salient defect regions;
[0015] The feature space is reconstructed by orientation alignment based on the pose estimation results;
[0016] The defect discrimination weights are adaptively modulated based on the size deviation results.
[0017] The structural coupling feedback mechanism introduces a weighted enhancement mechanism for significant defect regions, enabling the model to focus on real defect-related regions, suppressing the influence of background interference on feature representation, and improving the localization accuracy of defect detection.
[0018] By driving feature space orientation alignment through pose estimation results, chopstick features under different rotation states can be compared and analyzed under a unified orientation reference, thus improving the consistency of feature representation in multi-pose scenarios.
[0019] By adaptively modulating the defect discrimination weights based on size deviations, the system can dynamically adjust the defect discrimination sensitivity according to the degree of physical scale anomalies, thereby improving the stability and reliability of comprehensive discrimination.
[0020] According to the image recognition-based chopstick sorting method provided by the present invention, the structural coupling feedback mechanism is implemented using a dynamic feedback control model, including:
[0021] The defect detection output is introduced as a disturbance input into the state update equation of the size regression branch;
[0022] The attitude estimation output is used as a coordinate transformation control variable in the feature space alignment process;
[0023] This enables the multi-task output to form a stable and convergent coupled dynamic system during the iterative optimization process.
[0024] By incorporating the defect detection output as a perturbation term into the size regression state update, the size estimation process can perceive local abnormal structural changes, thereby reducing the impact of local defects on the overall size estimation.
[0025] By using the pose estimation results as coordinate transformation control variables in the feature alignment process, the feature representation can gradually converge to a stable directional consistency state during the iteration process, thereby improving the convergence stability of the multi-task training process.
[0026] By constructing a dynamic feedback control structure, the outputs of multiple tasks form a mutual constraint and collaborative optimization relationship during the training process, thereby reducing the performance degradation caused by mutual interference between multiple tasks.
[0027] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein the attitude estimation result is used to construct a continuously rotating transformed flow field, and dense resampling is performed on the features of the candidate region based on the rotating transformed flow field to achieve the aligned representation of features on a uniform directional manifold.
[0028] By constructing a continuously rotating transformed flow field and performing dense resampling on candidate regions, the target features can achieve directional consistency alignment in continuous space, thereby reducing the error accumulation problem caused by discrete angle regression.
[0029] By using a unified directional manifold representation, the features of chopsticks under different postures have a consistent spatial representation structure, thereby improving the comparability and discrimination stability of features under posture change conditions.
[0030] According to the image recognition-based chopstick sorting method provided by the present invention, the multi-dimensional collaborative discrimination model is optimized by a joint optimization mechanism; wherein, the joint optimization mechanism includes an optimization objective function and a structural consistency constraint term, the structural consistency constraint term being used to constrain:
[0031] Consistency between the geometric central axis and the predicted direction;
[0032] Consistency between the target edge structure and the predicted boundary;
[0033] Consistency between physical size estimates and structural dimensions;
[0034] Determine the physical consistency relationship between multiple tasks.
[0035] By introducing a structural consistency constraint, the model can simultaneously consider geometric structural consistency and the detection task objective during the optimization process, thereby avoiding the structural distortion problem caused by relying solely on data fitting.
[0036] By constraining the consistency of the central axis, boundaries, and scale, the prediction results are made to conform to the physical structural laws of chopsticks as rigid and slender objects, thereby improving the physical rationality of the detection results.
[0037] By introducing multi-task physical consistency constraints, conflicting outputs between different discrimination tasks are reduced, thereby improving the coordination and reliability of the overall discrimination results.
[0038] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein the structural consistency constraint includes an error propagation constraint model, which is used to calculate the propagation path of the central axis offset error in size estimation and defect location, and to suppress and optimize the propagation error.
[0039] By establishing an error propagation constraint model, the system can explicitly characterize the propagation path of the central axis offset error in size estimation and defect location, thereby identifying the source of error and suppressing it in a targeted manner.
[0040] By optimizing the error propagation path through constraints, the amplification effect of structural errors in multi-task inference is effectively reduced, thereby improving the overall system's stability and anti-interference capability.
[0041] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein structural response analysis is performed on the image to be detected to obtain structure-guided candidate detection regions, including:
[0042] A two-dimensional gradient direction field is constructed for the image to be detected, and the gradient direction is decomposed locally to obtain the structural consistency subspace and the noise subspace.
[0043] Energy aggregation analysis is performed on the structural consistency subspace to generate candidate target regions.
[0044] By performing a consistent decomposition of the image gradient direction field, structural information is separated from noise information, making the candidate detection region generation process more resistant to texture interference.
[0045] By using an energy aggregation mechanism based on structural consistency subspace, the generated detection region is more concentrated in the real target structure region, thereby improving the accuracy and stability of candidate region generation.
[0046] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein the method of introducing structural geometric constraints to encode visual features to obtain structurally enhanced features includes:
[0047] Visual features are mapped onto a predefined chopsticks geometric constraint space, and the features are orthogonally projected using a constraint projection matrix to obtain the structure enhancement features; wherein, the predefined chopsticks geometric constraint space consists of the target central axis direction vector, the edge parallel vector, and the scale-stabilized basis vector.
[0048] By mapping visual features to the geometric constraint space of chopsticks and performing orthogonal projection, the feature representation explicitly conforms to the prior structure of chopsticks, thereby improving the interpretability and structural consistency of the feature space.
[0049] By constructing a constraint space consisting of the central axis vector, edge parallel vectors, and scale basis vectors, the model can explicitly model changes in the chopstick structure, thereby enhancing the ability to identify structural anomalies.
[0050] According to the present invention, a chopsticks sorting method based on image recognition is provided, wherein the quality evaluation function is constructed based on a multidimensional risk potential function, wherein:
[0051] Defect severity is treated as a potential energy term, size deviation as a scale modulation term, and attitude fluctuation as a system disturbance term.
[0052] The final quality score is obtained by normalizing and integrating the risk potential function.
[0053] By constructing a multidimensional risk potential function, defect severity, size deviation, and attitude fluctuation are uniformly mapped to the same evaluation space, thereby achieving a unified quantitative expression of multi-source detection results.
[0054] By introducing a normalized integral method to obtain quality scores, the quality evaluation results are made continuous and sortable, thereby supporting more refined industrial grading and automatic sorting control.
[0055] The present invention also provides a chopsticks sorting device based on image recognition, comprising the following modules:
[0056] The structural response analysis module is used to perform structural response analysis on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of slender targets;
[0057] The feature extraction module is used to extract features from the structure-guided candidate detection region to obtain visual features;
[0058] The feature enhancement module is used to introduce structural geometric constraints to encode visual features and obtain structurally enhanced features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio;
[0059] The discrimination module is used to input the structural enhancement features into a multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism;
[0060] The evaluation module is used to input the discrimination result into the quality evaluation function to obtain the quality level result;
[0061] The sorting module is used to sort the chopsticks according to the quality grade results.
[0062] The chopsticks sorting method based on image recognition provided by this invention has the following technical effects:
[0063] This invention generates structure-guided candidate detection regions by performing structural response analysis on the image to be detected. The generation process of the candidate regions explicitly depends on the directional consistency and edge structure continuity of the slender target, thereby significantly improving the localization stability and structural integrity of the chopstick target region under complex backgrounds and random changes in target posture.
[0064] By introducing structural geometric constraints to encode visual features, the feature representation is extended from the traditional data-driven mode to the structural prior constraint-driven mode, which enhances the sensitivity of features to the offset of the chopstick's central axis, edge deformation and scale changes, and improves the ability to represent subtle defects and local deformations.
[0065] By constructing a multi-dimensional collaborative discrimination model and introducing a structural coupling feedback mechanism, information interaction and mutual correction relationships are formed between defect detection, size estimation, posture recognition and foreign object classification, thereby improving the consistency and robustness of multi-task discrimination and reducing the impact of single-task errors on the overall judgment results.
[0066] By using a quality evaluation function to uniformly map multidimensional discrimination results, a unified quantitative expression from multi-source detection results to quality levels is achieved, enabling the detection results to be directly used for industrial sorting control and improving the system's automated decision-making capabilities and engineering deployability. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0068] Figure 1 This is a flowchart illustrating the image recognition-based chopsticks sorting method provided by the present invention.
[0069] Figure 2 This is a schematic diagram of the chopsticks sorting device based on image recognition provided by the present invention.
[0070] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0072] The following is combined Figures 1 to 3 This invention is described.
[0073] Figure 1 This is one of the flowcharts illustrating the image recognition-based chopsticks sorting method and apparatus provided by the present invention, such as... Figure 1 As shown, the method includes the following:
[0074] Step 101: Perform structural response analysis on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of the elongated target.
[0075] In one embodiment, images of chopsticks on an assembly line are captured using an industrial camera as the images to be detected, and the images to be detected are preprocessed as follows:
[0076] Bilateral filtering is used to remove high-frequency noise;
[0077] Histogram equalization is used to improve illumination robustness;
[0078] The images are uniformly scaled to a fixed resolution of H×W.
[0079] The preprocessed image is denoted as .
[0080] Regarding step 101, in one embodiment, after preprocessing the image to be detected, conventional target detection is not performed directly. Instead, a gradient direction field of the two-dimensional image is first constructed, and structural response analysis is performed based on the consistency of gradient directions within the local neighborhood. The structural response analysis of the image to be detected, to obtain structure-guided candidate detection regions, includes:
[0081] A two-dimensional gradient direction field is constructed for the image to be detected, and the gradient direction is decomposed locally to obtain the structural consistency subspace and the noise subspace.
[0082] Energy aggregation analysis is performed on the structural consistency subspace to generate candidate target regions.
[0083] Among them, by performing energy aggregation analysis on the structural consistency subspace, candidate target regions are generated, making the final detection region more concentrated in the real chopstick structure region, thereby improving the accuracy and anti-interference ability of candidate region generation.
[0084] Specifically, the gradient direction distribution of each pixel neighborhood in the image is statistically analyzed by using a sliding window, and the direction consistency response value is calculated to characterize whether the region satisfies the structural continuity characteristics of the slender target.
[0085] When the directional consistency response value and the edge linear continuity index both meet the preset conditions, the region is identified as a candidate detection region for structure guidance.
[0086] By adopting the above method, the candidate region generation process is transformed from region proposal based on appearance probability to region constraint generation based on structural consistency, thereby effectively suppressing the interference of background texture regions on the detection results and improving the stable positioning capability of the chopstick target region in complex industrial backgrounds.
[0087] Specifically, the Sobel operator is performed on the image:
[0088]
[0089]
[0090] Calculate the gradient direction:
[0091]
[0092] Calculate the gradient magnitude:
[0093]
[0094] Build a window for each pixel Consistency in calculation direction:
[0095]
[0096] in It is a unit vector in direction.
[0097] Structure-Noise Decomposition
[0098] definition:
[0099] like : Included in the structure subspace
[0100] Otherwise: assigned to the noise subspace
[0101] The structural response diagram is obtained:
[0102]
[0103] Candidate region generation
[0104] Construct the energy function:
[0105]
[0106] right Clustering using DBSCAN:
[0107]
[0108]
[0109] The output structure guides the candidate region of interest (ROI).
[0110] Step 102: Extract features from the structure-guided candidate detection region to obtain visual features.
[0111] Regarding step 102, in one embodiment, convolutional feature extraction is performed on the structure-guided candidate detection region to obtain a basic visual feature map, denoted as:
[0112]
[0113] Step 103: Introduce structural geometric constraints to encode visual features and obtain structural enhancement features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio.
[0114] Regarding step 103, based on step 102, a chopstick structure geometric constraint term is introduced to encode the visual features, wherein the structure geometric constraint term includes a central axis direction consistency constraint, an edge parallelism constraint, and a slenderness ratio stability constraint.
[0115] Specifically, by calculating the main direction distribution of candidate regions and performing deviation analysis with the predefined chopstick structure direction prior, different channels of the feature map are recalibrated to enhance the feature response in the structurally consistent direction and suppress it in the non-structural direction.
[0116] This structural encoding method transforms feature representation from a traditional data-driven model to a structure-constraint-driven model, thereby enhancing the sensitivity to subtle bends, local defects, and deformed areas of chopsticks, and improving feature stability and distinguishability.
[0117] Regarding step 103, in one embodiment, the visual features are mapped to a predefined chopsticks geometric constraint space and orthogonal projection is performed using a constraint projection matrix.
[0118] The geometric constraint space consists of the target central axis direction vector, the edge parallel vector, and the scale-stable basis vector.
[0119] This mapping method makes the feature representation explicitly conform to the geometric rules of the chopstick structure, thereby enhancing the ability to identify abnormal structural changes and improving the interpretability of the feature representation.
[0120] Specifically, construct the chopsticks structural basis: the central axis vector. Edge direction and scale base ;
[0121] Composition matrix:
[0122]
[0123] Structural constraint projection onto the feature matrix:
[0124]
[0125] Obtain structural enhancement features .
[0126] Step 104: Input the structural enhancement features into the multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism.
[0127] Regarding step 104, the structural coupling feedback mechanism includes:
[0128] Weighted enhancement of feature responses based on salient defect regions;
[0129] The feature space is reconstructed by orientation alignment based on the pose estimation results;
[0130] The defect discrimination weights are adaptively modulated based on the size deviation results.
[0131] The structural coupling feedback mechanism is implemented using a dynamic feedback control model, including:
[0132] The defect detection output is introduced as a disturbance input into the state update equation of the size regression branch;
[0133] The attitude estimation output is used as a coordinate transformation control variable in the feature space alignment process;
[0134] This enables the multi-task output to form a stable and convergent coupled dynamic system during the iterative optimization process.
[0135] In one embodiment, a continuously rotating transformed flow field is constructed based on the attitude estimation results, and the features of the candidate detection region are densely resampled based on the flow field to achieve the aligned representation of features on a uniform directional manifold.
[0136] Specifically, by extending discrete angle estimation to a continuous rotational mapping relationship, fine-grained orientation reconstruction of the feature space is performed, enabling the target features to be expressed in a unified orientation manifold space.
[0137] This approach effectively reduces error jumps caused by discrete angle regression and improves the consistency and continuity of feature representation under multi-pose conditions.
[0138] Specifically, the attitude estimation is expressed as:
[0139]
[0140] Construct the rotation matrix based on the attitude estimation representation:
[0141]
[0142] Use bilinear interpolation for feature-dense resampling:
[0143]
[0144] This achieves continuous directional alignment.
[0145] In one embodiment, structural enhancement features are input into a multidimensional collaborative discrimination model for joint inference. The multidimensional collaborative discrimination includes defect presence discrimination, physical size deviation estimation, target orientation estimation, and surface foreign object category identification.
[0146] In this process, the decision branches do not operate independently, but interact with each other through a structural coupling feedback mechanism.
[0147] Specifically:
[0148] The saliency response map generated from the defect discrimination results is used to weight and enhance the feature space, so that the model pays more attention to high-risk areas in subsequent iterations, thereby improving the detection capability of small defects.
[0149] The pose estimation results are used to construct spatial alignment transformation relationships and the feature representation is corrected for orientation consistency, so that targets under different rotation states can be analyzed in a unified coordinate system, thereby improving the discrimination consistency in multi-pose scenarios.
[0150] By using the size deviation estimation result as a modulation factor on the defect discrimination branch, the system can dynamically adjust the defect sensitivity according to the degree of physical scale anomaly, thereby improving the discrimination robustness under complex error conditions.
[0151] Through the above coupling mechanism, the relationship between each task is transformed from independent prediction to mutual constraint and information correction, thereby improving the consistency and stability of the multidimensional discrimination results as a whole.
[0152] Regarding step 104, in one embodiment, the structural coupling feedback mechanism is further implemented based on a dynamic feedback control model.
[0153] Specifically, during the model iterative optimization process, the defect detection output is introduced as a disturbance signal into the state update process of size regression, so that the size estimation can perceive the abnormal changes in local structure, thereby reducing the interference of local defects on the overall size estimation.
[0154] Meanwhile, the pose estimation results are used as coordinate transformation control variables in the feature space alignment process, so that the feature representation gradually converges to a stable directional consistency state during training.
[0155] This dynamic feedback control mechanism enables the multidimensional collaborative discrimination model to form a stable and convergent coupled system structure during training, thereby improving the overall training stability and inference consistency of the model.
[0156] Specifically, in the structural coupling feedback mechanism, the state vector is defined as follows:
[0157]
[0158] Where d represents the defect state, s represents the size state, p represents the attitude state, and o represents the foreign object state.
[0159] The state update equation is:
[0160]
[0161] in Indicates visual feature input, This represents the structural disturbance term.
[0162] Correspondingly, the three types of feedback mechanisms are as follows:
[0163]
[0164]
[0165]
[0166] when The convergence condition has been met.
[0167] Regarding step 104, in one embodiment, the multidimensional collaborative discrimination model is jointly optimized and trained, and a structural consistency constraint term is introduced based on the optimization objective function.
[0168] Among them, structural consistency constraints are used to constrain the following relationships:
[0169] The consistency between the target's central axis direction and the predicted attitude direction;
[0170] The consistency relationship between the target edge geometry and the predicted detection boundary;
[0171] The correspondence between physical size estimation results and target structure scale;
[0172] Physical consistency relationships among multi-task discrimination results.
[0173] This constraint mechanism ensures that the model meets both data fitting and structural physical consistency requirements during the optimization process, thereby reducing the impact of non-physical consistency on the model output and improving the overall detection reliability.
[0174] Furthermore, by using error propagation modeling, the propagation path of the central axis offset error in size estimation and defect location is analyzed, and the propagation error is suppressed and optimized, thereby reducing the cumulative amplification effect of structural errors in the multi-task system.
[0175] Specifically, the error propagation modeling process is as follows:
[0176] Constructing an error plot:
[0177] Define a node:
[0178] Define an edge: an error propagation relation.
[0179] The propagation matrix is represented as:
[0180]
[0181] in For propagation weight matrix.
[0182] Suppression mechanisms are used to reduce error propagation, and are expressed as:
[0183]
[0184] The error suppression coefficient γ is used to characterize the suppression ratio of error propagation intensity, and its value range is: , This indicates that no error suppression is performed; γ approaching 1 indicates maximum suppression of error propagation.
[0185] Step 105: Input the discrimination result into the quality evaluation function to obtain the quality level result.
[0186] Regarding step 105, in one embodiment, a risk potential function model is constructed using defect severity, dimensional deviation, and attitude fluctuation as input variables, wherein:
[0187] Defect severity corresponds to the potential energy term;
[0188] Size deviation corresponds to scale modulation term;
[0189] Attitude fluctuations correspond to system disturbance terms;
[0190] The final quality score is obtained by performing a normalized integral operation on the risk potential function, and is used for subsequent sorting decisions.
[0191] This method enables a continuous mapping of multidimensional detection results to a unified quality evaluation index, thereby improving the automation and stability of industrial sorting decisions.
[0192] Specifically, the risk potential function is expressed as:
[0193]
[0194] in, For defect weights, For size weight, For attitude weights, For foreign matter weights, and satisfying .
[0195] Defect severity Used to characterize the overall impact of surface defects on chopsticks:
[0196]
[0197] in, Let i be the area of the i-th defect region, such as pixels or mm². These are the weighting coefficients for defect types, such as cracks > scratches > black spots. The probability is output by the model to represent the defect confidence level. The number of defects detected.
[0198] The dimensional deviation Used to characterize the degree of deviation between the actual size and the standard size of chopsticks:
[0199]
[0200] in, The detection length is obtained by fitting the median. This is the standard length.
[0201] The attitude fluctuation Used to characterize the directional stability of chopsticks in an image:
[0202]
[0203] in, To detect attitude angles, This is the standard direction, the reference direction for the production line.
[0204] Foreign object risk Used to characterize the risk level of non-target adhering substances on the surface of chopsticks:
[0205]
[0206] in, This represents the probability of different types of foreign objects, such as metal, burrs, stains, etc. The area of the foreign object region. For risk weighting coefficients, This represents the number of foreign objects.
[0207] The normalized output final quality score is expressed as:
[0208]
[0209] Step 106: Sort the chopsticks according to the quality grade results.
[0210] Specifically, based on the quality score:
[0211] Superior quality
[0212] Defective products
[0213] Remove
[0214] Control the pneumatic actuators to perform sorting.
[0215] This invention provides a chopsticks sorting method based on image recognition. The method involves analyzing the structural response of the image to be detected to obtain structure-guided candidate detection regions; extracting features from these regions to obtain visual features; introducing structural geometric constraints to encode the visual features, resulting in structure-enhanced features; inputting these features into a multi-dimensional collaborative discrimination model to obtain discrimination results; inputting these results into a quality evaluation function to obtain quality grade results; and sorting the chopsticks according to the quality grade results. This method improves the stability and structural integrity of chopstick target region positioning under complex backgrounds and randomly changing target postures, as well as enhances the consistency and robustness of multi-task discrimination, reducing the impact of single-task errors on the overall judgment results. The quality evaluation function provides a unified mapping of multi-dimensional discrimination results, achieving a unified quantitative expression from multi-source detection results to quality grades. This allows the detection results to be directly used for industrial sorting control, improving the system's automated decision-making capabilities and engineering deployability.
[0216] The image recognition-based chopsticks sorting device provided by the present invention will be described below. The image recognition-based chopsticks sorting device described below can be referred to in correspondence with the image recognition-based chopsticks sorting method described above.
[0217] Figure 2 This is a flowchart illustrating the image recognition-based chopsticks sorting device provided by the present invention, as shown below. Figure 2 As shown, the device includes the following:
[0218] The structural response analysis module 201 is used to perform structural response analysis on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of slender targets;
[0219] Feature extraction module 202 is used to extract features from the structure-guided candidate detection region to obtain visual features;
[0220] The feature enhancement module 203 is used to introduce structural geometric constraints to encode visual features and obtain structurally enhanced features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio;
[0221] The discrimination module 204 is used to input the structural enhancement features into a multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism;
[0222] Evaluation module 205 is used to input the discrimination result into the quality evaluation function to obtain the quality grade result;
[0223] The sorting module 206 is used to sort the chopsticks according to the quality grade results.
[0224] This invention provides a chopsticks sorting device based on image recognition. It obtains structurally guided candidate detection regions by performing structural response analysis on the image to be detected; extracts visual features from these candidate regions; encodes the visual features using structural geometric constraints to obtain structural enhancement features; inputs these enhancement features into a multi-dimensional collaborative discrimination model to obtain discrimination results; inputs these results into a quality evaluation function to obtain quality grade results; and sorts the chopsticks according to the quality grade results. This device improves the stability and structural integrity of chopstick target region positioning under complex backgrounds and randomly changing target postures, as well as enhances the consistency and robustness of multi-task discrimination, reducing the impact of single-task errors on the overall judgment results. The quality evaluation function provides a unified mapping of multi-dimensional discrimination results, achieving a unified quantitative expression from multi-source detection results to quality grades. This allows the detection results to be directly used for industrial sorting control, improving the system's automated decision-making capabilities and engineering deployability.
[0225] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840. The processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions from the memory 830 to execute an image recognition-based chopsticks sorting method.
[0226] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0227] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the image recognition-based chopstick sorting method provided by the above methods.
[0228] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the image recognition-based chopstick sorting method provided by the above methods.
[0229] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0230] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A chopstick sorting method based on image recognition, characterized by, include: Structural response analysis is performed on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of slender targets; Feature extraction is performed on the candidate detection region guided by the structure to obtain visual features; Structural geometric constraints are introduced to encode visual features, resulting in structural enhancement features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio; The structural enhancement features are input into a multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism; The discrimination result is input into the quality evaluation function to obtain the quality grade result; The chopsticks are sorted according to the quality grade results.
2. The chopstick sorting method based on image recognition according to claim 1, characterized in that, The structural coupling feedback mechanism includes: Weighted enhancement of feature responses based on salient defect regions; The feature space is reconstructed by orientation alignment based on the pose estimation results; The defect discrimination weights are adaptively modulated based on the size deviation results.
3. The chopstick sorting method based on image recognition according to claim 2, characterized in that, The structural coupling feedback mechanism is implemented using a dynamic feedback control model, including: The defect detection output is introduced as a disturbance input into the state update equation of the size regression branch; The attitude estimation output is used as a coordinate transformation control variable in the feature space alignment process; This enables the multi-task output to form a stable and convergent coupled dynamic system during the iterative optimization process.
4. A chopsticks sorting method based on image recognition according to claim 2 or 3, characterized in that, The attitude estimation results are used to construct a continuously rotating transformed flow field, and dense resampling is performed on the candidate region features based on the rotating transformed flow field to achieve aligned representation of features on a uniform directional manifold.
5. The chopsticks sorting method based on image recognition according to claim 1, characterized in that, The multidimensional collaborative discriminant model is optimized through a joint optimization mechanism; wherein, the joint optimization mechanism includes an optimization objective function and a structural consistency constraint term, the structural consistency constraint term being used to constrain: Consistency between the geometric central axis and the predicted direction; Consistency between the target edge structure and the predicted boundary; Consistency between physical size estimates and structural dimensions; Determine the physical consistency relationship between multiple tasks.
6. The chopsticks sorting method based on image recognition according to claim 5, characterized in that, The structural consistency constraint includes an error propagation constraint model, which is used to calculate the propagation path of the central axis offset error in size estimation and defect location, and to suppress and optimize the propagation error.
7. The chopsticks sorting method based on image recognition according to claim 1, characterized in that, The structural response analysis of the image to be detected yields structure-guided candidate detection regions, including: A two-dimensional gradient direction field is constructed for the image to be detected, and the gradient direction is decomposed locally to obtain the structural consistency subspace and the noise subspace. Energy aggregation analysis is performed on the structural consistency subspace to generate candidate target regions.
8. The chopsticks sorting method based on image recognition according to claim 1, characterized in that, The introduction of structural geometric constraints to encode visual features yields structurally enhanced features, including: Visual features are mapped onto a predefined chopsticks geometric constraint space, and the features are orthogonally projected using a constraint projection matrix to obtain the structure enhancement features; wherein, the predefined chopsticks geometric constraint space consists of the target central axis direction vector, the edge parallel vector, and the scale-stabilized basis vector.
9. A chopsticks sorting method based on image recognition according to claim 1, characterized in that, The quality evaluation function is constructed based on a multidimensional risk potential function, where: Defect severity is treated as a potential energy term, size deviation as a scale modulation term, and attitude fluctuation as a system disturbance term. The final quality score is obtained by normalizing and integrating the risk potential function.
10. A chopsticks sorting device based on image recognition, characterized in that, include: The structural response analysis module is used to perform structural response analysis on the image to be detected to obtain structure-guided candidate detection regions; wherein, the structure-guided candidate detection regions are generated based on the directional consistency, edge linear continuity and local gradient aggregation features of slender targets; The feature extraction module is used to extract features from the structure-guided candidate detection region to obtain visual features; The feature enhancement module is used to introduce structural geometric constraints to encode visual features and obtain structurally enhanced features; wherein, the structural geometric constraints include the consistency constraint of the target's central axis direction, the parallelism constraint of the target's edges, and the stability constraint of the target's slenderness ratio; The discrimination module is used to input the structural enhancement features into a multidimensional collaborative discrimination model to obtain the discrimination result; wherein, the multidimensional collaborative discrimination includes defect existence discrimination, physical size deviation estimation, target attitude direction estimation and surface foreign object category identification, and the various discrimination processes interact with each other through a structural coupling feedback mechanism; The evaluation module is used to input the discrimination result into the quality evaluation function to obtain the quality level result; The sorting module is used to sort the chopsticks according to the quality grade results.
