An intelligent small target segmentation method and system for high-precision measuring instruments
By constructing an enhanced dataset of real physical properties and a multi-scale attention network model, the problems of data discrepancy and insufficient model adaptability in small target segmentation methods of traditional high-precision measuring instruments are solved, and high-precision and stable small target segmentation effects are achieved.
Patent Information
- Application Number
- CN202511082324.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-04
AI Technical Summary
Traditional high-precision measurement instrument small target segmentation methods rely on limited labeled data and cannot accurately model the instrument-specific degradation process, resulting in systematic differences between training data and real data. The scarcity of small target samples is difficult to solve, which can easily lead to model overfitting or missed detection. At the same time, traditional segmentation models find it difficult to balance semantic abstraction and edge details in high-precision instrument scenarios. Fixed convolution kernels lack the ability to respond to the physical parameters of the instrument and cannot adapt to the degradation characteristics of different devices.
Image physical enhancement processing is used to construct an enhanced dataset containing real physical properties. Generative network optimization and semantic reconstruction technology are combined to generate synthetic data that conforms to real noise characteristics. A multi-scale attention network model is constructed. The global context and local high-frequency features are captured through a dual-branch encoding structure, and the attention gating mechanism is used to achieve feature adaptive fusion. It combines edge-guided decoding strategies and physical parameter-driven dynamic convolution kernel fine-tuning.
It significantly expands the diversity of small targets, improves the stability and reliability of segmentation results, ensures the complete segmentation of tiny targets, solves the problems of model adaptability and feature loss in traditional methods, and achieves high-precision target segmentation.
Smart Images

Figure CN120580254B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of small target segmentation of intelligent high-precision measuring instruments, and in particular to an intelligent small target segmentation method and system for high-precision measuring instruments. Background Art
[0002] Small target segmentation in high-precision measuring instruments refers to separating small-sized targets from complex backgrounds through precise technical means in image or measurement data processing to ensure that these targets can be accurately identified and measured. Effective target segmentation can not only improve measurement accuracy and avoid interference from background noise, but also improve detection efficiency and automation levels in various fields, playing an important role in improving measurement and analysis capabilities in various fields.
[0003] However, traditional small target segmentation methods for high-precision measuring instruments usually rely on limited labeled data and general enhancement methods, and cannot accurately model the degradation process unique to the instrument, resulting in systematic differences between training data and real data. The scarcity of small target samples is difficult to effectively solve by simple copying or translation, which easily leads to technical problems such as model overfitting or missed detection. Traditional small target segmentation methods for high-precision measuring instruments have inherent limitations of traditional segmentation models in high-precision instrument scenarios. A single encoding branch is difficult to balance the conflict between semantic abstraction and edge details. Pooling operations easily lead to the loss of small target features. At the same time, fixed convolution kernels lack the ability to respond to the physical parameters of the instrument and cannot adapt to the degradation characteristics of different devices. Summary of the Invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an intelligent high-precision measuring instrument small target segmentation method and system. The traditional high-precision measuring instrument small target segmentation method usually relies on limited labeled data and general enhancement means, and cannot accurately model the instrument-specific degradation process, resulting in systematic differences between training data and real data. The scarcity of small target samples is difficult to effectively solve by simple copying or translation, which easily leads to technical problems such as model overfitting or missed detection. This solution creatively adopts image physical enhancement processing to construct an enhanced data set containing real physical properties. By constructing a degradation model based on the physical parameters of the instrument, synthetic data that conforms to the real noise characteristics is generated, and combined with generative network optimization and semantic reconstruction technology, the diversity of small targets is significantly expanded while ensuring physical consistency, providing high-fidelity training for the segmentation model. Practice the basics and improve the stability and reliability of the segmentation results; In view of the inherent limitations of traditional segmentation methods for small targets of high-precision measuring instruments in high-precision instrument scenarios, a single encoding branch is difficult to balance the conflict between semantic abstraction and edge details, and pooling operations easily lead to the loss of small target features. At the same time, fixed convolution kernels lack the ability to respond to the physical parameters of the instrument and cannot adapt to the degradation characteristics of different devices. This solution creatively adopts a multi-scale attention network model as the target segmentation model. It captures global context and local high-frequency features respectively through a dual-branch encoding structure, and uses the attention gating mechanism to achieve feature adaptive fusion. It combines edge-guided decoding strategies and physical parameter-driven dynamic convolution kernel fine-tuning to enable the model to adjust feature extraction weights in real time according to instrument characteristics, suppress upsampling blur, and ensure the complete segmentation of small targets.
[0005] The technical solution adopted by the present invention is as follows: The present invention provides an intelligent high-precision measuring instrument small target segmentation method, the method comprising the following steps:
[0006] Step S1: raw data collection;
[0007] Step S2: original data optimization;
[0008] Step S3: image physical enhancement processing;
[0009] Step S4: target segmentation model design;
[0010] Step S5: small object segmentation.
[0011] Furthermore, in step S1, the raw data acquisition is used to acquire the raw data required for small target segmentation of high-precision measuring instruments, specifically by performing data acquisition to obtain a small target segmentation raw data set, the small target segmentation raw data set specifically including a past segmentation raw data set and a real-time segmentation raw data set, the past segmentation raw data set and the real-time segmentation raw data set both including raw image data and instrument physical parameter data, the past segmentation raw data set also including segmentation annotation data.
[0012] Furthermore, in step S2, the raw data optimization is used to optimize the collected raw data, and specifically includes the following steps:
[0013] Step S21: instrument calibration, which is used to eliminate the inherent noise of the instrument, specifically by dark current compensation and linear response correction to obtain an image that conforms to the radiometric measurement;
[0014] Step S22: Illumination normalization, which is used to eliminate uneven illumination. Specifically, the contrast of small objects is enhanced through adaptive homomorphic filtering to obtain an image with uniform illumination.
[0015] Step S23: edge-preserving filtering is used to suppress noise interference, specifically by combining bilateral filtering to protect sub-pixel edges while reducing noise, thereby obtaining an image with an optimized signal-to-noise ratio;
[0016] Step S24: Size normalization is used to unify the input specifications, specifically by adaptive cropping and bicubic interpolation to obtain an image of a standard size that meets the network input;
[0017] The real-time segmentation original data set and the past segmentation original data set are optimized through the instrument calibration, the illumination normalization, the edge-preserving filtering and the size normalization to obtain the image data set to be segmented and the optimized past original data set.
[0018] Furthermore, in step S3, the image physical enhancement processing is used to construct an enhanced dataset containing real physical properties, specifically by fusing optical, mechanical and electronic multi-physics noise models to obtain an enhanced segmentation training set and an enhanced segmentation test set that are consistent with the noise characteristics of the real measurement instrument;
[0019] The image physical enhancement processing specifically includes the following steps:
[0020] Step S31: physical parameter vector definition, used to clarify the physical source of instrument noise, specifically by introducing five physical parameters: wavelength, numerical aperture, thermal noise standard deviation, vibration frequency, and quantum efficiency, to obtain a physical parameter vector;
[0021] Step S32: a unified degradation function is designed to comprehensively simulate physical degradation effects. Specifically, a four-layer cascade operation of point spread function convolution, gradient energy constrained vibration blur kernel, Poisson-gamma noise, and Gaussian noise is performed to obtain a synthetic degraded image that conforms to physical laws.
[0022] Step S33: Physical consistency verification is used to ensure the authenticity of the synthesized data. Specifically, a physical consistency score is obtained through a weighted combination of structural similarity and gradient fidelity.
[0023] Step S34: Lightweight GAN optimization is used to learn the noise distribution of images collected by real instruments and further refine the images generated by the physical model. Specifically, the image quality of the synthesized degraded image is improved by training the lightweight GAN to obtain an optimized synthesized degraded image.
[0024] Step S35: Small object semantic reorganization is used to expand the diversity of small object samples. Specifically, the original samples are decomposed into atoms and reconstructed to obtain new samples that meet physical constraints. The steps include:
[0025] Step S351: Atomizing the target to extract reusable small target sample atomic units, specifically intercepting the target area through a segmentation mask and obtaining texture features to obtain a small target material set;
[0026] Step S352: Designing a spatially constrained attention to predict the appropriate position for inserting a small target in a base image. Specifically, a three-layer convolutional neural network is used to generate a spatial attention map representing the weight distribution of the small target insertion position. The base image is specifically a background image without a target.
[0027] Step S353: Poisson blending optimization is used to naturally fuse the small target with the background. Specifically, the Poisson blending equation is constrained by the spatial attention map to obtain a reconstructed image.
[0028] Step S354: obtaining an enhanced reconstructed image, specifically, processing the reconstructed image according to steps S31 to S34 to obtain an enhanced reconstructed image;
[0029] Step S36: Obtain an enhanced data set, specifically based on the instrument physical parameter data pre-generated in the optimized past original data set, and process through steps S31 to S34 to obtain an optimized synthetic degraded image set, and incorporate the optimized synthetic degraded image set into the optimized past original data set, and process through step S35 to obtain an enhanced reconstructed image set, and also incorporate the enhanced reconstructed image set into the optimized past original data set, and perform data set segmentation to obtain an enhanced segmentation training set and an enhanced segmentation test set.
[0030] Furthermore, in step S4, the target segmentation model is designed to construct a model required for small target segmentation of high-precision measuring instruments, specifically a multi-scale attention network model is constructed as the target segmentation model. The multi-scale attention network model specifically includes a dual-branch encoder module, a gated aggregation module, an improved decoder module and a fine-tuning module;
[0031] The target segmentation model design specifically includes the following steps:
[0032] Step S41: constructing a dual-branch encoder module for complementary feature extraction, specifically by constructing a global semantic branch and a local edge branch for parallel processing, the steps include:
[0033] Step S411: global semantic branch construction is used to capture long-range dependencies, specifically by layered patch merging and Swin-Transformer block processing to obtain three-level downsampling features;
[0034] Step S412: constructing a local edge branch to enhance edge response, specifically extracting high-frequency components through the Laplacian operator and using maximum pooling downsampling to obtain multi-scale edge features;
[0035] Step S42: constructing a gated aggregation module for adaptive feature fusion. Specifically, the module associates global semantics and local edge information through an attention mechanism to obtain multi-scale fusion features. The steps include:
[0036] Step S421: Feature alignment is used to unify the feature space. Specifically, the number of channels of the edge features output by the local edge branch is adjusted through 1×1 convolution to obtain multi-scale optimized edge features that match the downsampled feature dimensions output by the global semantic branch.
[0037] Step S422: Design an attention mechanism to establish cross-modal associations. Specifically, the downsampled features output by the global semantic branch are used to generate queries, and the multi-scale optimized edge features are used to generate keys and values to obtain multi-scale attention output features.
[0038] Step S423: gated fusion, which is used to weight the fusion features, specifically controlling the multi-scale attention output features through learnable parameters to obtain multi-scale fusion features;
[0039] Step S43: Improve the decoder module construction for high-precision mask reconstruction, specifically by edge-sensitive deconvolution and sharpening activation function to obtain small object segmentation results, the steps include:
[0040] Step S431: sharpening activation function design to enhance microstructure response;
[0041] Step S432: skip connection fusion is used to restore spatial details, specifically, the multi-scale fusion features output by the dual-branch encoder module are fused with the output features of the previous decoding layer through cross-layer connections to obtain up-sampled features;
[0042] Step S433: Edge-sensitive deconvolution is used to suppress upsampling blur. Specifically, the upsampling features are activated by a sharpening activation function and combined with the multi-scale edge features output by the local edge branch of the dual-branch encoder module to obtain deconvolution features.
[0043] Step S44: A fine-tuning module is constructed to dynamically adapt to the instrument characteristics and act on the deconvolution features of each decoding layer. Specifically, a dynamic convolution kernel is generated by the physical parameter vector and superimposed on the basic convolution kernel. Then, a convolution operation is performed to obtain the output features of the decoding layer.
[0044] Step S45: Build and train the model, specifically by integrating the dual-branch encoder module construction, the gated aggregation module construction, the improved decoder module construction and the fine-tuning module construction to construct a multi-scale attention network model, train the model based on the enhanced segmentation training set, verify the model performance based on the enhanced segmentation test set, and obtain the multi-scale attention network model as the target segmentation model.
[0045] Furthermore, in step S5, the small target segmentation is specifically performed by taking the image data set to be segmented as the input of the target segmentation model to perform small target segmentation to obtain a high-precision measuring instrument small target segmentation reference result. The high-precision measuring instrument small target segmentation reference result is specifically the small target segmentation result output by the target segmentation model.
[0046] The present invention provides an intelligent high-precision measuring instrument small target segmentation system, which includes a raw data acquisition module, a raw data optimization module, an image physical enhancement processing module, a target segmentation model design module and a small target segmentation module;
[0047] The raw data acquisition module is used to collect raw data, obtain a small target segmentation raw data set by collecting the raw data, and send the small target segmentation raw data set to the raw data optimization module;
[0048] The raw data optimization module is used for raw data optimization, and obtains the image data set to be segmented and the optimized past raw data set through raw data optimization, and sends the image data set to be segmented to the small object segmentation module, and sends the optimized past raw data set to the image physical enhancement processing module;
[0049] The image physical enhancement processing module is used for image physical enhancement processing, obtains an enhanced segmentation training set and an enhanced segmentation test set through image physical enhancement processing, and sends the enhanced segmentation training set and the enhanced segmentation test set to the target segmentation model design module;
[0050] The target segmentation model design module is used to design the target segmentation model by constructing a multi-scale attention network model as the target segmentation model and sending the target segmentation model to the small target segmentation module;
[0051] The small target segmentation module is used for small target segmentation, and obtains a high-precision measurement instrument small target segmentation reference result by using the target segmentation model to process data in real time.
[0052] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0053] (1) Traditional high-precision measurement instrument small target segmentation methods usually rely on limited labeled data and general enhancement methods, which cannot accurately model the instrument-specific degradation process, resulting in systematic differences between training data and real data. In addition, the scarcity of small target samples is difficult to effectively solve by simple copying or translation, which easily leads to technical problems such as model overfitting or missed detection. This solution creatively uses image physical enhancement processing to construct an enhanced dataset containing real physical properties. By constructing a degradation model based on the physical parameters of the instrument, synthetic data that conforms to the real noise characteristics is generated. Combined with generative network optimization and semantic reconstruction technology, the diversity of small targets is significantly expanded while ensuring physical consistency, providing a high-fidelity training foundation for the segmentation model and improving the stability and reliability of the segmentation results.
[0054] (2) In view of the inherent limitations of traditional segmentation methods for small targets of high-precision measuring instruments in high-precision instrument scenarios, a single encoding branch is difficult to balance the conflict between semantic abstraction and edge details, and pooling operations easily lead to the loss of small target features. At the same time, fixed convolution kernels lack the ability to respond to the physical parameters of the instrument and cannot adapt to the degradation characteristics of different devices. This solution creatively adopts a multi-scale attention network model as the target segmentation model. It captures global context and local high-frequency features respectively through a dual-branch encoding structure, uses the attention gating mechanism to achieve feature adaptive fusion, and combines the edge-guided decoding strategy and the physical parameter-driven dynamic convolution kernel fine-tuning to enable the model to adjust the feature extraction weights in real time according to the instrument characteristics, suppress upsampling blur, and ensure the complete segmentation of small targets. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic flow chart of a small target segmentation method for an intelligent high-precision measuring instrument provided by the present invention;
[0056] Figure 2 A schematic diagram of a module of an intelligent high-precision measuring instrument small target segmentation system provided by the present invention;
[0057] Figure 3 Schematic diagram of the process for optimizing the raw data in step S2;
[0058] Figure 4 This is a schematic diagram of the process of image physical enhancement processing in step S3;
[0059] Figure 5 Schematic diagram of the process flow for the object segmentation model design in step S4.
[0060] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0062] In the description of the present invention, it should be understood that terms such as "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.
[0063] Example 1, see Figure 1 The present invention provides an intelligent high-precision measuring instrument small target segmentation method, which includes the following steps:
[0064] Step S1: raw data collection;
[0065] Step S2: original data optimization;
[0066] Step S3: image physical enhancement processing;
[0067] Step S4: target segmentation model design;
[0068] Step S5: small object segmentation.
[0069] Example 2, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S1, the raw data acquisition is used to acquire the raw data required for small target segmentation of a high-precision measuring instrument. Specifically, a small target segmentation raw data set is obtained by performing data acquisition. The small target segmentation raw data set specifically includes a past segmentation raw data set and a real-time segmentation raw data set. Both the past segmentation raw data set and the real-time segmentation raw data set include raw image data and instrument physical parameter data. The past segmentation raw data set also includes segmentation annotation data.
[0070] The original image data is specifically image data containing typical small targets and background image data without targets collected by a high-precision measuring instrument;
[0071] The instrument physical parameter data specifically includes instrument wavelength data obtained from the instrument equipment spectrum calibration report, instrument numerical aperture data obtained from the objective lens specifications, instrument thermal noise standard deviation data obtained by dark field calibration method, instrument vibration frequency data collected by installing an accelerometer on the instrument base, instrument quantum efficiency data obtained by single photon response testing, and pre-generated instrument wavelength data, instrument numerical aperture data, instrument thermal noise standard deviation data, instrument vibration frequency data, and instrument quantum efficiency data that conform to physical laws;
[0072] The segmentation annotation data is specifically a binary segmentation mask corresponding to the original image data.
[0073] Example 3, see Figure 1 、 Figure 2 and Figure 3 This embodiment is based on the above embodiment. In step S2, the raw data optimization is used to optimize the collected raw data, and specifically includes the following steps:
[0074] Step S21: instrument calibration, which is used to eliminate the inherent noise of the instrument, specifically by dark current compensation and linear response correction to obtain an image that conforms to the radiometric measurement;
[0075] Step S22: Illumination normalization, which is used to eliminate uneven illumination. Specifically, the contrast of small objects is enhanced through adaptive homomorphic filtering to obtain an image with uniform illumination.
[0076] Step S23: edge-preserving filtering is used to suppress noise interference, specifically by combining bilateral filtering to protect sub-pixel edges while reducing noise, thereby obtaining an image with an optimized signal-to-noise ratio;
[0077] Step S24: Size normalization is used to unify the input specifications, specifically by adaptive cropping and bicubic interpolation to obtain an image of a standard size that meets the network input;
[0078] The real-time segmentation original data set and the past segmentation original data set are optimized through the instrument calibration, the illumination normalization, the edge-preserving filtering and the size normalization to obtain the image data set to be segmented and the optimized past original data set.
[0079] Example 4, see Figure 1 、 Figure 2 and Figure 4 This embodiment is based on the above embodiment. In step S3, the image physical enhancement processing is used to construct an enhanced data set containing real physical properties. Specifically, by fusing the multi-physics noise model of optics, mechanics and electronics, an enhanced segmentation training set and an enhanced segmentation test set consistent with the noise characteristics of the real measuring instrument are obtained.
[0080] The image physical enhancement processing specifically includes the following steps:
[0081] Step S31: physical parameter vector definition, used to clarify the physical source of instrument noise, specifically by introducing five physical parameters: wavelength, numerical aperture, thermal noise standard deviation, vibration frequency, and quantum efficiency, to obtain a physical parameter vector;
[0082] Step S32: A unified degradation function is designed to comprehensively simulate the physical degradation effect. Specifically, a four-layer cascade operation of point spread function convolution, gradient energy constrained vibration blur kernel, Poisson-gamma noise, and Gaussian noise is performed to obtain a synthetic degraded image that conforms to physical laws. The formula used is as follows:
[0083] ;
[0084] Where, represents the image after optical diffraction, represents an ideal noise-free image, represents the point spread function, represents wavelength, NA represents numerical aperture, PR represents the ratio of photon energy, Qe represents quantum efficiency, and Plc represents Planck's constant. represents the light frequency, represents the synthetic degraded image, represents the vibration frequency, represents the gradient of the image after optical diffraction, represents the Poisson noise generating function, represents random numbers that follow a standard normal distribution, represents the convolution operation, Indicates calculation of L2 norm;
[0085] Step S33: Physical consistency verification is used to ensure the authenticity of the synthesized data. Specifically, a physical consistency score is obtained by weighted combination of structural similarity and gradient fidelity. The formula used is as follows:
[0086] ;
[0087] Where PS represents the physical consistency score, N represents the total number of samples, represents the structural similarity calculation function, represents the synthetic degradation image synthesized from the instrument physical parameter data of the nth sample, represents the real image of the nth sample, represents the gradient-fidelity weight, represents the gradient of the synthetic degraded image, represents the gradient of the real image, Indicates calculation of L1 norm;
[0088] Step S34: Lightweight GAN optimization is used to learn the noise distribution of images collected by real instruments and further refine the images generated by the physical model. Specifically, the image quality of the synthesized degraded image is improved by training the lightweight GAN to obtain an optimized synthesized degraded image.
[0089] Step S35: Small object semantic reorganization is used to expand the diversity of small object samples. Specifically, the original samples are decomposed into atoms and reconstructed to obtain new samples that meet physical constraints. The steps include:
[0090] Step S351: Atomize the target to extract reusable small target sample atomic units. Specifically, the target area is intercepted by segmentation mask and texture features are obtained to obtain a small target material set, which is expressed as follows:
[0091] ;
[0092] In the formula, Gc represents the small target material set, Represents the num-th small target material, Num represents the total number of small target instances contained in all samples, Represents the image block of the num-th small target material, Represents the binary segmentation mask of the image block of the num-th small target material, Represents the texture features of the image block of the num-th small target material, represents the principal component analysis function, represents the local binary pattern function;
[0093] Step S352: Design spatially constrained attention to predict the appropriate position for inserting a small target in the base image. Specifically, a spatial attention map representing the weight distribution of the small target insertion position is generated through a three-layer convolutional neural network. The base image is specifically a target-free background image. The spatial attention map is generated through the convolutional neural network. The formula used is as follows:
[0094] ;
[0095] Where, represents the spatial attention map, represents the sigmoid activation function, represents the convolution operation function, represents the ReLU activation function, Represents the base image;
[0096] Step S353: Poisson blending optimization is used to naturally fuse the small target with the background. Specifically, the Poisson blending equation is constrained by the spatial attention map to obtain the reconstructed image. The formula used is as follows:
[0097] ;
[0098] Where, Represents the reconstructed image, represents the base image for inserting small targets, represents the gradient of the base image with the small target inserted, Represents the gradient of the image block of the num-th small target material, Represents element-wise multiplication operation;
[0099] Step S354: obtaining an enhanced reconstructed image, specifically, processing the reconstructed image according to steps S31 to S34 to obtain an enhanced reconstructed image;
[0100] Step S36: Obtain an enhanced data set, specifically based on the instrument physical parameter data pre-generated in the optimized past original data set, and process through steps S31 to S34 to obtain an optimized synthetic degraded image set, and incorporate the optimized synthetic degraded image set into the optimized past original data set, and process through step S35 to obtain an enhanced reconstructed image set, and also incorporate the enhanced reconstructed image set into the optimized past original data set, and perform data set segmentation to obtain an enhanced segmentation training set and an enhanced segmentation test set.
[0101] By performing the above operations, the traditional high-precision measuring instrument small target segmentation method usually relies on limited labeled data and general enhancement means, which cannot accurately model the instrument-specific degradation process, resulting in systematic differences between training data and real data. The scarcity of small target samples is difficult to effectively solve by simple copying or translation, which easily leads to technical problems such as model overfitting or missed detection. This solution creatively uses image physical enhancement processing to construct an enhanced dataset containing real physical properties. By constructing a degradation model based on the physical parameters of the instrument, synthetic data that conforms to the real noise characteristics is generated. Combined with generative network optimization and semantic reconstruction technology, the diversity of small targets is significantly expanded while ensuring physical consistency, providing a high-fidelity training foundation for the segmentation model and improving the stability and reliability of the segmentation results.
[0102] Example 5, see Figure 1 、 Figure 2 and Figure 5 This embodiment is based on the above embodiment. In step S4, the target segmentation model is designed to construct a model required for small target segmentation of high-precision measuring instruments. Specifically, a multi-scale attention network model is constructed as the target segmentation model. The multi-scale attention network model specifically includes a dual-branch encoder module, a gated aggregation module, an improved decoder module, and a fine-tuning module.
[0103] The target segmentation model design specifically includes the following steps:
[0104] Step S41: constructing a dual-branch encoder module for complementary feature extraction, specifically by constructing a global semantic branch and a local edge branch for parallel processing, the steps include:
[0105] Step S411: Global semantic branch construction is used to capture long-range dependencies, specifically by layered patch merging and Swin-Transformer block processing to obtain three-level downsampling features 、 and ;
[0106] Step S412: Local edge branch construction is used to enhance edge response. Specifically, high-frequency components are extracted through the Laplacian operator and maximum pooling downsampling is used to obtain multi-scale edge features. The formula used is as follows:
[0107] ;
[0108] Where, represents the edge features of the first scale, represents the Laplace operator, represents the input image data, represents the maximum pooling function, Represents the edge features of the second scale, Represents edge features of the third scale;
[0109] Step S42: constructing a gated aggregation module for adaptive feature fusion. Specifically, the module associates global semantics and local edge information through an attention mechanism to obtain multi-scale fusion features. The steps include:
[0110] Step S421: Feature alignment is used to unify the feature space. Specifically, the number of channels of the edge features output by the local edge branch is adjusted through 1×1 convolution to obtain multi-scale optimized edge features that match the downsampled feature dimensions output by the global semantic branch.
[0111] Step S422: Design an attention mechanism to establish cross-modal associations. Specifically, the downsampled features output by the global semantic branch are used to generate queries, and the multi-scale optimized edge features are used to generate keys and values to obtain multi-scale attention output features. The formula used is as follows:
[0112] ;
[0113] Where, represents the query of the mth scale, represents the key of the mth scale, represents the value of the mth scale, represents the 1×1 convolution operation function, represents the mth level downsampling feature, represents the splitting function, represents the optimized edge feature of the mth scale, represents the attention output feature of the mth scale, represents the softmax activation function, represents the dimension of the key of the mth scale, and T represents the transpose operation;
[0114] Step S423: Gated fusion is used to weight the fusion features. Specifically, the multi-scale attention output features are controlled by learnable parameters to obtain multi-scale fusion features. The formula used is as follows:
[0115] ;
[0116] Where, represents the fusion feature of the mth scale, and le represents the learnable parameter;
[0117] Step S43: Improve the decoder module construction for high-precision mask reconstruction, specifically by edge-sensitive deconvolution and sharpening activation function to obtain small object segmentation results, the steps include:
[0118] Step S431: Design a sharpening activation function to enhance the microstructure response. The formula used is as follows:
[0119] ;
[0120] Where, represents the sharpening activation function, x represents the input variable, represents the hyperbolic tangent function, represents the linear intensity control coefficient, Indicates the linear range control coefficient;
[0121] Step S432: Skip connection fusion is used to restore spatial details. Specifically, the multi-scale fusion features output by the dual-branch encoder module are fused with the output features of the previous decoding layer through cross-layer connections to obtain up-sampled features. The formula used is as follows:
[0122] ;
[0123] Where, represents the upsampled features of the mth decoding layer, represents the 3×3 convolution operation function, represents the bilinear interpolation upsampling function, Represents the output features of the m+1th decoding layer;
[0124] Step S433: Edge-sensitive deconvolution is used to suppress upsampling blur. Specifically, the upsampling features are activated by a sharpening activation function and combined with the multi-scale edge features output by the local edge branch of the dual-branch encoder module to obtain deconvolution features. The formula used is as follows:
[0125] ;
[0126] Where, represents the deconvolution feature of the mth decoding layer, represents the depth-wise separable convolution function, Represents the edge feature of the mth scale;
[0127] Step S44: A fine-tuning module is constructed to dynamically adapt to the instrument characteristics and act on the deconvolution features of each decoding layer. Specifically, a dynamic convolution kernel is generated by the physical parameter vector and superimposed on the basic convolution kernel. Then, a convolution operation is performed to obtain the output features of the decoding layer. The formula used is as follows:
[0128] ;
[0129] Where, represents the dynamic convolution kernel, represents the multilayer perceptron function, represents the physical parameter vector, represents the output features of the mth decoding layer, Represents the basic convolution kernel;
[0130] Step S45: Build and train the model, specifically by integrating the dual-branch encoder module construction, the gated aggregation module construction, the improved decoder module construction and the fine-tuning module construction to construct a multi-scale attention network model, train the model based on the enhanced segmentation training set, verify the model performance based on the enhanced segmentation test set, and obtain the multi-scale attention network model as the target segmentation model.
[0131] By performing the above operations, the traditional high-precision measurement instrument small target segmentation method has inherent limitations of traditional segmentation models in high-precision instrument scenarios. A single encoding branch is difficult to balance the conflict between semantic abstraction and edge details. Pooling operations easily lead to the loss of small target features. At the same time, the fixed convolution kernel lacks the ability to respond to the physical parameters of the instrument and cannot adapt to the degradation characteristics of different devices. Technical problems, this scheme creatively adopts a multi-scale attention network model as the target segmentation model. The dual-branch encoding structure captures the global context and local high-frequency features respectively, and uses the attention gating mechanism to achieve feature adaptive fusion. Combined with the edge-guided decoding strategy and the dynamic convolution kernel fine-tuning driven by physical parameters, the model can adjust the feature extraction weights in real time according to the instrument characteristics, suppress upsampling blur, and ensure the complete segmentation of small targets.
[0132] Example 6, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S5, the small target segmentation is specifically to use the image data set to be segmented as the input of the target segmentation model to perform small target segmentation to obtain a high-precision measuring instrument small target segmentation reference result. The high-precision measuring instrument small target segmentation reference result is specifically the small target segmentation result output by the target segmentation model.
[0133] Example 7, see Figure 1 and Figure 2 , based on the above embodiment, this embodiment provides an intelligent high-precision measuring instrument small target segmentation system, including a raw data acquisition module, a raw data optimization module, an image physical enhancement processing module, a target segmentation model design module and a small target segmentation module;
[0134] The raw data acquisition module is used to collect raw data, obtain a small target segmentation raw data set by collecting the raw data, and send the small target segmentation raw data set to the raw data optimization module;
[0135] The raw data optimization module is used for raw data optimization, and obtains the image data set to be segmented and the optimized past raw data set through raw data optimization, and sends the image data set to be segmented to the small object segmentation module, and sends the optimized past raw data set to the image physical enhancement processing module;
[0136] The image physical enhancement processing module is used for image physical enhancement processing, obtains an enhanced segmentation training set and an enhanced segmentation test set through image physical enhancement processing, and sends the enhanced segmentation training set and the enhanced segmentation test set to the target segmentation model design module;
[0137] The target segmentation model design module is used to design the target segmentation model by constructing a multi-scale attention network model as the target segmentation model and sending the target segmentation model to the small target segmentation module;
[0138] The small target segmentation module is used for small target segmentation, and obtains a high-precision measurement instrument small target segmentation reference result by using the target segmentation model to process data in real time.
[0139] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0140] While the embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions, and alterations can be made to the embodiments without departing from the principles and spirit of the invention.
[0141] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. An intelligent high-precision small target segmentation method for measuring instruments, characterized by: The method comprises the following steps: S1: Raw data collection: obtaining a small target segmentation raw data set by performing data collection. The small target segmentation raw data set specifically includes a past segmentation raw data set and a real-time segmentation raw data set. S2: Raw data optimization: optimize the collected raw data to obtain the image dataset to be segmented and the optimized past raw dataset; S3: Image physical enhancement processing, used to construct an enhanced dataset containing real physical properties. Specifically, by integrating optical, mechanical, and electronic multi-physics noise models, we obtain enhanced segmentation training and test sets that are consistent with the noise characteristics of real measurement instruments; S4: Target segmentation model design, used to build a model for small target segmentation of high-precision measuring instruments. Specifically, a multi-scale attention network model is constructed as the target segmentation model. The multi-scale attention network model specifically includes a dual-branch encoder module, a gated aggregation module, an improved decoder module, and a fine-tuning module. S5: small target segmentation, specifically, using the image dataset to be segmented as the input of the target segmentation model to perform small target segmentation, and obtaining a high-precision measuring instrument small target segmentation reference result, wherein the high-precision measuring instrument small target segmentation reference result is specifically the small target segmentation result output by the target segmentation model; The target segmentation model design specifically includes the following steps: Step S41: constructing a dual-branch encoder module for complementary feature extraction, specifically by constructing a global semantic branch and a local edge branch for parallel processing, the steps include: Step S411: global semantic branch construction is used to capture long-range dependencies, specifically by layered patch merging and Swin-Transformer block processing to obtain three-level downsampling features; Step S412: constructing a local edge branch to enhance edge response, specifically extracting high-frequency components through the Laplacian operator and using maximum pooling downsampling to obtain multi-scale edge features; Step S42: constructing a gated aggregation module for adaptive feature fusion. Specifically, the module associates global semantics and local edge information through an attention mechanism to obtain multi-scale fusion features. The steps include: Step S421: Feature alignment is used to unify the feature space. Specifically, the number of channels of the edge features output by the local edge branch is adjusted through 1×1 convolution to obtain multi-scale optimized edge features that match the downsampled feature dimensions output by the global semantic branch. Step S422: Design an attention mechanism to establish cross-modal associations. Specifically, the downsampled features output by the global semantic branch are used to generate queries, and the multi-scale optimized edge features are used to generate keys and values to obtain multi-scale attention output features. Step S423: gated fusion, which is used to weight the fusion features, specifically controlling the multi-scale attention output features through learnable parameters to obtain multi-scale fusion features; Step S43: Improve the decoder module construction for high-precision mask reconstruction, specifically by edge-sensitive deconvolution and sharpening activation function to obtain small object segmentation results, the steps include: Step S431: sharpening activation function design to enhance microstructure response; Step S432: skip connection fusion is used to restore spatial details, specifically, the multi-scale fusion features output by the dual-branch encoder module are fused with the output features of the previous decoding layer through cross-layer connections to obtain up-sampled features; Step S433: Edge-sensitive deconvolution is used to suppress upsampling blur. Specifically, the upsampling features are activated by a sharpening activation function and combined with the multi-scale edge features output by the local edge branch of the dual-branch encoder module to obtain deconvolution features. Step S44: A fine-tuning module is constructed to dynamically adapt to the instrument characteristics and act on the deconvolution features of each decoding layer. Specifically, a dynamic convolution kernel is generated by the physical parameter vector and superimposed on the basic convolution kernel. Then, a convolution operation is performed to obtain the output features of the decoding layer. Step S45: Build and train the model, specifically by integrating the dual-branch encoder module construction, the gated aggregation module construction, the improved decoder module construction and the fine-tuning module construction to construct a multi-scale attention network model, train the model based on the enhanced segmentation training set, verify the model performance based on the enhanced segmentation test set, and obtain the multi-scale attention network model as the target segmentation model.
2. The intelligent high-precision measuring instrument small target segmentation method according to claim 1 is characterized by: The image physical enhancement processing specifically includes the following steps: Step S31: physical parameter vector definition, used to clarify the physical source of instrument noise, specifically by introducing five physical parameters: wavelength, numerical aperture, thermal noise standard deviation, vibration frequency, and quantum efficiency, to obtain a physical parameter vector; Step S32: a unified degradation function is designed to comprehensively simulate physical degradation effects. Specifically, a four-layer cascade operation of point spread function convolution, gradient energy constrained vibration blur kernel, Poisson-gamma noise, and Gaussian noise is performed to obtain a synthetic degraded image that conforms to physical laws. Step S33: Physical consistency verification is used to ensure the authenticity of the synthesized data. Specifically, a physical consistency score is obtained through a weighted combination of structural similarity and gradient fidelity. Step S34: Lightweight GAN optimization is used to learn the noise distribution of images collected by real instruments and further refine the images generated by the physical model. Specifically, the image quality of the synthesized degraded image is improved by training the lightweight GAN to obtain an optimized synthesized degraded image. Step S35: Small object semantic reorganization is used to expand the diversity of small object samples. Specifically, the original samples are decomposed into atoms and reconstructed to obtain new samples that meet physical constraints. The steps include: Step S351: Atomizing the target to extract reusable small target sample atomic units, specifically intercepting the target area through a segmentation mask and obtaining texture features to obtain a small target material set; Step S352: Designing a spatially constrained attention to predict the appropriate position for inserting a small target in a base image. Specifically, a three-layer convolutional neural network is used to generate a spatial attention map representing the weight distribution of the small target insertion position. The base image is specifically a background image without a target. Step S353: Poisson blending optimization is used to naturally fuse the small target with the background. Specifically, the Poisson blending equation is constrained by the spatial attention map to obtain a reconstructed image. Step S354: obtaining an enhanced reconstructed image, specifically, processing the reconstructed image according to steps S31 to S34 to obtain an enhanced reconstructed image; Step S36: Obtain an enhanced data set, specifically based on the instrument physical parameter data pre-generated in the optimized past original data set, and process through steps S31 to S34 to obtain an optimized synthetic degraded image set, and incorporate the optimized synthetic degraded image set into the optimized past original data set, and process through step S35 to obtain an enhanced reconstructed image set, and also incorporate the enhanced reconstructed image set into the optimized past original data set, and perform data set segmentation to obtain an enhanced segmentation training set and an enhanced segmentation test set.
3. The intelligent high-precision measuring instrument small target segmentation method according to claim 1 is characterized by: The previously segmented original data set and the real-time segmented original data set both include original image data and instrument physical parameter data. The previously segmented original data set also includes segmentation annotation data.
4. The intelligent high-precision measuring instrument small target segmentation method according to claim 1 is characterized by: The raw data optimization specifically includes the following steps: Step S21: instrument calibration, which is used to eliminate the inherent noise of the instrument, specifically by dark current compensation and linear response correction to obtain an image that conforms to the radiometric measurement; Step S22: Illumination normalization, which is used to eliminate uneven illumination. Specifically, the contrast of small objects is enhanced through adaptive homomorphic filtering to obtain an image with uniform illumination. Step S23: edge-preserving filtering is used to suppress noise interference, specifically by combining bilateral filtering to protect sub-pixel edges while reducing noise, thereby obtaining an image with an optimized signal-to-noise ratio; Step S24: Size normalization is used to unify the input specifications, specifically by adaptive cropping and bicubic interpolation to obtain an image of a standard size that meets the network input; The real-time segmentation original data set and the past segmentation original data set are optimized through the instrument calibration, the illumination normalization, the edge-preserving filtering and the size normalization to obtain the image data set to be segmented and the optimized past original data set.
5. An intelligent high-precision measuring instrument small target segmentation system, used to implement an intelligent high-precision measuring instrument small target segmentation method according to any one of claims 1 to 4, characterized in that: It includes raw data acquisition module, raw data optimization module, image physical enhancement processing module, target segmentation model design module and small target segmentation module.
6. The intelligent high-precision measuring instrument small target segmentation system according to claim 5, characterized in that: The raw data acquisition module is used to collect raw data, obtain a small target segmentation raw data set by collecting the raw data, and send the small target segmentation raw data set to the raw data optimization module; The raw data optimization module is used for raw data optimization, and obtains the image data set to be segmented and the optimized past raw data set through raw data optimization, and sends the image data set to be segmented to the small object segmentation module, and sends the optimized past raw data set to the image physical enhancement processing module; The image physical enhancement processing module is used for image physical enhancement processing, obtains an enhanced segmentation training set and an enhanced segmentation test set through image physical enhancement processing, and sends the enhanced segmentation training set and the enhanced segmentation test set to the target segmentation model design module; The target segmentation model design module is used to design the target segmentation model by constructing a multi-scale attention network model as the target segmentation model and sending the target segmentation model to the small target segmentation module; The small target segmentation module is used for small target segmentation, and obtains a high-precision measurement instrument small target segmentation reference result by using the target segmentation model to process data in real time.
Citation Information
Patent Citations
Target region segmentation method and system of ultrasonic image and electronic equipment
CN117934824A
Medical image segmentation method based on u-net
US20220309674A1