Garment fabric defect detection method and system based on image semantic segmentation
By establishing a dynamic illumination response band and a time-stabilized anchor chain in fabric inspection, the influence of illumination disturbance is eliminated, the problem of texture instability caused by the drift of the incident angle of illumination is solved, and high-precision and stable defect detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-24
AI Technical Summary
In existing fabric inspection technologies, slight shifts in the incident angle of light cause instability in texture rhythm features. Semantic segmentation networks struggle to distinguish between genuine texture changes and pseudo-changes introduced by lighting variations, resulting in false defect boundaries and affecting the continuity and reliability of inspection results.
By establishing a dynamic illumination response band, generating a time-stable anchor chain and a spatial reflection compensation band, adjusting the brightness distribution to eliminate the influence of illumination disturbance, constructing a rhythmic balance channel, and dynamically adjusting the local brightness threshold, the texture peaks and valleys maintain periodic consistency under different illumination conditions.
It achieves continuous and stable texture rhythm when the incident light angle drifts, eliminates false edges and grayscale jumps, improves the stability and accuracy of detection results, and ensures high accuracy and time continuity of fabric defect detection.
Smart Images

Figure CN121724946A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fabric detection, and particularly relates to a garment fabric defect detection method and system based on image semantic segmentation. BACKGROUND
[0002] The garment fabric defect detection based on image semantic segmentation refers to using computer vision and deep learning technology to perform pixel-level semantic understanding and region division on the collected fabric image, so as to automatically identify the region with defects. Specifically, the method first acquires the surface image of the fabric through a high-resolution camera, and inputs the image into a trained semantic segmentation network (such as U-Net, DeepLab or SegFormer, etc.), which classifies each pixel in the image and distinguishes normal texture from defect regions, such as holes, oil stains, wrinkles, thread ends, color differences, etc. Subsequently, through region labeling, boundary extraction and statistical analysis of the segmentation results, the type, area and position of the defect can be accurately located. Compared with the traditional detection method based on threshold or texture features, the detection based on semantic segmentation can better understand the subtle abnormalities in complex texture background, realize adaptive recognition of different types of fabric and diversified defects, and has the characteristics of high precision, strong robustness and high automation.
[0003] The prior art has the following disadvantages: In the fabric detection process where the texture is periodically repeated, when the light incidence angle appears a slight drift, the originally stable texture rhythm feature will be temporarily reversed in the time sequence, and the light and dark distribution relationship of the local region will be temporarily disturbed. In this case, when the semantic segmentation network extracts features and identifies boundaries for consecutive frames, it is difficult to effectively distinguish between real texture changes and pseudo changes introduced by light changes, and it is easy to misidentify the peak-valley region that should belong to the normal texture structure as a defect boundary, thereby forming a false broken area or discontinuous detection result. This problem is more obvious in fabrics with strong surface reflectivity or fine texture structure. Once it occurs, it will destroy the continuity of the detection result in the time dimension, cause the defect mask to appear misplacement diffusion between frames, and ultimately affect the stability and reliability of the overall fabric quality judgment process.
[0004] The above information disclosed in the background section is only used to enhance the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The purpose of the present application is to provide a garment fabric defect detection method and system based on image semantic segmentation to solve the problems in the background.
[0006] In order to achieve the above object, the present application provides the following technical scheme: a garment fabric defect detection method based on image semantic segmentation, comprising the following steps: Step one, obtain image data of the weave period area of the fabric to be detected, and establish a dynamic light response band around the weave period area, continuously collect the brightness distribution trajectory in the interval of the light incident angle change in the light response band, form a light response sequence for characterizing the incident angle drift characteristics, and provide basic data for subsequent weave rhythm adjustment; Step two, based on the light response sequence, set a rhythm balance window in the weave period area, and compare the weave peak and valley positions in the continuous frames according to the brightness change trend, mark the rhythm inversion section caused by light disturbance, and take the rhythm inversion section as the reference benchmark for texture recovery, for subsequent time stability correction; Step three, generate a time stability anchor chain according to the rhythm inversion section, and rearrange the brightness sequence in the rhythm inversion section with the time stability anchor chain, so that the brightness sequence maintains a continuous structure in the stable interval of the previous and subsequent frames, thereby realizing smooth transition of the light and dark distribution in the time dimension, to obtain a stable output texture rhythm signal; Step four, guided by the time stability anchor chain, establish a space reflection compensation band in the corresponding weave space area, and diffuse the brightness distribution in the space reflection compensation band in the direction, so that the gray transition of the light inversion section remains smooth, to weaken the energy concentration effect at the false edge and improve the consistency of the texture boundary; Step five, based on the continuous texture area output after the space reflection compensation band processing, construct a rhythm balance channel, and dynamically adjust the local brightness threshold limit according to the rhythm of the time stability anchor chain, so that the weave peak and valley maintain period consistency, and eliminate the texture breakage and discontinuity of the detection result caused by light drift from the root, thereby realizing the time sequence stability and high-precision identification of the garment fabric defect detection.
[0007] Preferably, the step of obtaining image data of the weave period area of the fabric to be detected and establishing a dynamic light response band comprises: The garment fabric to be detected is evenly spread on the optical detection table, so that the fabric surface is tightly attached to the detection plane, the included angle between the weave main direction and the light incident direction is controlled to change within a controllable range, and a high-resolution industrial camera is used to move along the light direction at a constant speed, continuously collecting image sequences covering different incident angles; Select the area containing complete weave repeating structure in the obtained multi-angle image sequence as the weave period area, and extend on both sides of the area to form a light response band, so that the light response band covers the reflection levels of the weave from the bright area to the dark area, to capture the brightness change characteristics under the change of light incident angle; After the establishment of the illumination response band, the illumination incident angle is gradually adjusted and the brightness information in the texture period area is synchronously collected to record the brightness changes of each pixel in the illumination response band at different angles and form a brightness distribution trajectory; The brightness distribution trajectory in the illumination response band is rearranged according to the time sequence of the illumination incident angle to form an illumination response sequence reflecting the incident angle drift characteristics, thereby providing basic data for subsequent texture rhythm adjustment.
[0008] Preferably, the step of setting the rhythm balance window and calibrating the rhythm inversion section based on the illumination response sequence comprises: Based on the formed illumination response sequence, the texture period area is selected as the analysis range, and the position of the rhythm balance window is determined according to the brightness change law in the area, so that the rhythm balance window covers the complete period unit from the transition of the bright area to the dark area; After the establishment of the rhythm balance window, the brightness distribution of adjacent frames in the illumination response sequence is time-correlated and compared, the relative position changes of the texture peak and valley in the continuous frames are compared, and the bright-dark inversion and the time period of the rhythm inversion are determined; After identifying the brightness inversion time period, the time period is taken as the rhythm inversion section for joint calibration in the spatial and time dimensions, so that the boundaries of the rhythm inversion section are aligned with the actual positions of the texture peaks and valleys, thereby limiting the influence range of the illumination disturbance; The calibrated rhythm inversion section is taken as the reference benchmark for texture recovery, and the rhythm balance window is aligned with the brightness distribution of the previous and subsequent frames with the rhythm inversion section as the time anchor point, thereby providing a consistent reference for subsequent time stability correction.
[0009] Preferably, the step of generating a time stability anchor chain according to the rhythm inversion section and rearranging the brightness sequence comprises: According to the calibrated rhythm inversion section, the spatial position with the most representative brightness change in the texture period area is selected as the initial reference position of the time anchor point, and the time anchor points are arranged in the time sequence of the inversion section to form a time stability anchor chain; After the establishment of the time stability anchor chain, the starting anchor point of the time stability anchor chain is taken as the time alignment benchmark, and the brightness sequence in the rhythm inversion section is rearranged in the order of the time anchor points, so that the brightness curve restores the continuous structure consistent with the texture rhythm; After the rearrangement of the brightness sequence is completed, the time transition relationship between the previous and subsequent frames is established based on the time stability anchor chain, the time span of the time stability anchor chain is extended to the previous and subsequent stable intervals, and the smooth connection of the brightness between the rhythm inversion section and the stable section is realized; After the extension of the time stability anchor chain is completed, the rearranged brightness sequence is integrated in the time sequence to generate a texture rhythm signal with continuous output characteristics, so that the bright-dark distribution remains stable in the time dimension.
[0010] Preferably, the time span of the time stable anchor chain extends to the stable interval before and after the rhythm reversal section, and the gray level change of the lightness transition region is kept continuous by the sequential connection of the time anchor points, with the peak-valley lightness change in the texture period region as the reference, so as to realize smooth connection of lightness at the connection between the rhythm reversal section and the front and rear frames, and ensure continuous output of the texture rhythm signal in the time dimension.
[0011] Preferably, the step of establishing a space reflection compensation band and diffusing lightness direction based on the time stable anchor chain comprises: According to the formed time stable anchor chain, the corresponding space position range is determined in the texture period region, and the space reflection compensation band is constructed based on the range, so that the time nodes of the time stable anchor chain are mapped into the space coordinate system and extended to form a band structure along the texture direction and the vertical direction; After the space reflection compensation band is established, the lightness distribution in the compensation band is directionally extended, so that the lightness diffusion path is consistent with the main direction of the texture, so as to reduce the sudden change of gray gradient caused by light disturbance and restore the natural continuity of lightness distribution; After the lightness extension in the space reflection compensation band is completed, a gray transition band is established on both sides of the compensation band boundary, and lightness diffusion is performed along the texture direction, so that the light and dark transition region forms a continuous intermediate gray layer, so as to reduce the appearance of false edges; After the lightness diffusion in the space reflection compensation band and the gray transition band is completed, the overall lightness distribution of the texture period region is uniformly coordinated, so that the lightness structure inside and outside the compensation band is consistent in time and space dimensions, thereby realizing smooth connection of the texture boundary.
[0012] Preferably, the width of the gray transition band is determined according to the texture reflectivity and the light incidence angle change range, and the lightness is diffused along the texture direction, so that the gray gradient gradually flattens in space, thereby forming a continuous transition layer between the space reflection compensation band and the texture period region, so as to ensure the synchronous consistency of light and dark distribution in time and space dimensions.
[0013] Preferably, the step of constructing a rhythm balance channel and dynamically adjusting the local lightness threshold limit based on the continuous texture region output after the space reflection compensation band processing comprises: In the continuous texture region obtained after the space reflection compensation band processing, a region with complete texture period structure and smooth lightness transition is selected as the construction basis of the rhythm balance channel, and the rhythm balance channel is established based on the time stable anchor chain as the time main line; After the rhythm balance channel is established, the lightness distribution in the rhythm balance channel is time dynamically analyzed according to the rhythm characteristics of the time stable anchor chain, the initial setting range of the local lightness threshold limit is determined, and the initial setting range is kept synchronized with the time rhythm; After the dynamic range of the local brightness threshold is determined, the brightness distribution in the rhythm balance channel is rhythmically adjusted to keep the texture peak and valley consistent in time and space dimensions and avoid false breaks; After the dynamic adjustment of the rhythm balance channel is completed, the adjusted brightness distribution in the channel is integrated with the surrounding undisturbed area to form a continuous texture output with soft brightness change and consistent peak and valley rhythm, thereby maintaining the time continuity and spatial integrity of the detection result.
[0014] Preferably, the width of the rhythm balance channel is determined according to the texture period length and the illumination change range, and the time node of the time stable anchor chain is used as the rhythm reference for brightness adjustment, so that the brightness threshold in the channel changes synchronously in time dimension, and the brightness adjustment extends along the texture direction to maintain the consistency of the peak and valley period, thereby ensuring that the continuous texture output forms a unified structure in time and space.
[0015] The garment fabric defect detection system based on image semantic segmentation includes a dynamic illumination response construction module, a rhythm balance calibration module, a time stable anchor chain generation module, a spatial reflection compensation module, and a rhythm balance adjustment module. The dynamic illumination response construction module acquires image data of a texture period region of the fabric to be detected, and establishes a dynamic illumination response band around the texture period region. The brightness distribution trajectory is continuously collected in the interval of the illumination incident angle change in the illumination response band to form an illumination response sequence. The rhythm balance calibration module sets a rhythm balance window in the texture period region based on the illumination response sequence, and compares the positions of the texture peak and valley in the continuous frames according to the brightness change trend to calibrate the rhythm reversal section caused by the illumination disturbance. The time stable anchor chain generation module generates a time stable anchor chain according to the rhythm reversal section, and rearranges the brightness sequence in the rhythm reversal section with the time stable anchor chain to maintain the continuous structure in the stable interval of the previous and next frames. The spatial reflection compensation module establishes a spatial reflection compensation band in the corresponding texture space region guided by the time stable anchor chain, and diffuses the brightness distribution in the spatial reflection compensation band in the direction. The rhythm balance adjustment module constructs a rhythm balance channel based on the continuous texture region output after the spatial reflection compensation band processing, and dynamically adjusts the local brightness threshold according to the rhythm of the time stable anchor chain to maintain the period consistency of the texture peak and valley.
[0016] In the above technical solution, the present application provides technical effects and advantages: The present application can keep the brightness distribution and texture rhythm continuous and stable when the fabric has a slight drift in the light incidence angle by establishing a dynamic light response band in the texture period area and combining the synergistic effect of the time stable anchor chain and the space reflection compensation band. By adaptively balancing the light and dark inversion caused by light disturbance in time and space dimensions, the rhythm rupture and mask misplacement of the texture structure in the continuous frame can be effectively avoided, so that the detection result remains smooth and consistent in the time dimension, and the real structure of the fabric texture is accurately restored.
[0017] The present application can maintain the periodic consistency of the texture peak and valley under different light conditions by constructing a rhythm balance channel in the continuous texture area and dynamically adjusting the local brightness threshold according to the time stable anchor chain. This technical means can eliminate the false edges and gray level jumps caused by light drift, and at the same time, the segmentation boundary can maintain a unified structure in the time sequence. Therefore, the bright-dark transition of the fabric detection is more natural, the boundary recognition is more accurate, and the stability and segmentation accuracy of the overall detection result are significantly improved, providing reliable technical support for high-precision automatic detection in complex lighting environments. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0019] Figure 1 The method flow chart of the garment fabric defect detection method based on image semantic segmentation of the present application.
[0020] Figure 2 The module schematic diagram of the garment fabric defect detection system based on image semantic segmentation of the present application. DETAILED DESCRIPTION
[0021] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these examples are provided so that this disclosure will be thorough and complete, and will fully convey the gist of each patent claim to those skilled in the art.
[0022] The present application provides a garment fabric defect detection method based on image semantic segmentation as shown in Figure 1 The method comprises the following steps: Step one, obtain the image data of the weave period area of the fabric to be detected, and establish a dynamic light response band around the weave period area, continuously collect the brightness distribution track in the interval of the light incidence angle change in the light response band, form the light response sequence for characterizing the incidence angle drift characteristics, to provide basic data for subsequent weave rhythm adjustment; The specific implementation of this step is as follows: The garment fabric to be detected is spread flat on the optical detection table, so that the fabric surface is as close as possible to the detection plane, avoiding inconsistent light reflection angles due to wrinkles or slight undulations. The spreading direction of the fabric should be consistent with the horizontal reference line of the detection plane, and the included angle between the weave main direction and the light incidence direction should be controlled by a precise angle adjusting device, so that the incidence angle can slowly change within a controllable small range. The light source is a linear surface light source with high uniformity and low flicker frequency, which is symmetrically arranged along the weave direction. The distance between the light source and the detection plane is accurately set within a fixed value range by the distance measuring device, so as to reduce the random fluctuation of light intensity. In order to ensure that the weave details are clear and visible, a high-resolution industrial camera is used for image acquisition, the lens focal length is fixed, and the focal plane is parallel to the weave plane. During the acquisition process, the camera is driven by a stepping motor to move at a constant speed along the light incidence direction, so that the same weave area is continuously photographed at multiple incidence angles, forming an image sequence covering from low angle to high angle. Each image contains a complete weave period unit, and the brightness distribution is recorded under the same exposure parameter, ensuring the comparability between images at different angles.
[0023] After obtaining the multi-angle image sequence of the fabric surface, the periodic texture area in the image is accurately positioned. First, select a region containing complete weave repeating structure as the analysis range of the weave period area. By manually or automatically marking the spatial distribution of the texture peak and valley positions in the continuous images, the spatial period length and repeating direction of the weave are determined. On this basis, a fixed width area is extended on both sides of the weave repeating structure in units of weave period, and the combination of the two areas is defined as the light response band. The width of the light response band is determined according to the actual period of the weave and the light reflection characteristics, generally taking two to three times the length of the weave period, to ensure that when the light incidence angle drifts slightly, the brightness change can be completely captured within the response band. In order to eliminate edge interference, the outer boundary of the light response band should be located in the area where the weave reflection changes slowly, and the inner boundary should intersect with the peak and valley transition zone of the weave, so that the response band covers all the reflection levels from bright to dark. The light response band arranged in this way can truly reflect the energy distribution change characteristics of the weave under light disturbance.
[0024] After the establishment of the light response band, the light incident angle is gradually adjusted to continuously change within a small angle interval. At each incident angle position, the brightness information in the weave period region is collected in real time by the camera, and the brightness value of each pixel point in the light response band at this angle is recorded. The frame rate of the camera collection is strictly synchronized with the rate of change of the light angle to ensure that each frame of image corresponds to a specific incident angle. During the collection process, the brightness change of the same weave peak and valley corresponding pixels is continuously recorded to obtain a brightness curve that changes with the angle. The collection of all pixel point brightness curves forms the brightness distribution trajectory of the light response band in the time dimension. Each brightness trajectory corresponds to the light response characteristics of a specific spatial position in the weave period region, and the change law of these trajectories under different incident angles reflects the actual influence of light disturbance on the reflection distribution of the fabric surface. In order to avoid external interference, the collection process should be carried out in a constant temperature and air flow-free environment, and the stability of the light source brightness output should be maintained to ensure that the brightness trajectory only reflects the real brightness change caused by the change of the light angle.
[0025] After the brightness distribution trajectory of the light response band is collected, all the brightness trajectories are rearranged in the time sequence of the change of the light incident angle to form a light response sequence. Based on the brightness change curve of each pixel in the weave period region, the light response sequence continuously connects the brightness change process with the angle for the same spatial position to construct a time brightness distribution sequence reflecting the incident angle drift characteristics. In the light response sequence, each response curve represents the energy change law of the weave structure under light disturbance, the bright area corresponds to the high reflection area, the dark area corresponds to the low reflection area, the peak and valley spacing of the curve reflects the periodic rhythm of the weave, and the fluctuation of the curve shape reveals the disturbance degree of the light angle drift on the reflection brightness. In this way, the brightness change of the weave period region is no longer represented as isolated inter-frame differences, but is transformed into a response sequence with time continuity. The formation of the light response sequence enables the drift trend of the bright and dark distribution to be judged based on the sequence as a reference in the subsequent weave rhythm adjustment and light compensation process, thereby providing accurate reference for the setting of the rhythm balance window and the establishment of the time stability anchor chain.
[0026] Through the above steps, the whole process from high-precision image collection of the weave period region to establishment of the light response band, then to brightness trajectory collection and formation of the light response sequence is completed. This process not only realizes the continuous recording of the brightness distribution characteristics of the fabric under different light incident angles, but also converts the light disturbance into traceable response information through the establishment of the dynamic light response band.
[0027] Through the structured light response record, the detection system can maintain the time continuity and spatial consistency of the texture rhythm when facing the micro incident angle drift, and the misidentification problem caused by light changes is fundamentally reduced.
[0028] In step two, based on the light response sequence, a rhythm balance window is set in the texture period area, and the texture peak and valley positions in the continuous frames are compared according to the brightness change trend, the rhythm reversal section caused by the light disturbance is marked, and the rhythm reversal section is taken as the reference benchmark for texture recovery for subsequent time stability correction. The specific implementation of this step is as follows: Based on the formed light response sequence, the texture period area is selected as the analysis range, and the brightness change law in the light response sequence is preliminarily analyzed in the area to determine the layout position of the rhythm balance window. Specifically, by observing the continuous curve of the brightness of each pixel in the light response sequence with the change of the incident angle, it can be found that the texture period area has a periodic repeating structure in the distribution of the brightness peak and valley. In order to maintain the time consistency of the texture rhythm under the condition of light disturbance, a rhythm balance window is set in each complete texture period range. The length of the rhythm balance window is determined according to the length of the texture period, and the starting boundary corresponds to the peak position of the texture brightness curve, and the terminal boundary corresponds to the adjacent valley position, so that the rhythm balance window completely covers a period unit from the bright area to the dark area. The width of the rhythm balance window is adaptively set according to the brightness fluctuation range in the light response sequence, so that no matter how the incident angle changes, the bright and dark distribution of the texture in the window can be completely captured. The role of the rhythm balance window is to provide a stable analysis interval in the time dimension, so as to facilitate the comparison and change marking of the peak and valley positions of the continuous frames of the texture.
[0029] After the rhythm balance window is established, the brightness distribution of adjacent frames in the light response sequence is compared in time. In order to ensure the corresponding relationship of the peak and valley positions in time, the brightness change trend of each frame in the light response sequence is extracted in the range of the rhythm balance window, so that the brightness change of the same texture position can be compared between different frames. By comparing the relative position change of the peak and valley values of the texture in the continuous frames, it can be found that when the light incident angle produces a slight drift, the originally stable bright area and dark area will be temporarily reversed in brightness in some frames. At this time, the time axis of the rhythm balance window will appear the phenomenon that the peak and valley positions are exchanged, that is, the spatial position corresponding to the brightness peak in the last frame becomes the brightness valley, and vice versa. This peak and valley exchange phenomenon is a direct manifestation of the rhythm reversal caused by the light disturbance. In order to ensure the identification accuracy of the reversal section, the time frame interval is kept consistent during the comparison, so that the peak and valley corresponding relationship in each texture period can be continuously tracked, so that the time period of the rhythm change can be accurately identified.
[0030] After identifying the time period of the brightness inversion, it is jointly calibrated in the spatial and temporal dimensions as a rhythm inversion segment. The spatial position of the rhythm inversion segment corresponds to the area where the light-dark distribution relationship in the rhythm balance window is reversed, and its time range corresponds to the frame sequence interval of the brightness inversion in the light response sequence. In order to make the calibration process more consistent with the physical structural characteristics of the texture, the boundaries of the rhythm inversion segment need to be aligned with the actual spatial positions of the texture peaks and valleys, so that the influence of the light disturbance is limited within the actual light-dark transition area. The calibration of the rhythm inversion segment not only includes the position identification of the inversion center frame, but also includes the definition of the inversion duration, so as to provide a complete reference range in the subsequent time stability correction process. In this way, the light-dark inversion phenomenon of the texture under the light disturbance is fixed in the form of a time interval, so that targeted adjustment can be made according to the segment in the subsequent texture recovery process.
[0031] Finally, the calibrated rhythm inversion segment is used as a reference benchmark for texture recovery for subsequent time stability correction. Specifically, the rhythm inversion segment is used to establish the mapping relationship of the rhythm change of the texture under the light disturbance, so that the brightness inversion under the light drift condition can be effectively identified and corrected. In the subsequent time stability adjustment process, the rhythm balance window will take the rhythm inversion segment as the time anchor point to align the brightness distribution of the previous and subsequent frames, so that the texture peak and valley distribution before and after the light disturbance remains continuous in the time dimension. By taking the rhythm inversion segment as a reference, it can be ensured that when the light incidence angle changes, the light-dark order of the texture rhythm will not be incorrectly identified as a defect boundary, thereby avoiding the segmentation result from appearing broken or false edges. Throughout the process, the rhythm balance window plays a role in stabilizing the analysis range, the light response sequence provides the time trajectory of the brightness change, and the calibration of the rhythm inversion segment provides a consistent reference in space and time for the subsequent time stability correction, so that the light-dark rhythm of the texture in the continuous frames remains smooth and stable.
[0032] Through the implementation of the above steps, the whole process from the use of the light response sequence to the establishment of the rhythm balance window, and then to the continuous frame brightness comparison and the calibration of the rhythm inversion segment is completed. This process enables the rhythm change of the texture under the light disturbance to be accurately recorded and defined.
[0033] Step three, according to the rhythm inversion segment, a time stability anchor chain is generated, and the brightness sequence in the rhythm inversion segment is rearranged by the time stability anchor chain, so that the brightness sequence remains continuous in the stable interval of the previous and subsequent frames, thereby realizing the smooth transition of the light-dark distribution in the time dimension, and obtaining a stable output texture rhythm signal; The specific implementation of this step is as follows: According to the calibrated rhythm inversion section, the spatial position with the most representative brightness change in the texture period region is selected as the initial reference position of the time anchor point. The rhythm inversion section reflects the specific time range of the inversion of light and dark relationship under light disturbance, so in each inversion section, the area with the most concentrated peak value change and the highest change rate is selected as the starting point of the time stable anchor chain. In order to ensure the physical correspondence of the time anchor point, the spatial position of each time anchor point should be corresponded to the physical structure of the texture, so that the anchor point can reflect the time change characteristics and maintain consistency with the periodic structure of the texture. By arranging the time sequence of the continuous inversion section, a set of anchor points with continuous time sequence relationship can be obtained, and the time sequence of these anchor points is consistent with the sequence of brightness change caused by light disturbance. The anchor point set constitutes the basic framework of the time stable anchor chain, forming a time reference sequence covering the entire rhythm inversion section, which provides a reference for subsequent brightness rearrangement.
[0034] After the preliminary establishment of the time stable anchor chain, the brightness sequence in the rhythm inversion section is mapped and adjusted according to the time relationship. Specifically, the starting anchor point of the time stable anchor chain is taken as the time alignment reference, and the brightness sequence of each pixel in the rhythm inversion section is rearranged according to the order of the time anchor point, so that the inverted relationship of light and dark caused by light disturbance is adjusted back to the arrangement structure consistent with the time sequence. In this process, the continuity of the brightness change trajectory of each pixel in time should be maintained to avoid discontinuity or misplacement. Through the time sequence guidance of the anchor chain, the brightness curve in the inversion section will be reorganized, so that the peak-valley alternating relationship is consistent with the texture rhythm, and the inversion caused by the light angle drift no longer occurs. At this time, the brightness sequence is reconnected into a continuous structure in the time axis, and the distribution of bright and dark areas in the time dimension returns to the periodic state consistent with the texture rhythm. This step smooths the time inversion caused by light disturbance and forms a continuous brightness evolution trajectory, laying a foundation for the smooth output of the subsequent light and dark distribution.
[0035] After the brightness sequence in the rhythm reversal section is rearranged, the time stable anchor chain is used as the core to establish the time transition relationship between the front and back frames. Since the change in the angle of incidence of light is usually continuous rather than abrupt, in order to make the brightness distribution between the front and back frames smooth, the time stable anchor chain needs to be extended between the front and back frames, so that the time span of the anchor point covers the front and back stable intervals of the reversal section. By expanding the time range of the anchor point to the stable areas before and after the start of the light disturbance, a smooth connection band is formed in time, so that the brightness remains continuous between the rhythm reversal section and the stable section. At this time, the brightness change of each frame is referenced to the time anchor point of the adjacent frame, so that the brightness and darkness change trend can be continued rather than abruptly changed. The brightness sequence processed in this way not only restores the rhythm continuity within the reversal section, but also realizes seamless connection of the brightness at the connection with the front and back frames, thereby eliminating the time fault phenomenon caused by the light disturbance. In this way, the time stable anchor chain forms a brightness balance constraint mechanism in the time dimension, so that the entire texture period area still maintains a regular brightness distribution rhythm under the condition of light change.
[0036] After the time stable anchor chain is extended and the brightness is smoothly connected, the rearranged brightness sequence is integrated according to the time sequence of the time stable anchor chain to generate a texture rhythm signal with continuous output characteristics. The texture rhythm signal uses the time stable anchor chain as the time main line to uniformly express the brightness change in the rhythm reversal section and the brightness state in the stable interval, so that the brightness and darkness change presents a smooth periodic law on the entire time axis. In this way, the brightness and darkness distribution of the texture before and after the light disturbance is reorganized into a continuous time structure, and the brightness and darkness reversal caused by the light drift is naturally transitioned to smooth change. The output of the texture rhythm signal is no longer affected by the transient light disturbance, but realizes continuous brightness output based on the time stable anchor chain. Therefore, the brightness and darkness rhythm of the texture maintains a stable periodic characteristic in the time dimension, providing a reliable time basis for subsequent spatial reflection compensation and rhythm balance adjustment, so that the clothing fabric shows more coherent brightness response and balanced light adaptability in the detection process.
[0037] Through the above process, the non-continuous brightness change caused by the light disturbance can be reorganized into a time-consistent continuous brightness structure, so that the texture can still maintain a stable rhythm output in the time dimension under the condition of light drift.
[0038] Step four, guided by the time stable anchor chain, a spatial reflection compensation band is established in the corresponding texture space area, and the brightness distribution in the spatial reflection compensation band is directionally diffused, so that the gray transition of the light reversal section is kept smooth, to weaken the energy concentration effect at the false edge and improve the consistency of the texture boundary; The specific implementation of this step is as follows: According to the time-stable anchor chain formed, the corresponding spatial position range in the texture period area is determined, and a spatial reflection compensation band is constructed based on the range. The time sequence information of the texture that keeps the brightness continuity during the illumination drift is recorded in the time-stable anchor chain, so in the spatial domain, the time node corresponding to the anchor chain needs to be projected into the spatial coordinate system of the texture period area, so that each time anchor point can be mapped to a specific spatial position. Taking these spatial positions as the center, a spatial area with a certain width is extended along the texture direction and the vertical texture direction respectively, forming a band-shaped reflection compensation band. The width of the compensation band is determined according to the texture period length and the amplitude of the illumination incident angle change, so that it can cover the main area affected by the illumination disturbance, and will not extend to the background part that is not affected. The boundary of the spatial reflection compensation band should be parallel to the texture direction, so that it can conform to the texture direction during the subsequent brightness diffusion process. In this way, the time continuity contained in the time-stable anchor chain is accurately mapped to the spatial structure, providing a clear spatial channel for the subsequent brightness directional diffusion.
[0039] After the spatial reflection compensation band is established, the brightness distribution in the compensation band is preliminarily arranged to eliminate the unevenness of local strong reflection and weak reflection caused by illumination disturbance. In the illumination reversal section, the brightness-dark relationship is reversed in a short time, which will cause the local area gray gradient to mutate, and the brightness energy will concentrate at the edge, causing false boundaries or pseudo defects. In order to alleviate this phenomenon, the brightness distribution of each spatial position needs to be directionally extended in the spatial reflection compensation band according to the order of the time-stable anchor chain. The direction of the path of directional extension should be consistent with the main direction of the texture, so as to ensure that the direction of brightness diffusion is consistent with the reflection law of the texture. In this way, the gray transition area between the bright area and the dark area can be smoothly expanded without changing the overall brightness structure, so as to weaken the local energy concentration caused by illumination reversal. The core of this step is to use the continuous time characteristics of the time-stable anchor chain to orderly transfer the brightness change trend in space, so that the gray distribution affected by the illumination disturbance can return to the natural spatial transition state.
[0040] After the completion of the spatial reflection compensation in-band brightness extension, a gray transition zone is established at the boundary area of the compensation band to achieve the spatial smoothing connection of light and dark distribution. Since the light reversal usually occurs at the position where the peaks and valleys of the texture alternate, the brightness of this area changes most sensitively, and if it is not smoothed, it is easy to form a pseudo crack or discontinuous boundary. In this step, a gray transition zone is formed by extending a buffer area on both sides of the compensation band boundary with the spatial projection point of the time stable anchor chain as the center. The width of the gray transition zone is determined according to the reflectivity of the texture and the amplitude of the light change, and is generally one-third to one-half of the width of the compensation band. In the gray transition zone, the brightness is diffused along the texture direction, so that the gray gradient of the light and dark transition area gradually slows down. Through this diffusion mode, a continuous intermediate gray layer is formed between the light and dark areas, thereby effectively reducing the appearance of false edges. At the same time, the brightness distribution in the gray transition zone is still guided by the time sequence of the time stable anchor chain, so that the spatial diffusion of the brightness change is consistent with the rhythm change in the time dimension, ensuring that the brightness smooth transition is not only naturally coherent in space, but also synchronized with the texture rhythm in time.
[0041] After the completion of the brightness diffusion in the spatial reflection compensation band and the gray transition zone, the brightness distribution of the entire texture period area is uniformly coordinated to form a continuous reflection distribution pattern in the whole. Specifically, the brightness reference values of the front and rear frames in the time stable anchor chain are used as the boundary constraints of the spatial reflection compensation band, so that the brightness change in the compensation band is consistent in both time and space dimensions. Through this two-dimensional constraint relationship, the light and dark distribution of the light reversal section is no longer a sudden change, but a slow transition into the overall structure of the texture, thereby forming a natural brightness connection effect in vision. Through the action of the spatial reflection compensation band, the continuity of the texture boundary is restored, the energy concentration of the false edge is weakened, and the light and dark boundary is transformed from the original sharp fault to the gradual level, so that the texture can still maintain clear and stable structure characteristics under complex lighting conditions. This processing not only ensures the smoothness of the brightness distribution of the fabric surface, but also provides a stable spatial basis for subsequent rhythm balance adjustment, so that the fabric maintains a high consistency of texture expression in semantic segmentation detection.
[0042] This process extends the brightness continuity in the time dimension to the spatial domain, forming a two-dimensional stable structure of the light and dark distribution of the texture under the disturbance of light, thereby effectively weakening the energy concentration effect of the false edge and improving the overall consistency of the texture boundary in the time-space dimension.
[0043] Step five, based on the continuous texture region output after the space reflection compensation band processing, construct the rhythm balance channel, and dynamically adjust the local brightness threshold limit according to the rhythm of the time stable anchor chain, so that the texture peak and valley maintain periodic consistency, and the problems of texture breakage and discontinuity of detection results caused by illumination drift are eliminated from the root, thereby realizing the time stability and high precision recognition of garment fabric defect detection; The specific implementation of this step is as follows: In the continuous texture region obtained after the space reflection compensation band processing, select a region with complete weave period structure, smooth brightness transition and clear boundary as the basis for constructing the rhythm balance channel. The space reflection compensation band has realized the spatial smooth transition of light and dark distribution in the previous stage, so the brightness gradient in this region has tended to be stable, which can provide an ideal brightness environment for the formation of the rhythm balance channel. In the construction process, take the time stable anchor chain as the time main line, map the rhythm information of the brightness change in the front and rear frames to the continuous texture region, so that the brightness change of each time node corresponds to the spatial distribution of the weave structure. Set the main axis of the rhythm channel along the weave direction, so that the channel covers the complete peak and valley change period. The width of the rhythm balance channel is determined according to the weave period length and the local illumination change range, and is generally an integer multiple of the weave period length to ensure that the brightness adjustment has enough range support. Through this space and time combined construction method, the rhythm balance channel embodies the continuity in brightness distribution and the synchronization in time change, providing an operable basic environment for the dynamic adjustment of the local brightness threshold limit.
[0044] After the establishment of the rhythm balance channel, the brightness distribution in the rhythm balance channel is dynamically analyzed according to the rhythm characteristics of the time stable anchor chain to determine the initial setting range of the local brightness threshold limit. The time stable anchor chain records the time continuous change rhythm of the weave under the condition of illumination drift, and the periodic fluctuation corresponds to the brightness fluctuation of the weave. By corresponding the time nodes of the time stable anchor chain with the spatial distribution of the rhythm balance channel, the time sequence positions of the brightness peak and valley can be identified in the channel. Taking these peak and valley positions as a reference, the upper and lower intervals of the brightness threshold limit are determined, so that the dynamic change of the brightness threshold limit can keep synchronization with the rhythm of the time anchor point. In order to avoid the short-term brightness mutation caused by illumination reflection at some moments, the change rate of the local brightness threshold limit should be smoothly adjusted according to the slow change characteristics of the weave reflection, so that the brightness change in the rhythm channel can reflect the real influence of illumination disturbance, and will not cause sudden instability of light and dark reversal. Through this time and brightness co-constraint method, the brightness distribution in the rhythm balance channel begins to show periodic stable fluctuation, laying a foundation for the periodic consistency of the weave peak and valley.
[0045] After the dynamic range of the local brightness threshold is determined, the brightness distribution in the rhythm balance channel is adjusted in rhythm to keep the peak and valley of the texture consistent in time and space dimensions. The adjustment process is guided by the time stable anchor chain, and the brightness change in the channel is adjusted gradually according to the time sequence. For the bright area, the brightness is extended according to the time sequence of the time anchor, so that the peak value keeps rising or gently falling between adjacent frames; for the dark area, the brightness is connected according to the reverse rhythm of the anchor, so that the valley value keeps stable in the time dimension. In this process, the bright and dark distribution of the texture period region is re-adjusted to a continuous structure consistent with the time rhythm, and the transient bright and dark reversal caused by light drift is absorbed and corrected by the time adjustment mechanism, thereby avoiding false breaks or local discontinuity caused by light disturbance. In order to maintain spatial consistency, the brightness adjustment is extended along the texture direction, so that the peak and valley changes in the rhythm channel are strictly aligned with the texture direction, ensuring that the periodic rhythm of the texture forms a complete and continuous structure in vision.
[0046] After the dynamic adjustment of the rhythm balance channel is completed, the adjusted brightness distribution in the channel is integrated with the surrounding undisturbed area to form a unified continuous texture output. This output not only contains the time rhythm consistency maintained by the time stable anchor chain, but also contains the brightness smoothing feature brought by the spatial reflection compensation band, so that the texture period region still maintains the natural periodic rhythm and stable bright and dark structure under the condition of light drift. In the integration process, the rhythm balance channel plays a bridge role in connecting the brightness changes of the previous and subsequent frames, so that the light disturbance is smoothly transitioned in the time dimension and continuously extended in the spatial dimension. The final output of the continuous texture region shows a whole structure with soft brightness change and consistent peak and valley rhythm, and the texture break phenomenon caused by light drift is radically eliminated, and the detection result keeps continuous in the time dimension and complete in the spatial dimension. Through this series of processing, the defect detection of the fabric can maintain the stability and high precision of the detection result when facing complex lighting conditions, realizing the coordination of texture rhythm, brightness threshold and time rhythm, and making the texture recognition of the garment fabric have stronger robustness and self-adaptive ability.
[0047] Through the above steps, from the output of the spatial reflection compensation band to the construction of the rhythm balance channel, to the dynamic adjustment of the local brightness threshold and the final continuous output, a complete rhythm regulation and stabilization process is formed, which not only realizes the self-balancing of the brightness rhythm under the light disturbance, but also makes the texture peak and valley period consistent in space and time through the dynamic guidance of the time stable anchor chain, thereby fundamentally eliminating the texture break and discontinuity of the detection result caused by light drift.
[0048] The present application can keep the brightness distribution and texture rhythm continuous when the fabric is slightly drifted in the light incident angle by establishing a dynamic light response band in the texture period area and combining the synergistic effect of the time stable anchor chain and the space reflection compensation band. By adaptively balancing the light and dark inversion caused by light disturbance in time and space dimensions, the rhythm rupture and mask misplacement of the texture structure in the continuous frame can be effectively avoided, so that the detection result remains smooth and consistent in the time dimension, and the real structure of the fabric texture is accurately restored. This process realizes the stable reconstruction of texture information under light disturbance, and improves the reliability of detection.
[0049] The present application can make the texture peak and valley maintain periodical consistency under different light conditions by constructing a rhythm balance channel in the continuous texture area and dynamically adjusting the local brightness threshold limit according to the time stable anchor chain. This technical means can eliminate the false edges and gray level jumps caused by light drift, and make the segmentation boundary maintain a unified structure in the time sequence. Therefore, the light and dark transition of fabric detection is more natural, the boundary recognition is more accurate, and the stability and segmentation accuracy of the overall detection result are significantly improved, which provides reliable technical support for high-precision automatic detection in complex light environment.
[0050] The present application provides a garment fabric defect detection system based on image semantic segmentation as shown in Figure 2 The present application provides a garment fabric defect detection system based on image semantic segmentation as shown in The dynamic light response construction module acquires image data of the texture period area of the fabric to be detected, and establishes a dynamic light response band around the texture period area. The brightness distribution trajectory is continuously collected in the interval of the light incident angle change in the light response band to form a light response sequence. The rhythm balance calibration module sets a rhythm balance window in the texture period area based on the light response sequence, and compares the texture peak and valley positions in the continuous frames according to the brightness change trend to calibrate the rhythm inversion section caused by light disturbance. The time stable anchor chain generation module generates a time stable anchor chain according to the rhythm inversion section, and rearranges the brightness sequence in the rhythm inversion section with the time stable anchor chain, so that the brightness sequence maintains a continuous structure in the stable interval of the previous and next frames. The space reflection compensation module establishes a space reflection compensation band in the corresponding texture space area guided by the time stable anchor chain, and diffuses the brightness distribution in the space reflection compensation band in the direction. The rhythm balance adjustment module constructs a rhythm balance channel based on the continuous texture area output after the space reflection compensation band processing, and dynamically adjusts the local brightness threshold limit according to the rhythm of the time stable anchor chain, so that the texture peak and valley maintain periodical consistency.
[0051] The garment fabric flaw detection method based on image semantic segmentation provided by the embodiment of the present application is realized by the garment fabric flaw detection system based on image semantic segmentation. The specific method and process of the garment fabric flaw detection system based on image semantic segmentation are described in the above embodiment of the garment fabric flaw detection method based on image semantic segmentation, and will not be described here.
[0052] The above only describes certain exemplary embodiments of the present application by way of illustration, and it is needless to say that the described embodiments can be modified in various ways without departing from the spirit and scope of the present application for those skilled in the art. Therefore, the above drawings and descriptions are illustrative in nature and should not be understood as limiting the scope of protection of the claims of the present application.
Claims
1. A method for detecting defects in clothing fabrics based on image semantic segmentation, characterized in that, Includes the following steps: Step 1: Acquire image data of the weave periodic area of the fabric to be tested, and establish a dynamic illumination response band around the weave periodic area. Within the illumination response band, continuously collect the brightness distribution trajectory in the range of light incident angle changes to form an illumination response sequence. Step 2: Based on the illumination response sequence, a rhythm balance window is set in the texture periodic region, and the texture peak and valley positions in consecutive frames are compared according to the brightness change trend to identify the rhythm reversal segment caused by illumination disturbance. Step 3: Based on the rhythm reversal segment, generate a time-stable anchor chain, and rearrange the luminance sequence within the rhythm reversal segment using the time-stable anchor chain, so that the luminance sequence maintains a continuous structure in the stable intervals of the preceding and following frames. Step 4: Using the time-stabilized anchor chain as a guide, establish a spatial reflection compensation zone in the corresponding textured space area, and directionally diffuse the brightness distribution within the spatial reflection compensation zone. Step 5: Based on the continuous texture area output after processing by the spatial reflection compensation band, a rhythmic balance channel is constructed, and the local brightness threshold is dynamically adjusted according to the rhythm of the time-stable anchor chain to maintain the periodic consistency of the texture peaks and valleys.
2. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 1, characterized in that, The steps for acquiring image data of the weave periodic region of the fabric to be tested and establishing a dynamic illumination response band include: The garment fabric to be inspected is laid flat on the optical inspection stage, so that the fabric surface is in close contact with the inspection plane. The angle between the main direction of the weave and the incident direction of the light is controlled to vary within a controllable range, and image sequences covering different incident angles are continuously acquired. In the obtained multi-angle image sequence, the region containing the complete repeating structure of the texture is selected as the texture periodic region, and the light response band is extended on both sides of the texture periodic region to form a light response band, so that the light response band covers the reflection layer of the texture from the bright area to the dark area. After the illumination response band is established, the incident angle of illumination is gradually adjusted and the brightness information in the texture period area is collected simultaneously. The brightness changes of each pixel in the illumination response band at different angles are recorded to form a brightness distribution trajectory. The brightness distribution trajectory within the illumination response band is rearranged according to the time sequence of the incident angle of illumination to form an illumination response sequence that reflects the characteristics of incident angle drift.
3. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 2, characterized in that, The steps for setting a rhythm balance window and calibrating the rhythm reversal segment based on the illumination response sequence include: Based on the formed illumination response sequence, the texture periodic region is selected as the analysis range. Within this analysis range, the position of the rhythmic balance window is determined according to the brightness change law, so that the rhythmic balance window covers the complete periodic unit transitioning from the bright area to the dark area. After the rhythm balance window is established, the brightness distribution of adjacent frames in the illumination response sequence is compared in time. By comparing the relative position changes of the texture peak and valley values in consecutive frames, the brightness reversal is identified and the time period of rhythm reversal is determined. After identifying the brightness reversal time period, this time period is used as the rhythm reversal segment for joint spatial and temporal calibration, so that the boundary of the rhythm reversal segment is aligned with the actual position of the texture peaks and valleys, thus limiting the influence range of illumination disturbance. The calibrated rhythm inversion section is used as a reference for texture restoration, so that the rhythm balance window aligns the brightness distribution of the preceding and following frames with the rhythm inversion section as the time anchor point.
4. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 1, characterized in that, The steps for generating time-stable anchor chains based on rhythm reversal segments and rearranging the brightness sequence include: Based on the calibrated rhythm reversal section, the most representative spatial position of brightness change in the weave cycle area is selected as the initial reference position of the time anchor point, and the time anchor points are arranged in the time sequence of the reversal section to form a time stable anchor chain. After the time-stabilized anchor chain is established, the starting anchor point of the time-stabilized anchor chain is used as the time alignment reference. The brightness sequence in the rhythm reversal section is rearranged according to the order of the time anchor points so that the brightness curve restores the continuous structure consistent with the weave rhythm. After the luminance sequence is rearranged, a time transition relationship between the previous and next frames is established with the time-stabilized anchor chain as the core, and the time span of the time-stabilized anchor chain is extended to the previous and next stable intervals. After the time-stabilized anchor chain is extended, the rearranged brightness sequence is integrated in chronological order to generate a texture rhythm signal.
5. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 4, characterized in that, When the time span of the time-stabilized anchor chain extends to the stable interval before and after the rhythm reversal section, the peak and valley brightness changes within the weave cycle region are used as a reference, and the grayscale changes in the brightness transition region are kept continuous by sequentially connecting the time anchor points.
6. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 4, characterized in that, The steps for establishing a spatial reflection compensation zone and performing luminance directional diffusion using a time-stabilized anchor chain as a guide include: Based on the formed time-stable anchor chain, the corresponding spatial position range is determined within the weave cycle area, and a spatial reflection compensation zone is constructed based on this spatial position range, so that the time node of the time-stable anchor chain is mapped to the spatial coordinate system and extends along the weave direction and the vertical direction to form a strip structure. After the spatial reflection compensation zone is established, the brightness distribution within the compensation zone is extended in direction so that the brightness diffusion path is consistent with the main direction of the texture, thereby reducing the sudden change in grayscale gradient caused by illumination disturbance. After completing the brightness extension within the spatial reflection compensation band, a grayscale transition band is established on both sides of the compensation band boundary, and brightness diffusion is carried out along the texture direction, so that the bright-dark transition area forms a continuous intermediate grayscale layer. After the brightness diffusion of the spatial reflection compensation zone and grayscale transition zone is completed, the overall brightness distribution of the texture periodic area is uniformly coordinated to ensure that the brightness structure inside and outside the compensation zone remains consistent in both time and space.
7. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 6, characterized in that, The width of the grayscale transition zone is determined based on the variation of the fabric reflectivity and the incident angle of light, and the brightness is diffused along the fabric direction, so that the grayscale gradient gradually flattens in space, thereby forming a continuous transition layer between the spatial reflection compensation zone and the fabric periodic region.
8. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 6, characterized in that, The steps for constructing a rhythmic balance channel and dynamically adjusting the local brightness threshold based on the continuous texture region output after spatial reflection compensation banding include: Within the continuous texture area obtained after processing with the spatial reflection compensation band, a region with a complete texture periodic structure and smooth brightness transition is selected as the basis for constructing the rhythm balance channel, and the rhythm channel is established with the time-stable anchor chain as the time main line. After the rhythm balance channel is established, based on the rhythm characteristics of the time-stable anchor chain, the brightness distribution in the rhythm balance channel is analyzed in time dynamics to determine the initial setting range of the local brightness threshold and keep it synchronized with the time rhythm. After determining the dynamic range of the local brightness threshold, the brightness distribution in the rhythm balance channel is rhythmically adjusted so that the peaks and valleys of the texture remain consistent in time and space. After the dynamic adjustment of the rhythm balance channel is completed, the adjusted brightness distribution within the channel is integrated with the surrounding undisturbed area to form a continuous texture output with smooth brightness changes and consistent peak and valley rhythms.
9. The method for detecting defects in clothing fabrics based on image semantic segmentation according to claim 8, characterized in that, The width of the rhythm balance channel is determined based on the weave cycle length and the range of light variation, and the time node of the time-stable anchor chain is used as the rhythm benchmark for brightness adjustment.
10. A garment fabric defect detection system based on image semantic segmentation, used to implement the garment fabric defect detection method based on image semantic segmentation as described in any one of claims 1-9, characterized in that, It includes a dynamic illumination response construction module, a rhythm balance calibration module, a time-stabilized anchor chain generation module, a spatial reflection compensation module, and a rhythm balance adjustment module; The dynamic illumination response construction module acquires image data of the weave period area of the fabric to be tested, and establishes a dynamic illumination response band around the weave period area. Within the illumination response band, the brightness distribution trajectory is continuously collected in the interval of light incident angle change to form an illumination response sequence. The rhythm balance calibration module sets a rhythm balance window in the texture period region based on the illumination response sequence, and compares the texture peak and valley positions in consecutive frames according to the brightness change trend to calibrate the rhythm reversal segment caused by illumination disturbance. The time-stabilized anchor chain generation module generates a time-stabilized anchor chain based on the rhythm reversal section, and rearranges the luminance sequence within the rhythm reversal section using the time-stabilized anchor chain, so that the luminance sequence maintains a continuous structure in the stable intervals of the preceding and following frames. The spatial reflection compensation module, guided by a time-stabilized anchor chain, establishes a spatial reflection compensation zone within the corresponding textured spatial area and diffuses the brightness distribution within the spatial reflection compensation zone in a specific direction. The rhythm balance adjustment module constructs a rhythm balance channel based on the continuous texture area output after processing by the spatial reflection compensation band, and dynamically adjusts the local brightness threshold according to the rhythm of the time-stable anchor chain to maintain the periodic consistency of the texture peaks and valleys.