Foreign fiber identification method and device, equipment and storage medium

By acquiring the fusion of raw cotton images and spectral images, and using the target recognition network based on ResNet18 for heterofiber recognition, the problem of low heterofiber recognition efficiency and accuracy in the prior art is solved, and more efficient and accurate heterofiber recognition is achieved to ensure the stability of yarn quality.

CN119723538APending Publication Date: 2025-03-28XINJIANG UNIVERSITY +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411682411.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, heterofiber identification efficiency and accuracy are low, making it difficult to effectively detect and identify opposite-sex fibers in cotton, affecting the quality of textile products.

Method used

A heterofiber recognition method is adopted to obtain the fusion of raw cotton images and spectral images and input the target recognition network for identification. The target recognition network is based on the residual network update of the original ResNet18 convolutional neural network, including a pyramid convolutional layer and a 1×1 convolutional layer, which can introduce multi-scale perception capabilities and dimensionality reduction features to improve the recognition accuracy.

Benefits of technology

It improves the recognition efficiency and accuracy of the opposite-sex fibers, enriches image information, reduces missed detection, and ensures the stability of yarn quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723538A_ABST
    Figure CN119723538A_ABST
Patent Text Reader

Abstract

The invention discloses a foreign fiber recognition method, device and equipment and a storage medium, foreign fibers are recognized through a target recognition network, the recognition efficiency is improved, a target raw cotton image input into the target recognition network is obtained based on fusion of a shot raw cotton image and a raw cotton spectral image, image information is enriched, and the recognition efficiency is improved. The foreign fiber identification accuracy is improved; moreover, the target recognition network is obtained by updating a residual network of an original ResNet18 convolutional neural network, a convolutional layer in a first residual module in the original ResNet18 convolutional neural network is replaced by a pyramid convolutional layer, and the pyramid convolutional layer can introduce multi-scale sensing ability into the network by using convolution kernels of different sizes, so that the accuracy of target recognition is improved. Compared with the prior art, the method has the advantages that the receptive field of each convolution layer is expanded, missing detection is reduced, the foreign fiber recognition accuracy is improved, the pyramid convolution layer is filled based on half of the convolution kernel, the fringe effect can be reduced, more original image information can be reserved, and the foreign fiber recognition accuracy is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of cotton foreign fiber detection, and specifically relates to a foreign fiber identification method, device, equipment and storage medium. Background Art

[0002] Foreign fibers in cotton (referred to as foreign fibers) refer to non-cotton fibers and non-natural color fibers mixed in cotton, such as cotton shells, cotton seeds, plastics, hair, chemical fibers, paper pieces, etc. These foreign fibers mixed in raw cotton are easily broken into scattered single fibers, which are difficult to remove in the subsequent textile processing, and will have a serious adverse effect on the quality of textile products. These foreign fibers will not only reduce the spinning efficiency, but also cause defects on the cloth surface and reduce the product grade. In the national standard GB1103-2012, foreign fiber content is used as an important basis for evaluating cotton quality. Before spinning production, if the foreign fibers in cotton can be effectively detected, identified and removed, the mixing of foreign fibers can be avoided to cause printing and dyeing defects, which can provide a guarantee for the stability of yarn quality in the subsequent spinning process. With the development of deep learning technology, especially the application of convolutional neural network (CNN) in the field of image recognition, new possibilities have been provided for foreign fiber identification. Therefore, studying the detection method of cotton foreign fibers is of great value to improve the quality of cotton textiles. Summary of the invention

[0003] In view of the deficiencies in the prior art, an object of the present invention is to provide a foreign fiber identification method, device, equipment and storage medium to solve the problem of low foreign fiber identification efficiency and accuracy in the prior art.

[0004] According to one aspect of the present application, a foreign fiber identification method is disclosed, the method comprising:

[0005] Acquire a raw cotton image, wherein the raw cotton image is obtained by photographing a target raw cotton, wherein the target raw cotton is obtained after impurities are screened from the initial raw cotton, wherein the target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer, and the target impurities include branches and leaves, mud and stones, and broken seeds;

[0006] Acquire a spectral image of raw cotton, wherein the spectral image of raw cotton is obtained by taking a spectral camera;

[0007] Performing correction processing on the raw cotton spectral image to obtain a raw cotton corrected image;

[0008] Performing image fusion on the raw cotton image and the raw cotton corrected image to obtain a target raw cotton image;

[0009] The target raw cotton image is input into a target recognition network so that the target recognition network recognizes the target raw cotton image to output category information of foreign fibers corresponding to the target raw cotton image, wherein the target recognition network is obtained based on a residual network update of an original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, respectively, and the pyramid convolution layer is filled based on half of the convolution kernel.

[0010] In some embodiments, acquiring the raw cotton spectral image comprises:

[0011] Based on a spectral range of 920-2526nm, a camera exposure time of 6ms, a camera frame rate of 70.0133Hz, a distance between a lens and the target raw cotton of 33.5cm, and a camera pixel of 384×288, a spectral camera takes pictures of the target raw cotton at the target position; the target position is a reference white board with a diffuse reflectivity greater than 90%, the target raw cotton is placed on the reference white board, and a focus adjustment plate is installed above the reference white board.

[0012] In some embodiments, the correcting the raw cotton spectral image to obtain the raw cotton corrected image includes:

[0013] The raw cotton spectral image is subjected to a black and white plate correction process to obtain the raw cotton corrected image, wherein the black and white plate correction process is determined based on the following formula:

[0014]

[0015] Among them, R ref is the corrected image of raw cotton, DN raw is the original spectrum image of raw cotton, DN white is the calibration image of the reference whiteboard, DN dark is the calibration image of the dark current of the spectral camera.

[0016] In some embodiments, the target recognition network further includes a last layer activation function, and the last layer activation function is a PReLU activation function.

[0017] In some embodiments, the target recognition network recognizes the target raw cotton image to output the category information of the foreign fiber corresponding to the target raw cotton image, including:

[0018] The target recognition network performs image adaptive adjustment on the image aspect ratio of the target raw cotton image to obtain a target adjusted image;

[0019] The target recognition network extracts sub-scale features from the target adjustment image based on an updated residual network to obtain a multi-scale feature map;

[0020] The target recognition network performs category probability prediction on the multi-scale feature map based on a global average fully connected layer to determine the category information of the heterosexual fiber based on the category probability.

[0021] According to another aspect of the present application, a foreign fiber identification device is also disclosed, the device comprising:

[0022] A raw cotton image acquisition module is used to acquire a raw cotton image, wherein the raw cotton image is obtained by photographing a target raw cotton, wherein the target raw cotton is obtained after impurities are screened from the initial raw cotton, wherein the target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer, and the target impurities include branches, leaves, mud and stones, and broken seeds;

[0023] A raw cotton spectral image acquisition module is used to acquire a raw cotton spectral image, wherein the raw cotton spectral image is obtained by taking a spectral camera;

[0024] a raw cotton correction image determination module, which performs correction processing on the raw cotton spectral image to obtain a raw cotton correction image;

[0025] A target raw cotton image determination module is used to perform image fusion on the raw cotton image and the raw cotton correction image to obtain a target raw cotton image;

[0026] An input module is used to input the target raw cotton image into a target recognition network so that the target recognition network recognizes the target raw cotton image and outputs category information of foreign fibers corresponding to the target raw cotton image, wherein the target recognition network is obtained based on a residual network update of an original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, respectively, and the pyramid convolution layer is filled based on half of the convolution kernel.

[0027] According to another aspect of the present application, an electronic device is also disclosed, comprising a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes each step of the foreign fiber identification method as described in any one of the above items.

[0028] According to another aspect of the present application, a computer-readable storage medium is further disclosed, wherein instructions are stored on the computer-readable storage medium, and wherein the instructions, when executed by a processor, implement the steps of any of the above foreign fiber identification methods.

[0029] The present invention includes but is not limited to the following beneficial effects: (1) The present invention recognizes foreign fibers through a target recognition network, thereby improving recognition efficiency, and the target raw cotton image input into the target recognition network is obtained by fusion of the captured raw cotton image and the raw cotton spectral image, which can enrich image information and improve the recognition accuracy of foreign fibers; (2) The target recognition network in the present invention is obtained by updating the residual network of the original ResNet18 convolutional neural network, and the convolution layer in the first residual module in the original ResNet18 convolutional neural network is replaced by a pyramid convolution layer. The pyramid convolution layer can introduce multi-scale perception capabilities in the network by using convolution kernels of different sizes, thereby expanding the receptive field of each convolution layer, effectively processing targets or objects of different sizes, and reducing missed detection. The occurrence of this situation can improve the recognition accuracy of foreign fibers. Furthermore, the pyramid convolution layer is filled based on half of the convolution kernel, which can reduce the edge effect, retain more original image information, and further improve the recognition accuracy of foreign fibers. (3) The convolution layer of the second residual module of the target recognition network in the present invention is a 1×1 convolution layer, which can effectively reduce the number of channels of the input feature map, reducing the amount of calculation and the number of model parameters. (4) The raw cotton spectral image obtained by the spectral camera in the present invention will be further corrected, which can reduce noise interference, fully mine the effective information of the original data, and enrich the image information. (5) The activation function of the last layer in the present invention is the PReLU activation function, which improves the robustness and training stability of the target recognition network. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0031] Figure 1 is a flow chart of a foreign fiber identification method according to an embodiment of the present application;

[0032] Figure 2 is a framework diagram of a residual network of a target recognition network in an embodiment of the present application;

[0033] Figure 3 is a structural block diagram of a foreign fiber identification device according to an embodiment of the present application;

[0034] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The embodiment of the present invention provides a foreign fiber identification method, which includes obtaining a raw cotton image, the raw cotton image is obtained by photographing a target raw cotton, and the target raw cotton is obtained after impurities are screened from the initial raw cotton, wherein the target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer, and the target impurities include branches and leaves, mud and stones, and broken seeds; obtaining a raw cotton spectral image, the raw cotton spectral image is obtained by photographing a spectral camera; correcting the raw cotton spectral image to obtain a raw cotton corrected image; fusing the raw cotton image and the raw cotton corrected image to obtain a target raw cotton image; inputting the target raw cotton image into a In the target recognition network, the target recognition network recognizes the target raw cotton image to output the category information of the foreign fiber corresponding to the target raw cotton image, wherein the target recognition network is obtained based on the residual network update of the original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, and the pyramid convolution layer is filled based on half of the convolution kernel. The technical solution recognizes foreign fibers through a target recognition network, thereby improving recognition efficiency, and the target raw cotton image input to the target recognition network is obtained by fusion of the captured raw cotton image and the raw cotton spectral image, which can enrich image information and improve the recognition accuracy of foreign fibers; further, the target recognition network is obtained by updating the residual network of the original ResNet18 convolutional neural network, and the convolution layer in the first residual module in the original ResNet18 convolutional neural network is replaced by a pyramid convolution layer. The pyramid convolution layer can introduce multi-scale perception capabilities in the network by using convolution kernels of different sizes, expand the receptive field of each convolution layer, effectively process targets or objects of different sizes, reduce the occurrence of missed detection, and thus improve the recognition accuracy of foreign fibers; further, the pyramid convolution layer is filled based on half of the convolution kernel, which can reduce edge effects, retain more original image information, and further improve the recognition accuracy of foreign fibers; further, the convolution layer of the second residual module of the target recognition network is a 1×1 convolution layer, which can effectively reduce the number of channels of the input feature map, thereby reducing the amount of calculation and the number of model parameters.

[0036] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] For ease of understanding, the specific process of the embodiment of the present invention is described below. Specifically, Figure 1 This is a flow chart of the foreign fiber identification method of the present application, and the steps include:

[0038] S100: Acquire a raw cotton image.

[0039] Specifically, the raw cotton image is obtained by taking a photo of the target raw cotton, and the target raw cotton is obtained after the initial raw cotton is screened for impurities, wherein the target impurities in the initial raw cotton can be screened based on the raw cotton impurity analyzer, and the target impurities can include branches, leaves, mud and broken seeds. In one example, the raw cotton impurity analyzer in the present application can screen out the heavier parts of mud and stones, the heavier parts of branches and leaves, and the heavier parts of broken seeds through the vibration function, and further screen out the lighter parts of mud and stones, the lighter parts of branches and leaves, and the lighter parts of broken seeds through the blowing effect. When taking a photo of the target raw cotton, a camera can be used.

[0040] S102, obtaining a spectral image of raw cotton, where the spectral image of raw cotton is obtained by taking pictures with a spectral camera.

[0041] Specifically, a spectral camera can be used to photograph the target image to obtain a spectral image of raw cotton. In one example, the spectral camera can photograph the target raw cotton at the target position with a spectral range of 920 to 2526 nm, a camera exposure time of 6 ms, a camera frame rate of 70.0133 Hz, a distance between the lens and the target raw cotton of 33.5 cm, and a camera pixel of 384×288. The target position is a reference whiteboard with a diffuse reflectivity greater than 90%, and the target raw cotton is placed on the reference whiteboard, and a focus adjustment plate is installed above the reference whiteboard.

[0042] S104, performing correction processing on the raw cotton spectral image to obtain a raw cotton corrected image.

[0043] Specifically, this step may be to perform a black-and-white plate correction process on the raw cotton spectral image to obtain a raw cotton corrected image, wherein the black-and-white plate correction process is determined based on the following formula:

[0044]

[0045] Among them, R ref is the corrected image of raw cotton, DN raw is the original spectrum image of raw cotton, DN white is the calibration image of the reference whiteboard, DN dark is the calibration image of the dark current of the spectral camera.

[0046] In one example, a reference white board can be prepared, and the parameters of the spectrum analyzer can be set to the required state, such as wavelength range, resolution, integration time, etc., and then the reference white board can be placed at the measurement position of the spectrum analyzer to ensure that the light source is evenly irradiated on the reference white board, and the spectrum analyzer is turned on to shoot and obtain the spectrum image of the reference white board. This image will be used as a calibration image for image correction. Further, dark current refers to the current that the spectrum camera still generates when there is no light. This is caused by the thermal noise of the photodiode or imaging sensors such as CCD and CMOS. Dark current will generate noise to the image, so calibration is required for correction during image processing. In one example, the steps for obtaining a calibration image of dark current are as follows: Set up the spectrum camera: Set the parameters of the spectrum camera to the required state, such as wavelength range, resolution, integration time, etc. Turn off all light sources: Make sure there is no light source in the environment, including the light source of the spectrum analyzer and the ambient light. This is usually achieved by completely closing the shutter of the spectrum camera or covering the light inlet of the spectrum camera with black material. Obtain a dark current calibration image: In a completely dark environment, turn on the spectrum camera, shoot, and obtain a calibration image of the dark current. This image will be used as a dark current calibration image for image correction.

[0047] S106: performing image fusion on the raw cotton image and the raw cotton corrected image to obtain a target raw cotton image.

[0048] It can be understood that in this technical solution, the target raw cotton image is obtained by fusing the raw cotton image and the raw cotton correction image, thereby enriching the data of the target raw cotton image. Moreover, through the above solution, the impurity screening of the initial raw cotton and the acquisition of the target raw cotton image are integrated, and the image can be preliminarily processed before the neural network recognition, which can effectively reduce the algorithm of the target recognition network, improve the recognition efficiency of the target raw cotton image, and can also improve the recognition accuracy of foreign fibers in the target raw cotton image based on the rich data of the target raw cotton image after the initial processing.

[0049] S108, inputting the target raw cotton image into the target recognition network, so that the target recognition network recognizes the target raw cotton image and outputs category information of the foreign fiber corresponding to the target raw cotton image.

[0050] Specifically, the target recognition network is obtained based on the residual network update of the original ResNet18 convolutional neural network. The residual network includes a first residual module and a second residual module. The convolution layer of the first residual module is a pyramid convolution layer, and the convolution layer of the second residual module is a 1×1 convolution layer. The convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, and the pyramid convolution layer is filled based on half of the convolution kernel.

[0051] Specifically, the framework diagram of the target recognition network is as follows Figure 2 As shown, in the target recognition network, the convolution layer in the first residual module in the original ResNet18 convolutional neural network is replaced by a pyramid convolution layer. The pyramid convolution layer can introduce multi-scale perception capabilities in the network by using convolution kernels of different sizes, expand the receptive field of each convolution layer, and effectively process targets or objects of different sizes, reducing the occurrence of missed detections, thereby improving the recognition accuracy of heterogeneous fibers. Furthermore, the pyramid convolution layer is filled based on half of the convolution kernel, which can reduce edge effects, retain more original image information, and further improve the recognition accuracy of heterogeneous fibers. Furthermore, the convolution layer of the second residual module of the target recognition network is a 1×1 convolution layer, which can effectively reduce the number of channels of the input feature map, reducing the amount of calculation and the number of model parameters.

[0052] It is understandable that the target recognition network is pre-built, and the building conditions meet the steps explained in step S108. In one example, when building the target recognition network, the PyTorch library can be imported. PyTorch is an open source deep learning framework for machine learning and deep learning, which provides flexible and efficient tensor calculations and a powerful automatic gradient system for building neural networks. Further, the residual module is defined. The definition of the residual module in the target recognition network of the embodiment of the present application is based on the update of the residual network in the original ResNet18 convolutional neural network, that is, the 3×3 convolutional layer in the first residual module in the original ResNet18 convolutional neural network mentioned above is updated through the pyramid convolutional layer, and the 3×3 convolutional layer in the second residual module in the original ResNet18 convolutional neural network is updated based on the 1×1 convolutional layer. The activation function is further defined. The ReLU activation function is used in the original ResNet18 convolutional neural network. Compared with other activation functions in other convolutional neural networks, the ReLU activation function can effectively alleviate the gradient vanishing problem because its gradient is always 1 in the positive interval, which helps the gradient propagation in the deep network. In a neural network, the ReLU function is used as the activation function of a neuron, which is the nonlinear output result of the neuron after linear transformation. In other words, for the input vector from the previous layer of neural network entering the neuron, the neuron using the ReLU function will output to the next layer of neurons or as the output of the entire neural network. Figure 2 In the residual structure of the residual network shown, ReLU is updated to PReLU activation function, that is, the last layer activation function of the associated output is updated to the PReLU activation function. It can be understood that the last layer activation function is the PReLU activation function, which improves the robustness and training stability of the target recognition network.

[0053] In some embodiments, the target recognition network in step S108 recognizes the target raw cotton image to output the category information of the foreign fiber corresponding to the target raw cotton image, which may include the following steps:

[0054] First, the target recognition network performs image adaptive adjustment of the image aspect ratio of the target raw cotton image to obtain a target adjusted image. It is understandable that traditional neural networks usually require the input image to have a fixed size, which limits the network's ability to process images of different sizes. The ResNet18 network was designed with input images of different sizes in mind. By modifying the network structure, such as in the parameter settings of the average pooling layer and the fully connected layer, image inputs of sizes other than 224x224 can be adapted. This design enables the network to process images of any size without the need for excessive preprocessing of the original image, such as scaling or cropping. Therefore, the target recognition network updated based on the original ResNet18 network convolutional neural network in this application can achieve adaptive adjustment of the image.

[0055] Again, the target recognition network extracts sub-scale features of the target adjustment image based on the updated residual network to obtain a multi-scale feature map. It can be understood that the pyramid convolution layer is referenced in the residual network of the target recognition network, and then by using convolution kernels of different sizes, multi-scale perception capabilities can be introduced into the network, and the receptive field of each convolution layer is expanded to effectively process targets or objects of different sizes. For example, a large convolution kernel may capture the global information of the image, while a small convolution kernel may capture the local details of the image. Furthermore, the pyramid convolution layer is padded with half the size of the convolution kernel, which can keep the output size unchanged with a stride of 1.

[0056] Furthermore, the target recognition network predicts the category probability of the multi-scale feature map based on the global average fully connected layer to determine the category information of the foreign fiber based on the category probability. It is understandable that during the training of the target recognition network, the network will learn how to predict the category based on these features. This is usually achieved by adding one or more fully connected layers at the end of the network, which will combine and weight the previous features to predict the probability of each category. Therefore, after processing by these two residual modules, the network can output the category information of the corresponding foreign fiber of the raw cotton image, and the category information may include but is not limited to cotton fiber, hemp fiber, silk fiber, etc.

[0057] According to another aspect of the present application, a foreign fiber identification device is also disclosed. Specifically, Figure 3 As shown, the device comprises:

[0058] A raw cotton image acquisition module is used to acquire a raw cotton image. The raw cotton image is obtained by photographing a target raw cotton. The target raw cotton is obtained after impurities are screened from the initial raw cotton. The target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer. The target impurities include branches, leaves, mud, and broken seeds.

[0059] A raw cotton spectral image acquisition module is used to acquire a raw cotton spectral image, where the raw cotton spectral image is acquired based on the spectral camera;

[0060] A raw cotton correction image determination module corrects the raw cotton spectral image to obtain a raw cotton correction image;

[0061] A target raw cotton image determination module is used to fuse the raw cotton image and the raw cotton correction image to obtain a target raw cotton image;

[0062] An input module is used to input a target raw cotton image into a target recognition network so that the target recognition network recognizes the target raw cotton image and outputs category information of foreign fibers corresponding to the target raw cotton image, wherein the target recognition network is obtained based on a residual network update of an original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, respectively, and the pyramid convolution layer is filled based on half of the convolution kernel.

[0063] The application introduction of the relevant modules of the device in this example can refer to the relevant introduction of the principle of the above method, which will not be repeated here.

[0064] According to another aspect of the present application, the present application also discloses an electronic device, which includes a memory and at least one processor, wherein instructions are stored in the memory; at least one processor calls the instructions in the memory to enable the electronic device to execute each step of the above foreign fiber identification method.

[0065] above Figure 3 The grid warehouse billing device based on operating status in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the electronic device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0066] Figure 44 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 400 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 410 (for example, one or more processors) and a memory 420, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 433 or data 432. Among them, the memory 420 and the storage medium 430 can be short-term storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the electronic device 400. Furthermore, the processor 410 can be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the electronic device 400.

[0067] The electronic device 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input and output interfaces 450, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 4 The structure of the electronic device shown does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.

[0068] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the foreign fiber identification method.

[0069] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0070] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0071] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying foreign fibers, characterized in that: The method comprises: Acquire a raw cotton image, wherein the raw cotton image is obtained by photographing a target raw cotton, wherein the target raw cotton is obtained after impurities are screened from the initial raw cotton, wherein the target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer, and the target impurities include branches and leaves, mud and stones, and broken seeds; Acquire a spectral image of raw cotton, wherein the spectral image of raw cotton is obtained by taking a spectral camera; Performing correction processing on the raw cotton spectral image to obtain a raw cotton corrected image; Performing image fusion on the raw cotton image and the raw cotton corrected image to obtain a target raw cotton image; The target raw cotton image is input into a target recognition network so that the target recognition network recognizes the target raw cotton image to output category information of foreign fibers corresponding to the target raw cotton image, wherein the target recognition network is obtained based on a residual network update of an original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, respectively, and the pyramid convolution layer is filled based on half of the convolution kernel.

2. The foreign fiber identification method according to claim 1, characterized in that: The obtaining of the raw cotton spectrum image comprises: Based on a spectral range of 920-2526nm, a camera exposure time of 6ms, a camera frame rate of 70.0133Hz, a distance between a lens and the target raw cotton of 33.5cm, and a camera pixel of 384×288, a spectral camera takes pictures of the target raw cotton at the target position; the target position is a reference white board with a diffuse reflectivity greater than 90%, the target raw cotton is placed on the reference white board, and a focus adjustment plate is installed above the reference white board.

3. The foreign fiber identification method according to claim 1, characterized in that: The correcting process of the raw cotton spectral image to obtain the raw cotton corrected image comprises: The raw cotton spectral image is subjected to a black and white plate correction process to obtain the raw cotton corrected image, wherein the black and white plate correction process is determined based on the following formula: Among them, R ref is the corrected image of raw cotton, DN raw is the original spectrum image of raw cotton, DN white is the calibration image of the reference whiteboard, DN dark is the calibration image of the dark current of the spectral camera.

4. The foreign fiber identification method according to claim 1, characterized in that: The target recognition network also includes a last layer activation function, and the last layer activation function is a PReLU activation function.

5. The foreign fiber identification method according to claim 1, characterized in that: The target recognition network recognizes the target raw cotton image to output the category information of the foreign fiber corresponding to the target raw cotton image, including: The target recognition network performs image adaptive adjustment on the image aspect ratio of the target raw cotton image to obtain a target adjusted image; The target recognition network extracts sub-scale features from the target adjustment image based on an updated residual network to obtain a multi-scale feature map; The target recognition network performs category probability prediction on the multi-scale feature map based on a global average fully connected layer to determine the category information of the heterosexual fiber based on the category probability.

6. A foreign fiber identification device, characterized in that: The device comprises: A raw cotton image acquisition module is used to acquire a raw cotton image, wherein the raw cotton image is obtained by photographing a target raw cotton, wherein the target raw cotton is obtained after impurities are screened from the initial raw cotton, wherein the target impurities in the initial raw cotton are screened based on a raw cotton impurity analyzer, and the target impurities include branches, leaves, mud and stones, and broken seeds; A raw cotton spectral image acquisition module is used to acquire a raw cotton spectral image, wherein the raw cotton spectral image is obtained by taking a spectral camera; a raw cotton correction image determination module, which performs correction processing on the raw cotton spectral image to obtain a raw cotton correction image; A target raw cotton image determination module is used to perform image fusion on the raw cotton image and the raw cotton correction image to obtain a target raw cotton image; An input module is used to input the target raw cotton image into a target recognition network so that the target recognition network recognizes the target raw cotton image and outputs category information of foreign fibers corresponding to the target raw cotton image, wherein the target recognition network is obtained based on a residual network update of an original ResNet18 convolutional neural network, the residual network includes a first residual module and a second residual module, the convolution layer of the first residual module is a pyramid convolution layer, the convolution layer of the second residual module is a 1×1 convolution layer, the convolution kernels of the pyramid convolution layer are 9, 7, 5, and 3 from bottom to top, respectively, and the pyramid convolution layer is filled based on half of the convolution kernel.

7. An electronic device, characterized in that: The electronic device comprises a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes each step of the foreign fiber identification method according to any one of claims 1 to 5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the foreign fiber identification method according to any one of claims 1 to 5 are implemented.

Citation Information

Cited By

  • Non-woven fabric foreign fiber detection method and device based on Lab color space

    CN120823203A

  • A non-woven fabric foreign fiber detection method and device based on Lab color space

    CN120823203B

  • Rapid foreign fiber identification method and system based on artificial intelligence

    CN120892972A

  • An artificial intelligence-based rapid foreign fiber identification method and system

    CN120892972B