Fruit and vegetable extract color change monitoring method
By constructing a pseudo-metameric perception model, integrating images with physical and chemical features, and introducing boundary discrimination and residual analysis, the problem of identifying the "pseudo-metameric effect" in color changes of fruit and vegetable extracts was solved, and accurate identification and interference elimination of samples with similar colors but different states were achieved.
Patent Information
- Application Number
- CN202510895026.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-14
AI Technical Summary
Traditional image recognition methods have difficulty effectively distinguishing the "pseudo-metameric effect" that occurs in fruit and vegetable extracts under the influence of factors such as lighting angle and water surface disturbance, making it difficult to identify samples with similar colors but different states.
A pseudo-metameric perception model is constructed, which integrates image color features with physical and chemical parameter vectors, introduces spectral boundary discrimination and response residual analysis, and improves the recognition ability of samples with similar colors but heterogeneous states through cross-modal embedding and feature fusion.
It effectively solves the difficulty of identifying the "pseudo-metameric effect" in traditional methods, improves the accuracy and robustness of identifying color changes in fruit and vegetable extracts, and realizes the quantitative analysis and interference elimination of illumination variation and interface disturbance.
Smart Images

Figure CN120783069A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition monitoring of color changes of fruit and vegetable extracts, and more particularly to a method for monitoring color changes of fruit and vegetable extracts. Background Art
[0002] Fruit and vegetable extracts are liquid substances extracted from fresh fruits and vegetables by physical or chemical means. They are rich in natural pigments, phenols, polysaccharides, vitamins and aromatic compounds. Fruit and vegetable extracts are widely used in food, cosmetics, health care products and other fields. They have nutritional, antioxidant and functional properties.
[0003] When monitoring color changes in fruit and vegetable extracts, the phenomenon of "pseudo-metamerosity" often occurs. This means that extracts that appear similar or identical in color in the image may actually have undergone significant changes in composition or physical and chemical state, such as oxidation reactions, deterioration, or abnormal temperature control.
[0004] However, due to factors such as lighting angle, water surface disturbance, and reflection interference, traditional image recognition methods and human perception are easily misled and cannot effectively distinguish this "visually identical but essentially different" state.
[0005] Therefore, there is an urgent need to build an image recognition model with stronger discrimination ability to identify and eliminate the interference caused by the "pseudo-metameric effect" in the monitoring of color changes in fruit and vegetable extracts. Summary of the Invention
[0006] To overcome the above-mentioned shortcomings of the prior art, embodiments of the present invention provide a method for monitoring color changes in fruit and vegetable extracts. By constructing a pseudo-metameric perception model, fusing image color features with physicochemical parameter vectors, and introducing spectral boundary discrimination and response residual analysis, the method improves the ability to recognize samples with similar colors but heterogeneous states, thereby solving the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a method for monitoring color changes of fruit and vegetable extracts, comprising:
[0008] Collect image data of fruit and vegetable extracts under different incident light directions, and generate source light response maps based on them; collect deformation image data caused by surface disturbance of fruit and vegetable extracts, including water ripples, foam, and interface reflections;
[0009] The source illumination response map is fused with the deformation image data to construct an interference state image dataset;
[0010] An ideal color response baseline model is constructed based on sample images under standard conditions, and a set of multispectral mapping functions under interference-free conditions is defined by the ideal color response baseline model.
[0011] Comparing the response results of the ideal color response baseline model with those of the interference state image dataset, the illumination variation factor and interface disturbance factor are extracted as the feature expression vectors of the interference source based on the response results.
[0012] Based on the characteristic expression vector of the interference source, a mapping matrix between the interference factor and the perceived color shift is established for interference elimination;
[0013] The interference state image dataset is fused with the simultaneously acquired physical and chemical parameter data, and a fusion expression tensor of pseudo-metameric state is constructed through cross-modal embedding.
[0014] A pseudo-metameric perception model is constructed based on the input of the fused expression tensor. Through spectral boundary discrimination and response residual analysis, the recognition and interference elimination monitoring of heterogeneous samples of fruit and vegetable extracts with similar color states are completed.
[0015] In a preferred embodiment, a color space feature vector is extracted for each interference state image sample in the interference state image dataset, and the color space feature vector includes a multi-spectral channel texture response and an edge structure parameter of the disturbance region;
[0016] Synchronously collecting physical and chemical parameter data of the interference state image sample at the same time point, the physical and chemical parameter data including indicator factors composed of pH, redox potential, conductivity, and temperature;
[0017] The color space feature vectors and physical and chemical parameter data are normalized at the feature level based on the unified feature scale and statistical distribution under different modalities. They are then mapped to a unified semantic space through a two-stream embedding mapping function to form a cross-modal representation pair.
[0018] A modality alignment constraint loss function is introduced for cross-modal representation pairs to enhance the state consistency expression ability between image modality and physical and chemical modality during the training phase of pseudo-metameric perception model.
[0019] The aligned cross-modal representation pairs are fused through attention weighting or residual aggregation to generate a fused expression tensor in a pseudo-metameric state; the fused expression tensor is used as the input structure of the downstream model to form a comprehensive representation of the semantic association between the image color appearance and the potential state difference.
[0020] In a preferred embodiment, an input layer of a pseudo-metameric perception model is constructed, and the input of the input layer is designated as a fused expression tensor, the fused expression tensor including a semantic encoding vector of an image spectral feature and a physicochemical state indicator factor;
[0021] A local perception unit is introduced into the pseudo-metameric perception model structure. The local perception unit is used to extract the difference region features corresponding to the pseudo-metameric state in the fusion expression tensor.
[0022] Construct a global attention mechanism for fused representation tensors to model long-range dependencies and cross-channel interactions in color semantics;
[0023] By introducing atlas boundary discrimination, the cluster centers and boundaries of the fused expression tensor in the state embedding space are used as structural priors; the residual distribution between the output results of the pseudo-metameric perception model and the ideal color response baseline model is calculated, and the residual direction and amplitude information of the residual distribution are used to assist in the classification judgment of state offset samples.
[0024] In a preferred embodiment, the results of the spectrum boundary discrimination and the residual analysis are weightedly fused to output the recognition results of the pseudo-metameric state, and the supervised parameter optimization is performed in combination with the pseudo-metameric label;
[0025] During the inference stage of the pseudo-metameric perception model, when the fused expression tensor is judged to be similar in color but abnormal in state, interference resolution is triggered, and the associated interference source feature expression vector is traced back to perform color state estimation and correction. The image color state estimation value after interference resolution is output, and combined with the time series distribution trend of the state residual, dynamic monitoring and early warning of color changes in fruit and vegetable extracts are achieved.
[0026] In a preferred embodiment, the interference state image data of the interference state image data set is constructed, and the ideal color response baseline model is modeled;
[0027] Define the original image of the i-th sample as I i ,set up represents the source image data collected at the incident angle θ; let Represents the deformation image data caused by water ripples, foam, and interface reflection, based on which the source illumination response map of the i-th sample is generated in is a high-order spectral response generation function that fuses image information at different incident angles θ∈Θ;
[0028] Draft For the interference state image data of the i-th sample, construct the interference state image data: Where Λ(·,·) is the interference state constructor; is the deformed image data of the i-th sample;
[0029] Construct an ideal color response baseline model and extract interference features; based on clean samples collected under standard conditions, construct an ideal color response baseline model: Where I is the clean sample image input; represents the multispectral response vector under interference-free conditions; is a set of multispectral mapping functions;
[0030] Extract interference features by calculating the offset between the ideal response and the interference state response;
[0031]
[0032] where ΔR i is the response offset vector of the i-th sample; It is a nonlinear offset detection function, which uses difference mapping based on morphology and high-order activation function;
[0033] Extract interference source feature expression vector: D i =Ξ(ΔR i ); where Ξ(·) is a feature extraction function that converts the response offset into a joint expression of the illumination variation factor and the interface disturbance factor; is the interference feature expression vector of the i-th sample;
[0034] Establish the interference factor and perceptual color shift mapping matrix: in represents a nonlinear tensor fusion operation; Ω(·) is a mapping matrix generation function that uses a structure-sensitive activation function to construct an interference offset mapping matrix; Used to define the nonlinear mapping relationship between interference factor and color shift.
[0035] In a preferred embodiment, the color space feature vector is extracted and the physical and chemical parameter data are collected; Extract color space feature vector: Θ v (·) is the multi-spectral channel texture and edge structure feature extraction function; Represents the color space feature vector under image modality;
[0036] Synchronous collection of physical and chemical parameter data:
[0037] in is the physicochemical state vector of the i-th sample, where pH i Indicates pH; ORP i represents the redox potential, EC i represents conductivity, T i Indicates temperature; Represents the transpose of a vector;
[0038] In feature normalization and two-stream embedding mapping, the features of different modalities are normalized at the feature layer: in and is the normalization function; is the color space feature vector extracted from the i-th sample in the image mode; is the eigenvector of the physical and chemical parameters collected under the physical and chemical mode for the i-th sample;
[0039] The normalized features are mapped to a unified semantic space through the two-stream embedding mapping function:
[0040] in v (·)and r (·) is the nonlinear embedding mapping function; and is the unified semantic feature vector after mapping, and D is the semantic dimension; based on this, a cross-modal representation pair is formed: Where || represents the vector concatenation operation; is a preliminary cross-modal representation pair;
[0041] Introducing modal alignment constraint loss function in is the dual regularization function;
[0042] Fusing cross-modal features to generate a fused expression tensor in a pseudo-metameric state: Generating functions for fusion expression tensors; is the cross-modal representation pair of the i-th sample;
[0043] in, is the modal splicing and rearrangement function; Modal attention matrix generated for adaptation; is the attention-guided high-order fusion function; the final output is the fusion expression tensor, F represents the fusion feature dimension; Embedding vector for image modality; is the physical and chemical modality embedding vector.
[0044] In a preferred embodiment, in the construction and training of the pseudo-metameric perception model, the input layer of the pseudo-metameric perception model is constructed, and the input is designated as the fusion expression tensor Z i , That is, the high-dimensional feature representation as the model input; F is the fusion expression tensor Z i characteristic dimensions;
[0045] The local perception unit is introduced into the pseudo-metameric perception model to extract the features of the local significant difference regions in the fusion expression tensor. The local perception mapping function is defined as: It is a local feature extraction network; is the local perception feature representation, F L <F;F L L is the local perception feature representation i characteristic dimensions;
[0046] In the global attention mechanism and graph boundary discrimination, a global attention mechanism is constructed to perform global dependency modeling on the fused expression tensor: is the global attention mechanism function; is the global semantic feature vector extracted from the i-th sample under the global attention mechanism, F G ≤F; F G is the global feature dimension;
[0047] Introducing graph boundary discrimination, taking the cluster center and its boundary in the state embedding space as the structural prior, and defining the boundary discrimination function:
[0048]
[0049] in is the state prediction value of the i-th sample, is the discriminant function guided by the spectrum boundary, is the graph boundary set of the state embedding space; is the transpose of the weight matrix of the kth branch; b k is the bias vector of the kth branch; α k is the attention factor of the kth channel; is the nonlinear residual propagation function; is a soft discriminant function used to output the pseudo-metameric state K is the total number of branches or channels;
[0050] The residual distribution between the pseudo-metameric perception model output and the ideal color response baseline model is calculated using a non-Euclidean distance metric: In the formula It is the residual metric function, which adopts non-Euclidean metric and embeds nonlinear activation;
[0051] is the residual loss function value; Γ(Z i ) is the predicted output value of the i-th sample; Represents the original image I of the i-th sample under ideal conditions iOutput after applying the ideal color response baseline model;
[0052] Then, the results of the spectrum boundary discrimination and the residual analysis are weighted fused to achieve the state heterogeneous judgment output, and combined with the pseudo-metameric label Perform supervised optimization: where Φ(·,·,·) is the comprehensive loss function.
[0053] In a preferred embodiment, in the inference stage of the pseudo-metameric perception model, when the pseudo-metameric perception model determines that a sample has similar color but abnormal state, that is, If the preset threshold τ is exceeded, interference elimination is triggered;
[0054] Perform retroactive correction for interference using the interference cancellation function:
[0055] in is the estimated value of the color state of the i-th sample after interference elimination; ε reconf (·) is the state reconstruction offset estimation function; represents a nonlinear tensor product; is the interference inversion function;
[0056] Finally, combined with the temporal distribution trend of the color state residual, a dynamic monitoring curve is established:
[0057] in is the state monitoring function at time t; Represents the state estimation set after digestion of all samples in time t; Θ dyn (·) is a dynamic trend analysis function, which is used for early warning judgment.
[0058] Technical effects and advantages of the present invention:
[0059] 1. By building a pseudo-metameric perception model, integrating image color features with physical and chemical parameter vectors, and introducing spectral boundary discrimination and response residual analysis, the recognition ability of samples with similar colors but heterogeneous states is improved, effectively solving the problem that traditional recognition methods are unable to distinguish the "pseudo-metameric effect";
[0060] 2. By fusing the image responses of fruit and vegetable extracts under multiple incident angles with the surface disturbance deformation images, a disturbance state image dataset is formed. This achieves a unified representation of non-ideal image states and improves the model's robustness to interference factors such as reflections, water ripples, and foam.
[0061] 3. By constructing a multispectral response baseline model under standard conditions and comparing it with the interference state image response, we can extract the illumination variation and interface disturbance factors, thereby quantifying the deviation of color perception caused by interference, and providing a clear parameter basis for subsequent interference elimination and correction;
[0062] 4. By introducing a dual-stream embedding mapping function and a modality alignment constraint loss function, the image modality and the physical and chemical modality are embedded in a unified semantic space, enhancing the ability to recognize "similar colors but significantly different parameters" in pseudo-metameric states;
[0063] 5. The aligned cross-modal features are fused through attention weighting and residual aggregation to generate a fused expression tensor. This enhances the model's ability to represent high-order semantic relationships between images and physical and chemical states, providing in-depth support for state perception.
[0064] 6. When the model identifies a sample with similar color but abnormal state, it automatically traces back the feature expression vector of the interference source, performs state correction based on the offset mapping matrix, and finally outputs the corrected color estimation result. Combined with the residual trend, it realizes dynamic early warning monitoring of fruit and vegetable extracts. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0067] Refer to the instruction manual Figure 1 According to one embodiment of the present invention, a method for monitoring color changes of fruit and vegetable extracts comprises:
[0068] Collect image data of fruit and vegetable extracts under different incident light directions, and generate source light response maps based on them; collect deformation image data caused by surface disturbance of fruit and vegetable extracts, including water ripples, foam, and interface reflections;
[0069] The source illumination response map and deformation image data are fused and constructed into a disturbance state image dataset, which is used to uniformly represent the non-ideal image state under the conditions of illumination and interface disturbance.
[0070] An ideal color response baseline model is constructed based on sample images under standard conditions, and a set of multispectral mapping functions under interference-free conditions is defined by the ideal color response baseline model.
[0071] The response results of the ideal color and shade response baseline model and the interference state image dataset are compared, and based on the response results, the illumination variation factor and the interface disturbance factor are extracted as the feature expression vector of the interference source;
[0072] A mapping matrix of interference factors and perceived color and shade shifts is established based on the feature expression vector of the interference source, which is used for interference elimination;
[0073] The interference state image dataset and the simultaneously acquired physicochemical parameter data are subjected to feature fusion, and a fusion expression tensor of pseudo-heterochromatic isomorphism state is constructed through cross-modal embedding;
[0074] Based on the input of the fusion expression tensor, a pseudo-heterochromatic perception model is constructed, and through graph boundary discrimination and response residual analysis, the recognition and interference elimination monitoring of the color similar state isomorphism samples of fruit and vegetable extract are completed.
[0075] The color and shade space feature vector of each interference state image sample in the interference state image dataset is extracted, which includes the multi-spectral channel texture response and the edge structure parameters of the disturbance area;
[0076] The physicochemical parameter data of the interference state image sample at the same time point are synchronously collected, which includes the indicator factors composed of pH, oxidation-reduction potential, conductivity and temperature;
[0077] The color and shade space feature vector and the physicochemical parameter data are subjected to feature layer normalization processing based on the unified feature scale and statistical distribution under different modalities, and then mapped to a unified semantic space through a double-flow embedding mapping function, forming a cross-modal representation pair;
[0078] A modal alignment constraint loss function is introduced to the cross-modal representation pair, which enhances the state consistency expression ability between the image modal and the physicochemical modal during the training stage of the pseudo-heterochromatic perception model;
[0079] The aligned cross-modal representation pair is fused through attention weighting or residual aggregation to generate a fusion expression tensor under pseudo-heterochromatic state; the fusion expression tensor is used as the input structure of the downstream model to form high-order semantic association between the comprehensive representation of image color and shade appearance and the potential state difference.
[0080] The input layer of the pseudo-heterochromatic perception model is constructed, and the input of the input layer is specified as the fusion expression tensor, which contains the semantic encoding vector of the image spectral feature and the physicochemical state indicator;
[0081] A local perception unit is introduced in the pseudo-heterochromatic perception model structure, which is used to extract the significant difference region features of the corresponding pseudo-heterochromatic state in the fusion expression tensor;
[0082] A global attention mechanism of fusion expression tensor is constructed, which is used to model long-range dependencies and cross-channel correlations in color semantic;
[0083] By introducing atlas boundary discrimination, the clustering center of the fusion expression tensor in the state embedding space and its boundary are used as structural priors to improve the boundary recognition ability of state heterogeneous samples; the residual distribution between the output results of the pseudo-homochromatic heterochromatic perception model and the ideal color response baseline model is calculated, and the residual direction and amplitude information of the residual distribution are used to assist in classifying state shift samples.
[0084] The atlas boundary discrimination result and the residual analysis result are weighted and fused to output the recognition result of the pseudo-homochromatic heterochromatic state, and supervised parameter optimization is performed in combination with the pseudo-homochromatic heterochromatic label;
[0085] In the inference stage of the pseudo-homochromatic heterochromatic perception model, when the fusion expression tensor is determined to be color similar but state abnormal, interference elimination is triggered, and the associated interference source feature expression vector is traced back to perform color state estimation and correction; the image color state estimation value after interference elimination is output, and the dynamic monitoring and early warning of the color change of the fruit and vegetable extract liquid are realized in combination with the time series distribution trend of the state residual.
[0086] The interference state image data of the interference state image data set is constructed, and the ideal color response baseline model is modeled;
[0087] The original image of the i-th sample is defined as I i , let denote the source image data collected at the incident angle θ; let denote the deformation image data including the factors caused by water ripples, foam, and interface reflection, based on which the source illumination response atlas of the i-th sample is generated wherein is a high-order spectral response generation function that fuses image information at different incident angles θ∈Θ;
[0088] Let be the interference state image data of the i-th sample, and the interference state image data is constructed: wherein Λ(·,·) is an interference state construction function that nonlinearly fuses the source illumination response and the deformation image data; is the deformation image data of the i-th sample;
[0089] An ideal color response baseline model and interference feature extraction are constructed; based on the clean samples collected under standard conditions, an ideal color response baseline model is constructed: wherein I is the clean sample image input; represents the multispectral response vector under interference-free conditions, and the dimension m represents the number of responses of the image under different spectral channels; is a set of multispectral mapping functions;
[0090] Extract interference features by calculating the offset between the ideal response and the interference state response;
[0091]
[0092] where ΔR i is the response offset vector of the i-th sample; It is a nonlinear offset detection function, which uses difference mapping based on morphology and high-order activation function;
[0093] Extract interference source feature expression vector: D i =Ξ(ΔR i ); where Ξ(·) is an advanced feature extraction function that converts the response offset into a joint expression of the illumination variation factor and the interface perturbation factor; is the interference feature expression vector of the i-th sample, and the dimension p represents the total number of interference factors extracted;
[0094] Establish the interference factor and perceptual color shift mapping matrix: in represents a special nonlinear tensor fusion operation; Ω(·) is a mapping matrix generation function that constructs an interference offset mapping matrix using a structure-sensitive activation function, which includes Swish or GELU variants; It is used to define the nonlinear mapping relationship between interference factors and color shift, M δ Represents a p×q-dimensional matrix; N is the total number of current samples, and i is the index of the current sample.
[0095] Extract color space feature vectors and collect physical and chemical parameter data; for each Extract color space feature vector: Θ v (·) is the multi-spectral channel texture and edge structure feature extraction function; represents the color space feature vector under the image modality, d v is the number of dimensions of the image modality feature;
[0096] Synchronous collection of physical and chemical parameter data:
[0097] in is the physicochemical state vector of the i-th sample, where pH i Indicates pH; ORP irepresents the oxidation reduction potential, EC i represents the electrical conductivity, T i represents the temperature; corresponds to the pH i , ORP i , EC i , T i These four dimensions; represents the transpose of the vector;
[0098] In the feature normalization and dual-stream embedding mapping, the features of different modalities are subjected to feature layer normalization: wherein and are normalization functions, which are based on the feature distribution form for normalization; is the color space feature vector of the i-th sample extracted under the image modality; is the physicochemical parameter feature vector collected under the physicochemical modality of the i-th sample;
[0099] The normalized features are mapped to a unified semantic space by a dual-stream embedding mapping function, respectively:
[0100] wherein v (·) and r (·) are nonlinear embedding mapping functions, the nonlinear embedding mapping functions include a multi-layer transformation network, and have a deep transformation with an activation function ReLU; and are the mapped unified semantic feature vectors, and D is the semantic dimension; based on this, a cross-modality representation pair is formed: wherein || represents a vector splicing operation; is a preliminary cross-modality representation pair;
[0101] A modality alignment constraint loss function is introduced The modality alignment constraint loss function is used to enhance the consistency between the image and the physicochemical modality in the training stage, and the loss function adopts a dual regularization function; wherein is a dual regularization function, which is used to ensure that the features of the two modalities are close to each other in the semantic space;
[0102] The cross-modality features are fused to generate a fusion expression tensor under the pseudo-homochromatic heterochromatic state: is a fusion expression tensor generation function; is the cross-modality representation pair of the i-th sample;
[0103] wherein, is a modal splicing and rearrangement function, which is used to insert timing and structure labels; The adaptively generated modal attention matrix is automatically generated based on the intrinsic correlation of cross-modal features; is the attention-guided high-order fusion function; the final output is the fusion expression tensor, F represents the fusion feature dimension; Embedding vector for image modality; is the physical and chemical modality embedding vector.
[0104] In the construction and training of the pseudo-metameric perception model, the input layer of the pseudo-metameric perception model is constructed, and the input is specified as the fusion expression tensor Z i , That is, the high-dimensional feature representation as the model input; F is the fusion expression tensor Z i characteristic dimensions;
[0105] The local perception unit is introduced into the pseudo-metameric perception model to extract the features of the local significant difference regions in the fusion expression tensor. The local perception mapping function is defined as: It is a local feature extraction network. In practical applications, convolution, nonlinear activation and spatial self-attention mechanisms can be used inside the local feature extraction network. is the local perception feature representation, F L <F;F L L is the local perception feature representation i characteristic dimensions;
[0106] In the global attention mechanism and graph boundary discrimination, a global attention mechanism is constructed to perform global dependency modeling on the fused expression tensor: It is a global attention mechanism function, using a multi-head self-attention network; is the global semantic feature vector extracted from the i-th sample under the global attention mechanism, F G ≤F; F G is the global feature dimension;
[0107] Introducing graph boundary discrimination, taking the cluster center and its boundary in the state embedding space as the structural prior, and defining the boundary discrimination function:
[0108]
[0109] in is the state prediction value of the i-th sample, is the discriminant function guided by the spectrum boundary, is the graph boundary set of the state embedding space; is the transpose of the weight matrix of the kth branch; b k is the bias vector of the kth branch; α k is the attention factor of the kth channel, which is adaptively learned by the internal self-attention mechanism; is a nonlinear residual propagation function, which includes variants based on Swish / GELU activation; is a soft discriminant function used to output the pseudo-metameric state K is the total number of branches or channels;
[0110] The residual distribution between the pseudo-metameric perception model output and the ideal color response baseline model is calculated using a non-Euclidean distance metric: In the formula It is a residual metric function, which uses non-Euclidean metrics and embeds nonlinear activation. In practical applications, non-Euclidean metrics include Manhattan or Chebyshev. is the residual loss function value; Γ(Z i ) is the predicted output value of the i-th sample, which comes from the pseudo-metameric perception model, and the input is the fusion expression tensor Z i , the output is the state estimation result of the sample; Represents the original image I of the i-th sample under ideal conditions i Output after applying the ideal color response baseline model;
[0111] Then, the results of the spectrum boundary discrimination and the residual analysis are weighted fused to achieve the state heterogeneous judgment output, and combined with the pseudo-metameric label Perform supervised optimization: Where Φ(·,·,·) is the comprehensive loss function, which contains classification loss and residual penalty terms. The design of the comprehensive loss function is based on the dual learning mechanism.
[0112] In the inference stage of the pseudo-metameric perception model, when the pseudo-metameric perception model determines that a sample has similar color but abnormal state, that is, If the preset threshold τ is exceeded, interference elimination is triggered;
[0113] Perform retroactive correction for interference using the interference cancellation function:
[0114] in is the estimated value of the color state of the i-th sample after interference elimination; ε reconf (·) is the state reconstruction offset estimation function, which performs inverse mapping of the interference effect based on nonlinear transformation; represents a special nonlinear tensor product, Used to capture high-order coupling between interference factors and offset maps; is the interference inversion function;
[0115] Finally, combined with the temporal distribution trend of the color state residual, a dynamic monitoring curve is established:
[0116] in is the state monitoring function at time t; Represents the state estimation set after digestion of all samples in time t; Θ dyn (·) is a dynamic trend analysis function, which is used for early warning judgment. In practical applications, the dynamic trend analysis function adopts time series autoregressive or convolutional neural network time series modeling methods.
[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for monitoring color changes of fruit and vegetable extracts, comprising: Collect image data of fruit and vegetable extracts under different incident light directions, and generate source light response maps based on the data; Collect deformation image data caused by surface disturbance of fruit and vegetable extracts, including water ripples, foam, and interface reflections; The source illumination response map is fused with the deformation image data to construct an interference state image dataset; Its characteristics are: An ideal color response baseline model is constructed based on sample images under standard conditions, and a set of multispectral mapping functions under interference-free conditions is defined by the ideal color response baseline model. Comparing the response results of the ideal color response baseline model with those of the interference state image dataset, the illumination variation factor and interface disturbance factor are extracted as the feature expression vectors of the interference source based on the response results. Based on the characteristic expression vector of the interference source, a mapping matrix between the interference factor and the perceived color shift is established for interference elimination; The interference state image dataset is fused with the simultaneously acquired physical and chemical parameter data, and a fusion expression tensor of pseudo-metameric state is constructed through cross-modal embedding. A pseudo-metameric perception model is constructed based on the input of the fused expression tensor. Through spectral boundary discrimination and response residual analysis, the recognition and interference elimination monitoring of heterogeneous samples of fruit and vegetable extracts with similar color states are completed.
2. The method for monitoring color changes of fruit and vegetable extracts according to claim 1, wherein: Extracting a color space feature vector for each disturbed image sample in the disturbed image dataset. The color space feature vector includes the multi-spectral channel texture response and the edge structure parameter of the disturbed area. Synchronously collecting physical and chemical parameter data of the interference state image sample at the same time point, the physical and chemical parameter data including indicator factors composed of pH, redox potential, conductivity, and temperature; The color space feature vectors and physical and chemical parameter data are normalized at the feature level based on the unified feature scale and statistical distribution under different modalities. They are then mapped to a unified semantic space through a two-stream embedding mapping function to form a cross-modal representation pair. A modality alignment constraint loss function is introduced for cross-modal representation pairs to enhance the state consistency expression ability between image modality and physical and chemical modality during the training phase of pseudo-metameric perception model. The aligned cross-modal representation pairs are fused through attention weighting or residual aggregation to generate a fused expression tensor in a pseudo-metameric state; the fused expression tensor is used as the input structure of the downstream model to form a comprehensive representation of the semantic association between the image color appearance and the potential state difference.
3. The method for monitoring color changes of fruit and vegetable extracts according to claim 2, wherein: Construct the input layer of the pseudo-metameric perception model and specify the input of the input layer as a fused expression tensor containing the semantic encoding vectors of the image spectral features and the physical and chemical state indicator factors; A local perception unit is introduced into the pseudo-metameric perception model structure. The local perception unit is used to extract the difference region features corresponding to the pseudo-metameric state in the fusion expression tensor. Construct a global attention mechanism for fused representation tensors to model long-range dependencies and cross-channel interactions in color semantics; By introducing the graph boundary discrimination, the cluster center and its boundary of the fusion expression tensor in the state embedding space are used as the structural prior; The residual distribution between the output of the pseudo-metameric perception model and the ideal color response baseline model is calculated, and the residual direction and amplitude information of the residual distribution are used to assist in the classification judgment of state-shifted samples.
4. The method for monitoring color changes of fruit and vegetable extracts according to claim 3, wherein: The results of the spectrum boundary discrimination and the residual analysis are weightedly fused to output the recognition results of the pseudo-metameric state, and the pseudo-metameric labels are combined for supervised parameter optimization. During the inference stage of the pseudo-metameric perception model, when the fused expression tensor is judged to be similar in color but abnormal in state, interference resolution is triggered, and the associated interference source feature expression vector is traced back to perform color state estimation and correction. The image color state estimation value after interference resolution is output, and combined with the time series distribution trend of the state residual, dynamic monitoring and early warning of color changes in fruit and vegetable extracts are achieved.
5. The method for monitoring color changes of fruit and vegetable extracts according to claim 4, characterized in that: Constructing interference state image data of the interference state image data set and modeling the ideal color response baseline model; Define the original image of the i-th sample as I i ,set up represents the source image data collected at the incident angle θ; let Represents the deformation image data caused by water ripples, foam, and interface reflection, based on which the source illumination response map of the i-th sample is generated in is a high-order spectral response generation function that fuses image information at different incident angles θ∈Θ; Draft For the interference state image data of the i-th sample, construct the interference state image data: Where Λ(·,·) is the interference state constructor; is the deformed image data of the i-th sample; Construct ideal color response baseline model and interference feature extraction; Based on clean samples collected under standard conditions, a baseline model of ideal color response is constructed: Where I is the clean sample image input; represents the multispectral response vector under interference-free conditions; is a set of multispectral mapping functions; Extract interference features by calculating the offset between the ideal response and the interference state response; where ΔR i is the response offset vector of the i-th sample; It is a nonlinear offset detection function, which uses difference mapping based on morphology and high-order activation function; Extract interference source feature expression vector: D i =Ξ(ΔR i ); where Ξ(·) is a feature extraction function that converts the response offset into a joint expression of the illumination variation factor and the interface disturbance factor; is the interference feature expression vector of the i-th sample; Establish the interference factor and perceptual color shift mapping matrix: Where ⊕ represents a nonlinear tensor fusion operation; Ω(·) is a mapping matrix generation function that uses a structure-sensitive activation function to construct an interference offset mapping matrix; Used to define the nonlinear mapping relationship between interference factor and color shift.
6. The method for monitoring color changes of fruit and vegetable extracts according to claim 5, characterized in that: Extract color space feature vectors and collect physical and chemical parameter data; for each Extract color space feature vector: Θ v (·) is the multi-spectral channel texture and edge structure feature extraction function; Represents the color space feature vector under image modality; Synchronous collection of physical and chemical parameter data: in is the physicochemical state vector of the i-th sample, where pH i Indicates pH; ORP i represents the redox potential, EC i represents the conductivity, T i Indicates temperature; Represents the transpose of a vector; In feature normalization and two-stream embedding mapping, the features of different modalities are normalized at the feature layer: in and is the normalization function; is the color space feature vector extracted from the i-th sample in the image mode; is the eigenvector of the physical and chemical parameters collected under the physical and chemical mode for the i-th sample; The normalized features are mapped to a unified semantic space through the two-stream embedding mapping function: in v (·)and r (·) is the nonlinear embedding mapping function; and is the unified semantic feature vector after mapping, and D is the semantic dimension; based on this, a cross-modal representation pair is formed: Where || represents the vector concatenation operation; is a preliminary cross-modal representation pair; Introducing modal alignment constraint loss function in is the dual regularization function; Fusing cross-modal features to generate a fused expression tensor in a pseudo-metameric state: Generating functions for fusion expression tensors; is the cross-modal representation pair of the i-th sample; in, is the modal splicing and rearrangement function; Modal attention matrix generated for adaptation; is the attention-guided high-order fusion function; the final output is the fusion expression tensor, F represents the fusion feature dimension; Embedding vector for image modality; is the physical and chemical modality embedding vector.
7. The method for monitoring color changes of fruit and vegetable extracts according to claim 6, characterized in that: In the construction and training of the pseudo-metameric perception model, the input layer of the pseudo-metameric perception model is constructed, and the input is specified as the fusion expression tensor Z i , That is, the high-dimensional feature representation as the model input; F is the fusion expression tensor Z i characteristic dimensions; The local perception unit is introduced into the pseudo-metameric perception model to extract the features of the local significant difference regions in the fusion expression tensor. The local perception mapping function is defined as: It is a local feature extraction network; is the local perception feature representation, F L <F;F L L is the local perception feature representation i characteristic dimensions; In the global attention mechanism and graph boundary discrimination, a global attention mechanism is constructed to perform global dependency modeling on the fused expression tensor: is the global attention mechanism function; is the global semantic feature vector extracted from the i-th sample under the global attention mechanism, F G ≤F; F G is the global feature dimension; Introducing graph boundary discrimination, taking the cluster center and its boundary in the state embedding space as the structural prior, and defining the boundary discrimination function: in is the state prediction value of the i-th sample, is the discriminant function guided by the spectrum boundary, is the graph boundary set of the state embedding space; is the transpose of the weight matrix of the kth branch; b k is the bias vector of the kth branch; α k is the attention factor of the kth channel; is the nonlinear residual propagation function; is a soft discriminant function used to output the pseudo-metameric state K is the total number of branches or channels; The residual distribution between the pseudo-metameric perception model output and the ideal color response baseline model is calculated using a non-Euclidean distance metric: In the formula It is the residual metric function, which adopts non-Euclidean metric and embeds nonlinear activation; is the residual loss function value; Γ(Z i ) is the predicted output value of the i-th sample; Represents the original image I of the i-th sample under ideal conditions i Output after applying the ideal color response baseline model; Then, the results of the spectrum boundary discrimination and the residual analysis are weighted fused to achieve the state heterogeneous judgment output, and combined with the pseudo-metameric label Perform supervised optimization: where Φ(·,·,·) is the comprehensive loss function.
8. The method for monitoring color changes of fruit and vegetable extracts according to claim 7, characterized in that: In the inference stage of the pseudo-metameric perception model, when the pseudo-metameric perception model determines that a sample has similar color but abnormal state, that is, If the preset threshold τ is exceeded, interference elimination is triggered; Perform retroactive correction for interference using the interference cancellation function: in is the estimated value of the color state of the i-th sample after interference elimination; ε reconf (·) is the state reconstruction offset estimation function; represents a nonlinear tensor product; is the interference inversion function; Finally, combined with the temporal distribution trend of the color state residual, a dynamic monitoring curve is established: in is the state monitoring function at time t; Represents the state estimation set after digestion of all samples in time t; Θ dyn (·) is a dynamic trend analysis function, which is used for early warning judgment.