Bidding table structure calibration method and device
By using an improved CNN model and the Hausdorff distance minimization algorithm, the problem of calibration accuracy deviation in the recognition of table structures in bidding documents was solved, achieving sub-pixel-level edge localization and cross-page table alignment, thus improving the accuracy and consistency of table structures.
Patent Information
- Application Number
- CN202511356788.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-06
AI Technical Summary
In the existing identification of table structures in bidding documents, deep learning models have deviations in the precision of physical coordinate control, resulting in millimeter-level drift of cell boundaries, which affects the accuracy and compliance of structured data.
An improved CNN model is used, combining gradient direction weighted kernel and quadratic spline interpolation. Table edge calibration is performed by minimizing semantic unit center point and Hausdorff distance, establishing a unified page space reference system, and achieving sub-pixel level edge localization and cross-page table alignment.
It improves the clarity of table lines and edge features, ensures accurate restoration of table structure, reduces coordinate deviation caused by convolution downsampling and pooling, and achieves continuity and overall consistency of multi-page tables.
Smart Images

Figure CN121280291A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing, and in particular to a method and apparatus for calibrating the structure of bidding forms. Background Technology
[0002] In existing technologies for recognizing and calibrating the structure of bidding documents, deep learning models have advantages in semantic parsing, but they suffer from deviations in the accuracy of physical coordinate control. The lines in bidding documents are typically thin and exhibit single-pixel characteristics in black, white, and gray, making the model susceptible to accumulated errors during feature extraction, resulting in millimeter-level drifts at cell boundaries. During the structure reconstruction stage, these minute deviations are further amplified, manifesting as cell misalignment or errors in merging across rows and columns, affecting the accuracy and compliance of the structured data. Therefore, there is an urgent need for a table structure recognition method that can accurately calibrate the physical coordinates of table edges to ensure precise table structure reconstruction. Summary of the Invention
[0003] This application provides a method and apparatus for calibrating the structure of bidding forms, which solves the technical problem of deviations in the accuracy of form calibration in the prior art.
[0004] To achieve the above objectives, this application adopts the following technical solution: Firstly, a method for calibrating the structure of a bidding form is provided, comprising: acquiring image data of a scanned copy of the bidding form; performing image enhancement on the image data to obtain enhanced image data; inputting the enhanced image data into an improved CNN model to extract semantic unit center points; the improved CNN model includes a gradient direction weighted kernel, which is used to enhance the response to edge and line features of the image data; the semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data; performing sub-pixel level edge localization on the enhanced image data using quadratic spline interpolation to obtain a set of geometric edge coordinates; using the semantic unit center point as a reference, searching for the corresponding geometric edge points in the set of geometric edge coordinates within a preset radius neighborhood, and calibrating the semantic center point and geometric edge points using the Hausdorff distance minimization algorithm to obtain a calibrated set of table geometric edge points, and updating the geometric edge coordinate set to the calibrated set of table geometric edge points; based on the calibrated table image data of the geometric edge point set, establishing a unified page space reference system through binding holes, aligning and splicing cross-page tables into the same table to obtain the calibrated table.
[0005] In conjunction with the first aspect mentioned above, in one possible implementation, image enhancement is performed on the image data to obtain enhanced image data, including: converting the image data to the HSV color space and separating the lightness channel (V channel) image data; performing adaptive histogram equalization on the lightness channel image data to obtain second image data; and performing Gaussian-Laplacian fusion on the second image data to obtain enhanced image data.
[0006] In conjunction with the first aspect mentioned above, in one possible implementation, the second image data is processed by Gaussian-Laplacian fusion to obtain enhanced image data, including: applying Gaussian filtering and smoothing to the second image data to suppress noise, resulting in smoothed image data; based on the smoothed image data, using the Laplacian operator to extract edge information from the smoothed image data to enhance line details, resulting in edge-enhanced image data; and performing weighted fusion of the smoothed image data and the edge-enhanced image data to obtain enhanced image data.
[0007] In conjunction with the first aspect mentioned above, in one possible implementation, the smoothed image data Satisfy the following formula:
[0008]
[0009] in, For the second image data, These are the coordinate values. Let be the Gaussian standard deviation, k be the kernel radius, u be the stride of the kernel in the x-axis direction, and v be the stride of the kernel in the y-axis direction. For a two-dimensional Gaussian function in The value at that location.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the enhanced image data is input into an improved CNN model to extract semantic unit center points. This includes: performing multi-layer convolutional feature extraction on the enhanced image to capture table lines and unit boundary features in the image, resulting in multi-layer feature maps; generating candidate regions based on the multi-layer feature maps using a region proposal network, resulting in multiple candidate regions; obtaining feature maps of enhanced broken lines and dashed lines based on the feature maps corresponding to the multiple candidate regions using an improved gradient-direction weighted convolution kernel (GoConv); performing pixel-level instance segmentation on the candidate regions based on the feature maps of enhanced broken lines and dashed lines, resulting in the category, location, and mask of each target object; determining the semantic units of the target objects based on their category, location, and mask; and determining the center points of the semantic units based on their semantic units. The center point of a semantic unit is calculated based on its centroid or geometric center according to its semantic content.
[0011] In conjunction with the first aspect mentioned above, one possible implementation involves enhancing the feature map of broken and dashed line characteristic responses. Satisfy the following formula:
[0012]
[0013]
[0014]
[0015] in, To enhance image data, The convolution kernel is weighted according to the gradient direction. The original convolution kernel, For direction weights, For pixels Gradient direction of position, For the horizontal gradient, For the vertical gradient, For Sobel convolution kernel horizontal operators, This is the Sobel convolution vertical operator.
[0016] In conjunction with the first aspect mentioned above, in one possible implementation, the centroid satisfies the following formula:
[0017] in, Let i be the centroid coordinates. These are pixel coordinate values. This is the mask value.
[0018] In conjunction with the first aspect mentioned above, in one possible implementation, the Hausdorff distance minimization algorithm satisfies the following formula:
[0019] Among them, Let be the Euclidean distance between points p and q, where sup is the supremum and inf is the inf. For the set of semantic centers, It is a set of geometric edge points.
[0020] In conjunction with the first aspect mentioned above, in one possible implementation, after obtaining the reconstructed table structure, the method includes: using the single-page table coordinate deviation calculated during the calibration process as a feedback signal, and automatically adjusting the image preprocessing parameters and the parameters of the semantic understanding model based on the feedback signal.
[0021] Secondly, a device for calibrating the structure of a bidding form is provided, comprising: a communication unit and a processing unit. The communication unit is used to acquire image data of a scanned copy of the bidding form. The processing unit is used to enhance the image data to obtain enhanced image data. The enhanced image data is then input into an improved CNN model to extract semantic unit center points. The improved CNN model includes a gradient direction weighted kernel, which enhances the response to edge and line features of the image data. The semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data. Quadratic spline interpolation is used to perform sub-pixel-level edge localization on the enhanced image data to obtain a set of geometric edge coordinates. Using the semantic unit center point as a reference, the corresponding geometric edge points in the geometric edge coordinate set are searched within a preset radius neighborhood. The Hausdorff distance minimization algorithm is used to calibrate the semantic center point and geometric edge points to obtain a calibrated set of table geometric edge points. The geometric edge coordinate set is then updated to the calibrated set of table geometric edge points. Based on the calibrated table image data using the geometric edge point set, a unified page space reference system is established through binding holes. Cross-page tables are aligned and spliced into a single table to obtain the calibrated table.
[0022] Thirdly, this application provides an electronic device, including: a processor and a storage medium; the storage medium includes instructions, and the processor is configured to execute the instructions to implement the methods described in the first aspect and any possible implementation thereof. This electronic device may be an electronic device or a chip within an electronic device.
[0023] Fourthly, this application provides a bidding form structure calibration system, including: a bidding form data acquisition device and an electronic device; wherein the bidding form data acquisition device is used to acquire image data of a scanned copy of the bidding form. An electronic device is used to enhance image data to obtain enhanced image data. The enhanced image data is then input into an improved CNN model to extract semantic unit center points. The improved CNN model includes a gradient direction weighted kernel, which is used to enhance the response to edge and line features of the image data. The semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data. Subpixel-level edge localization is performed on the enhanced image data using quadratic spline interpolation to obtain a set of geometric edge coordinates. Based on the semantic unit center points, the corresponding geometric edge points in the geometric edge coordinate set are searched within a preset radius neighborhood, and the semantic center points and geometric edge points are calibrated using the Hausdorff distance minimization algorithm to obtain a calibrated set of table geometric edge points. The geometric edge coordinate set is then updated to the calibrated set of table geometric edge points. Based on the calibrated table image data of the geometric edge point set, a unified page space reference system is established through binding holes, and cross-page tables are aligned and spliced into a single table to obtain the calibrated table.
[0024] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0025] In a sixth aspect, this application provides a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0026] This application provides a method and apparatus for calibrating the structure of bidding documents. By enhancing the image of the bidding documents, the clarity of the lines and edge features is improved, laying the foundation for subsequent analysis. An improved CNN model is used to extract the center points of semantic units, and a gradient direction weighted kernel is introduced to enhance the response capability to image edges and lines, enabling the model to capture physical structure information more accurately while performing semantic parsing. Subpixel-level edge localization is achieved by combining quadratic spline interpolation, obtaining a fine set of geometric edge coordinates, effectively reducing coordinate deviations caused by convolution downsampling and pooling. Based on this, using the center points of semantic units as a reference, the Hausdorff distance minimization algorithm is used to calibrate the geometric edge points, achieving accurate alignment between semantic information and physical edges, and improving the accuracy of table boundary localization. At the same time, by establishing a unified page space reference system based on the binding hole positions, cross-page tables are aligned and spliced, ensuring the continuity and overall consistency of the multi-page table structure, solving the problem of deviation in calibration accuracy in existing bidding document table structure recognition and calibration technologies.
[0027] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0028] Figure 1 A system architecture diagram of a bidding form structure calibration system provided in this application embodiment; Figure 2 A flowchart illustrating a method for calibrating the structure of a bidding form, as provided in this application embodiment; Figure 3 A flowchart illustrating another method for calibrating the structure of a bidding form provided in this application embodiment; Figure 4 A flowchart illustrating another method for calibrating the structure of a bidding form provided in this application embodiment; Figure 5 A schematic diagram of a bidding form structure calibration device provided in this application embodiment; Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0030] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0031] The bidding form structure calibration method provided in this application embodiment can be applied to, for example... Figure 1 In the bidding form structure calibration system 100 shown, such as Figure 1 As shown, the communication system includes: a tender form acquisition device 101 and an electronic device 102.
[0032] Among them, the bidding form data acquisition device is used to acquire image data of scanned bidding forms.
[0033] An electronic device is used to enhance image data to obtain enhanced image data. The enhanced image data is then input into an improved CNN model to extract semantic unit center points. The improved CNN model includes a gradient direction weighted kernel, which is used to enhance the response to edge and line features of the image data. The semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data. Subpixel-level edge localization is performed on the enhanced image data using quadratic spline interpolation to obtain a set of geometric edge coordinates. Based on the semantic unit center points, the corresponding geometric edge points in the geometric edge coordinate set are searched within a preset radius neighborhood, and the semantic center points and geometric edge points are calibrated using the Hausdorff distance minimization algorithm to obtain a calibrated set of table geometric edge points. The geometric edge coordinate set is then updated to the calibrated set of table geometric edge points. Based on the calibrated table image data of the geometric edge point set, a unified page space reference system is established through binding holes, and cross-page tables are aligned and spliced into a single table to obtain the calibrated table.
[0034] To address the technical problem of calibration accuracy deviations in existing bidding document table structure recognition and calibration technologies, this application provides a bidding document table structure calibration method. Figure 2 A flowchart illustrating the method for calibrating the structure of bidding forms provided in this application embodiment is shown below. Figure 2 As shown, the method includes: S201. Obtain image data of scanned copies of bidding forms.
[0035] In one possible implementation, the original image is scanned to obtain image data of a scanned copy of the bidding form. The scanned original image data may have drawbacks such as binding shadows, ink stains, and noise.
[0036] As an example, in this embodiment of the application, the original bidding form is scanned using a high-resolution scanning device to obtain the original image data of the scanned form, ensuring that the visual information of the form can be completely obtained, and providing basic data for subsequent image enhancement and structural recognition.
[0037] S202. Perform image enhancement on the image data to obtain enhanced image data.
[0038] In one possible implementation, the image data is converted to the HSV color space, separating the luminance channel (V channel) image data. Adaptive histogram equalization is then applied to the luminance channel image data to obtain the second image data. Finally, the second image data is subjected to Gaussian-Laplacian fusion to obtain the enhanced image data.
[0039] It should be noted that, in the embodiments of this application, the HSV color space is more suitable for processing image problems related to brightness and color, and can more effectively separate the brightness information and color information of the image. Therefore, the image data is converted to the HSV color space for processing.
[0040] S203. Input the enhanced image data into the improved CNN model and extract the center points of semantic units.
[0041] In one possible implementation, multi-layer convolutional feature extraction is performed on the enhanced image to capture table lines and unit boundary features, resulting in multi-layer feature maps. Based on these multi-layer feature maps, a region proposal network is used to generate candidate regions, resulting in multiple candidate regions. Based on the feature maps corresponding to these candidate regions, an improved gradient-directed weighted convolution kernel (GoConv) is used to obtain feature maps for enhanced broken line and dashed line feature responses. Based on these feature maps, pixel-level instance segmentation is performed on the candidate regions to obtain the category, location, and mask of each target object. Based on the category, location, and mask of each target object, semantic units of the target object are determined. Based on the semantic units of the target object, the center point of each semantic unit is determined; the center point of the semantic unit is calculated based on its centroid or geometric center according to the semantic content.
[0042] It should be noted that, in the embodiments of this application, the improved CNN model includes a gradient orientation weighted kernel, which is used to enhance the response to edge and line features of image data. The semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data; S204. Quadratic spline interpolation is used to perform sub-pixel-level edge localization on the enhanced image data to obtain the geometric edge coordinate set.
[0043] In one possible implementation, quadratic spline interpolation is used to perform fine-grained calculations on the edge regions of the enhanced image data, thereby estimating higher-precision edge positions between pixels and forming a set of geometric edge coordinates.
[0044] As an example, in this embodiment of the application, several discrete sampling points are selected on the enhanced image along the normal direction of the edge to be detected, and their positions in the image coordinate system are recorded. and the corresponding gradient magnitude , using three adjacent sampling points Construct a quadratic spline interpolation function as a group. The three sampling points are then substituted into the quadratic spline interpolation function to calculate the coefficients of each term in the function. Calculate the first derivative and set it to zero to obtain the extreme value of the gradient magnitude, which is the sub-pixel edge position of the sampling segment. Convert the sub-pixel edge position calculated for each detection line into image coordinates, and summarize all the calculation results to form a geometric edge coordinate set.
[0045] As an example, in an embodiment of this application, the interpolation function Satisfy the following formula:
[0046] in, Let be the coordinates of the sampling point, a be the coefficient of the quadratic term, b be the coefficient of the linear term, and c be the constant term.
[0047] S205. Using the semantic unit center point as a reference, search for the corresponding geometric edge points in the geometric edge coordinate set within the preset radius neighborhood, and use the Hausdorff distance minimization algorithm to calibrate the semantic center point and geometric edge points to obtain the calibrated table geometric edge point set, and update the geometric edge coordinate set to the calibrated table geometric edge point set.
[0048] In one possible implementation, for each semantic unit center point, within a preset radius neighborhood, geometric edge points close to its location are searched from the geometric edge coordinate set as candidate matching points. Then, by calculating and comparing the Hausdorff distance between the semantic center point and the candidate geometric edge points, the geometric edge point with the smallest distance is selected as the calibration result for that semantic center point, and this result replaces the original corresponding point in the geometric edge coordinate set. After completing the matching and replacement of all semantic center points, a calibrated set of tabular geometric edge points is obtained, and the geometric edge coordinate set is updated to this calibration result.
[0049] As an example, in this embodiment, a circular neighborhood with a radius of 5 pixels is defined in the image, centered on the semantic unit's center point, covering the possible offset range between the theoretical position of the semantic unit and the actual geometric edge. Then, within this neighborhood, candidate edge points that are spatially close and have consistent geometric characteristics are searched from the geometric edge coordinate set. For example, for linear semantic units, edge points collinear with the line are preferentially selected; for corner semantic units, edge points at abrupt changes in gradient direction are selected. Next, the searched set of geometrically matching points is compared with the set of theoretical edge points generated by the semantic rules. By minimizing the Hausdorff distance, the position of the semantic center point is fine-tuned to ensure that the theoretical edge and the actual high-precision edge are aligned as much as possible in space. After calibration, the generated set of geometric edge points not only achieves sub-pixel accuracy in coordinates but also maintains a high degree of structural consistency with the semantic unit. For example, gaps in broken lines are accurately connected, and the rhythm of dashed lines is completely restored, thus providing a stable and reliable geometric benchmark for subsequent table structure restoration.
[0050] As an example, in an embodiment of this application, the Hausdorff distance minimization algorithm satisfies the following formula:
[0051] Among them, Let be the Euclidean distance between points p and q, where sup is the supremum and inf is the inf. For the set of semantic centers, It is a set of geometric edge points.
[0052] S206. Based on the calibrated table image data of geometric edge point set, a unified page space reference system is established through binding hole positions, and cross-page tables are aligned and spliced into the same table to obtain the calibrated table.
[0053] In one possible implementation, the center position of the binding hole is detected and located in the table image data after geometric edge point set calibration, and used as the anchor point of the global page space reference system to ensure that each page image is processed under the same coordinate reference. Next, spatial transformation and position correction are performed on each page table image according to the reference system, so that the edge lines, cells, and content of the cross-page table are strictly aligned in space. Finally, the multiple pages of tables are seamlessly stitched into a single table, resulting in a calibrated table with complete structure and content and accurate positioning.
[0054] It should be noted that during this process, rotation, scaling, and translation errors caused by scanning or shooting will be corrected to ensure that there are no misalignments, overlaps, or gaps at the stitching boundaries.
[0055] It should also be noted that after obtaining the reconstructed table structure, the single-page table coordinate deviation calculated during the calibration process is used as a feedback signal. Based on the feedback signal, the image preprocessing parameters and the parameters of the semantic understanding model are automatically adjusted to achieve dynamic collaborative optimization between the semantic understanding engine and the geometric localization engine.
[0056] The bidding document table structure calibration method provided in this application improves the clarity of table lines and edges by acquiring scanned copies of the table and performing image enhancement, providing a reliable foundation for subsequent feature extraction. An improved CNN-based model is used to extract semantic unit center points, and gradient-direction weighted kernels are combined to enhance the model's response to edges and lines, achieving preliminary matching between semantic parsing and physical structure. Subpixel-level edge localization is performed on the enhanced image using quadratic spline interpolation, generating a fine set of geometric edge coordinates, effectively reducing coordinate drift caused by convolution downsampling and pooling. Based on this, a calibration method using semantic center points as a reference and combining Hausdorff distance minimization is used to precisely align semantic units with geometric edges, eliminating millimeter-level deviations and achieving subpixel-level boundary accuracy while ensuring semantic and geometric consistency. Finally, a unified page space reference system is established through binding holes to align and splice cross-page tables, achieving continuity and overall consistency across multiple pages, thus solving the technical problem of calibration accuracy deviations in existing bidding document table structure recognition and calibration technologies.
[0057] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 3 As shown, the above S202 can be specifically implemented through the following S301, S302 and S303, which are explained in detail below: S301. Convert the image data to the HSV color space and separate the lightness channel (V channel) image data.
[0058] In one possible implementation, the acquired raw image data is converted from the RGB color space to the HSV color space, and the luminance channel (V channel) image data is extracted. The HSV space can separate color information from luminance information, so that subsequent luminance processing is not affected by color, while facilitating fine-tuning of the image's brightness and contrast.
[0059] S302. Perform adaptive histogram equalization on the brightness channel image data to obtain the second image data.
[0060] In one possible implementation, adaptive histogram equalization is performed on the separated brightness channel image data to obtain a second image data with equal brightness.
[0061] It should be noted that this processing method can enhance image contrast globally and locally, highlight subtle edges and line features, while suppressing local brightness unevenness caused by scanning or shooting, thus providing clearer visual information for the recognition of table structures.
[0062] As an example, in this embodiment, the luminance channel (V channel) image is input into the adaptive histogram equalization processing module. The processing parameters are set to TileGrid=(8,8) and ClipLimit=2.0 to enhance the contrast of local areas of the image. This processing improves the image brightness distribution, highlights table lines and details, and makes image edges clearer. After processing, the processing effect is evaluated by determining whether the deviation ΔL of the luminance component extraction is within ±5. If ΔL is within the allowable range, the enhancement effect is considered satisfactory, and the processing result proceeds to the next step; if it exceeds this range, the process returns to the V channel separation step for reprocessing to ensure the quality of image brightness equalization and edge features.
[0063] S303. The second image data is processed by Gaussian-Laplace fusion to obtain enhanced image data.
[0064] In one possible implementation, the second image data is subjected to Gaussian filtering and smoothing to suppress noise, resulting in smoothed image data. Based on the smoothed image data, the Laplacian operator is used to extract edge information and enhance line details, resulting in edge-enhanced image data. The smoothed image data and the edge-enhanced image data are then weighted and fused to obtain the enhanced image data.
[0065] As an example, in an embodiment of this application, the smoothed image data Satisfy the following formula:
[0066]
[0067] in, For the second image data, These are the coordinate values. Let be the Gaussian standard deviation, k be the kernel radius, u be the stride of the kernel in the x-axis direction, and v be the stride of the kernel in the y-axis direction. For a two-dimensional Gaussian function in The value at that location.
[0068] This application converts the acquired raw image data to the HSV color space and separates the luminance channel (V channel) image data for separate processing of luminance information, reducing color interference. Adaptive histogram equalization is applied to the luminance channel image data to obtain a second image data with balanced luminance, thereby improving the overall image contrast and highlighting edge features. The second image data is then processed using Gaussian-Laplacian fusion to enhance details and edge features, generating the final enhanced image data, providing high-quality input for subsequent semantic unit extraction and geometric edge localization.
[0069] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 4 As shown, the above S203 can be specifically implemented through the following S401 to S406, which are explained in detail below: S401. Perform multi-layer convolution feature extraction on the enhanced image to capture table lines and cell boundary features in the image, and obtain a multi-layer feature map.
[0070] In one possible implementation, the enhanced image is input into an improved CNN network model, where multiple convolutional operations are performed on the image to extract features.
[0071] It's worth noting that the improved CNN network model replaces the standard 3×3 convolutional kernel in ResNet-50 with gradient-direction-weighted convolutional kernels (GoConv). During convolution, it considers not only pixel grayscale values but also the gradient direction of each pixel for weighting, enabling the network to more sensitively capture edge features of broken lines, dashed lines, and continuous lines. The feature maps generated by multi-layer convolution contain image information at different scales and levels, preserving both low-level details and high-level semantics, providing a foundation for subsequent candidate region generation and feature enhancement.
[0072] S402. Based on multi-level feature maps, candidate regions are generated through a region proposal network to obtain multiple candidate regions.
[0073] In one possible implementation, a Region Proposal Network (RPN) is used to generate candidate regions based on multi-layer convolutional feature maps. Each candidate region may contain table cells, line or broken line features. The RPN searches for potential target locations on the feature map through a sliding window and anchor point mechanism, generating multiple candidate regions to provide preliminary spatial localization for subsequent fine semantic parsing.
[0074] S403. Based on the feature maps corresponding to multiple candidate regions, an improved gradient-direction weighted convolution kernel (GoConv) is used to obtain a feature map that enhances the feature response of broken lines and dashed lines.
[0075] In one possible implementation, a gradient-directed weighted convolutional kernel (GoConv) is applied to the feature map corresponding to the candidate region to further enhance the response intensity of broken lines and dashed lines. The GoConv convolutional kernel adjusts the convolution weights according to the gradient direction of each pixel, amplifying the line features in specific directions. In this way, the model can more accurately highlight dashed lines, broken lines, and the continuity between lines, providing more reliable feature input for instance segmentation.
[0076] As an example, in an embodiment of this application, a feature map enhancing the response of broken lines and dashed lines is used. Satisfy the following formula:
[0077]
[0078]
[0079]
[0080] in, To enhance image data, The convolution kernel is weighted according to the gradient direction. The original convolution kernel, For direction weights, For pixels Gradient direction of position, For the horizontal gradient, For the vertical gradient, For Sobel convolution kernel horizontal operators, This is the Sobel convolution vertical operator.
[0081] S404. Based on the feature map of the enhanced broken line and dashed line feature response, perform pixel-level instance segmentation on the candidate region to obtain the category, position and mask of each target object.
[0082] In one possible implementation, the enhanced feature map is used to perform pixel-level instance segmentation on the candidate region, generating the category, location, and mask information for each target object. The mask accurately represents the shape of broken and dashed lines, allowing complete unit boundaries to be obtained even if lines are discontinuous or have breaks. This step addresses the issues of overlapping, intersection, or breakage that may occur between adjacent units or lines, ensuring the independence of each target object.
[0083] As an example, in an embodiment of this application, a mask satisfies the following formula:
[0084] Where i represents the candidate target object. Represents the pixel coordinates in the image.
[0085] S405. Based on the category, location, and mask of each target object, determine the semantic units of the target object.
[0086] One possible implementation involves combining the category, location, and mask information of each target object to determine its corresponding semantic unit. The semantic unit represents a functional element in the table, such as a cell, header, or dashed boundary line, clarifying the semantic attributes of each structural object in the image and providing a reliable reference for geometric edge calibration.
[0087] S406. Based on the semantic units of the target object, determine the center point of the semantic unit; the center point of the semantic unit is calculated based on its centroid or geometric center according to the semantic content.
[0088] In one possible implementation, the coordinates of the center point of each semantic unit are calculated based on the mask shape. The center point can be calculated using either the centroid or the geometric center. This step effectively combines semantic parsing with physical geometric information, providing high-precision input for accurate reconstruction of the table structure.
[0089] As an example, in an embodiment of this application, the centroid satisfies the following formula:
[0090] in, Let i be the centroid coordinates. These are pixel coordinate values. This is the mask value.
[0091] This application utilizes multi-layer convolution to extract features, effectively capturing feature information at different scales and levels in table images. An improved gradient-directed weighted convolution kernel (GoConv) enhances the response intensity of broken lines, dashed lines, and complex lines during the feature enhancement stage, enabling the model to more accurately identify table boundaries and line structures during instance segmentation. Then, pixel-level instance segmentation precisely distinguishes adjacent units or broken lines, resolving issues of line intersections, overlaps, and breaks in tables, and generating a high-precision mask. Semantic units based on the mask abstract pixel-level information into structured semantic units and center points, providing a reliable benchmark for subsequent geometric edge calibration.
[0092] The above primarily describes the solutions of the embodiments of this application from the perspective of device implementation. It is understood that each device, such as a bidding form structure calibration device, includes at least one of the hardware structure and software module corresponding to each function in order to achieve the above-mentioned functions. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0093] This application embodiment can divide the bidding form structure calibration device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or software functional units. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0094] When using integrated units, Figure 5 A possible structural schematic diagram of the bidding form structure calibration device (referred to as bidding form structure calibration device 50) involved in the above embodiments is shown. The bidding form structure calibration device 50 includes a processing unit 501 and a communication unit 502, and may also include a storage unit 503. Figure 5 The structural diagram shown can be used to illustrate the structure of the bidding form structure calibration device involved in the above embodiments.
[0095] when Figure 5 The schematic diagram shown illustrates the structure of the bidding form structure calibration device involved in the above embodiments. The processing unit 501 is used to control and manage the operation of the bidding form structure calibration device, the communication unit 502 is used for the bidding form structure calibration device to communicate with other devices, and the storage unit 503 is used to store the program code and data of the bidding form structure calibration device.
[0096] For example, communication unit 502 is used to acquire image data of scanned copies of bidding forms; Processing unit 501 is used to enhance image data to obtain enhanced image data; input the enhanced image data into an improved CNN model to extract semantic unit center points; the improved CNN model includes a gradient direction weighted kernel, which is used to enhance the response to edge and line features of the image data; the semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic units of table line segments in the enhanced image data; subpixel-level edge localization is performed on the enhanced image data using quadratic spline interpolation to obtain a set of geometric edge coordinates; based on the semantic unit center point, the corresponding geometric edge points in the geometric edge coordinate set are searched within a preset radius neighborhood, and the semantic center point and geometric edge points are calibrated using the Hausdorff distance minimization algorithm to obtain a calibrated set of table geometric edge points, and the geometric edge coordinate set is updated to the calibrated set of table geometric edge points; based on the calibrated table image data of the geometric edge point set, a unified page space reference system is established through binding holes, and cross-page tables are aligned and spliced into the same table to obtain the calibrated table.
[0097] In one possible implementation, the processing unit 501 is further configured to perform image enhancement on the image data to obtain enhanced image data, including: converting the image data to the HSV color space and separating the lightness channel (V channel) image data; performing adaptive histogram equalization on the lightness channel image data to obtain second image data; and performing Gaussian-Laplacian fusion on the second image data to obtain enhanced image data.
[0098] In one possible implementation, the processing unit 501 is further configured to perform Gaussian-Laplacian fusion processing on the second image data to obtain enhanced image data, including: applying Gaussian filtering and smoothing processing to the second image data to suppress noise, thereby obtaining smoothed image data; based on the smoothed image data, using the Laplacian operator to extract edge information of the smoothed image data to enhance line details, thereby obtaining edge-enhanced image data; and performing weighted fusion of the smoothed image data and the edge-enhanced image data to obtain enhanced image data.
[0099] In one possible implementation, the smoothed image data Satisfy the following formula:
[0100]
[0101] in, For the second image data, These are the coordinate values. Let be the Gaussian standard deviation, k be the kernel radius, u be the stride of the kernel in the x-axis direction, and v be the stride of the kernel in the y-axis direction. For a two-dimensional Gaussian function in The value at that location.
[0102] In one possible implementation, the processing unit 501 is further configured to input the enhanced image data into an improved CNN model and extract semantic unit center points, including: performing multi-layer convolutional feature extraction on the enhanced image to capture table lines and unit boundary features in the image, obtaining multi-layer feature maps; generating candidate regions through a region proposal network based on the multi-layer feature maps, obtaining multiple candidate regions; obtaining feature maps of enhanced broken lines and dashed lines based on the feature maps corresponding to the multiple candidate regions through an improved gradient direction weighted convolution kernel (GoConv); performing pixel-level instance segmentation on the candidate regions based on the feature maps of enhanced broken lines and dashed lines, obtaining the category, position, and mask of each target object; determining the semantic units of the target objects based on the category, position, and mask of each target object; determining the center points of the semantic units based on the semantic units of the target objects; the center points of the semantic units are calculated based on their centroid or geometric center according to the semantic content.
[0103] In one possible implementation, the feature map enhances the response of broken lines and dashed lines. Satisfy the following formula:
[0104]
[0105]
[0106]
[0107] in, To enhance image data, The convolution kernel is weighted according to the gradient direction. The original convolution kernel, For direction weights, For pixels Gradient direction of position, For the horizontal gradient, For the vertical gradient, For Sobel convolution kernel horizontal operators, This is the Sobel convolution vertical operator.
[0108] In one possible implementation, the centroid satisfies the following formula:
[0109] in, Let i be the centroid coordinates. These are pixel coordinate values. This is the mask value.
[0110] In one possible implementation, the Hausdorff distance minimization algorithm satisfies the following formula:
[0111] Among them, Let be the Euclidean distance between points p and q, where sup is the supremum and inf is the inf. For the set of semantic centers, It is a set of geometric edge points.
[0112] In one possible implementation, the processing unit 501 is further configured to, after obtaining the reconstructed table structure, include: using the single-page table coordinate deviation calculated during the calibration process as a feedback signal, and automatically adjusting the image preprocessing parameters and the parameters of the semantic understanding model based on the feedback signal.
[0113] The processing unit 501 can be a processor or a controller, and the communication unit 502 can be a communication interface, transceiver, transceiver circuit, transceiver device, etc. The term "communication interface" is a general term and may include one or more interfaces. The storage unit 503 can be a memory. When the bidding form structure calibration device 50 is a chip, the processing unit 501 can be a processor or a controller, and the communication unit 502 can be an input interface and / or an output interface, pins, or circuits, etc. The storage unit 503 can be a storage unit within the chip (e.g., a register, cache, etc.) or a storage unit located outside the chip (e.g., read-only memory (ROM), random access memory (RAM, etc.)).
[0114] The communication unit can also be called a transceiver unit. The antenna and control circuit with transceiver functions in the bidding form structure calibration device 50 can be considered as the communication unit 502 of the bidding form structure calibration device 50, and the processor with processing functions can be considered as the processing unit 501 of the bidding form structure calibration device 50. Optionally, the device in the communication unit 502 that implements the receiving function can be considered as a communication unit, which is used to execute the receiving steps in the embodiments of this application. The communication unit can be a receiver, a receiver circuit, etc. The device in the communication unit 502 that implements the transmitting function can be considered as a transmitting unit, which is used to execute the transmitting steps in the embodiments of this application. The transmitting unit can be a transmitter, a transmitter, a transmitting circuit, etc.
[0115] Figure 5If the integrated units in the process are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. Storage media for storing computer software products include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0116] Figure 5 The units in the process can also be called modules; for example, a processing unit can be called a processing module.
[0117] This application also provides a hardware structure diagram of an electronic device (denoted as electronic device 60), see [link to diagram]. Figure 6 The electronic device 60 includes a processor 601, and optionally, a memory 602 connected to the processor 601.
[0118] In the first possible implementation, see Figure 6 The electronic device 60 also includes a transceiver 603. The processor 601, memory 602, and transceiver 603 are connected via a bus. The transceiver 603 is used to communicate with other devices or communication networks. Optionally, the transceiver 603 may include a transmitter and a receiver. The device in the transceiver 603 that implements the receiving function can be considered as a receiver, which is used to perform the receiving steps in the embodiments of this application. The device in the transceiver 603 that implements the transmitting function can be considered as a transmitter, which is used to perform the transmitting steps in the embodiments of this application.
[0119] Based on the first possible implementation method Figure 6 The structural diagram shown can be used to illustrate the structure of the electronic device involved in the above embodiments.
[0120] in, Figure 6 This can also be illustrated by a system chip in an electronic device. In this case, the actions performed by the aforementioned electronic device can be implemented by this system chip; the specific actions performed can be found above and will not be repeated here.
[0121] In implementation, each step of the method provided in this embodiment can be completed by integrated logic circuits in the processor or by instructions in software form. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0122] The processor in this application may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., which are various computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing. The processor may be a separate semiconductor chip or integrated with other circuits into a single semiconductor chip. For example, it may be integrated with other circuits (such as encoding / decoding circuits, hardware acceleration circuits, or various bus and interface circuits) to form a SoC (System-on-a-Chip), or it may be integrated as a built-in processor within an ASIC. The ASIC with the integrated processor may be packaged separately or together with other circuits. In addition to the cores for executing software instructions to perform calculations or processing, the processor may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.
[0123] The memory in the embodiments of this application may include at least one of the following types: read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; or electrically erasable programmable-only memory (EEPROM). In some scenarios, the memory may also be a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto.
[0124] This application also provides a computer-readable storage medium including instructions that, when run on a computer, cause the computer to perform any of the methods described above.
[0125] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the methods described above.
[0126] This application also provides a chip including a processor and an interface circuit. The interface circuit is coupled to the processor. The processor is used to run computer programs or instructions to implement the above-described method. The interface circuit is used to communicate with other modules outside the chip.
[0127] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).
[0128] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0129] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A method of aligning a tender form structure, characterized by, The method comprises the following steps: obtaining image data of a scanned tendering and bidding form; performing image enhancement on the image data to obtain enhanced image data; inputting the enhanced image data into an improved CNN model to extract semantic unit center points; the improved CNN model comprises a gradient direction weighted kernel for enhancing the response to the edge and line features of the image data; the semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic unit of the table line segment in the enhanced image data; performing sub-pixel level edge positioning on the enhanced image data by using quadratic spline interpolation to obtain a set of geometric edge coordinates; taking the semantic unit center point as a reference, searching for corresponding geometric edge points in the set of geometric edge coordinates within a preset radius neighborhood, and calibrating the semantic center point and the geometric edge point by using a Hausdorff distance minimization algorithm to obtain a set of calibrated table geometric edge points, and updating the set of geometric edge coordinates to the set of calibrated table geometric edge points; based on the calibrated table image data of the set of geometric edge points, establishing a unified page space reference system through the binding hole positions, aligning and splicing the cross-page table into the same table to obtain a calibrated table.
2. The method of claim 1, wherein, The method comprises the following steps: convert the image data to HSV color space to separate out the luminance channel (V channel) image data; performing adaptive histogram equalization processing on the luminance channel image data to obtain second image data; performing Gaussian-Laplacian fusion processing on the second image data to obtain enhanced image data.
3. The method of claim 2, wherein, The method comprises the following steps: respectively performing Gaussian filtering and smoothing processing on the second image data to suppress noise to obtain smoothed image data; based on the smoothed image data, using a Laplacian operator to extract edge information of the smoothed image data to enhance line details to obtain edge-enhanced image data; performing weighted fusion on the smoothed image data and the edge-enhanced image data to obtain enhanced image data.
4. The method of claim 3, wherein, the smoothed image data satisfies the following equation: wherein, is the second image data, is the coordinate coordinate value, is the Gaussian standard deviation, k is the convolution kernel radius, u is the step size of the convolution kernel in the x-axis direction, and v is the step size of the convolution kernel in the y direction, is the value of the two-dimensional Gaussian function at .
5. The method of claim 1, wherein, The method comprises the following steps: performing multi-layer convolution feature extraction on the enhanced image to capture the table line and unit boundary features in the image to obtain multi-level feature maps; based on the multi-level feature maps, generating candidate regions by using a region proposal network to obtain a plurality of candidate regions; based on the feature maps corresponding to the plurality of candidate regions, obtaining feature maps with enhanced broken line and dotted line feature responses by using an improved gradient direction weighted convolution kernel (GoConv); performing pixel-level instance segmentation on the candidate regions based on the class, position and mask of each target object to obtain the class, position and mask of each target object; determining the semantic unit of the target object based on the class, position and mask of each target object. Determine a center point of the semantic unit based on the semantic unit of the target object; the center point of the semantic unit is calculated as a centroid or a geometric center of the semantic content as the center point of the semantic unit.
6. The method of claim 5, wherein, The enhanced broken and dashed line feature response feature map satisfies the following equation: wherein, is an enhanced image data, is a gradient direction weighted convolution kernel, is an original convolution kernel, is a direction weight, is a pixel gradient direction of a position, is a horizontal gradient, is a vertical gradient, is a Sobel convolution kernel horizontal operator, is a Sobel convolution vertical operator.
7. The method of claim 5, wherein, The centroid satisfies the following formula: wherein, is the centroid coordinate for instance i, is the pixel coordinate value, is the mask value.
8. The method of claim 1, wherein, The Hausdorff distance minimization algorithm satisfies the following formula: wherein, wherein is the Euclidean distance between points p and q, sup is the supremum, inf is the infimum, is the set of semantic center points, is the set of geometric edge points.
9. The method of claim 1, wherein, After obtaining the obtained reconstructed table structure, comprising: using the single-page table coordinate deviation calculated in the calibration process as a feedback signal, automatically adjusting the image preprocessing parameters and the parameters of the semantic understanding model according to the feedback signal.
10. A device for calibrating the structure of a bidding form, characterized in that, The device comprises a communication unit and a processing unit; The communication unit is configured to obtain image data of a scanned tendering and bidding table form; The processing unit is configured to perform image enhancement on the image data to obtain enhanced image data; input the enhanced image data into an improved CNN model to extract a semantic unit center point; the improved CNN model comprises a gradient direction weighted kernel for enhancing the response to the edge and line features of the image data; the semantic unit center point is a geometrically meaningful center point coordinate obtained by abstracting the semantic unit of the table line segment in the enhanced image data; a quadratic spline interpolation is used to perform sub-pixel level edge positioning on the enhanced image data to obtain a geometric edge coordinate set; the semantic unit center point is taken as a reference to search for corresponding geometric edge points in the geometric edge coordinate set within a preset radius neighborhood, and a Hausdorff distance minimization algorithm is used to calibrate the semantic center point and the geometric edge points to obtain a calibrated table geometric edge point set, and the geometric edge coordinate set is updated to the calibrated table geometric edge point set; based on the calibrated table image data of the geometric edge point set, a unified page space reference system is established through the binding hole positions, the cross-page table is aligned and spliced into the same table, and a calibrated table is obtained.