A method for intelligent and accurate random inspection of beef balls based on AI visual recognition

By generating virtual defect samples through graph neural networks and multiphysics modeling, and combining them with dual-channel adversarial training, the problems of high false positive rate and resource waste in beef ball quality inspection are solved, realizing intelligent and accurate sampling inspection and improving inspection efficiency and accuracy.

CN120635608BActive Publication Date: 2025-10-31ZHAOAN RONGDA IND CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511128679.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-10-31
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

In existing technologies, the quality inspection of beef balls relies on manual visual inspection, which is inefficient, labor-intensive, and highly subjective. AI visual models have a high misjudgment rate when defective samples are scarce, making it difficult to achieve full batch coverage. Furthermore, manual labeling is subject to subjective bias.

Method used

By constructing graph neural networks and multiphysics modeling, virtual defect samples are generated. A dual-channel adversarial training model is used to identify the geometric deformation and fat distribution of beef balls. Combined with physical constraints such as density, thermal conductivity, and elasticity, the sampling rate is dynamically adjusted to construct a quality assessment system.

Benefits of technology

It reduced the false positive rate, ensured data reliability, expanded the training dataset, achieved a high sampling rate for high-risk batches and a low sampling rate for low-risk batches, and made precise resource allocation, thereby improving detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635608B_ABST
    Figure CN120635608B_ABST
Patent Text Reader

Abstract

This invention discloses a method for intelligent and accurate sampling inspection of beef balls based on AI visual recognition, belonging to the field of intelligent food detection technology. It includes: S1: Constructing defect data: A graph neural network is constructed using the microscopic morphology and 3D surface morphology of beef ball samples. Simultaneously, virtual beef ball defect samples are generated through multiphysics modeling, and the physical authenticity of the virtual beef ball defect samples is verified using the graph neural network; S2: Dual-channel adversarial training: The beef ball model is identified through structural and material channels, and the loss function of the beef ball model is determined; S3: Quality detection: Based on the composite loss function, the sampling rate of the beef balls is set, and a quality assessment system is constructed. This invention identifies the geometric deformation of beef balls through the structural channel and analyzes the fat distribution texture of beef balls through the material channel, thereby synergistically reducing the false judgment rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent food detection technology, specifically a method for intelligent and precise sampling inspection of beef balls based on AI visual recognition. Background Technology

[0002] With the development of the modern food processing industry, consumers are increasingly demanding higher food safety and quality standards. Beef balls, as a popular frozen meat product, suffer from quality problems during production, such as mixed raw materials, uneven processing, and poor shaping. Therefore, random quality inspections of beef balls have become a crucial step in ensuring product qualification rates.

[0003] Currently, quality inspection of beef balls mainly relies on manual visual inspection or traditional image processing methods for random sampling. Manual inspection depends on the experience and judgment of quality inspectors, which is not only inefficient and labor-intensive, but also highly subjective and susceptible to factors such as fatigue, leading to frequent missed and false positives. Furthermore, manual sampling cannot achieve full batch coverage, posing a significant quality risk.

[0004] Chinese invention patent application CN119643806A discloses a meat dish quality inspection system. This system includes a data acquisition module, a first determination module, a second determination module, a judgment module, a correction module, and an alarm sending module. This invention effectively improves the quality control level of meatball production lines through precise multi-parameter analysis and a hierarchical judgment mechanism. By monitoring the moisture content, sphericity, and deformation of meatballs in real time, it can accurately identify potential quality problems, such as cracks, excessive moisture, or excessive dryness. By dynamically adjusting the clamping pressure, the system can adapt to different production conditions in real time, avoiding the impact of excessive or insufficient clamping force on the shape and texture of the meatballs. The real-time feedback mechanism of the correction module ensures rapid adjustment during production fluctuations, effectively reducing the defect rate and solving the problems of low detection accuracy and slow response speed caused by reliance on static data.

[0005] Currently, most production lines use AI vision models to monitor the appearance changes and defect types of beef balls. However, in actual production, the pass rate exceeds 95%, and a single production line only encounters 3-5 real defects per day, resulting in a scarcity of defect samples. Furthermore, defect labeling relies on professional quality inspectors, and manual labeling is subject to subjective bias. Consequently, different labelers may differ in their judgment of "acceptable pore size" within the same batch of monitored images. Therefore, when a production line switches to a new beef ball formula, the false judgment rate of the AI ​​vision model will increase during the monitoring of beef balls. Summary of the Invention

[0006] The purpose of this invention is to provide a method for intelligent and accurate random sampling of beef balls based on AI visual recognition, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for intelligent and accurate random sampling of beef balls based on AI visual recognition, comprising:

[0008] S1: Constructing defect data: By constructing a graph neural network based on the microscopic morphology and 3D surface morphology of beef ball samples, and by multiphysics modeling, virtual beef ball defect samples are generated, and the physical authenticity of the virtual beef ball defect samples is verified by the graph neural network.

[0009] S2: Dual-channel adversarial training: The beef ball model is identified using the set structure and material channels, and the loss function of the beef ball model is determined, including:

[0010] S2.1: Constructing a network architecture: Through the structural channel, the geometric deformation of the beef ball model is identified, and through the material channel, the texture synthesis of the beef ball model is identified, thereby obtaining the geometric deformation field and fat distribution map of the beef ball model;

[0011] S2.2: Determine the loss function: Based on the geometric deformation field and fat distribution map, obtain the resistance loss of the structural channel, the resistance loss of the material channel, the perception loss value, the density constraint term, the thermal conductivity constraint term, and the elastic constraint term;

[0012] S2.3: Determine the composite loss function: Based on the resistance loss of the structural channel and the resistance loss of the material channel, determine the total resistance loss; based on the density constraint term, thermal conductivity constraint term, and elasticity constraint term, determine the physical constraint loss; and simultaneously, through a weighted algorithm, and based on the total resistance loss, the perception loss value, and the physical constraint loss, obtain the composite loss function.

[0013] S3: Quality Inspection: Based on the composite loss function, set the sampling rate for beef balls and construct a quality assessment system.

[0014] Furthermore, through multiphysics modeling, virtual beef ball defect samples are generated, including:

[0015] S1.1: Thermo-Mechanical Coupling Defect Generation: By constructing a material constitutive model, the elastic modulus change and anisotropic characteristics of the beef ball model during the steaming process are obtained, the real-time fracture stress of the beef ball model is determined, and the real-time fracture stress is compared with the critical fracture stress. Based on the comparison results, the crack state is determined, specifically:

[0016] When the real-time fracture stress is greater than the critical fracture stress, the beef ball will crack; otherwise, the beef ball will not crack.

[0017] S1.2: Fat flow modeling: Using the multiphase flow module and the set material properties, fat flow simulation is performed on the beef ball model to determine the fat volume leakage rate of the beef ball model.

[0018] S1.3: Obtain defect samples: Based on the constructed material property library and the divided process areas, perform defect simulation on the beef ball model to obtain a beef ball model with defects.

[0019] Furthermore, a three-stage test was conducted on the beef ball samples to obtain their displacement and strain, and the first and second parameters of the Mooney-Rivlin model were determined, thus constructing a material constitutive model, specifically:

[0020] ;

[0021] in: For strain energy density, These are the first parameters of the Mooney-Rivlin model. The second parameter of the Mooney-Rivlin model. As the first transformation invariant, For the second transformation invariant, It is a volume ratio. This is a compressibility parameter.

[0022] Furthermore, based on the process area and the flow of the beef ball production process, the spatial weight allocation of the beef ball is determined, and a 3D probability cloud map is obtained. The formula for obtaining the spatial weight allocation is as follows:

[0023] ;

[0024] in: For the first The spatial weighting coefficient of the region For the first The equivalent area of ​​the region For beef balls in the first The time spent in the area For regional indexes, For the first The equivalent area of ​​the region For beef balls in the first The length of time spent in the region.

[0025] Furthermore, a graph neural network was constructed using the microscopic and 3D surface morphology of the beef ball samples, including:

[0026] W1: Data Acquisition: The beef ball sample slices were examined using an optical microscope, a laser confocal microscope, and a near-infrared spectrometer to obtain two-dimensional morphology images, three-dimensional surface elevation maps, and local near-infrared reflectance spectra of the beef ball samples.

[0027] W2: Data processing: The two-dimensional topography map is converted into a grayscale image to construct a double logarithmic curve using box counting. At the same time, the coordinates of the three-dimensional surface elevation map and the two-dimensional topography map are aligned. Based on the Z value in the three-dimensional surface elevation map, the marked foreign objects are identified. Simultaneously, the spectral data of the local near-infrared reflectance spectrum is mapped to the three-dimensional surface of the three-dimensional surface elevation map to construct a three-dimensional moisture distribution cloud map.

[0028] W3: Feature extraction: Based on the box counting double logarithmic curve, marked foreign objects, and three-dimensional moisture distribution cloud map, the temporal graph network, harmonic similarity k-nearest neighbor topology graph, and voxel node graph are obtained;

[0029] W4: Constructing a graph neural network: The temporal graph network, harmonic similarity k-nearest neighbor topology graph, and voxel node graph are used as the top-level graph, middle-level graph, and bottom-level graph of the graph neural network in sequence, and the top-level graph, middle-level graph, and bottom-level graph are connected by edges.

[0030] Furthermore, based on the double logarithmic curves of box counting corresponding to different defects, the morphological similarity between different defects is obtained, and a time sequence graph network is constructed.

[0031] Based on the coordinates of the marked foreign object, Fourier descriptor vectors are obtained through Fourier transform, and normalized edge weights are determined. At the same time, based on the Fourier descriptor vectors and normalized edge weights, a harmonic similarity k-nearest neighbor topology graph is constructed.

[0032] Based on the set voxel grid size, the three-dimensional moisture distribution cloud map is divided to construct a voxel node map.

[0033] Furthermore, the specific edge size connecting the bottom and top graphs of the graph neural network is as follows:

[0034] ;

[0035] in: The weight is calculated based on a moisture-thermodynamic composite. Let be the moisture gradient vector. For thermodynamic simulation similarity, This represents the maximum moisture gradient vector for the current batch.

[0036] Furthermore, based on the 3D model of the beef ball model and the Marching Cubes algorithm, a binary mask of the beef ball model is obtained, and the binary mask is used as the input of the U-Net architecture model to output the geometric deformation field.

[0037] The geometric deformation field is used as the initial condition of the CycleGAN network model, and the muscle texture map of the beef ball model is used as the input of the CycleGAN network model to obtain the fat distribution map as the output.

[0038] Furthermore, a sampling rate for beef balls was set, and a quality assessment system was established, including:

[0039] S3.1: Determine the sampling rate: Adjust the basic sampling rate according to the composite loss function, specifically as follows:

[0040] ;

[0041] in: To adjust the sampling rate, Based on the basic sampling rate, This is the sampling rate adjustment coefficient. For composite loss function, As the baseline threshold for loss, This is the loss fluctuation range coefficient;

[0042] S3.2: Construct a quality assessment system: Compare the composite loss function with a preset evaluation threshold, and determine the quality grade of the beef balls based on the comparison results.

[0043] Compared with the prior art, the beneficial effects of the present invention are:

[0044] Firstly, this invention identifies the geometric deformation of beef balls through a structural channel and analyzes the fat distribution texture of beef balls through a material channel. Through dual-channel adversarial training, it can collaboratively reduce the false judgment rate. At the same time, based on physical constraints such as density, thermal conductivity, and elasticity, it forces the generation of defects to conform to real physical laws, avoiding the false judgments caused by traditional visual models ignoring physical laws, and further reducing the false judgment rate.

[0045] Secondly, this invention obtains high-fidelity virtual defect samples through multiphysics modeling and verifies the physical authenticity of the generated samples through graph neural networks, thereby ensuring the reliability of the data. At the same time, the generated virtual defect samples cover rare defects that are difficult to obtain through actual production, such as crack propagation and fat exudation, thus expanding the training dataset.

[0046] Thirdly, this invention uses a composite loss function to dynamically obtain the production line risk index and adjust the sampling rate in real time, so that the sampling rate of high-risk batches can be increased by 30%-50% and the sampling rate of low-risk batches can be reduced to 5%, thereby achieving precise allocation of resources. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating the intelligent and precise sampling method for beef balls in this invention.

[0048] Figure 2 This is a comparison chart of sampling rates in this invention;

[0049] Figure 3 This is a probability cloud map showing the spatial distribution of defects in this invention.

[0050] Figure 4 This is a comparison diagram of the process effects in this invention. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] Existing production lines mostly rely on AI vision models to monitor the appearance changes and defect types of beef balls. However, in actual production, the pass rate exceeds 95%, and a single production line only encounters 3-5 real defects per day, resulting in a scarcity of defect samples. Furthermore, defect labeling depends on professional quality inspectors, and manual labeling is subject to subjective bias, leading to differences in the "acceptable pore size" judgments among different labelers within the same batch of monitored images. Therefore, when switching production lines to new beef ball recipes, the false positive rate of AI vision models increases during beef ball monitoring. This application addresses this issue by generating virtual defect samples through multiphysics modeling and verifying their authenticity using a graph neural network. Simultaneously, a dual-channel adversarial training model, including structural and material channels, is used to obtain a composite loss function for the virtual defect samples. This composite loss function is then used to dynamically adjust the sampling rate and establish a quality assessment system. This achieves intelligent detection throughout the entire process, from data generation and model training to quality grading. Example 1

[0053] refer to Figures 1-4 This embodiment provides a method for intelligent and accurate sampling inspection of beef balls based on AI visual recognition. The method specifically includes the following steps:

[0054] Step S1: Constructing Defect Data. This involves using an optical microscope, laser confocal microscope, and near-infrared spectroscopy to detect and identify defective beef ball samples, obtaining their microscopic and 3D surface morphologies. Based on these morphologies, a graph neural network is constructed. Simultaneously, virtual defective beef ball samples are generated through multiphysics modeling, and the physical authenticity of these virtual samples is verified using the constructed graph neural network. Details are as follows:

[0055] Step S1.1: Thermo-Mechanical Coupling Defect Generation. This involves performing a three-stage test on the beef ball sample using a TA.XT Plus texture analyzer: compression, holding, and recovery. Specifically, the beef ball sample is compressed using a 5mm diameter probe at a strain rate of 1mm / s until 50% deformation occurs. This constant strain is held for 30 seconds, followed by a rebound test at the same strain rate of 1mm / s. Furthermore, the elastic modulus, relaxation modulus, and recovery rate of the beef ball sample are obtained during this three-stage test.

[0056] Furthermore, a speckle pattern was sprayed onto the surface of the beef ball samples after the three-stage testing, and high-speed images and mechanical data of the sprayed beef ball samples were acquired to obtain the corresponding displacement and strain magnitudes. Simultaneously, based on the obtained displacement and strain, the first and second parameters of the Mooney-Rivlin model were determined, specifically:

[0057] ;

[0058] in: The total number of experimental data points. Indexing experimental data points, For the first Engineering stress at each experimental data point These are the first parameters of the Mooney-Rivlin model. The second parameter of the Mooney-Rivlin model. It represents the elongation ratio.

[0059] Furthermore, based on the first and second parameters of the Mooney-Rivlin model, a Mooney-Rivlin hyperelastic constitutive model is constructed, specifically as follows:

[0060] ;

[0061] in: For strain energy density, These are the first parameters of the Mooney-Rivlin model. The second parameter of the Mooney-Rivlin model. As the first transformation invariant, For the second transformation invariant, It is a volume ratio. This is a compressibility parameter.

[0062] In this embodiment, geometric modeling is performed based on the diameter of the beef ball and the finite element model. Specifically, a 1 / 4 symmetrical model is established based on a beef ball with a diameter of 30mm, and pre-set micro-defects (e.g., 0.1mm initial cracks) are randomly distributed on the established beef ball model. Furthermore, in the finite element model, an initial temperature (e.g., 25℃), a cooking temperature (e.g., gradient heating to 85℃), and a heat convection coefficient (e.g., 12W / (m²)) are set. 2 The model of beef balls was simulated by steaming and cooking, and the fracture stress during the steaming and cooking process was obtained in real time. At the same time, the nonlinear deformation behavior of the beef ball model during the steaming and cooking process was obtained by constructing the Mooney-Rivlin hyperelastic constitutive model, namely the change of elastic modulus at different temperatures (for example, the elastic modulus is 0.8 MPa at 20℃, and its elastic modulus decreases to 0.3 MPa when steamed to 85℃) and the anisotropic characteristics (for example, the longitudinal and transverse deformation ratio reaches 1.2:1).

[0063] Furthermore, based on the initial defect half-length, surface energy, and Young's modulus of the beef ball sample, the critical fracture stress of the beef ball sample is determined as follows:

[0064] ;

[0065] in: The critical fracture stress, For Young's modulus, For surface energy, The initial defect half-length.

[0066] Specifically, the fracture stress obtained in real time during the steaming and cooking process of the beef ball model is compared with the critical fracture stress, and the crack state is determined based on the comparison results. Specifically:

[0067] When the real-time fracture stress exceeds the critical fracture stress, the initial defect begins to propagate, meaning the beef ball develops a crack. Conversely, when the real-time fracture stress is not greater than the critical fracture stress, the initial defect does not begin to propagate, meaning the beef ball does not develop a crack.

[0068] Step S1.2: Fat Flow Modeling. This involves setting the material properties, such as phase (e.g., fat and minced meat), density, viscosity, and interfacial tension, using the ANSYS Fluent multiphase flow module. In other words, fat flow simulation is performed on a beef ball model using the ANSYS Fluent multiphase flow module. Furthermore, during the fat flow simulation, the corresponding fat volume exudation rate is acquired in real time. Specifically:

[0069] ;

[0070] in: The rate of fat exudation by volume. The equivalent hydraulic radius of the crack channel. The pressure difference between the two ends of the crack. For fat dynamic viscosity, The crack length is given.

[0071] Step S1.3: Obtain defect samples. This involves constructing a material property library based on metallic and non-metallic foreign objects encountered during the beef ball production process. Details are shown in Tables 1 and 2 below:

[0072] Table 1: List of Metallic Foreign Objects

[0073]

[0074] Table 2: Non-metallic Foreign Matter Table

[0075]

[0076] Furthermore, based on the beef ball production process, the process area is divided into a meat grinding area, a mixing area, a forming area, and a conveying area. Specifically, based on the constructed material attribute library, the types of foreign objects and their weighting coefficients in the process area are set, as shown in Table 3 below:

[0077] Table 3: Regional Area Weighting Table

[0078]

[0079] In this embodiment, a defect simulation is performed on the beef ball model based on the regional area weight table to obtain a beef ball model with defects. Specifically, the spatial weight allocation of the beef ball is determined based on the division coordinates of the process area and the process flow direction during beef ball production, and a 3D probability cloud map is generated based on the spatial weight allocation. Simultaneously, a heat map of the foreign object location in the beef ball model is obtained based on the 3D probability cloud map.

[0080] In this embodiment, the formula for obtaining the spatial weight allocation of the beef balls is as follows:

[0081] ;

[0082] in: For the first The spatial weighting coefficient of the region For the first The equivalent area of ​​the region For beef balls in the first The time spent in the area For regional indexes, For the first The equivalent area of ​​the region For beef balls in the first The length of time spent in the region.

[0083] Step S2: Dual-channel adversarial training. This involves using a structure channel and a material channel to identify the beef ball model and obtain the corresponding loss function. Details are as follows:

[0084] Step S2.1: Construct the network architecture. This involves recognizing the geometric deformation of the beef ball model through the set structure channel, and recognizing the texture synthesis of the beef ball through the set material channel.

[0085] Specifically, a 3D model of a beef ball sample is obtained by scanning slices of the beef ball using micro-CT. Simultaneously, the Marching Cubes algorithm is used to extract its isosurfaces and project them to generate a corresponding binary mask. This binary mask is then used as input to the U-Net architecture model, and the output is the corresponding geometric deformation field.

[0086] Furthermore, the obtained geometric deformation field is used as the initial condition of the CycleGAN network model, and the muscle texture map of the beef ball model is used as the input of the CycleGAN network model, and the corresponding fat distribution map is obtained as the output.

[0087] Step S2.2: Determine the loss function. That is, based on the geometric deformation field and the original CT image obtained in step S2.1, determine the adversarial loss for the corresponding structural channel, specifically:

[0088] ;

[0089] in: To mitigate the losses in structural channels, For the structure discriminator network, This is real CT scan data. For the true displacement field, For the generated defective CT image, For the predicted deformation field, This is the expectation operator.

[0090] Furthermore, based on the fat distribution map and real microscopic image obtained in step S2.1, the corresponding material channel's resistance loss is determined, specifically as follows:

[0091] ;

[0092] in:, To combat material channel loss, For expert indexing, Let be the scoring function for the k-th expert. For the generated material texture image, This is a map showing the actual distribution of fat.

[0093] In this embodiment, the corresponding perceptual loss value is obtained based on the feature vector of the beef ball in the texture image and the feature vector in the real microscopic image, specifically as follows:

[0094] ;

[0095] in: To perceive the loss value, For feature map height, The width of the feature map. For position Feature vectors in material texture images For position Feature vectors in real microscopic images The weights of the Gram matrix. To generate the Gram matrix of the image, The Gram matrix of the real image. It is the Frobenius norm.

[0096] In this embodiment, based on the virtual CT image corresponding to the beef ball model, the virtual CT image is sampled in partitions according to the size of the sampling points, using a set number of sampling points. Simultaneously, the corresponding temperature rise rate is obtained through a transient heat conduction model. That is, based on the CT Heinz units and the actual density value of each sampling point, the corresponding density constraint term is determined. Simultaneously, based on the obtained temperature rise rate, the corresponding thermal conductivity constraint term is determined. Based on the stiffness tensor and strain tensor of each beef ball sample, the corresponding elastic constraint term is determined.

[0097] Furthermore, in this embodiment, the formulas for obtaining the density constraint term, thermal conductivity constraint term, and elasticity constraint term are as follows:

[0098] ;

[0099] in: For density constraint terms, The number of sampling points. Let be the CT Henle unit for the p-th sampling point. This represents the true density value of the p-th sampling point. For thermal conductivity constraints, For the rate of temperature change, To generate the thermal conductivity of the sample, For the temperature field Laplace operator, For the detection area, For the duration of observation, For flexible constraint terms, To generate the sample stiffness tensor, For strain tensor, This represents the true Cauchy stress.

[0100] Step S2.3: Determine the composite loss function. That is, based on the resistance losses of the structural channels and the material channels obtained in Step S2.2, determine the total resistance loss. Simultaneously, based on the density constraint term, thermal conductivity constraint term, and elastic constraint term obtained in Step S2.2, determine the physical constraint loss.

[0101] Furthermore, by using a weighted algorithm, the total adversarial loss, physical constraint loss, and perceptual loss values ​​are combined to obtain the corresponding composite loss function.

[0102] Step S3: Quality Inspection. Based on the composite loss function obtained in Step S2.3, the sampling rate for the beef balls is set, and a corresponding quality assessment system is constructed. Details are as follows:

[0103] Step S3.1: Determine the sampling rate. This involves adjusting the base sampling rate based on the composite loss function obtained in step S2.3 to determine the adjusted sampling rate. Specifically:

[0104] ;

[0105] in: To adjust the sampling rate, Based on the basic sampling rate, This is the sampling rate adjustment coefficient. For composite loss function, As the baseline threshold for loss, This is the loss fluctuation range coefficient.

[0106] Step S3.2: Construct a quality assessment system. This involves comparing the composite loss function obtained in step S2.3 with a preset evaluation threshold, and determining the quality grade of the beef balls based on the comparison results.

[0107] Specifically, when the composite loss function is less than 0.5, the corresponding beef balls are rated as excellent. When the composite loss function is between 0.5 and 1.2, the corresponding beef balls are rated as good. When the composite loss function is between 1.2 and 2, the corresponding beef balls are rated as acceptable. When the composite loss function is greater than 2, the corresponding beef balls are rated as unacceptable.

[0108] refer to Figure 2 , Figure 2 This is a comparison chart of the sampling rate in this embodiment, from Figure 2 It can be seen that for high-risk batches (batch C), the sampling rate is increased from the base value of 20% to 48%, meaning that more defects are captured by significantly increasing the sampling intensity. For low-risk batches (batch A), the sampling rate is reduced from 20% to 8%, reducing the sampling volume by 60%, thereby avoiding the waste of resources for low-risk batches. For medium-risk batches (batch B), the sampling rate is slightly adjusted to 22%, close to the base value.

[0109] refer to Figure 3 , Figure 3 This is the probability cloud map of the defect spatial distribution in this embodiment, generated by... Figure 3 It can be seen that the meat grinding zone has the highest defect density, with the main defect being metallic foreign objects. The cooking zone has the second highest defect density, with the main defect being surface cracks. The forming zone has the lowest defect density, with the main defect being shape distortion.

[0110] refer to Figure 4 , Figure 4 This is a comparison chart of the process effects in this embodiment, provided by... Figure 4 It can be seen that: increasing the magnetic separation frequency in the meat grinding zone reduced metal foreign object defects by 62%. Implementing a temperature gradient in the cooking zone reduced surface crack defects by 45%. Adjusting the mold pressure in the forming zone reduced shape distortion defects by 38%. Example 2

[0111] This embodiment provides a method for intelligent and precise sampling inspection of beef balls based on AI visual recognition. The specific implementation method is the same as in Embodiment 1, except that defective beef ball samples are detected and identified using an optical microscope, laser confocal microscope, and near-infrared spectrometer. The microscopic morphology and 3D surface morphology of the defective beef ball samples are obtained, and a graph neural network is constructed based on the obtained microscopic and 3D surface morphologies. The invention will be illustrated below with specific examples of this embodiment.

[0112] In this embodiment, a graph neural network is constructed based on the microscopic morphology and 3D surface morphology of the defective beef ball sample. Specifically:

[0113] Step W1: Data Acquisition. This involves extracting defective beef ball samples from the production line and flash-freezing them with liquid nitrogen to fix their microstructure. Simultaneously, the flash-frozen beef ball samples are cut into 5μm thin slices using a cryo-slicer to preserve typical defect areas, such as crack tips and foreign object embedding sites.

[0114] Furthermore, by using an optical microscope, a laser confocal microscope, and a near-infrared spectrometer, the cut beef ball sample slices were examined to obtain a two-dimensional morphology map, a three-dimensional surface elevation map, and a local near-infrared reflectance spectrum for each beef ball sample.

[0115] Step W2: Data Processing. The two-dimensional topography image obtained in Step W1 is converted into an eight-bit grayscale image. At the same time, the box size sequence is set to 1 pixel, 2 pixels, 4 pixels, 8 pixels, 16 pixels, 32 pixels, and 64 pixels. By obtaining the number of covered boxes at each scale in the grayscale image, a double logarithmic curve of box counting is constructed.

[0116] Furthermore, the three-dimensional surface elevation map obtained in step W1 is aligned with the two-dimensional topography map obtained in step W1. Simultaneously, the Z-value in the aligned three-dimensional surface elevation map is compared with a preset Z-threshold (set specifically according to the data, therefore not described in detail in this embodiment), and based on the comparison result, the marked foreign objects in the three-dimensional surface elevation map are identified. Specifically:

[0117] When the actual Z-value is greater than the preset Z-th threshold, the object corresponding to that actual Z-value is designated as a foreign object. Conversely, when the actual Z-value is not greater than the preset Z-th threshold, the object corresponding to that actual Z-value is not designated as a foreign object.

[0118] In this embodiment, the X and Y values ​​corresponding to the marked foreign object are obtained based on the determined Z value, and the corresponding Fourier descriptor is determined through Fourier transform.

[0119] Furthermore, in the local near-infrared reflectance spectrum obtained in step W1, the 1730cm range was determined. -1 The characteristic peaks were correlated with the histogram overflow region in the two-dimensional topography map to construct a fat content-reflectance calibration curve. Simultaneously, the spectral data from the local near-infrared reflectance spectrum were mapped onto the three-dimensional surface of the three-dimensional surface elevation map and color-coded.

[0120] In this embodiment, the bound water state is determined by the reflectance value (1450 nm) in the fat content-reflectance calibration curve. The free water content is determined by mapping the spectral data to the absorption peak intensity (near-infrared 1200 nm) in the three-dimensional surface elevation map. Specifically, a three-dimensional moisture distribution cloud map is constructed based on the bound water state and the free water content.

[0121] Step W3: Feature Extraction. Based on the fractal dimension of the box-counting double logarithmic curve obtained in Step W2, the corresponding fractal feature vector is obtained, and this fractal feature vector is used as the node features of the graph neural network. Specifically:

[0122] ;

[0123] in: For fractal eigenvectors, Let fractal dimension be the current crack. The rate of change of the fractal dimension with time. This represents the largest fractal dimension in history. It is the lowest fractal dimension in history.

[0124] In this embodiment, the morphological similarity between different defects is obtained based on the double logarithmic curves of box counting corresponding to different defects, and a corresponding time-series graph network is constructed based on the obtained morphological similarity. Specifically, the formula for obtaining the morphological similarity is as follows:

[0125] ;

[0126] in: For appearance similarity, The base of the natural logarithm, Let be the fractal dimension of the i-th crack node. Let be the fractal dimension of the j-th crack node. The width of the Gaussian kernel.

[0127] Furthermore, the Fourier descriptor vectors obtained in step W2 are normalized, and the normalized Fourier descriptor vectors are used as node features in the graph neural network. Specifically, based on the Fourier descriptor vectors corresponding to different labeled foreign objects, the corresponding normalized edge weights are determined. And based on the obtained normalized edge weights, the corresponding harmonic similarity k-nearest neighbor topology graph is constructed. Specifically, the formula for obtaining the normalized edge weights is as follows:

[0128] ;

[0129] in: Let be the normalized edge weight between the i-th foreign node and the j-th foreign node. Let be the Fourier descriptor vector of the i-th foreign object node. Let be the Fourier descriptor vector of the j-th foreign object node. The distance is Euclidean.

[0130] Furthermore, the three-dimensional moisture distribution cloud map obtained in step W2 is divided into 1mm... 3 The voxel grid contains moisture content, gradient direction, and Raman spectral fingerprint for each voxel.

[0131] Step W4: Construct the graph neural network. The voxel node graph defined in Step W3 is used as the bottom layer graph of the graph neural network; the harmonic similarity k-nearest neighbor topology graph defined in Step W3 is used as the middle layer graph of the graph neural network; and the temporal graph network defined in Step W3 is used as the top layer graph of the graph neural network.

[0132] Furthermore, the bottom-level, middle-level, and top-level graphs of the graph neural network are connected sequentially. Simultaneously, based on the set edge size, the bottom-level and top-level graphs are connected to construct the corresponding graph neural network. In this embodiment, the edge size connecting the bottom-level and top-level graphs in the graph neural network is specifically:

[0133] ;

[0134] in: The weight is calculated based on a moisture-thermodynamic composite. Let be the moisture gradient vector. For thermodynamic simulation similarity, This represents the maximum moisture gradient vector for the current batch.

[0135] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended embodiments and their equivalents.

Claims

1. A method for intelligent and precise random inspection of beef balls based on AI visual recognition, characterized in that, Including: S1: Constructing defect data: By constructing a graph neural network based on the microscopic morphology and 3D surface morphology of beef ball samples, and by multiphysics modeling, virtual beef ball defect samples are generated, and the physical authenticity of the virtual beef ball defect samples is verified by the graph neural network. S2: Dual-channel adversarial training: The beef ball model is identified using the set structure and material channels, and the loss function of the beef ball model is determined, including: S2.1: Constructing a network architecture: Through the structural channel, the geometric deformation of the beef ball model is identified, and through the material channel, the texture synthesis of the beef ball model is identified, thereby obtaining the geometric deformation field and fat distribution map of the beef ball model; S2.2: Determine the loss function: Based on the geometric deformation field and fat distribution map, obtain the resistance loss of the structural channel, the resistance loss of the material channel, the perception loss value, the density constraint term, the thermal conductivity constraint term, and the elastic constraint term; S2.3: Determine the composite loss function: Based on the resistance loss of the structural channel and the resistance loss of the material channel, determine the total resistance loss; based on the density constraint term, thermal conductivity constraint term, and elasticity constraint term, determine the physical constraint loss; and simultaneously, through a weighted algorithm, and based on the total resistance loss, the perception loss value, and the physical constraint loss, obtain the composite loss function. S3: Quality Inspection: Based on the composite loss function, set the sampling rate for beef balls and construct a quality assessment system.

2. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 1, characterized in that, Virtual beef ball defect samples are generated through multiphysics modeling, including: S1.1: Thermo-Mechanical Coupling Defect Generation: By constructing a material constitutive model, the elastic modulus change and anisotropic characteristics of the beef ball model during the steaming process are obtained, the real-time fracture stress of the beef ball model is determined, and the real-time fracture stress is compared with the critical fracture stress. Based on the comparison results, the crack state is determined, specifically: When the real-time fracture stress is greater than the critical fracture stress, the beef ball will crack; otherwise, the beef ball will not crack. S1.2: Fat flow modeling: Using the multiphase flow module and the set material properties, fat flow simulation is performed on the beef ball model to determine the fat volume leakage rate of the beef ball model. S1.3: Obtain defect samples: Based on the constructed material property library and the divided process areas, perform defect simulation on the beef ball model to obtain a beef ball model with defects.

3. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 2, characterized in that, A three-stage test was conducted on the beef ball samples to obtain their displacement and strain. The first and second parameters of the Mooney-Rivlin model were determined, and a material constitutive model was constructed, specifically as follows: ; in: For strain energy density, These are the first parameters of the Mooney-Rivlin model. The second parameter of the Mooney-Rivlin model. As the first transformation invariant, For the second transformation invariant, It is a volume ratio. This is a compressibility parameter.

4. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 2, characterized in that, Based on the process area and the flow of the beef ball production process, the spatial weight allocation of the beef balls is determined, and a 3D probability cloud map is obtained. The formula for obtaining the spatial weight allocation is as follows: ; in: For the first The spatial weighting coefficient of the region For the first The equivalent area of ​​the region For beef balls in the first The time spent in the area For regional indexes, For the first The equivalent area of ​​the region For beef balls in the first The length of time spent in the region.

5. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 1, characterized in that, A graph neural network was constructed based on the microscopic and 3D surface morphology of beef ball samples, including: W1: Data Acquisition: The beef ball sample slices were examined using an optical microscope, a laser confocal microscope, and a near-infrared spectrometer to obtain two-dimensional morphology images, three-dimensional surface elevation maps, and local near-infrared reflectance spectra of the beef ball samples. W2: Data processing: The two-dimensional topography map is converted into a grayscale image to construct a double logarithmic curve using box counting. At the same time, the coordinates of the three-dimensional surface elevation map and the two-dimensional topography map are aligned. Based on the Z value in the three-dimensional surface elevation map, the marked foreign objects are identified. Simultaneously, the spectral data of the local near-infrared reflectance spectrum is mapped to the three-dimensional surface of the three-dimensional surface elevation map to construct a three-dimensional moisture distribution cloud map. W3: Feature extraction: Based on the box counting double logarithmic curve, marked foreign objects, and three-dimensional moisture distribution cloud map, the temporal graph network, harmonic similarity k-nearest neighbor topology graph, and voxel node graph are obtained; W4: Constructing a graph neural network: The temporal graph network, harmonic similarity k-nearest neighbor topology graph, and voxel node graph are used as the top-level graph, middle-level graph, and bottom-level graph of the graph neural network in sequence, and the top-level graph, middle-level graph, and bottom-level graph are connected by edges.

6. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 5, characterized in that, Based on the double logarithmic curves of box counting corresponding to different defects, the morphological similarity between different defects is obtained, and a time sequence graph network is constructed. Based on the coordinates of the marked foreign object, Fourier descriptor vectors are obtained through Fourier transform, and normalized edge weights are determined. At the same time, based on the Fourier descriptor vectors and normalized edge weights, a harmonic similarity k-nearest neighbor topology graph is constructed. Based on the set voxel grid size, the three-dimensional moisture distribution cloud map is divided to construct a voxel node map.

7. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 5, characterized in that, The specific edge size connecting the bottom and top graphs of the graph neural network is as follows: ; in: The weight is calculated based on a moisture-thermodynamic composite. Let be the moisture gradient vector. For thermodynamic simulation similarity, This represents the maximum moisture gradient vector for the current batch.

8. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 1, characterized in that, Based on the 3D model of the beef ball model and the Marching Cubes algorithm, a binary mask of the beef ball model is obtained, and the binary mask is used as the input of the U-Net architecture model to output the geometric deformation field. The geometric deformation field is used as the initial condition of the CycleGAN network model, and the muscle texture map of the beef ball model is used as the input of the CycleGAN network model to obtain the fat distribution map as the output.

9. The method for intelligent and precise sampling inspection of beef balls based on AI visual recognition according to claim 1, characterized in that, Set a sampling rate for beef balls and construct a quality assessment system, including: S3.1: Determine the sampling rate: Adjust the basic sampling rate according to the composite loss function, specifically as follows: ; in: To adjust the sampling rate, Based on the basic sampling rate, This is the sampling rate adjustment coefficient. For composite loss function, As the baseline threshold for loss, This is the loss fluctuation range coefficient; S3.2: Construct a quality assessment system: Compare the composite loss function with a preset evaluation threshold, and determine the quality grade of the beef balls based on the comparison results.

Citation Information

Patent Citations

  • Meat dish quality detection system

    CN119643806A

  • Virtual image generation method and device, equipment and storage medium

    CN113569614A

  • Intelligent fish ball fixed-number packaging equipment based on machine vision

    CN114435667A