Data expansion method and system for wool / cashmere microscope image
By performing masking, completion, and fusion processing on microscopic images of wool and cashmere, high-quality microscopic images of wool and cashmere were generated, solving the problem of insufficient data, preserving natural textures, and enriching data, thus providing a high-quality image source for automatic identification of wool and cashmere.
Patent Information
- Application Number
- CN202511012588.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The lack of wool and cashmere microscope image data in existing technologies makes it easy for overfitting to occur during deep neural network training. Furthermore, traditional data augmentation methods have limited applicability to microscope images, especially since electron microscope images are expensive to produce.
By processing microscopic images of wool and cashmere, fiber masks are obtained, fiber foreground and noisy background images are separated, the noisy background image is completed, the fiber foreground image is simulated to be randomly placed, and then it is fused with the completed background image to generate a new microscopic image.
It effectively generates highly natural microscopic images of wool and cashmere fibers, preserving the texture details of the fiber surface, providing rich image data sources to alleviate overfitting, and supporting automatic wool and cashmere recognition.
Smart Images

Figure CN120953128A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent textile detection technology, and relates to detection methods using image processing, particularly to a data augmentation method and system for microscopic images of wool and cashmere. Background Technology
[0002] Wool and cashmere are both widely used natural animal hair fibers in the textile industry, but they differ significantly in terms of yield, physical properties, and market value. Cashmere, due to its rarity and superior feel and warmth, commands a much higher market price than ordinary wool. Because of their similar appearance, it is difficult for the average consumer to detect if wool is mixed into products that should contain cashmere, or even completely substituted with wool. Therefore, research on accurate identification and content detection technologies for wool and cashmere fibers has become an important topic in the field of intelligent textile testing.
[0003] With the development of artificial intelligence technology, the identification of wool and cashmere fibers using deep neural networks has become a research hotspot. This method not only improves the efficiency of fiber detection but also promotes the advancement of intelligent fiber detection technology. However, the training of deep neural networks relies on a large amount of data, while the number of currently available wool and cashmere microscopic images is limited, leading to the model's susceptibility to overfitting. Furthermore, the production process of wool and cashmere microscopic images is complex, especially the production cost of electron microscope images, which is high. In the field of computer vision, traditional data augmentation methods have limited applicability to these types of microscopic images, while generative data augmentation methods based on diffusion models easily alter the texture details of the fiber surface. Therefore, it is necessary to design a data augmentation method suitable for wool and cashmere microscopic images. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, the present invention aims to provide a data augmentation method and system for wool and cashmere microscope images, which aims to solve the problem of insufficient existing data resources and effectively alleviate the overfitting phenomenon caused by insufficient data during deep neural network training.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A method for data augmentation of microscopic images of wool and cashmere includes the following steps:
[0007] Step A: Process the microscopic image of wool and cashmere to obtain a wool and cashmere fiber mask.
[0008] Step B: Based on the fiber mask, the wool and cashmere microscope images are divided into fiber foreground images and noise background images;
[0009] Step C: Perform completion processing on the noisy background image to obtain the completed noisy background image;
[0010] Step D: Perform simulated random placement processing on the fiber foreground image to obtain a random fiber foreground image;
[0011] Step E involves fusing the random fiber foreground image with the completed noisy background image to obtain a new wool and cashmere microscope image.
[0012] In one embodiment, step A, obtaining the wool / cashmere fiber mask using a segmentation model, is as follows:
[0013] Step A11: Manually obtain multiple coordinates of the fiber foreground or noise background;
[0014] Step A12: Input the acquired coordinates and the wool / cashmere microscope image into the segmentation model to obtain the wool / cashmere fiber mask, as shown in the following formula:
[0015] I mask =SAM(p lable (x,y),image)
[0016] Where x and y represent the horizontal and vertical coordinates of a pixel in the image, respectively, p lable (x,y) represents the coordinates of the fiber foreground or noise background in a wool / cashmere microscope image, image represents the wool / cashmere microscope image, SAM represents the segmentation model, and I mask This represents the mask for wool and cashmere fibers.
[0017] In one embodiment, in step B, during the separation of the fiber foreground image and the noisy background image, the pixel positions of the non-fiber foreground or non-noisy background are set to white, as shown in the following formula:
[0018]
[0019] Among them, I fiber (x,y) represents the fiber foreground image I. fiber The pixel value at coordinates (x, y), I bg (x,y) represents the noisy background image I. bg The pixel value at coordinates (x, y), I mask (x,y) represents the wool / cashmere fiber mask I. mask The pixel value at coordinate (x,y) in the microscopic image of wool and cashmere is represented by image(x,y).
[0020] In one embodiment, step C, obtaining the completed noisy background image, is as follows:
[0021] Step C1: Create a white region in the noisy background image and give a deviation T, which is used to reduce the boundary difference between the completed and uncompleted regions during the final completion process;
[0022] Step C2: Create edge regions in the noisy background image, where the edge regions are areas in the noisy background image that are n pixels away from the top, bottom, left, and right sides;
[0023] Step C3: Define the locations in the noisy background image excluding white areas and edge areas as pixel regions. By randomly selecting a pixel value at a certain location in a pixel region as a pixel value at a certain location in a white region, the completed noisy background image can be obtained.
[0024] In one embodiment, step C1, creating a white region in a noisy background image, is represented as follows:
[0025]
[0026] Where c represents the identifier of the color channel, R, G, and B represent the red, green, and blue channels of the three-channel color image at position (i, j), respectively, and I bg (i,j,c) represents the noisy background image I. bg The pixel value at coordinates (x, y) in the white area W, where T represents the deviation;
[0027] Step C2 involves creating edge regions in the noisy background image, represented as follows:
[0028] E={(i,j)|(0≤i≤n)∨(hn≤i≤h)∨(0≤j≤n)∨(wn≤j≤w)}
[0029] Where w and h represent the noisy background image I bg The width and height, E represents I bg The edge region in;
[0030] In step C3, the completed noisy background image is represented as follows:
[0031]
[0032] Where random means random selection, I bg_p I represents the pixel value of a pixel region. bg_all (x,y) represents the pixel value at coordinates (x,y) in the completed noisy background image.
[0033] In one embodiment, step D, obtaining the random fiber foreground image, is as follows:
[0034] Step D1: Enlarge the fiber foreground image;
[0035] Step D2: Translate the expanded fiber foreground image.
[0036] Step D3: Rotate the translated image at its center.
[0037] Step D4: Perform a center cropping operation on the rotated image to obtain a random fiber foreground image.
[0038] In one embodiment, step D1 involves creating a transparent image larger than the fiber foreground image and then placing the fiber foreground image at the center of the transparent image; step D2 involves a translation operation including vertical and / or horizontal translation; and step D4 involves cropping the image to the same size as the original fiber foreground image, resulting in a random fiber foreground image represented as follows:
[0039] I fiber_random (x,y)=corp(totate(transform(paste(expand(I fiber (x,y))))))
[0040] Among them, I fiber_random (x,y) represents the random fiber foreground image I. fiber_random The pixel value at coordinates (x, y) is used to expand the image to create a foreground image I larger than the fiber. fiber A transparent image, paste means to paste I fiber Place it in the center of a transparent image. `transform` represents a translation operation, `totate` represents a center rotation operation with a random angle, and `corp` represents cropping.
[0041] In one embodiment, step E involves fusing the random fiber foreground image with the completed noisy background image, followed by another completion process according to step C, to obtain the final new wool and cashmere microscope image.
[0042] In one embodiment, step E involves fusing the random fiber foreground image with the completed noisy background image, implemented as follows:
[0043] The fiber mask is obtained from the random fiber foreground image. The pixel values at the corresponding mask positions in the completed noisy background image are removed. Then, the random fiber foreground image and the noisy background image are combined to form a wool / cashmere microscope image, as shown in the following formula:
[0044]
[0045] Among them, I merged(x,y) represents the new microscopic image I of wool and cashmere. merged The pixel value at coordinates (x, y), I fiber_mask (x,y) represents the pixel value at coordinates (x,y) in the fiber mask corresponding to the random fiber foreground image.
[0046] This invention also provides a data augmentation system for wool and cashmere microscope images, including a mask acquisition module, an image separation module, a noise background completion module, a fiber random placement module, and an image fusion module. The mask acquisition module processes the wool and cashmere microscope image to obtain a wool and cashmere fiber mask. The image separation module divides the wool and cashmere microscope image into a fiber foreground image and a noise background image based on the fiber mask. The noise background completion module completes the noise background image to obtain a completed noise background image. The fiber random placement module simulates random placement of the fiber foreground image to obtain a random fiber foreground image. The image fusion module fuses the random fiber foreground image with the completed noise background image to obtain a new wool and cashmere microscope image.
[0047] Compared with the prior art, the beneficial effects of the present invention are:
[0048] This invention discloses a data augmentation method for wool and cashmere microscope images. First, the wool and cashmere microscope image is processed to obtain a wool and cashmere fiber mask. Then, based on the fiber mask, the wool and cashmere microscope image is divided into a fiber foreground image and a noisy background image. Next, the noisy background image is completed to obtain a completed noisy background image. Subsequently, the fiber foreground image is simulated with random placement to obtain a random fiber foreground image. Finally, the random fiber foreground image is fused with the completed noisy background image to obtain a new wool and cashmere microscope image. This invention effectively generates highly natural wool and cashmere fiber microscope images while preserving the texture details of the fiber surface and simulating different positions of the fibers in a noisy background, providing a high-quality image source for developers of automatic wool and cashmere recognition programs. Attached Figure Description
[0049] Figure 1 This is an overall flowchart of a data augmentation method for wool and cashmere microscope images according to the present invention.
[0050] Figure 2 This is a microscope image of wool and cashmere from Embodiment 1 of the present invention.
[0051] Figure 3 This is the wool and cashmere fiber mask of Embodiment 1 of the present invention.
[0052] Figure 4 This is a fiber foreground image from Embodiment 1 of the present invention.
[0053] Figure 5 This is a noisy background image from Embodiment 1 of the present invention.
[0054] Figure 6 This is the completed noisy background image according to Embodiment 1 of the present invention.
[0055] Figure 7 This is a random fiber foreground image from Embodiment 1 of the present invention.
[0056] Figure 8 This is a fused wool and cashmere microscope image from Embodiment 1 of the present invention.
[0057] Figure 9 This is the final wool and cashmere microscope image of Embodiment 1 of the present invention.
[0058] Figure 10 These are microscope images of wool and cashmere from Embodiment 2 of the present invention.
[0059] Figure 11 This is the wool and cashmere fiber mask of Embodiment 2 of the present invention.
[0060] Figure 12 This is a fiber foreground image from Embodiment 2 of the present invention.
[0061] Figure 13 This is a noisy background image from Embodiment 2 of the present invention.
[0062] Figure 14 This is the completed noisy background image according to Embodiment 2 of the present invention.
[0063] Figure 15 This is a random fiber foreground image from Embodiment 2 of the present invention.
[0064] Figure 16 This is a fused wool and cashmere microscope image from Embodiment 2 of the present invention.
[0065] Figure 17 This is the final wool and cashmere microscope image of Embodiment 2 of the present invention.
[0066] Figure 18 These are microscope images of wool and cashmere from Embodiment 3 of the present invention.
[0067] Figure 19 This is the final wool and cashmere microscope image of Embodiment 3 of the present invention.
[0068] Figure 20 This is a microscope image of wool and cashmere from Embodiment 4 of the present invention.
[0069] Figure 21 This is the final wool and cashmere microscope image of Embodiment 4 of the present invention.
[0070] Figure 22 This is a microscope image of wool and cashmere from Embodiment 5 of the present invention.
[0071] Figure 23 This is the final wool and cashmere microscope image of Embodiment 5 of the present invention. Detailed Implementation
[0072] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings and examples.
[0073] This invention provides a data augmentation method for wool and cashmere microscope images. This method performs semantic segmentation on the original microscope image and extracts the fiber region as a mask, thereby providing accurate region control for subsequent data augmentation. This invention can generate one or more new high-quality microscope images based on a single wool and cashmere microscope image, thereby providing rich and reliable data support for the training of neural network models.
[0074] The specific process of this invention is as follows: Figure 1 As shown, it mainly includes the following steps:
[0075] Step A: Process the microscopic image of wool and cashmere to obtain a wool and cashmere fiber mask.
[0076] In this invention, the wool and cashmere microscope images are derived from high-resolution images taken with an optical microscope (and are also applicable to electron microscope images), such as... Figure 2 and Figure 10 As shown, it is worth noting that in this invention, the wool and cashmere microscope image refers to either a "wool microscope image" or a "cashmere microscope image." This step enables accurate identification and segmentation of fiber regions in the image, laying the foundation for subsequent mask-based data augmentation operations. The specific steps are as follows:
[0077] Step A1 involves processing the microscopic images of wool and cashmere, using the Segment Anything Model (SAM) to identify fiber regions within the images. The specific steps are as follows:
[0078] Step A11: Manually obtain multiple coordinates of the fiber foreground or noise background.
[0079] Step A12: Input the coordinates and the wool / cashmere microscope image into the segmentation model to obtain the wool / cashmere fiber mask, as shown in formula (1):
[0080] I mask =SAM(p lable (x,y),image)(1)
[0081] Where x and y represent the horizontal and vertical coordinates of a pixel in the image, respectively, p lable (x,y) represents the coordinates of the fiber foreground or noise background in a wool / cashmere microscope image, image represents the wool / cashmere microscope image, SAM represents the segmentation model, and I mask This represents the mask for wool and cashmere fibers.
[0082] The mask image I output by this model mask This can effectively distinguish between fiber foreground and noisy background in an image, facilitating subsequent refined data augmentation operations on the fiber region. For example... Figure 3 and Figure 11 As shown, they are respectively Figure 2 and Figure 10 Fiber mask image corresponding to a microscope image of medium wool cashmere.
[0083] Step B: Based on the fiber mask, the wool and cashmere microscope images are divided into fiber foreground images and noise background images.
[0084] In this step, during the separation of wool and cashmere microscope images into fiber foreground images and noise background images, the pixel positions of non-fiber foreground or non-noise background are set to white, as shown in formulas (2) and (3):
[0085]
[0086] Among them, I fiber (x,y) represents the fiber foreground image I. fiber The pixel value at coordinates (x, y), I bg (x,y) represents the noisy background image I. bg The pixel value at coordinates (x, y), I mask (x,y) represents the wool / cashmere fiber mask I. mask The pixel value at coordinate (x,y) in the microscopic image of wool and cashmere is represented by image(x,y).
[0087] The purpose of step B in this invention is to separate the fiber foreground and the noise background to facilitate subsequent operations. The fiber foreground is as follows: Figure 4 and Figure 12 As shown, the background noise is as follows Figure 5 and Figure 13 As shown.
[0088] Step C involves completing the noisy background image to obtain the completed noisy background image. The specific steps are as follows:
[0089] Step C1: Create a white region in the noisy background image and give a certain deviation, where the deviation is to reduce the boundary difference between the filled and unfilled regions during the final completion process, as shown in formula (4):
[0090]
[0091] Where c represents the identifier of the color channel, R, G, and B represent the red, green, and blue channels of the three-channel color image at position (i, j), respectively, and I bg (i,j,c) represents the noisy background image I. bg The pixel value at coordinates (x, y) in the white area W in the image, where T represents the deviation.
[0092] The white area here is the area where the fiber foreground is located. The deviation T represents the degree of inclusion between the white area and the noise background, i.e. the non-completion area boundary. The larger T is, the more natural the boundary part in the image transitions. However, if T is too large, it will cause too much noise in the image and change the original information of the image. In practical applications, the present invention can automatically adjust the parameter T according to the resolution and brightness of the original image.
[0093] Step C2, create the edge regions in the noisy background image, where the edge regions are areas in the noisy background image that are n pixels away from the top, bottom, left, and right sides, as shown in formula (5):
[0094] E={(i,j)|(0≤i≤n)∨(hn≤i≤h)∨(0≤j≤n)∨(wn≤j≤w)}(5)
[0095] Where w and h represent the noisy background image I bg The width and height, E represents I bg The edge region in the middle.
[0096] Step C3: Define the locations in the noisy background image excluding white areas and edge areas as pixel regions. A pixel value at a random location within a pixel region is used as the pixel value at a random location within a white region to obtain the completed noisy background image. This is illustrated in formula (6).
[0097]
[0098] Where random means random selection, I bg_p I represents the pixel value of a pixel region. bg_all (x,y) represents the pixel value at coordinates (x,y) in the completed noisy background image.
[0099] The purpose of step C in this invention is to fill in the blank areas in the noisy background image, and the filled noisy background image is as follows: Figure 6 and Figure 14 As shown.
[0100] Step D involves simulating random placement of the fiber foreground image to obtain a random fiber foreground image. The specific steps are as follows:
[0101] Step D1 involves expanding the fiber foreground image by creating a transparent image larger than the fiber foreground image, and then placing the fiber foreground image at the center of the transparent image. In this embodiment, the transparent image is 1.5 times the size of the fiber foreground image, balancing effect and efficiency.
[0102] Step D2 involves performing a translation operation on the image after step D1, specifically a vertical translation and / or a horizontal translation.
[0103] Step D3: Rotate the image after step D3 to its center.
[0104] Step D4: Perform a center cropping operation on the image after step D3. Specifically, crop the size to be consistent with the original fiber foreground image to obtain a random fiber foreground image, as shown in formula (7):
[0105] I fiber_random (x,y)=corp(totate(transform(paste(expand(I fiber (x,y))))))(7)
[0106] Among them, I fiber_random (x,y) represents the random fiber foreground image I. fiber_random The pixel value at coordinates (x, y) is used to expand the image to create a foreground image I larger than the fiber. fiber A transparent image, paste means to paste I fiber Place it in the center of a transparent image. `transform` represents a translation operation, `totate` represents a center rotation operation with a random angle, and `corp` represents cropping.
[0107] The purpose of step D in this invention is to simulate the situation when the fiber foreground is in different positions under a microscope, as shown in the random fiber foreground image. Figure 7 and Figure 15 As shown.
[0108] Step E involves fusing the random fiber foreground image with the completed noisy background image to obtain a new microscopic image of wool and cashmere. The specific steps are as follows:
[0109] Step E1: Obtain the fiber mask from the random fiber foreground image, remove the pixel values at the corresponding mask positions from the completed noisy background image, and then combine the random fiber foreground image and the noisy background image to form a wool / cashmere microscope image, as shown in formula (8):
[0110]
[0111] Among them, I merged (x,y) represents the new microscopic image I of wool and cashmere. merged The pixel value at coordinates (x, y), I fiber_mask (x,y) represents the pixel value at coordinates (x,y) in the fiber mask corresponding to the random fiber foreground image.
[0112] In a further embodiment of the invention, due to the fiber foreground image I fiber During extraction, white areas often exist at the edges. After fusion in step E, the resulting I... merged The fiber edge area is not natural enough, such as Figure 16 As shown, therefore, based on step E1, step E2 is executed, and then step C is performed again, that is:
[0113] Step E2, display the microscopic image of wool and cashmere. merged Perform step C again to obtain the final new microscopic image of wool and cashmere.
[0114] The purpose of step E in this invention is to combine the random fiber foreground and the completed noisy background image into a new image. The image obtained in step E1 is as follows: Figure 8 As shown, the purpose of step E2 is to smooth the edges of the image processed by E1, making it more natural, such as... Figure 9 and Figure 17 As shown.
[0115] Correspondingly, the present invention provides a data augmentation system for wool and cashmere microscope images, comprising a mask acquisition module, an image separation module, a noise background completion module, a fiber random placement module, and an image fusion module. The mask acquisition module processes the wool and cashmere microscope image to obtain a wool and cashmere fiber mask. The image separation module divides the wool and cashmere microscope image into a fiber foreground image and a noise background image based on the fiber mask. The noise background completion module completes the noise background image to obtain a completed noise background image. The fiber random placement module simulates random placement of the fiber foreground image to obtain a random fiber foreground image. The image fusion module fuses the random fiber foreground image with the completed noise background image to obtain a new wool and cashmere microscope image.
[0116] Specifically, the noise background completion module first creates white regions in the noise background image and provides a certain deviation during the noise background image completion process. Then, it creates edge regions in the noise background image and uses the positions in the noise background image other than the white regions and edge regions as pixel regions. Finally, a pixel value at a certain position in pixel region P is randomly selected as a pixel value at a certain position in the white region.
[0117] Specifically, the fiber random placement module expands the fiber foreground image, then performs translation and center rotation operations, and finally performs center cropping to maintain the same size as the original fiber foreground image.
[0118] The final images of the wool and cashmere microscope images of Embodiments 1 and 2 of this invention after image augmentation are as follows: Figure 9 and Figure 17 As shown, original images of Embodiments 3, 4, and 5 are also provided. Figure 18 , Figure 20 and Figure 22 As shown, the final images of Examples 3, 4, and 5 are as follows. Figure 19 , Figure 21 and Figure 23 As shown.
[0119] In summary, the present invention provides a data augmentation method for wool and cashmere microscope images. First, the wool and cashmere microscope image is processed to obtain a wool and cashmere fiber mask. Then, based on the fiber mask, the wool and cashmere microscope image is divided into a fiber foreground image and a noisy background image. Next, the noisy background image is completed to obtain a completed noisy background image. Subsequently, the fiber foreground image is simulated with random placement to obtain a random fiber foreground image. Finally, the random fiber foreground image is fused with the completed noisy background image to obtain a new wool and cashmere microscope image. This invention effectively generates highly natural wool and cashmere fiber microscope images while preserving the texture details of the fiber surface and simulating the different positions of the fibers in a noisy background, providing a high-quality image source for developers of automatic wool and cashmere recognition programs.
[0120] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in intelligent detection should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for data augmentation of microscopic images of wool and cashmere, characterized in that, Includes the following steps: Step A: Process the microscopic image of wool and cashmere to obtain a wool and cashmere fiber mask. Step B: Based on the fiber mask, the wool and cashmere microscope images are divided into fiber foreground images and noise background images; Step C: Perform completion processing on the noisy background image to obtain the completed noisy background image; Step D: Perform simulated random placement processing on the fiber foreground image to obtain a random fiber foreground image; Step E involves fusing the random fiber foreground image with the completed noisy background image to obtain a new wool and cashmere microscope image.
2. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, Step A involves obtaining the wool and cashmere fiber mask using a segmentation model, as follows: Step A11: Manually obtain multiple coordinates of the fiber foreground or noise background; Step A12: Input the acquired coordinates and the wool / cashmere microscope image into the segmentation model to obtain the wool / cashmere fiber mask, as shown in the following formula: I mask =SAM(p lable (x,y),image) Where x and y represent the horizontal and vertical coordinates of a pixel in the image, respectively, p lable (x,y) represents the coordinates of the fiber foreground or noise background in a wool / cashmere microscope image, image represents the wool / cashmere microscope image, SAM represents the segmentation model, and I mask This represents the mask for wool and cashmere fibers.
3. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, In step B, during the separation of the fiber foreground image and the noisy background image, the pixel positions of non-fiber foreground or non-noisy background are set to white, as shown in the following formula: Among them, I fiber (x,y) represents the fiber foreground image I. fiber The pixel value at coordinates (x, y), I bg (x,y) represents the noisy background image I. bg The pixel value at coordinates (x, y), I mask (x,y) represents the wool / cashmere fiber mask I. mask The pixel value at coordinate (x,y) in the microscopic image of wool and cashmere is represented by image(x,y).
4. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, The method for obtaining the completed noisy background image in step C is as follows: Step C1: Create a white region in the noisy background image and give a deviation T, which is used to reduce the boundary difference between the completed and uncompleted regions during the final completion process; Step C2: Create edge regions in the noisy background image, where the edge regions are areas in the noisy background image that are n pixels away from the top, bottom, left, and right sides; Step C3: Define the locations in the noisy background image excluding white areas and edge areas as pixel regions. By randomly selecting a pixel value at a certain location in a pixel region as a pixel value at a certain location in a white region, the completed noisy background image can be obtained.
5. The data augmentation method for wool and cashmere microscope images according to claim 4, characterized in that, Step C1 involves creating a white region in the noisy background image, represented as follows: Where c represents the identifier of the color channel, R, G, and B represent the red, green, and blue channels of the three-channel color image at position (i, j), respectively, and I bg (i,j,c) represents the noisy background image I. bg The pixel value at coordinates (x, y) in the white area W, where T represents the deviation; Step C2 involves creating edge regions in the noisy background image, represented as follows: E={(i,j)|(0≤i≤n)∨(hn≤i≤h)∨(0≤j≤n)∨(wn≤j≤w)} Where w and h represent the noisy background image I bg The width and height, E represents I bg The edge region in; In step C3, the completed noisy background image is represented as follows: Where random means random selection, I bg_p I represents the pixel value of a pixel region. bg_all (x,y) represents the pixel value at coordinates (x,y) in the completed noisy background image.
6. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, The method for obtaining the random fiber foreground image in step D is as follows: Step D1: Enlarge the fiber foreground image; Step D2: Translate the expanded fiber foreground image. Step D3: Rotate the translated image at its center. Step D4: Perform a center cropping operation on the rotated image to obtain a random fiber foreground image.
7. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, Step D1 involves creating a transparent image larger than the fiber foreground image, and then placing the fiber foreground image at the center of the transparent image; Step D2 involves a translation operation including vertical and / or horizontal translation; Step D4 involves cropping the image to the same size as the original fiber foreground image, resulting in a random fiber foreground image. I fiber_random (x,y)=corp(totate(transform(paste(expand(I fiber (x,y)))))) Among them, I fiber_random (x,y) represents the random fiber foreground image I. fiber_random The pixel value at coordinates (x, y) is used to expand the image to create a foreground image I larger than the fiber. fiber A transparent image, paste means to paste I fiber Place it in the center of a transparent image. `transform` represents a translation operation, `totate` represents a center rotation operation with a random angle, and `corp` represents cropping.
8. The data augmentation method for wool and cashmere microscope images according to claim 1, characterized in that, In step E, the random fiber foreground image is fused with the completed noisy background image, and then a completion process is performed again according to step C to obtain the final new wool and cashmere microscope image.
9. The data augmentation method for wool and cashmere microscope images according to claim 1 or 8, characterized in that, Step E involves fusing the random fiber foreground image with the completed noisy background image, as follows: The fiber mask is obtained from the random fiber foreground image. The pixel values at the corresponding mask positions in the completed noisy background image are removed. Then, the random fiber foreground image and the noisy background image are combined to form a wool / cashmere microscope image, as shown in the following formula: Among them, I merged (x,y) represents the new microscopic image I of wool and cashmere. merged The pixel value at coordinates (x, y), I fiber_mask (x,y) represents the pixel value at coordinates (x,y) in the fiber mask corresponding to the random fiber foreground image.
10. A data augmentation system for microscopic images of wool and cashmere, characterized in that, The system includes a mask acquisition module, an image separation module, a noise background completion module, a fiber random placement module, and an image fusion module. The mask acquisition module processes wool and cashmere microscope images to obtain wool and cashmere fiber masks. The image separation module divides the wool and cashmere microscope images into fiber foreground images and noise background images based on the fiber masks. The noise background completion module completes the noise background images to obtain the completed noise background images. The fiber random placement module is used to simulate random placement of the fiber foreground image and obtain a random fiber foreground image; the image fusion module is used to fuse the random fiber foreground image with the completed noisy background image and obtain a new wool and cashmere microscope image.
Citation Information
Patent Citations
Method and device for augmenting magnetic code data in bill, equipment and medium
CN116597455A
Pipeline defect identification method and device and storage medium
CN118212213A
Self-adaptive copying and pasting cluster target motion sequence video generation method
CN119007072A
Mesenchymal stem cell confluence degree calculation method and system based on image semantic segmentation
CN119477900A
Data augmentation for engineering schematic training data used with machine learning models
US20230297879A1