A method for target recognition in slaughtering scenes based on multi-source visual feature fusion

By calculating the local statistical variance and spatial entropy of infrared images, modal masks and orthogonal mapping matrices are generated to correct pixel displacement of visible light and infrared features and eliminate semantic ghosting. This solves the problem of decreased target recognition accuracy caused by high-concentration water vapor scattering in slaughtering scenarios and achieves high-precision multimodal feature fusion and target recognition.

CN122135405APending Publication Date: 2026-06-02BEIJING ZHIWEI YOUPIN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZHIWEI YOUPIN TECH CO LTD
Filing Date
2026-03-12
Publication Date
2026-06-02

Smart Images

  • Figure CN122135405A_ABST
    Figure CN122135405A_ABST
Patent Text Reader

Abstract

This invention relates to the field of multi-source visual feature fusion technology and discloses a target recognition method for slaughtering scenes based on multi-source visual feature fusion. The method includes: acquiring a first feature tensor of a visible light image and a second feature tensor of an infrared image; calculating the local statistical variance of the second feature tensor and determining the attenuation coefficient; adjusting the feature sampling span and correcting the spatial mapping of the first feature tensor according to the attenuation coefficient; calculating the spatial entropy of the first and second feature tensors to generate a modal mask and assigning weights to each feature tensor; decoupling the feature space using a preset orthogonal mapping matrix; fusing the decoupled features and outputting the recognition result. This invention utilizes infrared modal statistical deviation to characterize the scattering intensity of the medium, thereby adaptively adjusting the feature receptive field, eliminating texture diffusion caused by high concentrations of water vapor, and ensuring robustness of target boundary recognition under extreme conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-source visual feature fusion technology, specifically to a method for target recognition in slaughtering scenes based on multi-source visual feature fusion. Background Technology

[0002] Current industrial automation object recognition typically uses visible light sensors to collect optical signals and relies on the homogeneity of the imaging medium to ensure that the light path follows a linear propagation law, thereby extracting the texture features and topological structure of the target object. The slaughtering and processing environment generates high concentrations of water vapor, which causes the imaging medium to be filled with condensed water droplets and induce scattering phenomena, resulting in nonlinear refraction of the optical signal. This physical interference causes the visual features to have a phase shift in tensor space, causing the logical coordinates of the primitives to deviate from their physical true positions, and thus causing deformation of the geometric boundaries of the target object.

[0003] Conventional processing methods employ channel splicing or simple masking strategies to fuse multi-source data. However, in complex refractive environments, neglecting local nonlinear spatial distortions caused by the medium leads to coordinate misalignment and semantic ghosting of multimodal features at the logic layer, posing a challenge to the system's accuracy in resolving flexible biological tissues. Specifically, existing technologies face the following limitations: 1. Optical distortions within the logic space cause phase shifts in feature tensors, resulting in asymmetric deformation of target boundaries; 2. Reliability imbalances in cross-modal features under extreme conditions lead to geometric boundary collapse of the visible light branch in high-concentration water vapor; 3. Spatial alignment mechanisms lack the ability to correct dynamic refractive distortions, resulting in semantic ambiguity in the fused feature tensors. Besides hardware limitations, multimodal... The current information fusion logic and spatial alignment algorithm have shortcomings. For example, Chinese invention patent CN111611905B discloses a target recognition method that fuses visible light and infrared light. This technology is based on the premise that multimodal images have achieved ideal spatial registration. The DenseFuse pixel overlay method used does not consider the local nonlinear spatial distortion caused by medium scattering. Under the interference of high concentration of water vapor in slaughtering scenes, the visible light features produce sub-pixel level logical phase drift relative to the infrared topological anchor point. Due to the lack of dynamic refraction distortion mechanism compensation capability, the fused feature tensor has coordinate misalignment and semantic ghosting in the logic layer. The accuracy is reduced when analyzing flexible biological tissues such as the boundary of pig carcasses, which is difficult to support the real-time control requirements of precision cutting operations in production lines.

[0004] Therefore, how to solve the feature space phase shift caused by water vapor scattering in slaughtering scenarios, and the decrease in target recognition accuracy caused by modal coordinate misalignment, has become the technical problem to be solved by this invention. Summary of the Invention

[0005] This invention proposes a target recognition method for slaughtering scenes based on multi-source visual feature fusion, comprising the following steps: Step S1: Obtain the first feature tensor corresponding to the visible light image and the second feature tensor corresponding to the infrared image; Step S2: Calculate the local statistical variance of the second feature tensor, and determine the attenuation coefficient based on the local statistical variance and the preset mapping coefficient. The attenuation coefficient is used to quantify the diffusion ambiguity of the first feature tensor. Step S3: Determine the sampling grid span for feature resampling based on the attenuation coefficient, and map the first feature tensor based on the sampling grid span to correct pixel displacement caused by scattering. Step S4: Extract the spatial entropy of the first feature tensor and the second feature tensor, and generate a modal mask of spatial dimension based on the spatial entropy. Use the modal mask to perform weight allocation on the first feature tensor and the second feature tensor. Step S5: Spatial decoupling is performed on the first feature tensor and the second feature tensor after weight allocation using a preset orthogonal mapping matrix to obtain mutually independent visible light detail features and infrared contour features. Step S6: Perform feature alignment and fusion on visible light detail features and infrared contour features, and output the recognition result based on the fused feature tensor.

[0006] Preferably, in step S2, the specific process of calculating the local statistical variance of the second feature tensor includes: sliding a local window of size k×k on the second feature tensor and calculating the statistical deviation of the pixel values ​​within the local window; wherein, the attenuation coefficient is positively correlated with the statistical deviation, and the attenuation coefficient characterizes the feature fuzzy radius of the first feature tensor at the corresponding spatial coordinates.

[0007] Preferably, in step S3, the specific process of determining the sampling grid span for feature resampling includes: based on statistical deviation values The calculation logic for the sampling grid expansion rate D is expressed as follows: Where λ is a preset scaling coefficient and γ is a preset sensitivity factor. The statistical deviation value is calculated in step S2, and δ is the baseline sampling span. The method uses the sampling grid expansion rate D to perform irregular grid sampling on the first feature tensor.

[0008] Preferably, in step S4, the specific process of performing weight allocation includes: comparing the spatial entropy with a preset failure threshold; when the spatial entropy of a specific spatial location in the first feature tensor or the second feature tensor is higher than the failure threshold, using a modal mask to perform amplitude reduction processing on the feature value of that spatial location.

[0009] Preferably, the method further includes the following steps: Step S501, when the global spatial entropy of both the first feature tensor and the second feature tensor is detected to be higher than the failure threshold, the fused feature tensor of the historical frame is obtained; Step S502, the inter-frame optical flow vector between the current frame and the historical frame is calculated, and a spatial transformation is performed on the fused feature tensor of the historical frame based on the inter-frame optical flow vector to generate the compensation feature tensor of the current frame.

[0010] Preferably, in step S5, the orthogonal mapping matrix is ​​a transformation matrix obtained through pre-training and used to minimize the cosine similarity between the first feature tensor and the second feature tensor.

[0011] Preferably, in step S6, the feature alignment and fusion are implemented using a cross-modal attention mechanism, including: using the decoupled second feature tensor as a query vector, using the decoupled first feature tensor as a key vector and a value vector, calculating the cross-modal affinity weight matrix, and weighting the first feature tensor according to the cross-modal affinity weight matrix.

[0012] Preferably, the target objects include pig carcasses, splitting saws, and evisceration robots; the recognition results include the target object's classification label, bounding box coordinates, or semantic segmentation mask.

[0013] Preferably, feature resampling is achieved through a deformable convolution operator, and the sampling grid span is set by adjusting the sampling offset of the deformable convolution operator.

[0014] Preferably, the method further includes the following steps: using the recognition results to generate motion guidance parameters for the actuator, so as to correct the motion trajectory of the actuator based on the recognition results when the actuator performs the splitting or cleaning action.

[0015] The beneficial effects of this invention are: 1. In target recognition in slaughtering scenes using multi-source visual feature fusion, the uncertainty caused by water vapor occlusion is characterized by calculating the local spatial information entropy of the first modality feature tensor. This triggers feature coordinate deconvolution and correction logic, enabling the system to identify Mie scattering phenomena caused by water vapor. This mechanism changes the traditional approach of discarding masks that treat high-concentration water vapor as mere noise. Instead, it uses the second modality feature tensor carrying infrared thermal radiation information as a rigid topological anchor point. By calculating the two-dimensional cross-correlation offset, a refraction error vector field is generated, driving the resampling convolution operator to perform sub-pixel-level inverse coordinate addressing and feature interpolation extraction. This process physically corrects the spatial misalignment of local features within the logic tensor space, effectively solving the semantic phase drift problem of visible light images under strong refraction conditions. This ensures the topological coherence of the target object in extreme environments and provides a stable coordinate reference for the accurate identification of complex and flexible biological tissues.

[0016] 2. The local pixel variance of the second-mode feature tensor is used to invert the attenuation gradient of the target thermal radiation flux in the water vapor medium, thereby quantifying the dynamic water vapor condensation concentration in the physical space. The system dynamically adjusts the sampling grid span of the resampling convolution operator according to the concentration to achieve feature addressing and aggregation with variable receptive field. This mechanism translates the thermodynamic scattering phenomenon of the physical world into a variable-scale feature retrieval logic in the data space. When water vapor causes high-frequency texture physical diffusion, the divergent feature primitives are reconverged to the reference coordinate node by adaptively expanding the query receptive field. This processing method breaks through the limitation of the traditional registration method relying on the ideal rigid translation assumption, avoids registration failure caused by the collapse of cross-correlation peaks, eliminates feature ghosting caused by complex media, and improves the stability of target boundary regression.

[0017] 3. By constructing a dynamic routing control unit in the feature space and generating a spatial modality suppression mask matrix, real-time evaluation and weight allocation of the reliability of different modal information are achieved. This mechanism, combined with the feature orthogonal constraint loss function, drives the first and second modalities to converge in the orthogonal direction during the training phase, so that each modal branch focuses on the feature extraction of high-frequency texture and low-frequency topological contour, reducing information redundancy and preventing the disordered propagation of high-frequency noise between modalities. When the spatial information entropy of all modalities in a single frame image is detected to be higher than the failure threshold, the system calls the global fusion feature tensor of the historical frame and performs spatial distortion transformation in combination with the inter-frame optical flow vector to achieve self-repair of the feature mask. This synergistic effect of multiple mechanisms enables the system to avoid perception interruption caused by environmental pollution by relying solely on the reconstruction of existing sensor data streams without relying on physical cleaning devices, ensuring the continuity and reliability of target recognition in the pipeline operation. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of the steps of the multi-source visual feature fusion target recognition method for slaughtering scenes according to the present invention; Figure 2 This is a causal relationship diagram of the core technical elements affecting the target recognition results in slaughtering scenarios in this invention. Detailed Implementation

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

[0021] A method for target recognition in slaughtering scenes based on multi-source visual feature fusion includes the following steps: Step S1: Obtain the first feature tensor corresponding to the visible light image and the second feature tensor corresponding to the infrared image; Step S2: Calculate the local statistical variance of the second feature tensor, and determine the attenuation coefficient based on the local statistical variance and the preset mapping coefficient. The attenuation coefficient is used to quantify the diffusion ambiguity of the first feature tensor. Step S3: Determine the sampling grid span for feature resampling based on the attenuation coefficient, and map the first feature tensor based on the sampling grid span to correct pixel displacement caused by scattering. Step S4: Extract the spatial entropy of the first feature tensor and the second feature tensor, and generate a modal mask of spatial dimension based on the spatial entropy. Use the modal mask to perform weight allocation on the first feature tensor and the second feature tensor. Step S5: Spatial decoupling is performed on the first feature tensor and the second feature tensor after weight allocation using a preset orthogonal mapping matrix to obtain mutually independent visible light detail features and infrared contour features. Step S6: Perform feature alignment and fusion on visible light detail features and infrared contour features, and output the recognition result based on the fused feature tensor.

[0022] Preferably, in step S2, the specific process of calculating the local statistical variance of the second feature tensor includes: sliding a local window of size k×k on the second feature tensor and calculating the statistical deviation of the pixel values ​​within the local window; wherein, the attenuation coefficient is positively correlated with the statistical deviation, and the attenuation coefficient characterizes the feature fuzzy radius of the first feature tensor at the corresponding spatial coordinates.

[0023] Preferably, in step S3, the specific process of determining the sampling grid span for feature resampling includes: based on statistical deviation values The calculation logic for the sampling grid expansion rate D is expressed as follows: Where λ is a preset scaling coefficient and γ is a preset sensitivity factor. The statistical deviation value is calculated in step S2, and δ is the baseline sampling span. The method uses the sampling grid expansion rate D to perform irregular grid sampling on the first feature tensor.

[0024] Preferably, in step S4, the specific process of performing weight allocation includes: comparing the spatial entropy with a preset failure threshold; when the spatial entropy of a specific spatial location in the first feature tensor or the second feature tensor is higher than the failure threshold, using a modal mask to perform amplitude reduction processing on the feature value of that spatial location.

[0025] Preferably, the method further includes the following steps: Step S501, when the global spatial entropy of both the first feature tensor and the second feature tensor is detected to be higher than the failure threshold, the fused feature tensor of the historical frame is obtained; Step S502, the inter-frame optical flow vector between the current frame and the historical frame is calculated, and a spatial transformation is performed on the fused feature tensor of the historical frame based on the inter-frame optical flow vector to generate the compensation feature tensor of the current frame.

[0026] Preferably, in step S5, the orthogonal mapping matrix is ​​a transformation matrix obtained through pre-training and used to minimize the cosine similarity between the first feature tensor and the second feature tensor.

[0027] Preferably, in step S6, the feature alignment and fusion are implemented using a cross-modal attention mechanism, including: using the decoupled second feature tensor as a query vector, using the decoupled first feature tensor as a key vector and a value vector, calculating the cross-modal affinity weight matrix, and weighting the first feature tensor according to the cross-modal affinity weight matrix.

[0028] Preferably, the target objects include pig carcasses, splitting saws, and evisceration robots; the recognition results include the target object's classification label, bounding box coordinates, or semantic segmentation mask.

[0029] Preferably, feature resampling is achieved through a deformable convolution operator, and the sampling grid span is set by adjusting the sampling offset of the deformable convolution operator.

[0030] Preferably, the method further includes the following steps: using the recognition results to generate motion guidance parameters for the actuator, so as to correct the motion trajectory of the actuator based on the recognition results when the actuator performs the splitting or cleaning action.

[0031] Example 1: In the splitting and evisceration process of a pig slaughtering and initial processing line, continuously ejected high-temperature water vapor and splashed blood form a high-concentration mixed suspension medium. This suspension medium causes nonlinear brightness distortion and local occlusion in the visible light image captured by the sensor. The micro-droplets formed by the condensation of high-concentration water vapor constitute a microlens array, triggering Mie scattering. This physical scattering effect causes nonlinear spatial pixel drift in the imaging plane of the high-frequency geometric features captured by the visible light and depth camera. Conventional multimodal feature stitching assumes that each modal feature is absolutely aligned in the logical tensor space. When stitching multimodal features under spatial pixel drift, it causes coordinate misalignment and semantic feature ghosting in the feature space. Coordinate misalignment and semantic feature ghosting cause the flexible biological tissue boundary between the pig carcass and the evisceration robot to blur, destroying the topological coherence of the target object and causing cutting deviation at the physical execution end.

[0032] To address the feature coordinate misalignment caused by medium scattering, a first feature tensor corresponding to the visible light image and a second feature tensor corresponding to the infrared image are obtained. The second feature tensor is used as a topological contour reference, and a local window of size k×k is slid across the second feature tensor. The statistical deviation of pixel values ​​within the local window is then calculated. Based on statistical deviation value And the attenuation coefficient is determined by the preset image coefficient, and the attenuation coefficient and statistical deviation value The features are positively correlated. The feature fuzzy radius of the first feature tensor at the corresponding spatial coordinates is quantized. The sampling grid span of feature resampling is determined based on the attenuation coefficient and the statistical bias value. The sampling grid expansion ratio D is calculated using the following formula: Where λ is a preset scale adjustment coefficient, γ is a preset sensitivity factor, and δ is the reference sampling span. The sampling offset of the deformable convolution operator is adjusted according to the sampling grid expansion rate D. Irregular grid sampling is used on the first feature tensor. The system establishes a linear lookup table containing 256 entries, mapping the sampling grid expansion rate in the range of 0 to 5.0 to a radial offset increment from 0 pixels to 12 pixels. In the low-level operation, the system performs a scalar multiplication of this offset increment with 18 preset direction vectors (representing the 9 components of the 3x3 convolution kernel sampling point in the horizontal and vertical directions, respectively), generating a set of sampling coordinate fields containing floating-point position offsets. In a single frame processing time of 10ms, the convolution operator performs bilinear interpolation sampling within a range of 1.5 times the receptive field around the original center point according to the sampling coordinate field, thereby physically compensating for the geometric dispersion of 15 to 40 pixels in radius caused by water vapor medium refraction. This operation corrects the pixel displacement caused by scattering in the tensor space and aggregates the diffused local feature primitives to the reference coordinate node.

[0033] The spatial entropy of the first and second feature tensors is extracted and compared with a preset failure threshold. A modal mask is generated based on the spatial entropy. When the spatial entropy of a specific spatial location in either the first or second feature tensor exceeds the failure threshold, the modal mask is used to reduce the amplitude of the feature value at that location, thus completing the weight allocation of the first and second feature tensors. Using a pre-trained orthogonal mapping matrix that minimizes the cosine similarity between the first and second feature tensors, the weighted first and second feature tensors are decoupled to obtain independent visible light detail features and infrared contour features. The decoupling operation cuts off multi-source fusion. To address feature overlap redundancy and frequency interference propagation paths, the decoupled second feature tensor is used as the query vector, and the decoupled first feature tensor is used as the key and value vectors. A cross-modal affinity weight matrix is ​​calculated, and the first feature tensor is weighted according to the cross-modal affinity weight matrix. Visible light detail features and infrared contour features are aligned and fused. Based on the fused feature tensor, the classification label and bounding box coordinates of the target objects are output. The target objects include pig carcasses, splitting saws, and evisceration robots. The motion guidance parameters of the actuators are generated using the classification labels and bounding box coordinates. When the actuators perform splitting or evisceration actions, the motion trajectory of the actuators is corrected according to the motion guidance parameters.

[0034] Example 2: A physical test platform simulating a primary slaughtering and processing line was constructed, integrating a steam generator and a liquid spraying system to generate a mixed suspended medium environment containing high-temperature water vapor and splashed blood. The platform's data acquisition end integrated a visible light camera with a sampling rate of 60Hz and an infrared thermal imager with a resolution of 640×512 pixels. Transmittance variables were injected into the physical test platform to simulate environmental disturbances that induce Mie scattering. The size parameter k of the local window in the core calculation module was set. The value of the size parameter k was constrained by the quantitative mapping relationship between the maximum physical dispersion radius of the Mie scattering halo and the spatial resolution of the sensor. When the value of the size parameter k was lower than the lower limit, the local window could not cover the complete halo scattering area, resulting in an underestimation of the diffusion degree by the statistical deviation value. When the value of the size parameter k exceeded the upper limit, the low-frequency background gradient across the region was mixed into the local window, interfering with the calculation accuracy of the attenuation coefficient. Based on the combination of physical quantities such as the average diameter of water droplets from water vapor condensation (15μm to 45μm) and the imaging focal length, the set value of the size parameter k was determined to be 7. The system limited the sliding window range based on this size parameter to establish the boundary benchmark for obtaining the local statistical variance.

[0035] The transmittance of the suspended medium is set as the core parameter characterizing the medium concentration. The operating conditions are divided into three levels: low disturbance (85% transmittance), medium disturbance (50% transmittance), and high disturbance (20% transmittance). A multi-dimensional comparison system is constructed to verify the synergistic effect and parameter boundaries. Control group 1 serves as a benchmark existing technology reference, employing a multimodal feature splicing network with a fixed receptive field. Control group 2 serves as a partially missing reference, applying an attenuation coefficient to adjust the sampling offset but lacking a spatial decoupling module based on an orthogonal mapping matrix. Control group 3 serves as an out-of-range reference, where the failure threshold for high-frequency noise deviates from the defined optimal range. An experimental group is established as a complete representation of the technical solution, employing a target recognition system including statistical bias calculation and spatial entropy masking modules. Data input and processing flows for each group are initiated. Under the high disturbance condition of 20% transmittance, the original image captured by the visible light camera is... Nonlinear brightness distortion occurs, and the target edge contrast measurement value in the first feature tensor is 0.12. Background dynamic thermal radiation perturbs the infrared image, causing false thermodynamic artifacts accounting for 18.5% in the second feature tensor. After obtaining the above feature tensors, the experimental group extracted feature parameters. In the coordinate region with dense water vapor scattering, the extracted spatial entropy increased to 0.88. The experimental group set the failure threshold to 0.75. When the spatial entropy of the first or second feature tensor at a specific spatial location is higher than 0.75, the system generates a modal mask of spatial dimension based on the spatial entropy. The modal mask is used to reduce the feature value amplitude of the high-entropy coordinate region by 85.6%. Furthermore, the orthogonal mapping matrix is ​​used to perform spatial decoupling on the weighted features. The cosine similarity between the extracted visible light detail features and the infrared contour features drops to 0.04. This intermediate index indicates that the orthogonal mapping matrix cuts off the cross-modal transmission path of infrared artifacts to the visible light high-frequency channel.

[0036] The intersection-over-union (IoU) ratio of the bounding box coordinates of pig carcasses for each group was output as a recognition performance index. Under low-disturbance conditions with 85% transmittance, the IoU ratio of the experimental group was 94.2%, while that of control group 1 was 91.5%. Under medium-disturbance conditions with 50% transmittance, the IoU ratio of the experimental group was 89.6%, while that of control group 1 decreased to 73.8%. Under high-disturbance conditions with 20% transmittance, the IoU ratio of the experimental group was 86.4%, while that of control group 1 decreased to 38.2%. Meanwhile, under high-disturbance conditions with 20% transmittance, the IoU ratio of control group 2, which lacks orthogonal decoupling, was 65.3%. The difference between the data of the experimental group and control group 2 indicates that irregular mesh sampling... The decoupling of the sample and orthogonal mapping forms a mutually dependent synergistic relationship in the tensor space. The parameter boundary performance of the control group 3 was tested. When the failure threshold was increased to 0.95, which exceeded the upper limit setting, the modal mask did not reduce high-entropy noise, and the cross-union ratio dropped to 69.1%. When the failure threshold was decreased to 0.45, which was lower than the lower limit setting, the modal mask reduced the amplitude of high-frequency biological texture features, and the cross-union ratio dropped to 62.7%. The above nonlinear performance proves that 0.75 is the working window after technical trade-offs. The experimental data confirms that the feature fusion mechanism solves the technical conflict between preserving high-frequency details and suppressing cross-modal noise propagation, and maintains the stability of the target boundary recognition results under increasing medium perturbation gradient.

[0037] Example 3: In the automated cutting control node of the primary processing line for pig slaughtering, the target recognition system faces the technical challenge of determining the feature resampling parameters and the cross-modal feature decoupling matrix. To establish the preset mapping coefficients required for calculating the attenuation coefficient, the system initiates an offline physical calibration process. A standard black and white checkerboard calibration plate is set up in the steam generator, and the steam injection volume is controlled to make the transmittance of the suspended medium exhibit a gradient change between 20% and 85%. During this process, a visible light camera acquires images of the calibration plate, the processor calculates the physical diffusion pixel width of the calibration plate edge on the image plane, and an infrared thermal imager simultaneously acquires infrared images of the corresponding field of view. The local window is slid on the second feature tensor to extract the local statistical variance under each transmittance gradient. The system numerically fits the correlation curve between the physical diffusion pixel width and the local statistical variance based on the least squares method, and extracts the slope parameter of the correlation curve as the preset mapping coefficient. This procedure anchors the parameter settings of the algorithm layer to the scattering variation law of the physical medium.

[0038] For the generation of the preset orthogonal mapping matrix, the system iteratively optimizes the feature space decoupling model. The processor acquires the first and second feature tensors from the historical sample feature library. The feature library consists of 15,000 sets of visible light and infrared aligned images acquired under transmittance gradients ranging from 20% to 85%. All tensors are denoised and linearly normalized to between 0 and 1 before input using a 3x3 average pooling layer. The orthogonal mapping matrix consists of 4096 weight parameters in 64 rows and 64 columns. During 128 rounds of stochastic gradient descent training, the system adjusts the weights in steps with a learning rate of 0.0005. Whenever the inner product of two sets of modal feature vectors is greater than 0.001, the system performs an orthogonalization weight correction until the cosine similarity remains below 0.045 for 20 consecutive rounds on the validation set. This solidifies the transformation parameters for decoupling high-frequency texture and low-frequency contour in the hardware's underlying registers. The system sets an orthogonal constraint loss function to constrain model training. The formula for calculating the orthogonal constraint loss function L is as follows: ,in, The visible light feature vector is the result of projection onto the first candidate mapping matrix. The vector is the infrared feature vector projected onto the second candidate mapping matrix, where • denotes the vector dot product operation. The L2 norm of the vector is used to optimize the orthogonal constraint loss function L. The processor uses the gradient descent algorithm to simultaneously update the weight parameters of the first candidate mapping matrix and the second candidate mapping matrix. When the convergence value of the orthogonal constraint loss function L is lower than the set threshold of 0.05, the processor stops updating the parameters and solidifies the current network weights into the orthogonal mapping matrix. The determined preset mapping coefficients and the orthogonal mapping matrix are input to the feature fusion inference module.

[0039] The training orthogonal mapping matrix is ​​constructed using visible light samples containing high-frequency texture labels and infrared samples containing contour labels containing closed operations. The orthogonal constraint loss function is set as the projection vector of the first feature tensor. Projection vector of the second feature tensor In gradient descent iterations, the absolute value of the inner product is used to control the retention frequency of the first feature tensor to be above 150 line pairs per millimeter of detail components by introducing a weight decay coefficient, while limiting the retention of morphological gradient features in the second feature tensor, until... and When the cosine similarity between the two sides converges to below 0.05, the decoupling texture and topological transformation parameters are solidified at the weight level. The system outputs the attenuation coefficient based on the preset mapping coefficients obtained from the calibration, and adjusts the sampling offset of the deformable convolution operator. The system uses the trained and solidified orthogonal mapping matrix to block the cross-modal transmission of infrared thermodynamic artifacts to the visible light high-frequency channel. This step eliminates the fuzzy blind spots of parameter empirical setting and establishes the calculation basis for the bounding box coordinates output by the target recognition algorithm.

[0040] Example 4: Before deploying the target recognition system to a new pig slaughtering line, the system performs a pre-deployment calibration procedure to address sensor installation deviations and reference environment drift. In a static state where there is no water vapor interference on the production line, a standard geometric target is fixed at the center point of the working stroke of the splitting saw or the decontamination robot. The system controls a visible light camera and an infrared thermal imager to simultaneously acquire a reference image pair of the standard geometric target. The processor extracts the spatial coordinate sequence of the target edge pixels in the reference image pair. Based on the coordinate difference of the same target feature points between the visible light reference image and the infrared reference image, an initial affine transformation matrix is ​​calculated. This initial affine transformation matrix quantifies the inherent parallax caused by the difference in physical installation position between the two modal sensors. The system loads this initial affine transformation matrix as a preset constant into the low-level register of the feature extraction module to eliminate static geometric distortion.

[0041] After completing static spatial alignment, the system performs background medium scattering calibration to establish a baseline for dynamic water vapor interference. The steam generator is activated to bring the ambient temperature and humidity to the standard operating conditions for the slaughtering process. During a continuous time window without any target object passing through, the infrared thermal imager continuously acquires a sequence of background infrared images. The processor slides a local window across all grid points of the second feature tensor, extracting a time series of statistical deviations of pixel values ​​within the local window. The system calculates the mean of this time series as the background scattering noise baseline. In the real-time target recognition process, the net medium disturbance is obtained by subtracting this baseline from the currently calculated statistical deviation. This net medium disturbance is then combined with a preset mapping coefficient to calculate the attenuation coefficient. This standardized calibration procedure filters out fixed feature ambiguity caused by ambient background humidity, ensuring that the sampling grid expansion rate extracted by the system is only affected by dynamic high-concentration water vapor disturbances. This establishes an adaptive recognition foundation for the system in different workshop environments, and the system is then deployed to production. During the initial operation of the line, dynamic calibration of background scattering noise is performed: When no target object passes through the idle period, the background image sequence output by the infrared thermal imager is monitored. The initial statistical deviation value of the pixel value is calculated by sliding the local window of the global grid point of the second feature tensor. The average statistical deviation of each sampling point of 100 consecutive frames of images is calculated and stored as the background scattering noise baseline. During the daily power-on self-test phase, the system continuously collects 2000ms of image data on the idle pipeline. The local statistical variance of each pixel point is stored through a circular buffer with a length of 50. The system calculates the arithmetic mean of the remaining samples after removing the highest 5% and lowest 5% extreme values ​​in the sequence. This is used as the static water vapor noise on the current ambient optical axis. During real-time identification, the system subtracts this average noise from the currently calculated deviation value. If the resulting net medium disturbance is less than the energy level corresponding to 12 millivolts, the sampling grid expansion rate automatically falls back to the reference span of 1.0 to avoid false resampling caused by sensor thermal noise.

[0042] Example 5: When deploying a target recognition system on an actual pig slaughtering production line, the system executes a dynamic calibration procedure for the fusion weights of the cross-modal attention mechanism to solve the feature temporal mismatch problem caused by fluctuations in the production line cutting speed. The production line chain speed is set as the basic environmental variable, and the real-time pulse signal of the chain speed sensor is connected to the system control unit. When the production line is in a stopped state, the target object remains stationary. The system obtains the first feature tensor and the second feature tensor in this state, respectively. The processor calculates the benchmark cross-modal affinity weight matrix of visible light detail features and infrared contour features, and sets the average weight coefficient of the benchmark matrix to an initial value of 1.0. The system marks this state as the zero-speed alignment benchmark point.

[0043] When the production line starts and runs at a constant speed v, due to the coupling effect of sensor frame rate limitation and physical space displacement, the feature tensors captured by the visible light camera and infrared thermal imager at the same timestamp produce a temporal phase difference. The processor calculates the current linear velocity v in real time based on the pulse frequency of the chain speed sensor. The system sets a dynamic weight adjustment factor α to compensate for the feature fusion distortion caused by the temporal phase difference. The formula for calculating the dynamic weight adjustment factor α is as follows: Where β is a preset time constant determined by the sensor frame rate difference, the processor uses a dynamic weight adjustment factor α to perform scalar multiplication correction on the cross-modal affinity weight matrix, reducing the fusion weight of the temporally misaligned feature blocks generated when the linear velocity is high. The system repeatedly extracts feature tensors under different velocity gradient conditions, and fuses visible light detail features and infrared contour features based on the corrected cross-modal affinity weight matrix. This procedure establishes a deterministic function mapping between the fusion weight and the mechanical operating parameters of the physical equipment, avoiding the failure of a single weight parameter under dynamic conditions.

[0044] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for target recognition in slaughtering scenes based on multi-source visual feature fusion, characterized in that, Includes the following steps: Step S1: Obtain the first feature tensor corresponding to the visible light image and the second feature tensor corresponding to the infrared image; Step S2: Calculate the local statistical variance of the second feature tensor, and determine the attenuation coefficient based on the local statistical variance and the preset mapping coefficient. The attenuation coefficient is used to quantify the diffusion ambiguity of the first feature tensor. Step S3: Determine the sampling grid span for feature resampling based on the attenuation coefficient, and map the first feature tensor based on the sampling grid span to correct pixel displacement caused by scattering. Step S4: Extract the spatial entropy of the first feature tensor and the second feature tensor, and generate a modal mask of spatial dimension based on the spatial entropy. Use the modal mask to perform weight allocation on the first feature tensor and the second feature tensor. Step S5: Spatial decoupling is performed on the first feature tensor and the second feature tensor after weight allocation using a preset orthogonal mapping matrix to obtain mutually independent visible light detail features and infrared contour features. Step S6: Perform feature alignment and fusion on visible light detail features and infrared contour features, and output the recognition result based on the fused feature tensor.

2. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, In step S2, the specific process of calculating the local statistical variance of the second feature tensor includes: sliding a local window of size k×k on the second feature tensor and calculating the statistical deviation of the pixel values ​​within the local window; wherein, the attenuation coefficient is positively correlated with the statistical deviation, and the attenuation coefficient characterizes the feature fuzzy radius of the first feature tensor at the corresponding spatial coordinates.

3. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, In step S3, the specific process of determining the sampling grid span for feature resampling includes: based on statistical bias values The calculation logic for the sampling grid expansion rate D is expressed as follows: Where λ is a preset scaling coefficient and γ is a preset sensitivity factor. The statistical deviation value is calculated in step S2, and δ is the baseline sampling span. The method uses the sampling grid expansion rate D to perform irregular grid sampling on the first feature tensor.

4. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, In step S4, the specific process of weight allocation includes: comparing the spatial entropy with a preset failure threshold; when the spatial entropy of a specific spatial location in the first feature tensor or the second feature tensor is higher than the failure threshold, using a modal mask to perform amplitude reduction processing on the feature value of that spatial location.

5. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, It also includes the following steps: Step S501: When the global spatial entropy of both the first feature tensor and the second feature tensor is detected to be higher than the failure threshold, the fused feature tensor of the historical frame is obtained. Step S502: Calculate the inter-frame optical flow vector between the current frame and the historical frames, and perform a spatial transformation on the fused feature tensor of the historical frames based on the inter-frame optical flow vector to generate the compensation feature tensor of the current frame.

6. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, In step S5, the orthogonal mapping matrix is ​​a transformation matrix obtained through pre-training and used to minimize the cosine similarity between the first feature tensor and the second feature tensor.

7. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, In step S6, feature alignment and fusion are performed using a cross-modal attention mechanism, including: using the decoupled second feature tensor as the query vector, using the decoupled first feature tensor as the key vector and value vector, calculating the cross-modal affinity weight matrix, and weighting the first feature tensor according to the cross-modal affinity weight matrix.

8. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, The target objects include pig carcasses, splitting saws, and evisceration robots; the recognition results include the classification labels, bounding box coordinates, or semantic segmentation masks of the target objects.

9. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, Feature resampling is achieved through deformable convolution operators, and the sampling grid span is set by adjusting the sampling offset of the deformable convolution operators.

10. The method for target recognition in a slaughtering scene based on multi-source visual feature fusion according to claim 1, characterized in that, It also includes the following steps: The recognition results are used to generate motion guidance parameters for the actuator, so that the motion trajectory of the actuator can be corrected according to the recognition results when the actuator performs splitting or cleaning actions.

Citation Information

Patent Citations

  • A target recognition method that combines visible light and infrared fusion

    CN111611905B