Bundled reinforcing steel bar end face image segmentation method based on image pyramid and agent model
By using the image pyramid and proxy model methods in steel image segmentation, the problem of low efficiency in the existing technology is solved, fast and efficient image segmentation is achieved, the needs of real-time detection are met, and it is extended to multiple application fields.
Patent Information
- Application Number
- CN202410789353.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is inefficient in rebar image segmentation and is difficult to meet the needs of real-time or near-real-time industrial detection, especially when the background is complex and computing resources are limited, resulting in unstable and inaccurate detection results.
A fast image segmentation method based on image pyramid and surrogate model is adopted. By constructing multi-scale image pyramid and surrogate model, combined with Gaussian process regression and optimization algorithm, a multi-scale segmentation framework from rough to fine is realized, pixel pair evaluation function is optimized, and reduced Calculation volume and improve segmentation efficiency.
Significantly improves the speed and efficiency of image segmentation, meets the needs of real-time or near-real-time industrial inspection, maintains the high accuracy of segmentation results, and is suitable for many fields such as building construction monitoring and steel bar quality inspection, improving user experience and work efficiency .
Smart Images

Figure CN118608558A
Abstract
Description
Technical field:
[0001] The present invention relates to the field of image processing and computer vision technology, and in particular to an innovative method for image segmentation of bundled steel bar end faces based on image pyramid and proxy model. The technical solution aims to provide a fast, efficient and automated processing method for steel bar image segmentation in the construction industry, so as to achieve accurate extraction and analysis of steel bar end faces in bundled steel bar images. By combining multi-scale image processing technology and proxy model optimization strategy, the present invention can quickly generate high-quality segmentation results with limited computing resources, and is suitable for multiple related fields such as construction monitoring, steel bar quality inspection, and material management, and has important practical application value and broad market application prospects. Background technology:
[0002] In the construction industry, steel bars are key structural materials, and their accurate placement and quality are directly related to the safety and durability of the entire project. The detection and analysis of steel bars traditionally rely on manual inspection, which is not only inefficient but also easily affected by human factors, resulting in instability and inaccuracy in the detection results. With the development of computer vision and image processing technology, automated image segmentation technology provides a new solution for the rapid detection and analysis of steel bars.
[0003] The core goal of image segmentation technology is to accurately extract the object of interest, i.e., the end face of the steel bar, from the complex image background. In steel bar images, the dense arrangement of steel bars, changes in lighting conditions, and reflections on the steel bar surface make automatic segmentation of steel bars a challenging problem. Traditional image segmentation methods, such as threshold-based segmentation, edge detection, and region growing, often have difficulty coping with the complex situations in steel bar images, especially in scenes where the steel bars are densely packed and overlap with each other.
[0004] In addition, some existing automated rebar segmentation methods face the problems of low computational efficiency and lack of real-time performance when processing large-scale image data. These methods often require a lot of computing resources and time, especially when evaluating pixel pairs and iterative solutions, which makes it difficult to meet the needs of fast and real-time industrial inspection.
[0005] In order to overcome the above problems and improve the efficiency and accuracy of steel bar image segmentation, it is necessary to develop a new image segmentation technology that can significantly improve the processing speed while ensuring the segmentation quality and meet the real-time or near-real-time industrial application requirements. Based on this background, the present invention proposes a fast image segmentation method based on image pyramid and proxy model, aiming to solve the limitations of the existing technology in steel bar image segmentation and provide an innovative solution.
[0006] Technical Solution
[0007] The proposed method for segmenting bundled steel bar end faces incorporates an innovative algorithm flow to achieve efficient image processing. The following is a detailed technical flow of the method, combined with the provided algorithm content:
[0008] Preferably, an image pyramid is constructed: the present invention first uses an image pyramid decomposition technique to perform multi-scale decomposition on the input bundled steel bar color image and its corresponding trimap. This process involves resizing and normalizing the original image to meet the requirements of multi-scale decomposition, and using techniques such as Laplacian pyramid or Gaussian pyramid to reduce the image resolution layer by layer, construct a complete image pyramid structure, and provide a multi-scale analysis basis for the subsequent optimization process.
[0009] 1. Input image and trimap: First, obtain the color image of the bundled steel bars to be processed and its corresponding trimap. Trimap is a mask that divides the image into three regions: known foreground region, known background region, and unknown region.
[0010] 2. Resizing: Resize the input image to ensure that the resolution of the image is suitable for multi-scale decomposition.
[0011] 3. Normalization: Normalize the resized image, which usually includes color space conversion (such as conversion from RGB to LAB color space) and pixel value normalization (for example, normalization to the range of [0,1]).
[0012] 4. Choose a pyramid construction technique: Choose a suitable pyramid construction technique, such as Laplacian pyramid or Gaussian pyramid. These techniques allow the image resolution to be reduced layer by layer while maintaining the key information of the image.
[0013] 5. Multiscale decomposition: Apply the selected pyramid construction technique and start the multiscale decomposition process. Start with the highest resolution image and gradually create the next level of images, with each level having a lower resolution than the previous one.
[0014] Laplacian Pyramid: Create each level of the image through Gaussian filtering and subsampling.
[0015] Gaussian Pyramid: Use Gaussian filtering to gradually reduce the image resolution, with each level corresponding to a different scaling ratio.
[0016] 6. Build a complete image pyramid: Repeat the above steps until the required number of levels is reached. Each level of the image corresponds to a specific resolution, thus forming a complete multi-scale image sequence.
[0017] 7. Multi-scale decomposition of trimap: In sync with the image decomposition, trimap also performs multi-scale decomposition to ensure that there are corresponding masks of foreground, background and unknown areas at each level.
[0018] 8. Optimization preparation: The constructed image pyramid provides a basis for multi-scale analysis of the subsequent pixel pair optimization problem. At the lowest resolution level, the decision vector is initialized based on random or heuristic methods to prepare for the optimization process.
[0019] 9. Mapping between layers: Ensure that there is an appropriate mapping relationship between different layers, which allows the optimization results to be transferred from low-resolution layers to high-resolution layers.
[0020] Through the above steps, the constructed image pyramid provides a multi-scale framework from coarse to fine for the segmentation of bundled steel bar images, enabling the optimization algorithm to work efficiently at different levels and gradually improve the accuracy and quality of the segmentation results.
[0021] Preferably, initialize the decision vector: at the bottom layer of the image pyramid, initialize the decision vector for the pixel pair optimization problem. This vector is initialized based on a random or heuristic method and contains the foreground and background candidate pixel indices corresponding to each pixel in the unknown area. This step provides a starting point for subsequent optimization and takes into account the texture, color distribution and edge information of the image, ensuring the accuracy and effectiveness of the optimization process.
[0022] Preferably, a set of pixel pair optimization subproblems is selected: At each level, a set of representative pixel pair optimization subproblems is selected from the unknown region according to a specific selection strategy, such as random selection, selection based on image content, etc. These subproblem sets define the pixels in the unknown region that need to be further solved, which is a key step to achieve accurate segmentation. i On the top, select a set of pixel pairs to optimize the subproblem set These sets of subproblems define the unknown regions of pixels that need to be further solved.
[0023] Constructing the proxy model: For each pixel pair, optimize the subproblem P, in the set In the example above, we build a proxy model This proxy model uses Gaussian process regression (GPR) to approximate the pixel pair evaluation function g(x).
[0024] 1. Initialize the proxy model: Initialize the proxy model using the selected pixel pairs. This may involve selecting pixel pairs within known foreground and background regions and using them to train the proxy model.
[0025] 2. Optimization algorithm: Use an optimization algorithm to optimize the proxy model. This may include gradient descent or other efficient optimization algorithms, the goal is to minimize the objective function of the proxy model to find the optimal solution.
[0026] 3. Proxy model sharing strategy: If the stopping condition has not been met, optimize the subproblem kP for the adjacent pixel pairs of the current subproblem and use the optimized proxy model To approximate new sub-problems and avoid repeated calculations.
[0027] 4. Iterative optimization: With the help of the surrogate model, each sub-problem is iteratively optimized until the stopping condition is met or the predetermined number of iterations is reached.
[0028] 5. Update and propagate: Update the optimized decision vector x best Update the set of pixel pair optimization problems at the current level and prepare to propagate the results to the next higher pyramid level.
[0029] 6. Stopping condition: Check whether the stopping condition is met, which may be based on the calculation time, number of iterations, or the degree of improvement of the objective function. Result estimation: At the highest level, the alpha value of each pixel in the unknown area is calculated according to the optimized decision vector to generate the final alpha matte.
[0030] Preferably, construct a proxy model: For each selected pixel pair optimization subproblem, construct a proxy model based on a Gaussian process. This model is used to approximate the pixel pair evaluation function, which is a complex, non-convex and non-differentiable function. The construction of the proxy model is the key to achieving fast optimization, which allows the algorithm to efficiently evaluate and select the optimal pixel pair combination. Constructing the proxy model:
[0031] 1. Determine the optimization sub-problems: At each level of the image pyramid, optimize a set of sub-problems for selected pixel pairs, each sub-problem contains a pair of known foreground and background pixels, and one or more unknown pixels.
[0032] 2. Design pixel pair evaluation function: Design an evaluation function g(x) for each subproblem, which is based on the color difference, spatial relationship and other visual features of the pixel pair to evaluate the effect of different alpha value configurations. This function is complex, non-convex and non-differentiable.
[0033] 3. Select the surrogate model: Select Gaussian process regression as the surrogate model to approximate the above evaluation function. Gaussian process is a non-parametric probability model that can handle the complexity and uncertainty of the evaluation function.
[0034] 4. Collect training samples: For each sub-problem, collect training samples, which include alpha value evaluations of selected foreground pixels and background pixels for unknown pixels.
[0035] 5. Train the Gaussian process model: Use the collected training samples to train the Gaussian process model. This includes selecting a suitable kernel function (such as the radial basis function) and determining the hyperparameters of the model.
[0036] 6. Proxy model optimization: Use the trained Gaussian process model to optimize the sub-problem. The proxy model is used to predict the best alpha value of unknown pixels instead of directly optimizing the original evaluation function, which significantly reduces the amount of calculation.
[0037] 7. Proxy model sharing strategy: Share the constructed proxy model between adjacent pixel pair optimization sub-problems to avoid repeated calculations and save computing time. Specifically, for adjacent unknown pixels, if their proxy models are similar enough, the model parameters can be shared.
[0038] 8. Iterative update: During the optimization process, the proxy model is continuously iteratively updated based on new training samples and existing proxy models to improve the accuracy of the approximation.
[0039] 9. Optimal solution search: Use the proxy model to guide the search for the optimal solution, and use optimization algorithms (such as gradient descent or other heuristic algorithms) to find the optimal pixel pair combination under the prediction of the proxy model.
[0040] 10. Result verification: Verify the results predicted by the proxy model and compare them with the actual pixel pair evaluation function to ensure the accuracy and reliability of the optimization results.
[0041] Preferably, optimize the subproblems: Use the constructed proxy model to optimize each subproblem to find the optimal solution. The optimization process uses efficient optimization algorithms, such as gradient descent, to minimize the pixel pair evaluation function. This step is the core of the algorithm, which ensures that the algorithm can quickly converge to the optimal solution.
[0042] Preferably, a proxy model sharing strategy (SMS) is implemented: To save computing time, a proxy model sharing strategy is implemented. This strategy allows the optimized proxy model to be shared between adjacent pixel pair optimization sub-problems, avoiding repeated model construction and optimization calculations. This innovative strategy significantly improves the efficiency and speed of the algorithm.
[0043] Preferably, the optimization result propagation: the optimization result of the low level is propagated to the high level through upsampling technology. This step ensures the consistency of information between different levels and helps to maintain and improve the details and quality of the final segmentation result.
[0044] Preferably, estimate the alpha matte: At the highest level, the alpha value of each pixel in the unknown area is calculated according to the optimized decision vector to generate the final alpha matte. The calculation of the alpha value uses the formula mentioned in the paper to ensure the accuracy of the segmentation result.
[0045] Preferably, user interaction and parameter adjustment: provide a user interface that allows the user to input images, set optimization parameters, select the proxy model type, and view the segmentation results in real time. The user can make manual adjustments as needed to obtain the best segmentation effect.
[0046] Preferably, real-time processing and batch processing: This method supports real-time processing and batch processing modes, and is suitable for fast segmentation of video frames and processing of large-scale image data sets, meeting the needs of different application scenarios.
[0047] Preferably, computing resource management: the present invention also includes intelligent management of computing resources to ensure that segmentation tasks can be performed efficiently even when computing resources are limited, balancing computing speed and image quality.
[0048] Through the above technical solution, the present invention not only significantly improves the speed of image segmentation, but also maintains the high accuracy of the segmentation results, meets the needs of time-sensitive applications, and has broad application prospects and practical application value. Combined with the algorithm flow provided, the technical solution of the present invention further clarifies the following steps:
[0049] a. Initialization: At the beginning of the algorithm, the decision vector is initialized to prepare for the optimization phase of the image segmentation process.
[0050] b. Selection of pixel pair optimization subproblem sets: For each level, a set of pixel pair optimization subproblem sets is selected, which are selected from the unknown area for subsequent optimization.
[0051] c. Construction and optimization of proxy model: For each pixel pair, a proxy model is constructed and optimized until the stopping condition is reached.
[0052] d. Proxy model sharing: Through the proxy model sharing strategy, the optimized proxy model can be reused to reduce the amount of calculation.
[0053] e. Return estimated alpha matte: Finally, the algorithm returns the estimated alpha matte, which is the key result of the segmentation process and is used to generate the final segmented image.
[0054] Through this technical solution combined with an algorithmic process, the present invention provides a structured and efficient method for segmenting bundled steel bar end faces, which is suitable for automated and precise industrial image processing.
[0055] The present invention is committed to solving key technical problems in the field of steel bar image segmentation, including achieving accurate segmentation of steel bars in complex backgrounds, improving the real-time performance and computational efficiency of the segmentation process, overcoming the limitations of computing resources in the field environment, enhancing the robustness of the algorithm under different lighting and imaging conditions, improving the automation of segmentation tasks, effectively integrating multi-scale features to identify steel bars of various sizes and shapes, selecting appropriate optimization algorithms to improve segmentation accuracy and speed, and building and sharing proxy models to reduce repeated calculations and improve overall computational efficiency. Through these innovative solutions, the present invention significantly improves the quality of steel bar image segmentation, speeds up processing, and meets the strict requirements for steel bar detection and analysis in the construction industry.
[0056] The core protection points of the present invention are mainly focused on key innovations in two technical fields: first, it is to build a proxy model and implement a proxy model sharing strategy. This strategy allows the optimized proxy model parameters to be reused between adjacent pixel pair optimization sub-problems, significantly reducing the repeated calculations of model construction and optimization, thereby greatly improving the computational efficiency of image segmentation; second, it is the design of a multi-scale optimization framework, which ensures that the optimization results from low resolution to high resolution can be accurately propagated by gradually refining the segmentation process at the image pyramid level of different resolutions, which is crucial for maintaining image details and improving the final segmentation quality. These two innovations are the focus of the technical protection of the present invention, and together constitute a fast, efficient and user-friendly method for image segmentation of bundled steel end faces, which is suitable for a wide range of real-time and batch image processing application scenarios.
[0057] The beneficial effects of the present invention are mainly reflected in the following aspects: first, by introducing a fast image segmentation method based on image pyramid and proxy model, the speed and efficiency of steel bar image segmentation are greatly improved, meeting the needs of real-time or near real-time industrial detection; second, the sharing strategy of the proxy model significantly reduces the amount of calculation in the optimization process, optimizes the use of computing resources, and enables efficient execution even in resource-constrained environments; third, the multi-scale optimization framework ensures that the image segmentation results can maintain high quality at different resolutions, effectively retains image details, and improves the accuracy of segmentation; finally, the method has a wide range of applications, and can not only be used for construction monitoring and steel bar quality inspection, but can also be extended to material management, virtual reality content generation, image recognition and analysis and other fields, greatly improving user experience and work efficiency. Description of the drawings:
[0058] Figure 1 When the computation time of the present invention is tens of minutes, the computation time of the image segmentation method on 27 images is compared.
[0059] Figure 2The mean square error of the image segmentation method on 27 images is compared when the calculation time of the present invention is several tens of minutes.
[0060] Figure 3 When the computation time of the present invention is minutes, the computation time of the image segmentation method on 27 images is compared.
[0061] Figure 4 When the calculation time of the present invention is seconds, the calculation time of the image segmentation method on 27 images is compared.
[0062] Figure 5 This is the steel bar section image segmentation effect diagram of the present invention Specific implementation method:
[0063] The implementation of the present invention involves the following steps, with a clear process and clear steps:
[0064] 1. Constructing an image pyramid: The input color image of bundled steel bars and its corresponding trimap are decomposed at multiple scales using pyramid decomposition technology, and a two-level image pyramid is constructed. The decision vector at the bottom layer is randomly initialized.
[0065] 2. Selecting a set of pixel pair optimization subproblems: At each pyramid level, a set of representative pixel pair optimization subproblems (Ωp) is selected. The selection strategy is based on image content analysis to ensure uniform coverage of unknown areas.
[0066] 3. Constructing a proxy model: For each pixel pair optimization subproblem (P), a Gaussian process-based proxy model (j) is constructed. This model is used to approximate the complex pixel pair evaluation function, and the optimization subproblem is optimized through the proxy model.
[0067] 4. Optimize subproblems: Use the IMBSM method to optimize each subproblem, which is more efficient than traditional evolutionary algorithm-based methods.
[0068] 5. Proxy model sharing strategy: A proxy model sharing strategy was implemented, allowing the optimized proxy models to be shared between adjacent pixel pair optimization sub-problems, avoiding repeated calculations and significantly reducing the amount of calculations.
[0069] 6. Optimization result propagation: The optimization results of the low level are propagated to the high level through upsampling technology, which ensures the consistency of information between different levels and improves the segmentation quality.
[0070] 7. Estimate alpha matte: At the highest level, the alpha value of each pixel in the unknown area is calculated according to the optimized decision vector to generate the final alpha matte.
[0071] 8. Experimental verification:
[0072] The alphamatting.com dataset contains 27 images, each of which has a corresponding real alphamatte and trimaps. The experiments were conducted on a workstation equipped with an Intel Core i9-9900KF CPU, 3.60GHz, and 128GB of memory. All the methods in the experiments were implemented using MATLAB.
[0073] Parameters and Results
[0074] Constructing an image pyramid: A two-level pyramid is constructed, and the decision vectors at the bottom level are randomly initialized.
[0075] Selecting a set of pixel pairs for optimization subproblems: A set of representative pixel pairs is selected at each layer to construct a set of optimization subproblems.
[0076] Constructing surrogate models: A Gaussian process-based surrogate model was constructed for each subproblem.
[0077] Optimizing subproblems: Using the IMBSM method to optimize subproblems reduces the computational time.
[0078] Proxy model sharing strategy: Share proxy models to avoid duplicate calculations.
[0079] Optimize result propagation: Use upsampling technology to propagate results and improve segmentation quality.
[0080] Estimate alpha matte: Estimate alpha matte at the highest level and generate segmented image.
[0081] Experimental Results
[0082] Figure 1 The computation time comparison of IMMPSM and other existing methods on 27 images is presented with the computation time limited to tens of minutes. The results show that IMMPSM significantly outperforms existing methods such as IMBSM and PMF in terms of computation time.
[0083] Figure 2 A comparison of mean square error (MSE) of different methods under the same conditions is provided. IMMPSM shows that it can significantly reduce the required computation time while maintaining high quality results.
[0084] Figure 3 and Figure 4 The comparison between IMMPSM and PMF is shown under the condition that the computation time is limited to minutes. IMMPSM has significantly smaller MSE and shorter computation time.
[0085] Figure 5The original image shows the original image of the bundled steel bars, and the trimap shows the trimap, which divides the image into known foreground, known background, and unknown area. Segmentation results 1 and 2 show the segmentation results obtained by the IMMPSM method. Compared with the original image and the trimap, the segmentation effect can be clearly seen.
[0086] Through the above implementation, the present invention not only significantly improves the speed of image segmentation, but also maintains the high accuracy of the segmentation result, meets the needs of time-sensitive applications, and has broad application prospects and practical application value.
Claims
1. A method for segmenting bundled steel bar end images based on image pyramid and proxy model, characterized in that: The method comprises the following steps: a. Construct an image pyramid: Use image pyramid decomposition technology to decompose the input bundled steel bar image at multiple scales to form a series of image levels with decreasing resolution. Each layer of image is paired with its corresponding trimap (a mask containing known foreground, background, and unknown areas); b. Initialize the decision vector: In the bottom layer image, for each pixel pair in the unknown area, randomly initialize the decision vector, which determines the foreground and background candidate pixel indices of the pixel pair; c. Select a set of pixel pair optimization sub-problems: At each pyramid level, a set of pixel pair optimization sub-problems that can represent the end features of the steel bar are selected based on image content analysis and a specific selection strategy; d. Constructing a proxy model: For each sub-problem, a proxy model method such as Gaussian process regression is used to approximate the pixel pair evaluation function, which is designed based on the color and spatial information of the image and is used to evaluate the fitness of the foreground and background candidate pixels to the unknown pixels; First, for each sub-problem, the present invention uses Gaussian process regression as a proxy model to approximate the pixel pair evaluation function. The evaluation function is specially designed to integrate the color and spatial information of the image, with the purpose of evaluating the fitness of the foreground and background candidate pixels to the unknown pixels. Next, the feature data of the relevant pixel pairs, including information such as color, texture, position, and their fitness scores, are collected as training data. Then, these training data are used to train the Gaussian process regression model. In this process, the kernel function parameters of the Gaussian process, such as the parameters of the radial basis function, need to be carefully selected and adjusted to ensure that the model can accurately capture the characteristics of the pixel pair evaluation function. After the training is completed, the trained Gaussian process regression model is used to predict the fitness of the unknown pixel pairs. This step provides the necessary input for the optimization algorithm to help it make accurate decisions in the process of searching for the optimal solution. In order to improve computational efficiency, the present invention also implements a proxy model sharing strategy. This means sharing and reusing trained proxy models between adjacent pixel pair optimization sub-problems, and adapting model parameters to new problems, thus avoiding repeated training processes and significantly reducing the amount of computation. e. Optimization subproblems: Use optimization algorithms, such as gradient descent, particle swarm optimization, etc., to optimize the proxy model of each subproblem to obtain the optimal solution; the optimization subproblem is solved by building and using the proxy model. The specific steps are as follows: Selection subproblem: At each pyramid level λ i On the top, select a set of pixel pairs to optimize the subproblem set These sets of subproblems define the unknown regions of pixels that need to be further solved. Constructing the proxy model: For each pixel pair, optimize the subproblem P, in the set In the example above, we build a proxy model This proxy model uses Gaussian process regression (GPR) to approximate the pixel pair evaluation function g(x). Initialize the proxy model: Initialize the proxy model using the selected pixel pairs. This may involve selecting pixel pairs within known foreground and background regions and using them to train the proxy model. Optimization algorithm: An optimization algorithm is used to optimize the proxy model. This may include gradient descent or other efficient optimization algorithms, the goal is to minimize the objective function of the proxy model to find the optimal solution. Proxy model sharing strategy: If the stopping condition has not been met, optimize the subproblem kP for the neighboring pixel pairs of the current subproblem and use the optimized proxy model To approximate new subproblems and avoid repeated calculations. Iterative optimization: With the help of the surrogate model, each subproblem is iteratively optimized until the stopping condition is met or the predetermined number of iterations is reached. Update and propagate: Update the optimized decision vector x best Update the set of pixel pair optimization problems at the current level and prepare to propagate the results to the next higher pyramid level. Stopping condition: Check whether the stopping condition is met, which may be based on the calculation time, number of iterations, or the degree of improvement of the objective function. Result estimation: At the highest level, the alpha value of each pixel in the unknown area is calculated according to the decision vector obtained by optimization to generate the final alpha matte. f. Implement the proxy model sharing strategy: use the optimized proxy model as the initial proxy model for adjacent sub-problems to reduce the amount of calculation, and adjust the proxy model parameters to adapt to the new problem based on the difference in feature distribution of adjacent sub-problems; g. Propagation of optimization results and estimation of segmentation results: Use bilinear interpolation, nearest neighbor interpolation or other upsampling techniques to upsample the low-level optimization decision vector to a high-level level, and calculate the segmentation value of each pixel in the unknown area at the highest level based on the optimized decision vector and image color to generate a segmented image of the bundled steel bar end face. The propagation of optimization results and the estimation of segmentation results are achieved through the following detailed steps: Upsampling: After each pyramid level is optimized, the decision vector needs to be upsampled from the low-resolution level to the high-resolution level. This step usually uses upsampling techniques such as bilinear interpolation or nearest neighbor interpolation. Bilinear interpolation provides a smooth upsampling method, while nearest neighbor interpolation provides a faster but less smooth method. Decision vector propagation: The upsampled decision vector is used to initialize the pixel pair optimization subproblem at higher levels of the pyramid. This means that the solution found at the lower level will directly affect the optimization starting point of the higher level, thus maintaining the consistency of information between different levels. Segmentation result estimation: After the optimization of the highest level is completed, the optimized decision vector is used to estimate the segmentation value of each pixel in the unknown area. This is achieved by calculating the weighted average of the foreground and background colors of each unknown pixel, where the weight is determined by the optimized alpha value. Alpha Matte Generation: Based on the optimized decision vector and image color, the alpha value of each pixel in the unknown area is calculated to generate a segmented image of the end face of the bundled steel bars. The alpha value represents the transparency of the pixel, thereby clearly distinguishing the foreground and background. Iterative Refinement: In some cases, iterative refinement at the highest level may be necessary to refine the segmentation results and improve the segmentation quality. Result fusion: The final segmentation result needs to be fused with the original image to ensure the accuracy and visual effect of the segmented image. Quality Assessment: The quality of the segmentation results can be evaluated by different metrics, such as Mean Squared Error (MSE) or Structural Similarity Index (SSIM), and compared with the original image or ground truth data.
2. The method according to claim 1, characterized in that The step of constructing an image pyramid further includes: a. Preprocess the input image, including resizing and normalization, to meet the requirements of multi-scale decomposition; b. Use Laplacian pyramid or Gaussian pyramid techniques to reduce the image resolution layer by layer and build a complete image pyramid structure to ensure that the resolution of each layer of the image matches its corresponding trimap.
3. The method according to claim 1, characterized in that The step of initializing the decision vector further includes: a. Generate an initial decision vector for each pixel pair in the bottom-level image using a uniform distribution or image content-based heuristic method. The generation of this vector takes into account the texture, color distribution, and edge information of the image.
4. The method according to claim 1, characterized in that: The step of selecting a pixel pair optimization sub-problem set further includes: a. Based on image content analysis, pixel pairs that can represent the end features of the steel bar are selected. The selection process takes into account the geometry, size and spatial arrangement of the steel bar; b. Use clustering algorithm or image segmentation algorithm for preprocessing to assist in selecting representative pixel pairs to improve the efficiency and accuracy of the optimization process.
5. The method according to claim 1, characterized in that: The proxy model optimization step further comprises: a. For each sub-problem, a proxy model method such as Gaussian process regression is used to approximate the pixel pair evaluation function. The proxy model can efficiently handle the nonlinear and non-convex characteristics of the evaluation function; b. Use optimization algorithms, such as gradient descent and particle swarm optimization, to optimize the proxy model and obtain the optimal solution. The color information, spatial information and trimap information provided by the user are taken into account during the optimization process.
6. The method according to claim 1, characterized in that The proxy model sharing strategy further includes: a. Use the optimization result of the current sub-problem as the initial proxy model of the adjacent sub-problem to reduce the amount of calculation and improve the optimization efficiency; b. According to the differences in feature distributions of adjacent sub-problems, the proxy model parameters are dynamically adjusted to adapt to new problems, ensuring the accuracy and robustness of the optimization results.
7. A computer system for executing the method for segmenting the end face image of a bundle of steel bars according to any one of claims 1 to 6, characterized in that: The system includes: a. At least one processor for executing the construction of an image pyramid, the construction and optimization of a proxy model, the implementation of a proxy model sharing strategy, and the propagation of optimization results and the estimation of segmentation results; b. At least one memory for storing the computer program, image data, proxy model parameters and intermediate results of the optimization process to ensure the efficiency and stability of data processing.
8. A non-transitory computer-readable storage medium having a computer program stored thereon for executing the method for segmenting the end face image of a bundle of steel bars according to any one of claims 1 to 9 on a computer system, characterized in that: The computer program comprises: a. Image pyramid construction module, used to generate a multi-resolution image pyramid based on the input image, providing a multi-scale analysis basis for the subsequent optimization process; b. A proxy model building module, which is used to build a Gaussian process-based proxy model for each pixel pair optimization subproblem to approximate the complex pixel pair evaluation function; c. Optimization algorithm module, used to find the optimal solution for each sub-problem, using efficient optimization algorithms to minimize the evaluation function; d. Proxy model sharing module, used to share proxy model parameters between adjacent sub-problems, reduce repeated calculations, and improve calculation efficiency; e. Result propagation and segmentation result estimation module, which is used to transfer the low-level optimization results to the high-level and estimate the final segmentation results at the highest level.
9. An integrated system and method, characterized in that: include: a. A computer system comprising at least one processor and at least one memory for executing the method for segmenting the end face image of a bundle of steel bars according to any one of claims 1 to 10; b. a non-transient computer-readable storage medium having a computer program stored thereon for executing the bundled steel bar end face image segmentation method on a computer system; c. An image editing device, which integrates the computer system or storage medium, provides a user interface, allows the user to input images, set optimization parameters, select the type of proxy model, and view the segmentation results in real time; d. A video processing system, using the computer system or storage medium, for real-time or batch segmentation of video frames of bundled steel bar end images, suitable for dynamic monitoring and quality inspection; e. A virtual reality content generation system, using the computer system or storage medium to achieve rapid integration of virtual steel bar models and real scenes, and enhance the realism of virtual reality experience; f. An image recognition and analysis system, combined with the computer system or storage medium, is used to improve the accuracy of steel bar detection and classification in the end face image of bundled steel bars, providing support for automated quality control.
