Ginned cotton foreign fiber cleaning and detecting system based on visual identification

The global feature map is generated through hyperspectral imaging and lightweight dimensionality reduction algorithms, and the parameters are dynamically adjusted, solving the problems of high detection delay and high error detection rate in high-speed cotton flow, achieving efficient and accurate heterofiber cleaning.

CN120334240AInactive Publication Date: 2025-07-18XINJIANG APPLIED VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510388984.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional dimensionality reduction algorithm has high processing delays, which cannot meet the needs of high-speed cotton flow, and is prone to missed detection; the lack of dynamic feature screening leads to low signal-to-noise ratio and high error detection rate; the static parameters cannot be dynamically optimized, and the performance of multiple machines is attenuated, and the classification accuracy is limited.

Method used

A hyperspectral imager is used to scan multiple bands to generate standardized spectral data, construct three-dimensional tensors and segment them into sub-tensors, perform lightweight dimensionality reduction processing, generate a global feature map, filter the characteristic areas of heterofibres based on spectral similarity, and trigger the clearing device to separate the heterofibres through the dynamic feedback control module, and dynamically adjust the block size and dimensionality reduction parameters.

Benefits of technology

It improves the efficiency and accuracy of different fiber cleaning and detection, meets the demand for high-speed cotton flow, reduces the error detection rate, realizes dynamic feature screening and parameter optimization, and improves the collaborative performance of multiple machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334240A_ABST
    Figure CN120334240A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of textile industry automation and computer vision detection. According to the lint cotton foreign fiber cleaning and detecting system based on visual identification, a hyperspectral imager is used for conducting multi-band scanning on cotton flow, and standardized spectral data are generated; constructing a three-dimensional tensor, and dividing the three-dimensional tensor into a plurality of sub-tensors according to a spatial dimension; carrying out truncated high-order singular value decomposition processing on each sub-tensor, retaining a principal component of a core tensor and removing a secondary component, and generating a sub-tensor after dimension reduction; splicing the sub-tensors after dimension reduction into a global feature map according to spatial positions, and generating candidate foreign fiber masks; triggering a removing device to separate foreign fibers according to the candidate foreign fiber mask, and dynamically adjusting the partitioning size and dimension reduction parameters so as to solve the problems that a traditional dimension reduction algorithm is high in processing delay and cannot meet the requirement of high-speed cotton flow; the signal-to-noise ratio is low and the false detection rate is high due to lack of dynamic feature screening; the problems that static parameters cannot be dynamically optimized, multi-machine cooperation performance is degraded, and classification precision is limited are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of textile industry automation and computer vision detection, and particularly to a cotton lint foreign fiber cleaning and detection system based on visual recognition. Background Art

[0002] With the continuous improvement of the automation level of the textile industry, the cotton lint foreign fiber cleaning technology has become one of the core links to ensure the quality of textiles. In the processes of ginning, opening cotton, etc., efficiently identifying and removing the foreign fibers (such as plastic filaments, hair, chemical fiber fragments, etc.) mixed in cotton is directly related to the subsequent spinning efficiency and finished product quality.

[0003] However, although the related technologies can achieve foreign fiber positioning, there are problems that the traditional dimensionality reduction algorithm has a high processing delay, cannot meet the requirements of high-speed cotton flow, and is prone to missed detection; lacks dynamic feature screening, resulting in a low signal-to-noise ratio and a high false detection rate; the static parameters cannot be dynamically optimized, the multi-machine collaborative performance decays, and the classification accuracy is limited. Summary of the Invention

[0004] Based on this, it is necessary to provide a cotton lint foreign fiber cleaning and detection system based on visual recognition for the above technical problems, so as to solve the problems that the traditional dimensionality reduction algorithm has a high processing delay, cannot meet the requirements of high-speed cotton flow, and is prone to missed detection; lacks dynamic feature screening, resulting in a low signal-to-noise ratio and a high false detection rate; the static parameters cannot be dynamically optimized, the multi-machine collaborative performance decays, and the classification accuracy is limited.

[0005] In a first aspect, the present application provides a cotton lint foreign fiber cleaning and detection system based on visual recognition, including:

[0006] A hyperspectral acquisition and preprocessing module, configured to perform multi-band scanning on the cotton flow through a hyperspectral imager to generate standardized spectral data;

[0007] A tensor block processing module, configured to construct a three-dimensional tensor from the standardized spectral data according to the spatial dimension and the spectral dimension, and divide the three-dimensional tensor into multiple sub-tensors according to the spatial dimension;

[0008] A lightweight dimensionality reduction processing module, configured to perform truncated high-order singular value decomposition processing on each sub-tensor, retain the main components of the core tensor and remove the secondary components, and generate a dimensionality-reduced sub-tensor;

[0009] A spectral-spatial fusion detection module, configured to splice the dimensionality-reduced sub-tensors into a global feature map according to the spatial positions, screen the foreign fiber feature regions based on the spectral similarity, and generate a candidate foreign fiber mask;

[0010] A dynamic feedback control module, configured to trigger a cleaning device to separate the foreign fibers according to the candidate foreign fiber mask, and dynamically adjust the block size and the dimensionality reduction parameters.

[0011] Further, perform truncated higher-order singular value decomposition on each sub-tensor, retain the principal components of the core tensor and remove the minor components, and generate the reduced-dimensional sub-tensor, including:

[0012] Based on the sub-tensor after block processing, perform truncated higher-order singular value decomposition to generate a core tensor;

[0013] Based on the variance contribution rate of the feature channels in the core tensor, perform weight pruning to generate the pruned core tensor;

[0014] Perform dimensionality compression on the pruned core tensor to generate the reduced-dimensional sub-tensor.

[0015] Further, based on the sub-tensor after block processing, perform truncated higher-order singular value decomposition to generate a core tensor, including:

[0016] Perform singular value decomposition on the sub-tensor after block processing, retain the first k principal components, and generate a core tensor;

[0017] Perform minor component removal on the core tensor to generate the truncated core tensor.

[0018] Further, based on the variance contribution rate of the feature channels in the core tensor, perform weight pruning to generate the pruned core tensor, including:

[0019] Perform calculation processing on the variance contribution rate of the feature channels of the core tensor to generate variance contribution rate distribution data;

[0020] Based on the real-time processing delay, perform dynamic threshold adjustment on the variance contribution rate distribution data, delete the low-contribution rate feature channels, and generate the pruned core tensor.

[0021] Further, splice the reduced-dimensional sub-tensors according to the spatial positions into a global feature map, and screen the foreign fiber feature regions based on the spectral similarity to generate a candidate foreign fiber mask, including:

[0022] Based on the reduced-dimensional sub-tensor, perform spatial position splicing processing to generate a global feature map;

[0023] Based on the global feature map and the spectral angle matching algorithm, perform pixel spectral similarity calculation processing to generate a similarity distribution map;

[0024] Based on the similarity distribution map, perform region clustering processing to generate a candidate foreign fiber mask.

[0025] Further, based on the global feature map and the spectral angle matching algorithm, perform pixel spectral similarity calculation processing to generate a similarity distribution map, including:

[0026] Perform reference vector extraction processing on the foreign fiber standard spectral curve to generate a reference vector;

[0027] Perform cosine value of the included angle calculation processing based on the global feature map and the reference vector to generate a similarity distribution map.

[0028] Furthermore, separate foreign fibers according to the candidate foreign fiber mask trigger cleaning device, and dynamically adjust the block size and dimensionality reduction parameters, including:

[0029] Perform pneumatic nozzle array trigger processing based on the coordinate information of the candidate foreign fiber mask to complete foreign fiber separation;

[0030] Perform dynamic adjustment processing of the block size and dimensionality reduction parameters based on the statistical results of the single-frame processing delay and the feature retention rate to generate optimized block size and dimensionality reduction parameters.

[0031] Furthermore, construct a three-dimensional tensor from the normalized spectral data according to the spatial dimension and the spectral dimension, and divide the three-dimensional tensor into multiple sub-tensors according to the spatial dimension, including:

[0032] Perform spatial region division processing on the normalized spectral data based on the spatial dimension of the normalized spectral data to generate multiple rectangular regions;

[0033] Integrate the spectral band data of each rectangular region to generate a sub-tensor;

[0034] Independently process the sub-tensors through parallel computing channels to generate sub-tensors after block processing.

[0035] In a second aspect, the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of any method in the first aspect of the present application are implemented.

[0036] In a third aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, and is characterized in that when the computer program is executed by a processor, the steps of any method in the first aspect of the present application are implemented.

[0037] The technical solutions provided by this application include the following technical effects: By providing a lint foreign fiber cleaning and detection system based on visual recognition, including: a hyperspectral acquisition and preprocessing module for performing multi-band scanning on cotton flow through a hyperspectral imager to generate standardized spectral data; a tensor block processing module for constructing a three-dimensional tensor from the standardized spectral data according to the spatial dimension and spectral dimension, and dividing the three-dimensional tensor into multiple sub-tensors according to the spatial dimension; a lightweight dimensionality reduction processing module for performing truncated higher-order singular value decomposition on each sub-tensor, retaining the principal components of the core tensor and removing the secondary components to generate a dimensionality-reduced sub-tensor; a spectral-spatial fusion detection module for splicing the dimensionality-reduced sub-tensors into a global feature map according to spatial positions, screening foreign fiber feature regions based on spectral similarity to generate a candidate foreign fiber mask; and a dynamic feedback control module for triggering a cleaning device to separate foreign fibers according to the candidate foreign fiber mask, and dynamically adjusting the block size and dimensionality reduction parameters to solve the problems of high processing delay of traditional dimensionality reduction algorithms, inability to meet the requirements of high-speed cotton flow, and easy missed detection; lack of dynamic feature screening resulting in low signal-to-noise ratio and high false detection rate; static parameters unable to be dynamically optimized, multi-machine collaboration performance degradation, and limited classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0039] Figure 1 It is a structural diagram of a lint foreign fiber cleaning and detection system based on visual recognition in an embodiment of the present invention;

[0040] Figure 2 It is a flowchart of performing truncated higher-order singular value decomposition on each sub-tensor in an embodiment of the present invention, retaining the principal components of the core tensor and removing the secondary components to generate a dimensionality-reduced sub-tensor. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] In order to make the above objects, features, and advantages of this application more obvious and understandable, the following will provide a detailed description of the specific implementation of this application with reference to the drawings. Many specific details are set forth in the following description to fully understand this application. However, this application can be implemented in many other ways different from those described herein. Those skilled in the art can make similar improvements without departing from the connotation of the application. Therefore, this application is not limited by the specific embodiments disclosed below.

[0042] As Figure 1As shown in the figure, the present application provides a lint foreign fiber cleaning and detection system 100 based on visual recognition, including:

[0043] A hyperspectral acquisition and preprocessing module 101, which is used to perform multi-band scanning on the cotton flow through a hyperspectral imager to generate standardized spectral data.

[0044] Specifically, according to the characteristics of the cotton flow and the detection requirements of foreign fibers, determine the appropriate spectral band range and resolution, and set the parameters of the hyperspectral imager to ensure that the collected spectral data has sufficient details and accuracy. Install the hyperspectral imager above or on the side of the cotton flow conveying device to ensure that the field of view of the imager can cover the entire cotton flow area. During the high-speed movement of the cotton flow, the imager continuously takes pictures at a certain frame rate to obtain the spectral information of the cotton flow at different positions. The hyperspectral imager converts the optical signal into an electrical signal through a detector to generate an original spectral data cube. This cube contains two-dimensional image information of the cotton flow in the spatial dimension and spectral information of multiple bands in the spectral dimension. Perform radiometric calibration on the original spectral data to convert the digital signal output by the detector into a physical radiance value.

[0045] This step needs to consider the response function of the imager, the spectral characteristics of the light source, and the influence of ambient light to ensure the accuracy and comparability of the spectral data. Perform spectral correction to eliminate the influence of the instrument's own characteristics, environmental factors, etc. on the spectral data. Among them, it includes calibration of the spectral wavelength, correction of the spectral response function, etc., to ensure spectral matching and consistency between different bands. Perform spatial correction on the spectral data, including geometric correction and radiometric correction. Geometric correction is used to eliminate geometric distortion in the image to ensure the accurate spatial position and shape of the cotton flow; radiometric correction is used to adjust the brightness and contrast of the image to improve the image quality. Convert the preprocessed spectral data into a standardized data format for subsequent data processing and analysis.

[0046] A tensor block processing module 102, which is used to construct a three-dimensional tensor from the standardized spectral data according to the spatial dimension and the spectral dimension, and divide the three-dimensional tensor into multiple sub-tensors according to the spatial dimension.

[0047] Specifically, the standardized spectral data usually has a three-dimensional structure, namely rows (spatial dimension), columns (spatial dimension), and bands (spectral dimension). Each pixel has a corresponding spectral reflectance value at different bands. The data is arranged in the order of spatial dimension and spectral dimension to form a three-dimensional array, i.e., a tensor. The standardized spectral data is integrated into a three-dimensional tensor according to a determined dimension order. According to actual requirements and computing resources, the three-dimensional tensor is segmented by the spatial dimension. Common strategies include equally spaced segmentation by rows or columns, or irregular segmentation according to specific regional divisions. According to the determined segmentation strategy, the three-dimensional tensor is segmented into multiple sub-tensors. Throughout the process, it is necessary to ensure the integrity and consistency of the data so that subsequent processing and analysis can be carried out accurately. At the same time, the segmented sub-tensors should be able to cover the entire cotton flow area to avoid missing any area that may contain foreign fibers.

[0048] The lightweight dimensionality reduction processing module 103 is used to perform truncated higher-order singular value decomposition processing on each sub-tensor, retain the principal components of the core tensor and remove the secondary components, and generate a dimensionality-reduced sub-tensor.

[0049] Specifically, the segmented sub-tensors are used as inputs. Each sub-tensor has a spatial dimension and a spectral dimension. Perform higher-order singular value decomposition (HOSVD, Higher-Order Singular Value Decomposition) on the sub-tensor, and decompose the sub-tensor into a series of singular values and corresponding singular vectors. According to the set threshold or the number of principal components to be retained, retain the first k largest singular values and their corresponding singular vectors, and discard the remaining smaller singular values and singular vectors. This step realizes the dimensionality reduction of the sub-tensor and removes the secondary components. Through the truncated singular values and singular vectors, the core tensor is reconstructed. The core tensor retains the main features and information of the original sub-tensor. The core tensor is output as the dimensionality-reduced sub-tensor for subsequent processing and analysis. Through the above steps, the truncated higher-order singular value decomposition processing can effectively reduce the dimension of the sub-tensor, highlight the main features, reduce the data volume, improve the computing efficiency, and at the same time retain the information useful for tasks such as foreign fiber detection.

[0050] The spectral-spatial fusion detection module 104 is used to splice the dimensionality-reduced sub-tensors into a global feature map according to the spatial position, screen the foreign fiber feature regions based on spectral similarity, and generate a candidate foreign fiber mask.

[0051] Specifically, the reduced-dimensional sub-tensor obtained after truncated high-order singular value decomposition is used as input, and the above sub-tensor retains the key features of the cotton flow. The sub-tensors are aligned according to their spatial positions in the original cotton flow. This step requires recording the starting and ending positions of each sub-tensor in the row and column directions. The aligned sub-tensors are spliced in the original spatial order to form a complete global feature map. This step requires ensuring that the spliced feature map is continuous and non-repetitive in space. The spectral angle matching algorithm is used to calculate the similarity between the spectrum of each pixel in the global feature map and the known foreign fiber standard spectrum curve. This step measures the similarity by calculating the cosine value of the angle between the spectra. Based on the calculated similarity values, a similarity distribution map is generated. Each pixel value in the similarity distribution map represents the degree of similarity between the pixel spectrum at the corresponding position and the foreign fiber standard spectrum. The similarity distribution map is clustered in regions, and adjacent pixels with high similarity are clustered into one region, thereby screening out the foreign fiber feature region. Based on the screened foreign fiber feature region, a candidate foreign fiber mask is generated. The pixel values of the foreign fiber area in the mask are marked as a specific value (such as 1), while the pixel values of the non-foreign fiber area are marked as another specific value (such as 0) for subsequent processing. Through the above steps, the sub-tensors after dimensionality reduction can be integrated into a global feature map, and the foreign fiber feature area can be accurately screened out based on spectral similarity, providing accurate positioning information for subsequent foreign fiber removal operations.

[0052] The dynamic feedback control module 105 is used to trigger the removal device to separate foreign fibers according to the candidate foreign fiber mask, and dynamically adjust the block size and dimension reduction parameters.

[0053] Specifically, the candidate foreign fiber mask generated based on spectral similarity screening is used as input, which marks the area in the global feature map that may contain foreign fibers. The coordinate information of the foreign fiber area is extracted from the candidate foreign fiber mask to determine the specific location of the foreign fiber in the cotton flow. According to the extracted coordinate information, the action of the pneumatic nozzle array is controlled to trigger the corresponding nozzle jet to separate the foreign fiber from the cotton flow. This step requires precise control to ensure that the foreign fiber can be effectively removed while avoiding unnecessary interference to normal cotton fibers. During operation, key performance indicators such as single-frame processing delay and feature retention rate are counted in real time. Single-frame processing delay reflects the system's processing speed for each frame of data, while feature retention rate measures the degree of retention of the main components during the dimensionality reduction process. Based on the statistical results, an adjustment strategy for the block size and dimensionality reduction parameters is formulated. According to the adjustment strategy, the block size and dimensionality reduction parameters are dynamically updated to generate optimized parameter settings. This step needs to find a balance between ensuring processing efficiency and detection accuracy to adapt to different working conditions such as cotton flow speed and foreign fiber density.

[0054] Through the above steps, foreign fibers can be removed in a timely manner according to the candidate foreign fiber mask, and the block size and dimensionality reduction parameters can be dynamically optimized according to the actual operation conditions, thereby improving the overall performance and adaptability of the foreign fiber cleaning and detection system.

[0055] A cotton lint foreign fiber cleaning and detection system based on visual recognition provided by an embodiment of the present application includes a hyperspectral acquisition and preprocessing module for multi-band scanning of cotton flow through a hyperspectral imager to generate standardized spectral data; a tensor block processing module for constructing a three-dimensional tensor from the standardized spectral data according to the spatial dimension and the spectral dimension, and dividing the three-dimensional tensor into multiple sub-tensors according to the spatial dimension; a lightweight dimensionality reduction processing module for performing truncated higher-order singular value decomposition processing on each sub-tensor, retaining the main components of the core tensor and removing the secondary components to generate a dimensionality-reduced sub-tensor; a spectral-spatial fusion detection module for stitching the dimensionality-reduced sub-tensors into a global feature map according to the spatial position, screening foreign fiber feature regions based on spectral similarity to generate a candidate foreign fiber mask; and a dynamic feedback control module for triggering a cleaning device to separate foreign fibers according to the candidate foreign fiber mask, and dynamically adjusting the block size and dimensionality reduction parameters to solve the problems of high processing delay of traditional dimensionality reduction algorithms, inability to meet the requirements of high-speed cotton flow, and easy missed detection; lack of dynamic feature screening, resulting in low signal-to-noise ratio and high false detection rate; static parameters cannot be dynamically optimized, multi-machine collaborative performance decays, and classification accuracy is limited.

[0056] Further, as Figure 2 shown, performing truncated higher-order singular value decomposition processing on each sub-tensor, retaining the main components of the core tensor and removing the secondary components to generate a dimensionality-reduced sub-tensor includes:

[0057] S201: Based on the sub-tensor after block processing, perform truncated higher-order singular value decomposition processing to generate a core tensor;

[0058] S202: Based on the variance contribution rate of the feature channels in the core tensor, perform weight pruning processing to generate a pruned core tensor;

[0059] S203: Perform dimension compression processing on the pruned core tensor to generate a dimensionality-reduced sub-tensor.

[0060] Specifically, the sub-tensor after block processing is used as the input, and this sub-tensor contains the local spectral information of the cotton flow. Perform HOSVD on the sub-tensor and decompose it into a series of singular values and corresponding singular vectors. The singular values represent the importance of the corresponding singular vectors. According to the set threshold or the number of principal components to be retained, retain the top k largest singular values and their corresponding singular vectors, and discard the remaining smaller singular values and singular vectors. This step realizes the dimensionality reduction of the sub-tensor, removes the secondary components, and generates the core tensor. For each feature channel in the core tensor, calculate its variance contribution rate. The variance contribution rate reflects the importance of this feature channel in the overall data. Dynamically adjust the threshold for the calculated variance contribution rate distribution data based on the real-time processing delay. If the processing delay is high, the threshold can be appropriately reduced to reduce the number of retained feature channels to improve the calculation efficiency. According to the adjusted threshold, delete the feature channels with low contribution rates to generate the pruned core tensor. This step further reduces the data volume while retaining the main features. Select a suitable dimensionality compression algorithm, such as principal component analysis (PCA), linear discriminant analysis (LDA), etc., to perform dimensionality compression on the pruned core tensor. Through the dimensionality compression algorithm, compress the pruned core tensor to a lower dimension to generate the dimensionality-reduced sub-tensor. This step further reduces the data volume, improves the calculation efficiency, and retains the information useful for tasks such as foreign fiber detection.

[0061] Through the above steps, it is possible to effectively perform dimensionality reduction processing on each sub-tensor, highlight the main features, reduce the data volume, improve the calculation efficiency, and provide efficient data support for subsequent foreign fiber detection and removal operations.

[0062] Furthermore, based on the sub-tensor after block processing, perform truncated higher-order singular value decomposition processing to generate the core tensor, including:

[0063] Perform singular value decomposition processing on the sub-tensor after block processing, retain the top k principal components, and generate the core tensor;

[0064] Perform secondary component removal processing on the core tensor to generate the truncated core tensor.

[0065] Specifically, the sub-tensors after block processing are subjected to higher-order singular value decomposition (HOSVD). HOSVD is a multilinear algebra method that can decompose a high-dimensional tensor into a set of singular values and corresponding singular vectors. During the decomposition process, the first k principal components are retained. These principal components correspond to the largest k singular values, which can explain most of the variance in the data, thereby generating a core tensor. Further processing is performed on the core tensor to remove its minor components. This step can be achieved by setting a threshold to eliminate the singular values less than the threshold and their corresponding singular vectors, thereby generating a truncated core tensor. The truncated core tensor retains the main feature information in the original sub-tensor while reducing the data dimension and complexity, providing a more efficient and concise data representation for subsequent feature extraction and analysis.

[0066] Furthermore, based on the variance contribution rate of the feature channels in the core tensor, weight pruning is performed to generate a pruned core tensor, including:

[0067] Calculating the variance contribution rate of the feature channels in the core tensor to generate variance contribution rate distribution data;

[0068] Performing dynamic threshold adjustment on the variance contribution rate distribution data based on the real-time processing delay to delete the low contribution rate feature channels and generate a pruned core tensor.

[0069] Specifically, taking the core tensor generated by truncated higher-order singular value decomposition as the input, which retains the main feature information of the sub-tensor. For each feature channel in the core tensor, calculate its variance. The variance reflects the degree of dispersion of the data in this feature channel. The larger the variance, the more information this feature channel contains. Divide the variance of each feature channel by the sum of the variances of all feature channels to obtain the variance contribution rate of this feature channel. The variance contribution rate represents the proportion of this feature channel in the overall data and reflects its contribution degree to the data features. Arrange the variance contribution rates of all feature channels in a certain order to form variance contribution rate distribution data. This step helps to understand the importance distribution of each feature channel. During operation, the processing delay of single-frame data is detected in real time. The processing delay reflects the data processing speed and is one of the important indicators to measure performance.

[0070] Dynamically adjust the threshold for retaining feature channels according to the magnitude of the real-time processing delay. For example, when the processing delay is high, appropriately reduce the retention threshold to decrease the number of retained feature channels, thereby reducing the computational complexity and improving the processing speed; conversely, when the processing delay is low, the retention threshold can be appropriately increased to retain more feature channels to improve the detection accuracy. Delete the feature channels whose variance contribution rate is lower than this threshold according to the adjusted threshold. This step further simplifies the data structure and improves the computational efficiency by removing the channels that contribute less to the data features, while retaining the main features of the data to a certain extent. The retained high-contribution feature channels are composed into a new core tensor, that is, the pruned core tensor. While retaining the key features, this core tensor has a lower dimension and less computational volume, which is beneficial for subsequent processing and analysis.

[0071] Through the above steps, it is possible to dynamically perform weight pruning processing according to the variance contribution rate of the feature channels in the core tensor, generate the pruned core tensor, thereby achieving a balance between ensuring processing efficiency and detection accuracy, and improving the overall performance and adaptability of the foreign fiber cleaning detection system.

[0072] Furthermore, splice the dimension-reduced sub-tensors according to the spatial position into a global feature map, and screen the foreign fiber feature regions based on the spectral similarity to generate a candidate foreign fiber mask, including:

[0073] Based on the dimension-reduced sub-tensors, perform spatial position splicing processing to generate a global feature map;

[0074] Based on the global feature map and the spectral angle matching algorithm, perform pixel spectral similarity calculation processing to generate a similarity distribution map;

[0075] Based on the similarity distribution map, perform region clustering processing to generate a candidate foreign fiber mask.

[0076] Specifically, the dimension-reduced sub-tensors obtained after truncated higher-order singular value decomposition and weight pruning are used as inputs. These sub-tensors retain the key features of the cotton flow. According to the spatial positions of the sub-tensors in the original cotton flow, they are aligned. This step requires recording the starting and ending positions of each sub-tensor in the row and column directions to ensure that they can be accurately stitched together. The aligned sub-tensors are stitched together in the original spatial order to form a complete global feature map. This step requires ensuring that the stitched feature map is continuous and non-repetitive in space to truly reflect the overall features of the cotton flow. The stitched global feature map is used as an input, and the spectral angle matching algorithm is employed to calculate the pixel spectral similarity. The spectral angle matching algorithm measures the similarity by calculating the cosine value of the angle between the spectrum of each pixel and the known foreign fiber standard spectral curve. Based on the calculated similarity values, a similarity distribution map is generated. Each pixel value in the similarity distribution map represents the similarity between the pixel spectrum at the corresponding position and the foreign fiber standard spectrum. The higher the similarity value, the more likely it is to be a foreign fiber.

[0077] The generated similarity distribution map, which reflects the similarity between each pixel in the cotton flow and the foreign fiber spectrum, is used as an input. An appropriate region clustering algorithm, such as the connected component labeling algorithm, mean shift clustering algorithm, etc., is selected to perform clustering on the similarity distribution map. Through region clustering, adjacent pixels with high similarity are clustered into one region, thereby screening out the foreign fiber feature regions. A candidate foreign fiber mask is generated based on the above regions. The pixel values in the foreign fiber regions of the mask are marked with a specific value, while the pixel values in the non-foreign fiber regions are marked with another specific value for subsequent processing.

[0078] Through the above steps, the dimension-reduced sub-tensors can be integrated into a global feature map, and the foreign fiber feature regions can be accurately screened out based on spectral similarity, providing precise positioning information for subsequent foreign fiber removal operations, thereby improving the detection accuracy and efficiency of the foreign fiber cleaning detection system.

[0079] Furthermore, based on the global feature map and the spectral angle matching algorithm, pixel spectral similarity calculation processing is performed to generate a similarity distribution map, including:

[0080] The reference vector extraction process is performed on the foreign fiber standard spectral curve to generate a reference vector;

[0081] Based on the global feature map and the reference vector, the cosine value of the angle is calculated to generate a similarity distribution map.

[0082] Specifically, the standard spectral curve of foreign fibers is processed and key features are extracted to generate a reference vector, which represents the typical spectral characteristics of foreign fibers. Each pixel spectrum in the global feature map is compared with the reference vector, and the similarity value is determined by calculating the cosine value of the angle between them, reflecting the degree of similarity between each pixel and the foreign fiber spectrum. Afterwards, the similarity values of all pixels are organized according to their spatial positions in the global feature map to form a two-dimensional similarity distribution map, in which areas with higher brightness represent areas with higher similarity to the foreign fiber spectrum, which may be foreign fiber characteristic areas.

[0083] Furthermore, the removal device is triggered to separate the foreign fibers according to the candidate foreign fiber mask, and the block size and dimension reduction parameters are dynamically adjusted, including:

[0084] Based on the coordinate information of the candidate foreign fiber mask, the pneumatic nozzle array is triggered to complete the foreign fiber separation;

[0085] Based on the statistical results of single-frame processing delay and feature retention rate, the block size and dimensionality reduction parameters are dynamically adjusted to generate optimized block size and dimensionality reduction parameters.

[0086] Specifically, the coordinate information of the foreign fiber area is extracted from the candidate foreign fiber mask to determine the specific position of the foreign fiber in the cotton flow. According to the extracted coordinate information, the action of the pneumatic nozzle array is controlled to trigger the corresponding nozzle jet to separate the foreign fiber from the cotton flow. During the operation, key performance indicators such as single-frame processing delay and feature retention rate are counted in real time. According to the statistical results, the adjustment strategy of the block size and dimensionality reduction parameters is formulated. For example, if the single-frame processing delay is too high, it may be necessary to reduce the block size to reduce the amount of calculation; if the feature retention rate is insufficient, it may be necessary to increase the number of retained principal components. According to the adjustment strategy, the block size and dimensionality reduction parameters are dynamically updated to generate optimized parameter settings. This step needs to find a balance between ensuring processing efficiency and detection accuracy to adapt to different cotton flow speeds, foreign fiber density and other working conditions. Through the above steps, foreign fibers can be removed in time according to the candidate foreign fiber mask, and the block size and dimensionality reduction parameters can be dynamically optimized according to the actual operation conditions, thereby improving the overall performance and adaptability of the foreign fiber cleaning detection system.

[0087] Furthermore, the standardized spectral data is constructed into a three-dimensional tensor according to the spatial dimension and the spectral dimension, and the three-dimensional tensor is divided into multiple sub-tensors according to the spatial dimension, including:

[0088] Based on the spatial dimension of the standardized spectral data, the standardized spectral data is processed by spatial region division to generate a plurality of rectangular regions;

[0089] Integrate the spectral band data of each rectangular area to generate a sub-tensor;

[0090] The sub-tensors are independently processed through parallel computing channels to generate the sub-tensors after block processing.

[0091] Specifically, according to the spatial dimension of the normalized spectral data, it is divided into multiple rectangular regions, and each region corresponds to a local part of the cotton flow. The spectral band data of each rectangular region is integrated to form a sub-tensor, and each sub-tensor contains the spectral information of a specific spatial region. The individual sub-tensors are independently processed through parallel computing channels to improve the efficiency of data processing, and the sub-tensors after block processing are obtained, providing a basis for subsequent foreign fiber detection.

[0092] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0093] In one embodiment, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above-described system embodiments are implemented.

[0094] In one embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-described system embodiments are implemented.

[0095] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial descriptions of the method embodiments. The device embodiments described above are only illustrative. The components described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure solution. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0096] The above-described embodiments merely represent several implementation manners of the embodiments of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the embodiments of the application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the embodiments of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the embodiments of the present application.

Claims

1. A lint foreign fiber cleaning and detection system based on visual recognition, characterized in that, The system includes: A hyperspectral acquisition and preprocessing module, which is used to perform multi-band scanning on the cotton flow through a hyperspectral imager to generate standardized spectral data; A tensor block processing module, which is used to construct a three-dimensional tensor from the standardized spectral data according to the spatial dimension and the spectral dimension, and divide the three-dimensional tensor into multiple sub-tensors according to the spatial dimension; A lightweight dimensionality reduction processing module, which is used to perform truncated higher-order singular value decomposition processing on each of the sub-tensors, retain the principal components of the core tensor and remove the secondary components, and generate a dimensionality-reduced sub-tensor; A spectral-spatial fusion detection module, which is used to splice the dimensionality-reduced sub-tensors into a global feature map according to the spatial position, screen the foreign fiber feature regions based on the spectral similarity, and generate a candidate foreign fiber mask; A dynamic feedback control module, which is used to trigger a cleaning device to separate the foreign fibers according to the candidate foreign fiber mask, and dynamically adjust the block size and the dimensionality reduction parameters.

2. The lint foreign fiber cleaning and detection system based on visual recognition according to claim 1, wherein, The performing truncated higher-order singular value decomposition processing on each of the sub-tensors, retaining the principal components of the core tensor and removing the secondary components, and generating a dimensionality-reduced sub-tensor includes: Performing truncated higher-order singular value decomposition processing based on the sub-tensor after block processing to generate a core tensor; Performing weight pruning processing based on the variance contribution rate of the feature channels in the core tensor to generate a pruned core tensor; Performing dimensionality compression processing on the pruned core tensor to generate the dimensionality-reduced sub-tensor.

3. The lint foreign fiber cleaning and detection system based on visual recognition according to claim 2, characterized in that, The performing truncated higher-order singular value decomposition processing based on the sub-tensor after block processing to generate a core tensor includes: Performing singular value decomposition processing on the sub-tensor after block processing, retaining the first k principal components, and generating the core tensor; Performing secondary component removal processing on the core tensor to generate the truncated core tensor.

4. The lint foreign fiber cleaning and detection system based on visual recognition according to claim 2, characterized in that, The performing weight pruning processing based on the variance contribution rate of the feature channels in the core tensor to generate a pruned core tensor includes: Performing feature channel variance contribution rate calculation processing on the core tensor to generate variance contribution rate distribution data; Performing dynamic threshold adjustment processing on the variance contribution rate distribution data based on the real-time processing delay, deleting the low contribution rate feature channels, and generating the pruned core tensor.

5. The lint foreign fiber cleaning and detection system based on visual recognition according to claim 1, characterized in that, The splicing the dimensionality-reduced sub-tensors into a global feature map according to the spatial position, screening the foreign fiber feature regions based on the spectral similarity, and generating a candidate foreign fiber mask includes: Performing spatial position splicing processing based on the dimensionality-reduced sub-tensor to generate a global feature map; Performing pixel spectral similarity calculation processing based on the global feature map and the spectral angle matching algorithm to generate a similarity distribution map; Performing region clustering processing based on the similarity distribution map to generate the candidate foreign fiber mask.

6. The ginned lint foreign fiber cleaning and detection system based on visual recognition according to claim 5, characterized in that, The performing pixel spectral similarity calculation processing based on the global feature map and the spectral angle matching algorithm to generate a similarity distribution map includes: Performing reference vector extraction processing on the foreign fiber standard spectral curve to generate a reference vector; Performing cosine value of the included angle calculation processing based on the global feature map and the reference vector to generate the similarity distribution map.

7. A cotton lint foreign fiber cleaning and detection system based on visual recognition according to claim 1, characterized in that The triggering a cleaning device to separate the foreign fibers according to the candidate foreign fiber mask, and dynamically adjusting the block size and the dimensionality reduction parameters includes: Based on the coordinate information of the candidate foreign fiber mask, perform pneumatic nozzle array triggering processing to complete foreign fiber separation; Based on the statistical results of single-frame processing delay and feature retention rate, perform dynamic adjustment processing on the block size and dimensionality reduction parameters to generate the optimized block size and dimensionality reduction parameters.

8. A lint foreign fiber cleaning and detection system based on visual recognition according to claim 1, characterized in that The step of constructing a three-dimensional tensor from the standardized spectral data according to the spatial dimension and spectral dimension, and dividing the three-dimensional tensor into multiple sub-tensors according to the spatial dimension includes: Based on the spatial dimension of the standardized spectral data, perform spatial region division processing on the standardized spectral data to generate multiple rectangular regions; Integrate the spectral band data of each rectangular region to generate the sub-tensor; Independently process the sub-tensor through a parallel computing channel to generate the sub-tensor after block processing.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of a cotton lint foreign fiber cleaning and detection system based on visual recognition according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of a cotton lint foreign fiber cleaning and detection system based on visual recognition according to any one of claims 1 to 8.