A fabric composition identification system based on controllable light source acquisition device
Through an image acquisition device based on a controllable light source and a hybrid attention recognition model, the problems of low accuracy and low efficiency of fabric component recognition in the prior art are solved, and fast and accurate fabric component recognition is achieved, which improves the user experience.
Patent Information
- Application Number
- CN202210651620.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-06-09
AI Technical Summary
In the prior art, fabric component identification methods rely on professionals to judge or take photos on mobile phones, with low accuracy and low efficiency, making it difficult to achieve efficient and accurate fabric identification in offline transactions.
An image acquisition device based on a controllable light source is adopted in combination with a neural network model, fabric images are collected through a micro camera under a controllable light source, and data preprocessing and recognition are used to improve image acquisition quality and recognition accuracy.
It realizes fast and accurate fabric composition recognition, improves recognition accuracy and efficiency, improves user experience, and is suitable for commercial fields.
Smart Images

Figure CN115082652B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image acquisition and processing, and relates to a fabric composition recognition system based on a controllable light source acquisition device. Background Art
[0002] There are two main existing approaches to fabric composition testing: the first relies on professional fabric matchers to determine the composition. The second involves using mobile phone photography and color matching to detect fabric composition. Both approaches have significant drawbacks: professional fabric matchers typically rely on their own expertise and experience to identify fabrics, which not only requires a relatively high level of technical expertise but also has relatively low recognition efficiency. Mobile phone photography is affected by ambient light and, due to the limitations of camera hardware, struggles to capture detailed fabric features. Relying solely on color matching during the matching process results in low accuracy and fails to accurately match fabrics.
[0003] Applying image recognition technology trained on neural network models to fabric composition identification can help fabric distributors, designers, and suppliers accurately identify fabrics, providing a reliable solution to addressing the multiple transaction links, low efficiency, and long transaction cycles in the offline fabric trading market. Compared to traditional pixel-level image description and analysis methods, deep learning can tap into more in-depth information for classification. Neural network models perform convolution operations on shallow local information to capture global in-depth information within an image.
[0004] Common convolutional neural network models can identify fabric patterns, materials, and craftsmanship, but their recognition accuracy is low, the recognition time is long, and the recognition rate is low. For them to be truly applicable in the market, further improvements in efficiency and accuracy are needed. Furthermore, there is an urgent need for a stable image acquisition device that can capture the subtle physical properties of fabrics and work in conjunction with the recognition model. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention proposes a fabric composition identification system based on a controllable light source acquisition device. The fabric image is collected by a micro camera under a controllable light source, and then a recognition model based on a neural network is used to quickly and accurately identify the fabric composition.
[0006] A fabric composition recognition system based on a controllable light source acquisition device comprises an image acquisition module, a data preprocessing module and a fabric recognition module.
[0007] The image acquisition module includes a light-tight housing, a micro-camera, and a controllable light source. The housing has an opening at the bottom, and the micro-camera and controllable light source are secured within the housing. The micro-camera's direction of capture is aligned with the opening at the bottom of the housing, and the controllable light source provides varying intensities of illumination. The bottom of the sealed box is placed firmly and stably on the surface of the fabric to be identified. Images of the fabric are captured and transmitted to the data preprocessing module.
[0008] Preferably, the distance between the miniature camera and the bottom opening of the housing is adjustable.
[0009] The data preprocessing module performs noise filtering and data enhancement processing on the fabric image, adjusts it to a uniform size, and then performs normalization operation, and transmits the processed fabric image information to the fabric recognition module in the form of a tensor.
[0010] Preferably, the data preprocessing module performs image denoising and data enhancement through supersampling technology and detail enhancement technology based on a fast bilateral filtering algorithm.
[0011] The fabric recognition module uses the trained hybrid attention recognition model to identify the processed fabric image information and output a fabric composition label. The hybrid attention recognition model includes a hybrid attention layer, a multi-head attention layer, a normalization operation, and an MLP classifier. The hybrid attention layer includes three stages. Each stage first generates a feature vector through a convolutional feature extractor, and then obtains a query matrix, a key matrix, and a value matrix through multiple convolution switches. The input of stage one is the fabric image information, and the input of other stages is the feature map after the feature vector output of the previous stage is expanded. The multi-head attention layer receives the query matrix, key matrix, and value matrix output by the three stages of the hybrid attention layer, performs linear transformation and depth-separable convolution operation on the matrix, and then connects it with the fabric image information to obtain feature A. Feature A is normalized and input into the MLP classifier. The output result of the MLP classifier is convolved with feature A to output a feature vector B representing the fabric image. It is compared with the feature vectors of different fabrics stored in the template library to obtain the fabric composition label.
[0012] The present invention has the following beneficial effects:
[0013] In the fabric recognition module, a hybrid attention layer processes high-resolution fabric images, overcoming computational and memory costs. A feature pyramid network is also utilized to significantly improve the performance of the hybrid attention mechanism in densely packed object detection tasks, while global average pooling is used to reduce dimensionality. This improves both the accuracy and speed of fabric composition detection, significantly increasing the commercial adoption of this novel fabric composition detection method and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Schematic diagram of the image acquisition module in the embodiment;
[0015] Figure 2 Schematic diagram of the hybrid attention recognition model in the embodiment. DETAILED DESCRIPTION
[0016] The present invention will be further explained below with reference to the accompanying drawings.
[0017] A fabric composition recognition system based on a controllable light source acquisition device comprises an image acquisition module, a data preprocessing module and a fabric recognition module.
[0018] like Figure 1 As shown, the image acquisition module comprises a light-tight housing, a micro-camera, and a controllable light source. The housing has an opening at the bottom, and the micro-camera is fixed inside, with its shooting direction aligned with the opening. By adjusting the distance between the micro-camera and the opening, the focal length can be further adjusted, enhancing image clarity. The controllable light source comprises multiple light-emitting diodes evenly arranged on the inner wall of the housing. By controlling the on / off state of the LEDs, the brightness of the shooting environment can be varied. The bottom of the sealed box is placed firmly and stably on the surface of the fabric to be identified. Images of the fabric are captured and transmitted to the data preprocessing module.
[0019] The data preprocessing module uses supersampling technology and detail enhancement technology based on fast bilateral filtering algorithm to filter out noise and enhance data of the fabric image, adjusts the size to 128x128 pixels, and then performs normalization operation. The processed fabric image information is transmitted to the fabric recognition module in the form of a tensor.
[0020] Fabric images with known labels are collected and input into the hybrid attention recognition model after being processed by the data preprocessing module. The error between the training results and the labels is calculated using the loss function. The model is iteratively trained through gradient backpropagation until the recognition rate of the model reaches 85%. The training is considered complete and saved in the fabric recognition module.
[0021] like Figure 2As shown, the hybrid attention recognition model includes a hybrid attention layer, a multi-head attention layer, a normalization operation, and an MLP classifier. The hybrid attention layer includes three stages. Each stage first generates a feature vector through a convolutional feature extractor, and then obtains a query matrix, a key matrix, and a value matrix through multiple convolution switches. The input of stage one is the fabric image information, and the input of other stages is the feature map after the feature vector output of the previous stage is expanded. The multi-head attention layer receives the query matrix, key matrix, and value matrix output by the three stages of the hybrid attention layer, performs linear transformation and depth-separable convolution operation on the matrix, and then connects it with the fabric image information to obtain feature A. Feature A is normalized and input into the MLP classifier. The output result of the MLP classifier is convolved with feature A to output a feature vector B representing the fabric image.
[0022] The fabric recognition module first uses the trained hybrid attention recognition model to extract feature vectors B of fabric images with different labels and stores them as templates. It then extracts the feature vector B of the fabric image to be identified and compares it with the stored templates. The label corresponding to the template with the highest similarity is used as the component recognition result of the fabric image to be identified.
[0023] The above-described embodiments merely represent a concentrated implementation method of the present invention. While the description is relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A fabric composition identification system based on a controllable light source acquisition device, characterized by: It includes image acquisition module, data preprocessing module and fabric recognition module; The image acquisition module includes a light-proof housing, a micro camera, and a controllable light source; the housing has an opening at the bottom, and the micro camera and the controllable light source are fixed inside the housing; the micro camera is aligned with the opening at the bottom of the housing; the controllable light source is used to provide light of varying intensities; the bottom of the housing is placed tightly and stably on the surface of the fabric to be identified, and an image of the fabric to be identified is captured and transmitted to the data preprocessing module; The data preprocessing module performs noise filtering and data enhancement processing on the fabric image to be identified, adjusts it to a uniform size, and then performs normalization operation, and transmits the processed information of the fabric image to be identified to the fabric identification module in the form of a tensor; The fabric recognition module recognizes the information of the processed fabric image to be recognized through the trained hybrid attention recognition model and outputs a fabric component label; the hybrid attention recognition model includes a hybrid attention layer, a multi-head attention layer, a normalization operation and an MLP classifier; the hybrid attention layer includes three stages, each stage first generates a feature vector through a convolutional feature extractor, and then obtains a query matrix, a key matrix and a value matrix through multiple convolution switches, wherein the input of stage one is the information of the fabric image to be recognized, and the input of other stages is the feature map after the feature vector output of the previous stage is expanded; the multi-head attention layer receives the query matrix, key matrix and value matrix output by the three stages of the hybrid attention layer, performs linear transformation and depth-separable convolution operation on the matrix, and then connects it with the information of the fabric image to be recognized to obtain feature A, which is normalized and input into the MLP classifier. After the output result of the MLP classifier is convolved with feature A, a feature vector B representing the fabric image to be recognized is output, which is compared with the feature vectors of different fabrics stored in the template library to obtain a fabric component label.
2. A fabric composition identification system based on a controllable light source acquisition device as claimed in claim 1, characterized in that: The distance between the micro camera and the bottom opening of the shell can be adjusted.
3. The fabric composition identification system based on the controllable light source acquisition device according to claim 1, characterized in that: The data preprocessing module performs image denoising and data enhancement through supersampling technology and detail enhancement technology based on fast bilateral filtering algorithm.
4. The fabric composition identification system based on the controllable light source acquisition device according to claim 1, characterized in that: Fabric images with known labels are collected and input into the hybrid attention recognition model for network training. The error between the training results and the labels is calculated using the loss function. The model is iteratively trained through gradient back propagation until the recognition rate of the model reaches 85%.
5. The fabric composition identification system based on the controllable light source acquisition device according to claim 1, characterized in that: The feature vectors of fabric images with different components are extracted through the trained hybrid attention recognition model and stored in the template library. During the recognition process, the feature vector of the fabric image to be identified is compared with the feature vector stored in the template library. The label of the template with the greatest similarity is the component recognition result of the corresponding fabric image to be identified.
6. A fabric composition identification method based on a controllable light source acquisition device, characterized in that: The method specifically comprises the following steps: Step 1, construct a hybrid attention recognition model, which includes a hybrid attention layer, a multi-head attention layer, a normalization operation and an MLP classifier; the hybrid attention layer includes three stages, each stage first generates a feature vector through a convolutional feature extractor, and then obtains a query matrix, a key matrix and a value matrix through multiple convolution switches, wherein the input of stage one is a fabric image, and the input of other stages is a feature map after the feature vector output of the previous stage is expanded; the multi-head attention layer receives the query matrix, key matrix and value matrix output by the three stages of the hybrid attention layer, performs linear transformation and depth-separable convolution operation on the matrix, and then connects it with the input fabric image to obtain feature A, which is normalized and input into the MLP classifier. After the output result of the MLP classifier is convolved with feature A, a feature vector B representing the input fabric image is output; Step 2: Collect a large number of fabric images with different compositions, use the fabric composition as the label of the corresponding image, input the hybrid attention recognition model built in step 1, use the loss function to calculate the error between the training results and the label, and iteratively train the model through gradient backpropagation. The training ends when the recognition rate of the model reaches 85%; Step 3: Select fabric images of different compositions and input them into the hybrid attention recognition model trained in step 2 to extract the feature vector B, which is stored as a template in the template library. Step 4: Use an image acquisition device to capture an image of a fabric with unknown composition as the fabric image to be identified. After denoising and image enhancement, the image is input into the hybrid attention recognition model trained in Step 2. The feature vector output by the model is compared with the template obtained in Step 3. The template label with the highest similarity is the label of the fabric image with unknown composition. The image acquisition device includes an opaque shell, a micro camera and a controllable light source; an opening is provided at the bottom of the shell, and the micro camera and the controllable light source are fixed inside the shell; the shooting direction of the micro camera is aligned with the opening at the bottom of the shell; and the controllable light source is used to provide light of different intensities.
Citation Information
Patent Citations
Dairy cow individual identification system based on deep learning and identification method thereof
CN111291683A
Fabric material identification system and method based on photometric stereo
CN113743525A