A deep learning-based watchband image defect detection method
Patent Information
- Application Number
- CN202610821839.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-09
- Publication Date
- 2026-09-11
AI Technical Summary
[0004]现有技术在处理表带材质多样性与微小缺陷敏感度差异时存在不足,难以应对材质纹理复杂及背景干扰较大的情景
本发明中,通过对表带图像状态和特征提取响应的实时监控,优化动态特征提取策略,预测表面纹理变化趋势,并优先选择敏感度较高的特征节点执行检测任务。根据特征表达差异调整处理优先级,确保关键缺陷特征层优先参与推理,从而有效避免因材质纹理复杂或背景干扰造成的缺陷漏检或识别延迟。通过动态调整特征提取路径,提升系统计算资源的整体利用效率,减少复杂光影环境下的识别波动性,提高检测系统的稳定性和微小缺陷识别的高效性,有效保障了质检任务的顺利完成并降低了系统因材质多样性而带来的检测风险。
Smart Images

Figure CN122736984A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image defect detection technology, and in particular to a method for detecting defects in watch strap images based on deep learning. Background Technology
[0002] The field of image defect detection technology encompasses methods and systems for automatically identifying and judging surface quality features of products using computer vision algorithms. Its core lies in acquiring image data of the target object in real time and comparing it with a standard feature model. Combined with processing algorithms, defect areas are located and classified to adapt to different production batches and variations in ambient lighting. Its overall technical system covers image acquisition, data preprocessing, feature extraction, and logical judgment, and is widely used in scenarios requiring high-frequency, high-precision surface quality control, such as precision component processing, electronic product manufacturing, and wearable device assembly.
[0003] Among them, the deep learning-based watch strap image defect detection method refers to a method that uses a deep neural network model to perform feature analysis and anomaly judgment on the surface quality of watch straps. This method addresses the detection of appearance defects such as scratches, stains, and poor molding during the watch strap production process, as well as the feature recognition of watch straps made of different materials such as metal and leather under complex lighting conditions. It uses collected watch strap surface image data as input, and a trained deep learning model outputs defect categories and location parameters. The judgment results are directly used for quality traceability and defective product rejection on the production line, thereby achieving automatic quality inspection and real-time monitoring based on data learning results.
[0004] Existing technologies have limitations in handling the diversity of watch strap materials and the varying sensitivities to minute defects, making it difficult to cope with scenarios involving complex material textures and significant background interference. Existing solutions, such as the patent with authorization publication number CN117808741B, are relatively static in image preprocessing and feature filtering, unable to dynamically adjust extraction strategies for different textures in real time. This can lead to minor process scratches or deep foreign objects being masked or missed. Especially under conditions of drastic lighting changes or complex detection environments, existing technologies, such as the patent with authorization publication number CN224136869U, fail to effectively optimize deep feature extraction paths, easily leading to increased false detection rates or weakened system generalization capabilities, affecting the overall stability and detection accuracy of the system, and failing to fully leverage the advantages of deep learning in complex industrial scenarios. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides a deep learning-based method for detecting defects in watch strap images. The technical solution is as follows: A deep learning-based method for detecting defects in watch strap images includes the following steps: S1: Acquire and monitor the surface image status of the watch strap, collect image grayscale distribution, texture contrast and ambient light noise data, analyze the trend of surface texture change, evaluate the extraction sensitivity of its material features, determine whether there is a risk of micro-defects being covered up based on surface reflectivity fluctuations, update and analyze image feature status, and generate real-time image status data. S2: Based on the real-time image state data, predict the trend of strap material texture change, assess the detection risk in complex backgrounds and adjust the extraction depth of convolutional features, prioritize the texture areas with high contrast to perform feature enhancement, suppress high-noise background areas, and generate an optimized dynamic feature extraction strategy. S3: Acquire and analyze the feature response data of each convolutional layer in the image processing model, calculate the feature expression differences between layers, determine whether the feature activation value exceeds the threshold, adjust the priority of the feature propagation path, reduce the weight of redundant feature layers, increase the weight of defect-sensitive feature layers, and generate the path weight adjustment result. S4: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, monitor the image acquisition quality and feature map information in real time, analyze the defect recognition capability of each detection area and dynamically adjust the feature routing, rearrange the feature extraction path of the deep neural network, and generate the defect judgment optimization result.
[0006] As a further aspect of the present invention, the real-time image state data includes texture complexity evaluation value, light and shadow interference coefficient, and defect contrast level; the optimized dynamic feature extraction strategy includes convolution kernel receptive field size, feature layer selection weight, and filter frequency response; the path weight adjustment result operation includes feature channel weight ratio, sensitive node list, and deep feature extraction constraints; and the defect judgment optimization result includes bounding box regression parameters, classification confidence threshold, and non-maximum suppression rule.
[0007] As a further aspect of the present invention, the step of acquiring the real-time image state data is as follows: S101: Acquire and monitor the surface state of each group of watch strap images, collect the average gray level, gradient variance and noise pixel count data of the images, analyze the relationship between surface texture and imaging brightness for watch straps of different materials, evaluate the changes in texture detail richness and contrast, identify the bottleneck of detection by comparing the data of watch straps of different materials, and generate texture feature state data. S102: Based on the texture feature state data, the standard feature data in the material library is called for comparison. By analyzing the difference between the real-time acquired features and the standard features, the situation where the detection accuracy is affected by background interference is identified. The influence of light and shadow changes on texture extraction is monitored in real time. The preprocessing priority of feature extraction is further adjusted to generate interference evaluation and analysis data. S103: Based on the interference assessment and analysis data, combined with the real-time reflection fluctuation of the watch strap surface, monitor the fluctuation range of local brightness of the image, compare historical sample data and current fluctuation values, determine whether there is a risk of missing minor defects in the current state of the image, update the detection model state based on the judgment result, and generate real-time image state data.
[0008] As a further aspect of the present invention, the steps for obtaining the optimized dynamic feature extraction strategy are as follows: S201: Based on the real-time texture information of each region in the real-time image status data, analyze the current defect identification status, compare the historical texture fluctuations of different material regions, predict the future feature extraction trend, and combine image noise and contrast to identify factors affecting the detection effect to generate texture trend prediction data. S202: Based on the texture trend prediction data, evaluate the interference level of each detection area in the future detection cycle, compare it with the set detection risk threshold, determine whether there is a risk of false detection of defects in a specific area in the future cycle, identify high-risk interference areas, and generate detection risk assessment data. S203: Based on the detection risk assessment data, adjust the extraction depth of convolutional features, prioritize the allocation of computing resources to potential areas of small defects with low contrast, and postpone redundant calculations in bright background areas. Match the feature extraction priority with the material texture to generate an optimized dynamic feature extraction strategy.
[0009] As a further aspect of the present invention, the step of obtaining the path weight adjustment result is as follows: S301: Obtain the feature response data of each convolutional layer in the deep learning model, classify and organize the activation map records within the same inference cycle, arrange multiple sets of feature responses under the same layer number in order of network depth, summarize the feature distribution of each layer in combination with spatial domain features, and generate a feature response distribution set. S302: Based on the feature response distribution set, the feature expression capabilities of each convolutional layer are compared for differences. Layers whose feature activation intensity exceeds the set difference threshold are marked as nodes that need to have their weights increased, and layers that do not exceed the set difference threshold and have high redundancy are marked as nodes that need to have their weights decreased. The marking results are then adjusted in accordance with the network weight configuration table to generate path weight adjustment results.
[0010] As a further aspect of the present invention, the step of obtaining the defect determination optimization result is as follows: S401: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, call the feature information and pixel response status of each region, associate and organize the number of defect candidate boxes collected at the same time with the feature map channel occupancy rate and spatial attention coefficient, form the correspondence between feature response and detection candidate box, and generate a feature mapping set. S402: Call the feature mapping set, analyze the defect discrimination ability of each feature layer, mark the nodes whose feature response intensity and spatial saliency are both higher than the set extraction threshold as priority extraction nodes, compare and filter their marking results with the existing network node list to obtain the core feature extraction set; S403: Based on the core feature extraction set, the feature routing information in the defect judgment logic is reallocated, the feature transmission path is adjusted to point to the processing order of the core feature extraction node, and the parameter transmission order between networks is updated to establish the defect judgment optimization result.
[0011] As a further aspect of the present invention, the method further includes: S5: Based on the defect determination and optimization results, perform image detection and monitor the recognition progress in real time, analyze the feature extraction time information collected during the detection process, dynamically adjust the network inference order, avoid the risk of missed detection or overload of computing resources, and generate detection execution feedback data. The detection execution feedback data includes defect detection rate, inference delay records, and false alarm and false negative information.
[0012] As a further aspect of the present invention, the step of obtaining the detection execution feedback data is as follows: S501: Based on the defect judgment optimization results, start the feature processing flow of each detection branch, monitor the transmission status and judgment progress of feature data between each network layer, associate and record the defect location accuracy, computational overhead and timestamp, and generate a detection execution progress set. S502: Based on the detection execution progress set, collect the response delay information of the defect during the execution process of each detection branch, match and organize the delay records with the corresponding defect number and detection area, compare and analyze the accuracy change trend of multiple consecutive detection cycles, and obtain the detection efficiency trend value. S503: Based on the detection performance trend value, dynamically adjust the execution order in the current detection task queue, reallocate tasks with performance trend values lower than the set recognition threshold to the deep extraction path, update the adjusted order and feature node mapping relationship, and establish detection execution feedback data.
[0013] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this invention, by real-time monitoring of the watch strap image status and feature extraction response, a dynamic feature extraction strategy is optimized to predict surface texture change trends and prioritize the execution of detection tasks for highly sensitive feature nodes. Processing priorities are adjusted based on differences in feature representation to ensure that key defect feature layers participate in inference first, thereby effectively avoiding missed defects or recognition delays caused by complex material textures or background interference. By dynamically adjusting the feature extraction path, the overall utilization efficiency of system computing resources is improved, recognition fluctuations in complex lighting environments are reduced, and the stability of the detection system and the efficiency of identifying minute defects are enhanced. This effectively ensures the smooth completion of quality inspection tasks and reduces the detection risks caused by material diversity. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the acquisition process of S1 in this invention; Figure 3 This is a flowchart illustrating the acquisition process of S2 in this invention; Figure 4 This is a flowchart illustrating the acquisition process of S3 in this invention; Figure 5 This is a flowchart illustrating the acquisition process of S4 in this invention; Figure 6 This is a flowchart of the acquisition process for S5 of the present invention. Detailed Implementation
[0015] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0016] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0017] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0018] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0019] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0020] Please see Figure 1 This invention provides a technical solution: a deep learning-based method for detecting defects in watchband images, comprising the following steps: S1: Acquire and monitor the surface image status of the watch strap, collect image grayscale distribution, texture contrast and ambient light noise data, analyze the trend of surface texture change, evaluate the extraction sensitivity of its material features, determine whether there is a risk of micro-defects being covered up based on surface reflectivity fluctuations, update and analyze image feature status, and generate real-time image status data. S2: Based on real-time image state data, predict the trend of strap material texture change, assess the detection risk in complex backgrounds and adjust the extraction depth of convolutional features, prioritize the texture areas with high contrast to perform feature enhancement, suppress high-noise background areas, and generate an optimized dynamic feature extraction strategy. S3: Acquire and analyze the feature response data of each convolutional layer in the image processing model, calculate the feature expression differences between layers, determine whether the feature activation value exceeds the threshold, adjust the priority of the feature propagation path, reduce the weight of redundant feature layers, increase the weight of defect-sensitive feature layers, and generate the path weight adjustment result. S4: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, monitor the image acquisition quality and feature map information in real time, analyze the defect recognition capability of each detection area and dynamically adjust the feature routing, rearrange the feature extraction path of the deep neural network, and generate optimized defect judgment results. S5: Based on the defect judgment and optimization results, perform image detection and monitor the recognition progress in real time. Analyze the feature extraction time information collected during the detection process, dynamically adjust the network inference order, avoid the risk of missed detection or overload of computing resources, and generate detection execution feedback data.
[0021] Real-time image status data includes texture complexity evaluation value, light and shadow interference coefficient, and defect contrast level. The optimized dynamic feature extraction strategy includes convolution kernel receptive field size, feature layer selection weight, and filter frequency response. The path weight adjustment results include feature channel weight ratio, sensitive node list, and deep feature extraction constraints. The defect judgment optimization results include bounding box regression parameters, classification confidence threshold, and non-maximum suppression rules. The detection execution feedback data includes defect detection rate, inference latency record, and false positive and false negative anomaly information.
[0022] Please see Figure 2 The steps for acquiring real-time image status data are as follows: S101: Acquire and monitor the surface state of each group of watch strap images, collect the average gray level, gradient variance and noise pixel count data of the images, analyze the relationship between surface texture and imaging brightness for watch straps of different materials, evaluate the changes in texture detail richness and contrast, identify the bottleneck of detection by comparing the data of watch straps of different materials, and generate texture feature state data. Based on the acquisition and continuous monitoring of the surface condition of each strap material (specifically metal material M and leather material L), this process first collects the average grayscale, gradient variance, and number of noisy pixels for both materials under the current imaging environment. For metal material M, due to its high reflectivity and anisotropic scattering characteristics, it is prone to local specular reflection, with a measured gradient variance of 156.4 and a cluster of 1200 noisy pixels; while leather material L, due to its strong diffuse reflection characteristics and complex texture, has a gradient variance of 82.1 and a number of noisy pixels of 450. The data for the two materials are analyzed, and the ratio of their gradient variance to mean is calculated to identify the bottlenecks: for metal material, the bottleneck lies in the masking of minor scratches by highlight halos, while for leather material, it lies in the smoothing of textures in low-light areas. Continuous monitoring continues for the next two sampling periods ( ) data, when to The system continuously monitors for local overexposure in the metal region. When the gradient variance drops sharply to 140.5 and the noise surges to 1500, it keenly detects that the feature extraction bottleneck is rapidly deteriorating. The system then fuses the aforementioned multidimensional state indicators with the dynamic deterioration trend using multidimensional tensors to ultimately generate texture feature state data with temporal tracking characteristics.
[0023] S102: Based on texture feature state data, standard feature data in the material library is called for comparison. By analyzing the differences between real-time acquired features and standard features, the situation where the detection accuracy is affected by background interference is identified. The influence of light and shadow changes on texture extraction is monitored in real time. The preprocessing priority of feature extraction is further adjusted to generate interference evaluation and analysis data. Based on the generated texture feature state data, the underlying material feature standard library is accessed via a high-speed data bus to extract and compare the standard reflectance and texture frequency benchmark models for metal material M and leather material L. Specifically, the grayscale standard deviation of a standard defect-free metal surface is extracted. It also calculates the grayscale standard deviation of the corresponding region in the current image in real time. To quantify environmental interference, a background interference baseline value was introduced, obtained beforehand through Monte Carlo simulation and 1000 sets of ambient lighting ergonomic tests. By calculating the current interference deviation value By combining a nonlinear activation function, the interference factor of the current ambient light and shadow on the strap texture is output. Since the interference bias shows a significant positive correlation with the extremely high reflectivity (185) of the metallic material, it is determined that the current feature extraction network has been severely affected by specular occlusion. Therefore, the preprocessing scheduler is activated to introduce an adaptive light and shadow penalty term for the specular reflection region, and its initial preprocessing priority (set to 10) is adjusted according to the penalty coefficient. Dynamic decay is performed to obtain the adjusted priority. This effectively directs GPU computing resources away from severely overexposed, inefficient areas to areas with less interference and clearer textures, generating high-dimensional interference assessment and analysis data.
[0024] S103: Based on the interference assessment and analysis data, combined with the real-time reflection fluctuation of the watch strap surface, monitor the fluctuation range of local brightness of the image, compare historical sample data with the current fluctuation value, determine whether there is a risk of missing minor defects in the current state of the image, update the detection model state based on the judgment result, and generate real-time image state data. Based on interference assessment data and combined with real-time reflection fluctuation curves of metal and leather surfaces, a time-series analysis module was used to accurately monitor the fluctuation range of local image brightness. A reference baseline was constructed by retrieving the average brightness of the metal region from 50 historical images, and its historical standard deviation was calculated to be 4.2. Within the current 10-frame observation period, the brightness sequence of the metal region exhibited drastic changes, with the real-time standard deviation jumping to 7.42, a 76.6% increase compared to the historical baseline, indicating an extremely unstable alternating lighting environment. To accurately assess the probability of missed detections, a minor defect risk index was calculated. The index uses a bivariate weighted model: The weight and The values are dynamically configured to 0.6 and 0.4 respectively. Substituting the normalized reflection fluctuation and interference factor, the current... This value exceeded the critical safety threshold set based on 5,000 historical missed detection cases. (At this threshold, the false negative rate of tiny scratches increases exponentially.) The underlying logic immediately triggers a high-risk false negative warning mechanism, marks the current network detection confidence status as "high risk", and packages this mark with the ambient lighting parameters to generate real-time image status data for subsequent adaptive adjustment.
[0025] Please see Figure 3 The steps for obtaining the optimized dynamic feature extraction strategy are as follows: S201: Based on the real-time texture information of each region in the real-time image status data, analyze the current defect identification status, compare the historical texture fluctuations of different material regions, predict the future feature extraction trend, and combine image noise and contrast to identify factors affecting the detection effect to generate texture trend prediction data. Based on real-time texture information of each pixel region in real-time image state data (especially metal regions that have been marked as high-risk), The forward-looking trend analysis module was initiated. By extracting the texture contrast index of the target area over the past five consecutive time slices (decreasing from 0.65 to 0.53), a linear regression model was performed using the least squares method, fitting a texture sharpness decay slope of -0.032. This model was used to predict that the contrast in the next detection cycle would further deteriorate to 0.498. Simultaneously, combined with frequency domain analysis and the specular noise distribution extracted from S101, it was confirmed that the irregular diffusion of ambient light and the continuous increase in brightness were the core dominant factors inducing this degradation trend. In contrast, the leather region, due to its high light absorbance, exhibited a contrast fluctuation slope of only 0.002, demonstrating extremely strong robustness. The feature degradation prediction curves, noise influence weight matrix, and confidence time points for predicting the threshold values of each material region were structurally fused and encapsulated to output texture trend prediction data containing the overall evolution expectation, providing data support for the dynamic reconstruction of subsequent detection strategies.
[0026] S202: Based on texture trend prediction data, assess the interference level of each detection area in the future detection cycle, compare it with the set detection risk threshold, determine whether there is a risk of false defect detection in a specific area in the future cycle, identify high-risk interference areas, and generate detection risk assessment data. Based on texture trend prediction data, the prediction engine begins to quantitatively assess the future interference evolution level of each detection area over time. For the metallic region, the predicted contrast decay sequence values for the next three consecutive inference cycles are derived: 0.498, 0.466, and 0.434. Subsequently, these predicted sequences are compared with a preset detection risk threshold. Cross-comparison was performed. This threshold was derived from deep neural network feature visualization experiments. Once the contrast of the input feature map falls below 0.50, the network classification head is highly likely to mistakenly activate normal metal wire drawing processes as scratch features. The comparison results clearly show that the contrast of the metal area will fall below this safety threshold when entering the first future cycle. Based on this, it is determined that this area faces an extremely high risk of false positives (false detections) in the short term. A two-dimensional spatial mask was immediately generated on the feature input map to accurately mark the metal area as a "high-risk interference zone." The specific timestamp of the expected exceedance, the estimated false detection probability, and the corresponding spatial coordinate information were integrated and packaged to generate detection risk assessment data covering spatiotemporal dimensions.
[0027] S203: Based on the detection risk assessment data, adjust the extraction depth of convolutional features, prioritize the allocation of computing resources to potential areas of small defects with low contrast, and postpone redundant calculations in bright background areas. Match the feature extraction priority with the material texture to generate an optimized dynamic feature extraction strategy. Based on the generated detection risk assessment data, the adaptive control module dynamically reconstructs the underlying hyperparameters and computational power allocation of the convolutional neural network. For the metal highlight areas marked as high-risk interference zones, to prevent the deep network from amplifying low-signal-to-noise ratio high-frequency light spots into false defects, an early-exit mechanism is triggered, forcibly truncating and compressing the original 52-layer convolutional extraction depth to 18 layers. Simultaneously, the released GPU computing power and memory resources are rerouted and preferentially injected into leather areas with rich texture details and normal contrast, as well as metal edge shadow areas, instantly increasing the spatial feature sampling frequency of these key potential defect areas by 1.5 times. At the operator level, the metal highlight areas are directed to switch to 7×7 large-size convolutional kernels to perform low-frequency blur smoothing, filtering light spots; while the leather areas activate multi-scale dilated convolutional modules (such as ASPP components) to capture a wider range of subtle scratch context information. This risk-prediction-based regionalized computational power scheduling perfectly achieves dynamic synergy between network expressive power and physical material state, ultimately generating a highly targeted optimized dynamic feature extraction strategy.
[0028] Please see Figure 4 The steps to obtain the path weight adjustment results are as follows: S301: Obtain the feature response data of each convolutional layer in the deep learning model, classify and organize the activation map records within the same inference cycle, arrange multiple sets of feature responses under the same layer number in order of network depth, summarize the feature distribution of each layer in combination with spatial domain features, and generate a feature response distribution set. Under the dynamic feature extraction strategy, monitoring hooks embedded in each core module (Stage 1 to Stage 4) of the ResNet model are used to capture the tensor flow of each forward propagation in real time. For the inference cycle of the same watchband image, global average pooling (GAP) is performed on the feature response maps output by each convolutional layer to extract the average activation intensity of each layer. And combine pixel-level distribution to calculate spatial activation information entropy To measure feature richness, multiple sets of feature tensors were strictly sequenced according to the depth and topological order of the network layers. Data showed that the activation intensity of the shallow Stage 2 was 0.85, and the information entropy was as high as 4.2, indicating that the contour features of small defects were well captured. However, the activation intensity of the deep Stage 4 plummeted to 0.32, and the information entropy dropped to as low as 1.5, exhibiting typical gradient vanishing and fine-grained feature disappearance phenomena. The response intensity, information entropy index, spatial resolution information, and decay trend of each layer were structurally classified and stacked into tensors to establish a feature response distribution set that maps the internal expression state of the network.
[0029] S302: Based on the feature response distribution set, the feature expression capabilities of each convolutional layer are compared differentially. Layers whose feature activation intensity exceeds the set difference threshold are marked as nodes that need to increase weight, and layers that do not exceed the set difference threshold but have high redundancy are marked as nodes that need to decrease weight. The marking results are then adjusted in accordance with the network weight configuration table to generate path weight adjustment results. Based on the established feature response distribution set, the network adaptive evaluation module performs a layer-by-layer differential analysis of the effective representation ability of each convolutional layer for minor defects in the watch band. A threshold for inter-layer response attenuation difference is preset. By comparing the calculations, the attenuation difference between Stage 3's response value (0.55) and the upstream Stage 2 (0.85) reached 0.3, which is severely excessive, revealing a serious loss in the feature transmission chain at this node. Therefore, Stage 3 was marked as a "sensitive enhancement node." Conversely, Stage 4, with its extremely low absolute activation strength and lack of effective spatial information, was identified and marked as a "high redundancy node." Based on the marking results, a dynamic configuration command was issued to the network weight controller: for Stage 3, the scaling factor of its residual connection bypass was increased from the initial 1.0 compensation to 1.3 to strengthen the forward signal; while for Stage 4, a channel pruning strategy was enabled, directly reducing the weight ratio of the channels involved in the calculation by 40% to cut off interference from useless features. This operation generated path weight adjustment results accurate to the channel level.
[0030] Please see Figure 5 The steps for obtaining the defect determination and optimization results are as follows: S401: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, the feature information and pixel response status of each region are called, and the number of defect candidate boxes collected at the same time are associated with the feature map channel occupancy rate and spatial attention coefficient to form a correspondence between feature response and detection candidate box, and a feature mapping set is generated. Based on the optimized dynamic extraction strategy and path weight results, the regional feature concatenation information and pixel activation heatmap output by the Feature Pyramid Network (FPN) are retrieved at the network end. For the same monitoring time, the initial defect candidate boxes generated by the anchor box mechanism are captured. The 25 candidate boxes captured by the edge detection region are bound to the effective occupancy rate (45%) of the current feature map channel and the average spatial attention coefficient (0.68) generated by the attention mechanism (such as CBAM). A multi-dimensional dictionary structure is used to perform a one-to-one deep mapping between the coordinates and size of the candidate boxes and their response occupancy rate and attention weight in the tensor space, forming a high-dimensional key-value pair association map. This association process effectively filters out background ghost boxes without feature support and fully integrates the feature activation states of all regions in the entire image (such as the watch strap hole area, metal connecting shaft area, etc.) with the target detection head data, finally forming a feature mapping set used to guide network routing decisions.
[0031] S402: Call the feature mapping set, analyze the defect discrimination ability of each feature layer, mark the nodes whose feature response intensity and spatial saliency are both higher than the set extraction threshold as priority extraction nodes, compare and filter their marking results with the existing network node list to obtain the core feature extraction set; After invoking the generated feature map set, a rigorous screening procedure is executed to determine the discriminative power of the feature layer. A dual validation threshold is implemented: a response strength threshold is set. and spatial saliency threshold The feature nodes of each candidate layer are scanned and verified. Taking Stage 2 as an example, its intensity (0.85) and salience (0.75) are both consistently above the double threshold; while the deeper Stage 4 fails to be selected in both aspects. To perform refined ranking, a weighted scoring function is introduced: Calculations showed that Stage 2 achieved a high score of 0.82, far exceeding the passing score of 0.75, and was given the highest priority label of "priority node extraction". Subsequently, the score list of all candidate nodes was compared with the existing static network topology list and forcibly pruned, eliminating all redundant deep nodes that did not meet the score requirements. Finally, a highly streamlined core feature extraction set (containing only Stage 1 and Stage 2) was refined, focusing on micro-texture and with extremely low computational load.
[0032] S403: Based on the core feature extraction set, the feature routing information in the defect judgment logic is reallocated, the feature transmission path is adjusted to point to the processing order of the core feature extraction node, and the parameter transmission order between networks is updated to establish the defect judgment optimization result. Based on the refined core feature set, the underlying scheduling framework dynamically rewrites the graph structure of the detection model, reallocating feature routes for defect judgment. For newly fed watchband images, after completing Stage 1 and Stage 2 calculations, the data stream is directly intercepted by the routing controller, bypassing the subsequent redundant Stage 3 and Stage 4 calculation modules. An adaptive feature pooling layer is used to unify the dimensions and align the scale of the feature map extracted from Stage 2, and then it is directly fed into the classifier head and bounding box regression head of the detection model through a bypass direct connection network. This routing reconfiguration not only significantly compresses the depth of the forward inference computation graph of the deep learning network but also preserves, to the greatest extent possible, the geometric features of small scratches that are easily smoothed out in deep networks. Simultaneously, the parameter transmission sequence control table during backpropagation is updated, establishing a new, streamlined data channel, thereby establishing the final optimized defect judgment result.
[0033] Please see Figure 6 The steps for obtaining the execution feedback data are as follows: S501: Based on the defect judgment optimization results, start the feature processing flow of each detection branch, monitor the transmission status and judgment progress of feature data between each network layer, associate and record the defect location accuracy, computational cost and timestamp, and generate a detection execution progress set. Upon receiving the defect assessment optimization results, the multi-threaded parallel detection process is officially initiated. The detection engine continuously monitors the transmission frame rate of the image feature matrix along the optimized "shallow-straight-through" path and the classifier's assessment status. During this process, fine telemetry is performed on each independent detection branch, capturing the IoU accuracy and confidence score of each localization anchor box, and recording the precise microsecond-level time consumption of feature processing from input to output using hardware timestamps. For example, recording a minor scratch on the watch strap surface (Defect_01) achieves a 98.2% accuracy rate after bypassing deep redundancy, and the GPU computing power consumed in this process translates to a processing time of only 12.5 milliseconds; similarly, another blemish defect takes 10.8 milliseconds. These defect types, physical locations, confidence indices, computation time, and absolute timestamps are serialized and encapsulated, written to a circular buffer in runtime memory, generating a detection execution progress set containing rich temporal dynamics and hardware load fingerprints.
[0034] S502: Based on the detection execution progress set, collect the response delay information of defects during the execution process of each detection branch, match and organize the delay records with the corresponding defect number and detection area, compare and analyze the accuracy change trend of multiple consecutive detection cycles, and obtain the detection efficiency trend value. Based on a real-time rolling detection execution progress set, the performance analysis service continuously collects response latency and computational jitter information for each defect sample in the detection channel. The collected latency records are then jointly mapped across tables with the defect's unique identifier (ID), physical material classification, and the image spatial region it occupies. A sliding window evaluation algorithm is deployed to track the median processing latency over five consecutive inference cycles, and its dynamic change slope is calculated using first-order differencing. If the analysis shows that the latency change slope for a certain sequence cycle is stable at around 0.8ms / sample, the current network load is considered smooth; if the slope rises abnormally, it indicates that a specific complex defect (such as a severe reflective oil-stain mixture area) is causing the shallow detector to repeatedly iterate and regress. This data, containing latency increments, processing bottleneck regions, and accuracy fluctuation variance, is vectorized to extract a detection performance trend value that accurately reflects the current detection throughput pressure and model adaptability.
[0035] S503: Based on the detection performance trend value, dynamically adjust the execution order in the current detection task queue, reassign tasks whose performance trend value exceeds the set recognition threshold to the deep extraction path, update the adjusted order and feature node mapping relationship, and establish detection execution feedback data.
[0036] Based on the calculated detection performance trend value, task orchestration performs heuristic dynamic scheduling on the queue of images to be detected in the current input memory buffer. When the performance trend value exceeds the preset recognition latency warning threshold, such as 1.2ms / sample, it is keenly aware that the current lightweight truncation path has encountered feature discrimination bottlenecks and computational backlogs due to complex backgrounds such as dense, multi-type defect concurrent regions. Therefore, the scheduler immediately interrupts the FIFO logic of the default queue and dynamically redirects subsequent task instances marked as high complexity to the backup extraction path with full depth (full-level activation) for processing. Simultaneously, simple texture samples are kept in the fast read channel to achieve asymmetric load balancing of computing power. Finally, the new task execution order, the modified queue pointer, and network route recovery records are written to the log, establishing a complete closed-loop detection execution feedback data.
[0037] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A deep learning-based method for detecting defects in watch strap images, characterized in that, Includes the following steps: S1: Acquire and monitor the surface image status of the watch strap, collect image grayscale distribution, texture contrast and ambient light noise data, analyze the trend of surface texture change, evaluate the extraction sensitivity of its material features, determine whether there is a risk of micro-defects being covered up based on surface reflectivity fluctuations, update and analyze image feature status, and generate real-time image status data. S2: Based on the real-time image state data, predict the trend of strap material texture change, assess the detection risk in complex backgrounds and adjust the extraction depth of convolutional features, prioritize the texture areas with high contrast to perform feature enhancement, suppress high-noise background areas, and generate an optimized dynamic feature extraction strategy. S3: Acquire and analyze the feature response data of each convolutional layer in the image processing model, calculate the feature expression differences between layers, determine whether the feature activation value exceeds the threshold, adjust the priority of the feature propagation path, reduce the weight of redundant feature layers, increase the weight of defect-sensitive feature layers, and generate the path weight adjustment result. S4: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, monitor the image acquisition quality and feature map information in real time, analyze the defect recognition capability of each detection area and dynamically adjust the feature routing, rearrange the feature extraction path of the deep neural network, and generate the defect judgment optimization result.
2. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that: The real-time image state data includes texture complexity evaluation value, light and shadow interference coefficient, and defect contrast level. The optimized dynamic feature extraction strategy includes convolution kernel receptive field size, feature layer selection weight, and filter frequency response. The path weight adjustment results include feature channel weight ratio, sensitive node list, and deep feature extraction constraints. The defect judgment optimization results include bounding box regression parameters, classification confidence threshold, and non-maximum suppression rules.
3. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that, The steps for obtaining S1 are as follows: S101: Acquire and monitor the surface state of each group of watch strap images, collect the average gray level, gradient variance and noise pixel count data of the images, analyze the relationship between surface texture and imaging brightness for watch straps of different materials, evaluate the changes in texture detail richness and contrast, identify the bottleneck of detection by comparing the data of watch straps of different materials, and generate texture feature state data. S102: Based on the texture feature state data, the standard feature data in the material library is called for comparison. By analyzing the difference between the real-time acquired features and the standard features, the situation where the detection accuracy is affected by background interference is identified. The influence of light and shadow changes on texture extraction is monitored in real time. The preprocessing priority of feature extraction is further adjusted to generate interference evaluation and analysis data. S103: Based on the interference assessment and analysis data, combined with the real-time reflection fluctuation of the watch strap surface, monitor the fluctuation range of local brightness of the image, compare historical sample data and current fluctuation values, determine whether there is a risk of missing minor defects in the current state of the image, update the detection model state based on the judgment result, and generate real-time image state data.
4. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that, The steps for obtaining S2 are as follows: S201: Based on the real-time texture information of each region in the real-time image status data, analyze the current defect identification status, compare the historical texture fluctuations of different material regions, predict the future feature extraction trend, and combine image noise and contrast to identify factors affecting the detection effect to generate texture trend prediction data. S202: Based on the texture trend prediction data, evaluate the interference level of each detection area in the future detection cycle, compare it with the set detection risk threshold, determine whether there is a risk of false detection of defects in a specific area in the future cycle, identify high-risk interference areas, and generate detection risk assessment data. S203: Based on the detection risk assessment data, adjust the extraction depth of convolutional features, prioritize the allocation of computing resources to potential areas of small defects with low contrast, and postpone redundant calculations in bright background areas. Match the feature extraction priority with the material texture to generate an optimized dynamic feature extraction strategy.
5. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that, The steps for obtaining S3 are as follows: S301: Obtain the feature response data of each convolutional layer in the deep learning model, classify and organize the activation map records within the same inference cycle, arrange multiple sets of feature responses under the same layer number in order of network depth, summarize the feature distribution of each layer in combination with spatial domain features, and generate a feature response distribution set. S302: Based on the feature response distribution set, the feature expression capabilities of each convolutional layer are compared for differences. Layers whose feature activation intensity exceeds the set difference threshold are marked as nodes that need to have their weights increased, and layers that do not exceed the set difference threshold and have high redundancy are marked as nodes that need to have their weights decreased. The marking results are then adjusted in accordance with the network weight configuration table to generate path weight adjustment results.
6. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that, The steps for obtaining S4 are as follows: S401: Based on the optimized dynamic feature extraction strategy and path weight adjustment results, call the feature information and pixel response status of each region, associate and organize the number of defect candidate boxes collected at the same time with the feature map channel occupancy rate and spatial attention coefficient, form the correspondence between feature response and detection candidate box, and generate a feature mapping set. S402: Call the feature mapping set, analyze the defect discrimination ability of each feature layer, mark the nodes whose feature response intensity and spatial saliency are both higher than the set extraction threshold as priority extraction nodes, compare and filter their marking results with the existing network node list to obtain the core feature extraction set; S403: Based on the core feature extraction set, the feature routing information in the defect judgment logic is reallocated, the feature transmission path is adjusted to point to the processing order of the core feature extraction node, and the parameter transmission order between networks is updated to establish the defect judgment optimization result.
7. The deep learning-based method for detecting defects in watch strap images according to claim 1, characterized in that, The method further includes: S5: Based on the defect determination and optimization results, perform image detection and monitor the recognition progress in real time, analyze the feature extraction time information collected during the detection process, dynamically adjust the network inference order, avoid the risk of missed detection or overload of computing resources, and generate detection execution feedback data. The detection execution feedback data includes defect detection rate, inference latency records, and false alarm and false negative anomaly information.
8. The deep learning-based method for detecting defects in watch strap images according to claim 7, characterized in that, The steps for obtaining S5 are as follows: S501: Based on the defect judgment optimization results, start the feature processing flow of each detection branch, monitor the transmission status and judgment progress of feature data between each network layer, associate and record the defect location accuracy, computational overhead and timestamp, and generate a detection execution progress set. S502: Based on the detection execution progress set, collect the response delay information of the defect during the execution process of each detection branch, match and organize the delay records with the corresponding defect number and detection area, compare and analyze the accuracy change trend of multiple consecutive detection cycles, and obtain the detection efficiency trend value. S503: Based on the detection performance trend value, dynamically adjust the execution order in the current detection task queue, reallocate tasks with performance trend values exceeding the set recognition threshold to the deep extraction path, update the adjusted order and feature node mapping relationship, and establish detection execution feedback data.
Citation Information
Patent Citations
An integrated silicone strap molding detection method based on neural network model
CN117808741B