Step-by-step refinement type automatic weight correction method for oracle bone copy image
Through the gradual improvement feature extraction and matching method, the oracle bone copy images are re-filmed, which solves the problem of difficulty in recognition in the prior art and achieves efficient and accurate re-filmed recognition effect.
Patent Information
- Application Number
- CN202411846184.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The prior art is difficult to effectively identify and correct heavy films in oracle copy images, especially when faced with various oracle styles, complex morphology and different rubbing quality.
Using a step-by-step method of excitation, the homography transformation matrix is calculated through feature extraction and matching, the reference image is perspective transformed, and it is aligned into the target image coordinate system, and quadratic feature matching is performed. At the same time, pixel-level feature filtering based on character areas and filtering based on character spatial arrangement order are further improved.
It significantly improves the accuracy and efficiency of re-film recognition of oracle copy images, reduces the occurrence of missed calibration, and maintains high recognition accuracy in complex oracle bone environments.
Smart Images

Figure CN119763132A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of oracle bone copy image recognition, and in particular to a method for automatic weight correction of oracle bone copy images with gradual refinement. Background Art
[0002] As one of the oldest writing systems in China, oracle bone script is a precious heritage of Chinese civilization. Its unique pictographic and ideographic nature makes the oracle bone script characters present complex diversity in form. Different oracle bone inscriptions and copies have great differences in writing style, character shape and arrangement. Since oracle bone script characters are easily deformed, damaged or blurred during the writing process, traditional character recognition technology is difficult to deal with effectively. Especially in the task of automated character detection and recognition, the irregularity of oracle bone script and the lack of a standardized font system further increase the difficulty of character detection.
[0003] On the other hand, in the process of rubbing oracle bones, the predecessors had different levels and standards of rubbing, which resulted in different quality and completeness of the existing oracle bone copies. This caused multiple inconsistencies in the same oracle bone copy, or multiple different oracle bone inscriptions in one oracle bone copy, further increasing the difficulty of detecting and identifying oracle bone characters.
[0004] In the prior art, the applicant has successively applied for invention patents with publication number CN111292283B and titled "A method for combining oracle bone fragments based on time series similarity calculation" and publication number CN111291750B and titled "A method for automatically annotating oracle bone inscriptions based on spatial nearest neighbor relationship", respectively combining oracle bone fragments based on time series similarity calculation and automatically annotating oracle bone inscriptions based on spatial nearest neighbor relationship; however, the technical effects of the above-mentioned technologies in the application scenario of oracle bone replica image re-fragmentation recognition to be solved by the present invention need to be further improved;
[0005] The announcement number is CN111539437B, and the name is "A method for detecting and identifying oracle bone script radicals based on deep learning". The following technical solutions are disclosed: S1: Scan or take a photo of the oracle bone script rubbings to obtain the oracle bone script image; S2: Use the maximum extreme value stable region algorithm to screen the oracle bone script single radical area in the oracle bone script image; S3: Perform ellipse fitting on the selected oracle bone script single radical area; S4: Use the non-maximum suppression algorithm to remove redundant repetitions or erroneous detection results of the same oracle bone script single radical, complete the detection of the oracle bone script single radical, and obtain the oracle bone script single radical data; S5: Use the BN-Lenet network model to identify the oracle bone script single radical data. Although the above technology can achieve a higher oracle bone script recognition accuracy to a certain extent, it still cannot achieve a relatively accurate re-piece recognition result for the problem that the same oracle bone script appears in multiple incompletely consistent oracle bone copies, or multiple different oracle bone scripts appear in one oracle bone copy. Summary of the invention
[0006] The purpose of the present invention is to provide a method for automatic weight correction of oracle bone copy images with gradual refinement, which can realize the weight recognition of oracle bone copy images efficiently and accurately.
[0007] The present invention adopts the following technical solutions:
[0008] A method for automatically calibrating oracle bone copy images with gradual refinement includes the following steps:
[0009] A: The oracle bone copy image to be re-identified is divided into a reference image and a target image to form an image pair, and then the feature points and corresponding feature descriptors of each oracle bone copy image are obtained through feature extraction; then the reference image and the target image are initially matched based on the feature points and feature descriptors, and finally the initial matching pairs that meet the first matching rate threshold are screened;
[0010] B: For the reference image and the target image in the initial matching pair, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship; then the reference image is perspective transformed through the homography matrix H, and the reference image is aligned to the target image coordinate system to obtain the alignment result image; then the feature points and corresponding feature descriptors of the alignment result image and the target image are obtained through feature extraction; then the reference image and the target image are secondary feature matched based on the feature points and feature descriptors, and finally the secondary matching pairs that meet the second matching rate threshold are screened;
[0011] C: For the oracle bone copy images in the secondary matching pairs, all the character regions in the reference image and the target image are annotated using the preset oracle bone character region recognition model; then after image alignment and character region mapping, pixel-level feature screening based on the character region and screening based on the character spatial arrangement order are performed respectively, and the results are stored as a copy pair set based on the character region pixel-level feature similarity screening and the character spatial arrangement order screening;
[0012] D: Perform an intersection operation on the set of replica pairs selected based on the pixel-level feature similarity of the character area and the set of replica pairs selected based on the character spatial arrangement order, and finally obtain the oracle bone replica image re-slice recognition result.
[0013] In step C, the pixel-level feature screening based on the character area is performed by aligning the feature matching points in the corresponding character area in the image, calculating the pixel-level feature matching degree of each character area, and taking the average of the pixel-level feature matching degrees of all character areas in the reference image and the target image as the overall pixel-level matching degree based on the character area; finally, a set of replica pairs for pixel-level feature similarity screening of the character area is obtained based on the set third matching degree threshold.
[0014] In step C, the screening based on the spatial arrangement order of characters is to obtain the nearest character pairs existing in the same area of the reference image and the target image in the same coordinate system through the centroid distance; and use the preset oracle bone character same-word determination model to obtain the oracle bone character similarity in the nearest character pairs in the reference image and the target image, and take the average of the oracle bone character similarities of all the nearest character pairs in the reference image and the target image as the screening result based on the spatial arrangement order of characters; finally, the set fourth matching degree threshold is used to screen and obtain a set of replica pairs screened based on the spatial arrangement order of characters.
[0015] Step A includes the following specific steps:
[0016] A1: Divide the oracle bone copy image to be recognized into a reference image and a target image, and form an image pair;
[0017] A2: Using a deep learning feature extractor, obtain the feature points and corresponding feature descriptors of each oracle bone copy image in the image pair; the feature points are the prominent areas in the oracle bone copy image, and the feature descriptors are the high-dimensional feature representations of the feature points;
[0018] A3: Based on feature points and feature descriptors, perform initial feature matching on the reference image and the target image in the image pair, and obtain a set of feature matching point pairs;
[0019] A4: Using feature matching point pairs, calculate the ratio of the number of feature matching point pairs to the total number of feature points of the reference image and the target image, and take the maximum value of the two as the matching rate of the image pair; then use the set first matching rate threshold to screen out image pairs with a matching rate higher than the first matching rate, and use the screened image pairs as the initial matching pairs.
[0020] Step B comprises the following steps:
[0021] B1: Using the feature matching point pairs of the reference image and the target image calculated in the initial matching, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship;
[0022] B2: Perform perspective transformation on the reference image through the homography matrix H, and align the reference image to the target image coordinate system to obtain the alignment result image;
[0023] B3: Obtain feature points and corresponding feature descriptors of the alignment result image and the target image through feature extraction; then perform secondary feature matching on the reference image and the target image based on the feature points and feature descriptors, and finally screen out secondary matching pairs that meet the second matching rate threshold.
[0024] In step C, the overall steps of performing pixel-level feature screening based on the character area are:
[0025] C11: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model;
[0026] C12: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system;
[0027] C13: After image alignment, the character annotation box in the reference image is mapped to the aligned target image;
[0028] C14: After the character region is mapped, the pixel-level feature matching degree of each character region is calculated by aligning the feature matching points in the corresponding character region in the image, and the average of the pixel-level feature matching degrees of all character regions in the reference image and the target image is used as the overall pixel-level matching degree based on the character region;
[0029] C15: According to the set third matching degree threshold, a set of replica pairs is obtained based on the similarity of pixel-level features in the character area.
[0030] In step C, the overall steps for screening based on the character space arrangement order are:
[0031] C21: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model;
[0032] C22: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system;
[0033] C23: After image alignment, the character annotation box in the reference image is mapped to the aligned target image;
[0034] C24: After the character area is mapped, the annotation box of the reference image mapped in the target image is compared with the original annotation box of the target image in the target image coordinate system, and the nearest character pair existing in the same area of the reference image and the target image in the same coordinate system is determined by the centroid distance;
[0035] C25: Save the nearest character pairs in the same area of the reference image and the target image in the same coordinate system into a csv file. The first column is the character box annotation serial number of the reference image, and the second column is the character box annotation serial number of the target image adjacent to the character box in the first column.
[0036] C26: Using the preset oracle bone character homonym determination model, obtain the oracle bone character similarity between the nearest character pair in the reference image and the target image;
[0037] C27: The average of the oracle bone character similarities of all the nearest character pairs in the reference image and the target image is used as the screening result based on the character space arrangement order;
[0038] C28: According to the set fourth matching degree threshold, a set of replica pairs selected based on the character space arrangement order is obtained.
[0039] The oracle bone character region recognition model is constructed based on the EAST single-word text detection model; the oracle bone character region recognition model performs text detection on each oracle bone character in the oracle bone copy image, and outputs the position information of all oracle bone character annotation boxes in the oracle bone copy image, that is, the position information of the character region.
[0040] The oracle bone character homonym determination model adopts a Siamese model based on a twin network to extract the image features of single-word oracle bone characters and perform similarity judgment on character image pairs, ultimately determining whether the single-word characters in two oracle bone copies are the same word.
[0041] When obtaining the distribution of feature points, the feature extractor analyzes the significance of each position in the grayscale image and finally outputs the position and significance of the feature points; the significance of the feature points is the importance of each feature point expressed as a numerical value; the feature extractor selects the top N feature points with the highest significance based on the score of the feature point significance; the feature extractor detects the surrounding range of each feature point, extracts the feature information of the local area within the surrounding range of the feature point, including brightness and edge direction, and finally generates a high-dimensional feature vector as a feature descriptor.
[0042] The present invention utilizes pixel-level feature extraction and preliminary matching to extract pixel-level key features from the oracle bone copy image to be subjected to heavy-piece recognition, uses feature point descriptors to perform matching and calculates the matching rate of image pairs, and then screens out image pairs with strong correlation through a set first matching rate threshold, thereby laying the foundation for subsequent fine processing (image alignment and secondary matching) and significantly improving the efficiency of heavy-piece recognition.
[0043] The present invention aims at obtaining the initial matching pairs with a high matching rate, calculates the homography matrix and completes the image alignment, and further extracts and matches the aligned images and verifies the correlation, thereby further improving the matching accuracy.
[0044] The present invention uses a preset oracle bone character region recognition model, and after marking all character regions in the reference image and the target image, aligning the images and mapping the character regions, respectively performs pixel-level feature screening based on the character region and screening based on the character space arrangement order, and stores the corresponding copies as a set of copies based on the character region pixel-level feature similarity screening and the character space arrangement order screening; finally, the oracle bone copy image re-slice recognition result is obtained by performing an intersection operation on the two copy pair sets. The accuracy and efficiency of oracle bone copy image re-slice recognition are greatly improved, and the occurrence of missed calibration can also be prevented.
[0045] The present invention adopts two complementary screening methods: pixel-level feature screening based on character area and screening based on character spatial arrangement order. The shape and detail consistency of characters are ensured by pixel-level feature matching, and the correct positioning and order of characters are ensured by matching spatial arrangement order. When used in combination, it can not only improve the matching accuracy of oracle bone copy images in details, but also maintain high recognition accuracy and robustness in the case of complex character arrangement or highly similar character morphology, significantly enhancing the overall effect of oracle bone copy image re-slice recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the process of the present invention;
[0047] Figure 2 This is a schematic diagram of the partial overlap of two oracle bone copies;
[0048] Figure 3 This is a schematic diagram of two oracle bone copies completely overlapping;
[0049] Figure 4 This is a schematic diagram of the partial overlap of three oracle bone copies. DETAILED DESCRIPTION
[0050] The present invention is described in detail below with reference to the accompanying drawings and embodiments:
[0051] like Figure 1 As shown, the method for automatic weight correction of oracle bone copy images with gradual refinement of the present invention comprises the following steps:
[0052] A: The oracle bone copy image to be re-identified is divided into a reference image and a target image to form an image pair, and then the feature points and corresponding feature descriptors of each oracle bone copy image are obtained through feature extraction; then the reference image and the target image are initially matched based on the feature points and feature descriptors, and finally the initial matching pairs that meet the first matching rate threshold are screened;
[0053] In the present invention, pixel-level feature extraction and preliminary matching are used to extract pixel-level key features from the oracle bone copy image to be subjected to heavy-piece recognition, feature point descriptors are used for matching and the matching rate of image pairs is calculated, and then image pairs with strong correlation are screened out through a set first matching rate threshold, which lays the foundation for subsequent fine processing (image alignment and secondary matching) and significantly improves the efficiency of heavy-piece recognition.
[0054] In the present invention, the step A comprises the following specific steps:
[0055] A1: Divide the oracle bone copy image to be recognized into a reference image and a target image, and form an image pair;
[0056] In step A1:
[0057] The first step is to load the oracle bone copy images so that all the oracle bone copy images to be re-identified form an ordered image list for processing;
[0058] First, the image files (such as .png) that meet the requirements are selected from the target path, and then sorted according to the loading order to ensure the consistency of the processing order. In the loading step, the actual pixel data of the oracle bone copy image to be re-identified has not been loaded into the memory, only the file path list is saved as the basis for the subsequent division of the reference image and the target image.
[0059] Step 2: Based on the division of the reference image and the target image, a two-layer loop is used to combine the loaded image list to obtain the corresponding image pairs.
[0060] First, an image is selected from the image list as a reference image, and then all the remaining images are respectively used as target images, and finally each target image is sequentially combined with the reference image to form a unique image pair; according to the above method, the image pairs corresponding to all the images in the image list when they are respectively used as reference images are finally obtained;
[0061] The above-mentioned image pair acquisition method can effectively avoid repeated processing of oracle bone copy images. In addition, in order to achieve large-scale data processing, the image pair acquisition supports a breakpoint resume mechanism, which ensures that the task can be continued after interruption by recording the index of the current reference image and the completed image pair, thereby effectively organizing the data flow and reducing redundant calculations.
[0062] A2: Through the deep learning feature extractor (SuperPoint), the feature points and corresponding feature descriptors of each oracle bone copy image in the image pair are obtained; the feature points refer to the significant areas in the oracle bone copy images, and the feature descriptors are high-dimensional feature representations of the feature points, which are used for subsequent matching calculations. During the feature extraction process, an upper limit is set on the number of feature points of each oracle bone copy image, for example, 2000, to balance the computational complexity and feature richness. The extracted feature points and descriptors provide basic data for subsequent feature matching, and also have a direct impact on the matching quality between images.
[0063] In step A2:
[0064] Step 1: Dynamically load the data of the oracle bone copy image to be feature extracted;
[0065] After the division of the reference image and the target image is completed, all image data is not directly loaded into the memory, but a delayed loading strategy is adopted. That is, when the specified image pair needs to be processed, the corresponding image data is dynamically read from the file path into the memory. The dynamically loaded images will be standardized, including grayscale, normalization and scale adjustment; the oracle bone copy image will be grayscaled, the pixel value will be normalized to the range of [0,1], and the image size will be adjusted to meet the input requirements of the subsequent feature extraction module. This method avoids the problem of insufficient memory caused by direct loading of large-scale image sets, and also reduces unnecessary loading operations for image files that are not actually used, thereby improving efficiency.
[0066] Step 2: Detect feature points of the oracle bone copy image to be extracted, obtain the distribution of feature points and select significant feature points;
[0067] When obtaining the distribution of feature points, the feature extractor will analyze which positions in the grayscale image are significant. The significant positions may appear at: the edges of internal text, lines, intersections (such as the intersection part of the character "人"), as well as the edges and corner regions of patterns (such as the corners of the rectangular region in the figure). The feature extractor finally outputs the positions of the feature points and the significance of the feature points. The significance of the feature points is the importance level of each feature point represented by a numerical value;
[0068] When screening significant feature points, the feature extractor will screen out the top N feature points with the highest significance according to the scores of the feature point significance. N can take the value of 2000;
[0069] The third step: Generate corresponding feature descriptors according to the obtained feature points; The feature descriptor is the feature information of the local area within the range around the feature point, including brightness, edge direction, etc.;
[0070] According to the obtained feature points, the feature extractor will detect the range around each feature point, extract the feature information of the local area within the range around the feature point, and generate a high-dimensional feature vector (256-dimensional) with a fixed length as the feature descriptor; The feature information such as brightness and edge direction in the feature descriptor jointly forms a representation of the entire image.
[0071] The fourth step: The feature extractor outputs the feature points and the corresponding feature descriptors of each oracle bone facsimile image; including the feature point coordinates and the feature point descriptors. For example:
[0072] Input the reference image, and generate (keypoints1, descriptors1)
[0073] Input the target image, and generate (keypoints2, descriptors2);
[0074] In the present invention, by using the end-to-end training architecture of the deep learning feature extractor SuperPoint, the feature point detection and descriptor generation are completed一次性, avoiding the data inconsistency problem caused by the separation of the two steps in the traditional method.
[0075] A3: Based on the feature points and feature descriptors, perform an initial feature matching on the reference image and the target image in the image pair, and obtain a set of feature matching point pairs;
[0076] In this embodiment, by using the deep learning model LightGlue, LightGlue can build a matching relationship between the feature point descriptors of the reference image and the target image, and determine the feature matching point pairs by comparing the similarity of the feature descriptors of the corresponding feature points;
[0077] LightGlue is based on the Transformer's attention mechanism, which can utilize global context information and local feature descriptor similarity to generate high-quality feature point matching pairs. During the matching process, LightGlue dynamically learns the matching confidence of each point and removes unreliable matching points, thereby outputting a set of feature matching point pairs. Each feature matching point pair contains the corresponding key point indexes in the reference image and the target image. The matching results take into account both local features and global geometric relationships, and are highly robust and accurate. The specific steps are as follows:
[0078] In step A3, LightGlue first uses the self-attention and cross-attention modules of Transformer to analyze the global and local feature relationship between the two images based on the feature points and feature descriptors of the input reference image and target image; then, LightGlue automatically generates a list of feature matching point pairs (i, j), and outputs the matching point coordinate pairs of the reference image and the target image and their confidences; finally, LightGlue outputs a reliable set of feature matching point pairs (match pairs);
[0079] A4: Using the feature matching point pairs output by LightGlue, calculate the ratio of the number of feature matching point pairs to the total number of feature points in the reference image and the target image, and take the maximum value of the two as the matching rate of the image pair; then use the set first matching rate threshold to screen out image pairs with a matching rate higher than the first matching rate, and use the screened image pairs as the first matching pairs with strong correlation;
[0080] In the present invention, the matching rate is used to measure the matching quality between the reference image and the target image. The first matching rate threshold can be set to 0.2, and the screened image pairs enter the subsequent image alignment and secondary matching steps, which not only effectively improves the processing efficiency, but also lays a foundation for high-quality input data for subsequent operations.
[0081] The matching rate is calculated for the reference image and the target image respectively, and the formula is:
[0082]
[0083] Among them, Match Ration represents the matching rate, Number of Matches represents the number of feature matching point pairs, and Number of Keypoints represents the total number of feature points in the reference image or target image. The higher the matching rate value, the stronger the correlation between the image pairs.
[0084] B: For the reference image and the target image in the initial matching pair, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship; then the reference image is perspective transformed through the homography matrix H, and the reference image is aligned to the target image coordinate system to obtain the alignment result image; then the feature points and corresponding feature descriptors of the alignment result image and the target image are obtained through feature extraction; then the reference image and the target image are secondary feature matched based on the feature points and feature descriptors, and finally the secondary matching pairs that meet the second matching rate threshold are screened;
[0085] In the present invention, for the initial matching pairs with a high matching rate obtained in step A, the matching accuracy is further improved by calculating the homography matrix and completing the image alignment, and further extracting features and matching the aligned images and verifying the correlation.
[0086] Image alignment is to transform the reference image into the coordinate system of the target image by calculating the geometric transformation between the images (homography matrix and affine transformation), so as to match the content of the two images at the pixel level. A large number of experiments have confirmed that the matching rate will be improved after the images are aligned and then matched again to confirm that there are similar image pairs. The theoretical basis is as follows:
[0087] 1. For dissimilar image pairs, the main reason for the decrease in matching rate after image alignment is the significant reduction in false matching points. The alignment operation removes false matching points with similar descriptors but inconsistent spatial positions by introducing geometric consistency constraints, while reducing random matching points that occur accidentally in the background area. In addition, the descriptors of the feature points after alignment are more consistent with the actual geometric relationship, which further reduces the matching points in dissimilar images. The strict screening mechanism and the neglect of background feature points also exacerbate the decline in matching rate. Although the quality of matching points has improved, the total number of matching points has been significantly reduced.
[0088] 2. For similar image pairs, the reason why the matching rate improves after image alignment is that the geometric transformation differences are eliminated, making the feature points more consistent in space. After alignment, feature points that were originally unmatched due to position deviation or angle change can find corresponding points, thereby increasing the number of effective matching points. At the same time, the enhanced geometric consistency reduces the number of mismatched points, the descriptors of the feature points are more similar, and the reliability of matching is significantly improved. In addition, the alignment operation makes the local structure of the image more aligned, and the matching success rate of the local area is further improved, so the overall matching rate is significantly improved.
[0089] In the present invention, the step B comprises the following steps:
[0090] B1: Using the feature matching point pairs of the reference image and the target image in the initial matching pair, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship;
[0091] In step B1, the homography matrix is a 3×3 matrix used to represent the perspective transformation relationship between images and is the core basis for subsequent image alignment operations. The calculation of the homography transformation matrix H can be performed as follows:
[0092] 1. In the feature matching point pair set (match pairs) generated by LightGlue in step A3, select the M pairs of key point coordinates of the reference image and the target image with the highest matching degree; the value of M can be 6;
[0093] 2. Use OpenCV's cv2.findHomography method to calculate the homography transformation matrix H from the reference image to the target image.
[0094] The code to implement the above steps can be expressed as:
[0095] H,mask=cv2.findHomography(points1,points2,method=cv2.RANSC())
[0096] enter:
[0097] points1: coordinates of key points of the reference image;
[0098] points2: coordinates of key points of the target image;
[0099] method = cv2.RANSAC: specifies to use the RANSAC algorithm to calculate the homography matrix
[0100] Output:
[0101] Homography matrix H: represents the perspective transformation from the reference image to the target image;
[0102] Inlier mask: marks which feature matching point pairs are considered inliers;
[0103] B2: Perform perspective transformation on the reference image through the homography matrix H, and align the reference image to the target image coordinate system to obtain the alignment result image;
[0104] In step B2, in order to further ensure the accuracy of image alignment, the image with fewer key points in the initial matching can be used as the reference image, and the image with more key points can be used as the target image. The reference image is aligned to the target image coordinate system, and the alignment result image is stored as a new image.
[0105] In the process of image alignment, the cv2.warpPerspective function of OpenCV can be used to perform perspective transformation on the reference image. The alignment result output after perspective transformation is represented by an image, and the alignment result image is the representation of the reference image in the target image coordinate system, and its size is consistent with that of the target image.
[0106] Transformed Image=H*Base Image
[0107] B3: Obtain feature points and corresponding feature descriptors of the alignment result image and the target image through feature extraction; then perform secondary feature matching on the reference image and the target image based on the feature points and feature descriptors, and finally screen out secondary matching pairs that meet the second matching rate threshold;
[0108] In step B3, the deep learning feature extractor SuperPoint is also used to obtain the feature points and corresponding feature descriptors of the alignment result image and the target image; and the deep learning model LightGlue is also used for secondary feature matching; the second matching rate threshold is not less than 1.5 times the first matching rate threshold, and the secondary matching pairs that meet the second matching rate threshold are stored, and the secondary matching pairs that do not meet the second matching rate threshold are discarded.
[0109] For the initial large-scale oracle bone replica image set, the present invention obtains the primary matching pairs through the initial screening step, that is, the initial feature matching in step A, and then obtains the secondary matching pairs after image alignment and secondary feature matching for the primary matching pairs in step B, and has obtained a small-scale oracle bone replica image pair set A with high pixel-level similarity and related matching information. After that, the present invention continues to obtain the real oracle bone replica heavy pieces from the initial screening results through the fine screening step, rather than just staying at the oracle bone replica image pairs with high pixel-level similarity in the initial screening results;
[0110] C: For the oracle bone copy images in the secondary matching pairs, all the character regions in the reference image and the target image are annotated using the preset oracle bone character region recognition model; then after image alignment and character region mapping, pixel-level feature screening based on the character region and screening based on the character spatial arrangement order are performed respectively, and the results are stored as a copy pair set based on the character region pixel-level feature similarity screening and the character spatial arrangement order screening;
[0111] Among them, the pixel-level feature screening based on the character area refers to calculating the pixel-level feature matching degree of each character area by aligning the feature matching points in the corresponding character area in the image, and taking the average of the pixel-level feature matching degrees of all the character areas in the reference image and the target image as the overall pixel-level matching degree based on the character area; finally, the set third matching degree threshold is used to screen and obtain the copy pair set B for the pixel-level feature similarity screening of the character area;
[0112] The screening based on the character space arrangement order refers to obtaining the closest character pairs existing in the same area of the reference image and the target image in the same coordinate system through the centroid distance; and using the preset oracle bone character same-word determination model to obtain the oracle bone character similarity in the closest character pairs in the reference image and the target image, and taking the average of the oracle bone character similarities of all the closest character pairs in the reference image and the target image as the screening result based on the character space arrangement order; finally, screening based on the set fourth matching degree threshold to obtain the copy pair set C screened based on the character space arrangement order;
[0113] In step C of the present invention, the oracle bone character region recognition model can be constructed based on the EAST single-word text detection model; the oracle bone character region recognition model can perform text detection on each oracle bone character in the oracle bone copy image, and output the position information of all oracle bone character annotation boxes in the oracle bone copy image, that is, the position information of the character region;
[0114] During the construction and training of the EAST single-word text detection model:
[0115] 1. First, construct the original data set; in the present invention, 500 oracle bone copy images are manually annotated to construct the original data set, and the original data set includes oracle bone copy image files and corresponding annotation files. Each oracle bone copy image represents an oracle bone copy image, and the annotation file records the bounding box information of all oracle bone characters in the image;
[0116] 2. By performing data enhancement on the original data to improve the generalization ability of the model, in order to improve the detection ability of the EAST single-word text detection model for oracle bone characters, the present invention performs multiple data enhancement operations on the original data in the original data set to simulate different image deformation conditions, so that the model can learn a variety of character forms during training. Data enhancement operations include: scaling, random rotation, and random cropping.
[0117] Among them, scaling adjustment refers to adjusting the size of the image to enhance the robustness of the model to changes in character proportions;
[0118] Random rotation means randomly rotating the image at different angles to improve the model's adaptability to rotated characters;
[0119] Random cropping means randomly cropping the image while retaining the character information, so that the model can better adapt to the different positions of the characters in the image.
[0120] 3. In order to enable the EAST single-word text detection model to learn the boundaries and rotation information of oracle bone characters more accurately, the present invention generates the real annotation data (groundtruth) required by the EAST single-word text detection model based on the annotation file, which is used to guide the model to learn how to identify the oracle bone character area in the image; the real annotation data includes score map, geometric map and ignore map.
[0121] Score map (score_map): The score map is used to mark the binary matrix of the character area in the oracle bone copy image. Its function is to help the model distinguish the target area (character area) from the background. During the training process, the score map marks the pixels where the characters are located as 1 (positive samples) and the remaining pixels as 0 (negative samples) by annotating the character area coordinates provided by the file. This allows the model to focus on learning to identify the specific location of the character area while ignoring irrelevant background areas. For example, for an image containing characters, the score map will cover the character area with a binary rectangular box, thereby guiding the model to learn the existence distribution of the target area.
[0122] Geometry map (geo_map): The geometry map is a set of multi-channel feature maps that describe the geometric information of the character area, including the distance from each pixel in the character to the four boundaries of the character and the rotation angle of the character. Specifically, the first four channels of the geometry map record the shortest distance from each pixel to the upper, lower, left, and right boundaries of the character area, and the fifth channel records the rotation angle of the character area (for example, the tilt angle of the minimum circumscribed rectangle of the character). These geometric features enable the model to accurately describe the shape, size, and rotation state of the character, thereby adapting to complex character boundaries and direction distributions.
[0123] Ignored_map: Ignored_map is a binary matrix used to mark difficult-to-recognize or invalid areas. Its function is to shield fuzzy, damaged or uncertain character areas, so as to avoid these areas from interfering with model training. In the annotation file, if some character areas are damaged or blurred and their boundaries are difficult to determine, these areas will be marked as 1 (ignored area) in the ignored map, and other available areas will be marked as 0. During training, the model will skip these areas marked as 1, so as to focus on learning more reliable target areas, improving the training efficiency and performance of the model.
[0124] 4. Design a loss function to optimize the performance of the EAST single-word text detection model in character region classification, bounding box detection, and rotation angle prediction. The loss function includes classification loss (classify_loss), geometric loss (geo_loss), and loss weight adjustment.
[0125] In order to further adapt to the oracle bone script detection task, the present invention specially designs a targeted loss function to optimize the performance of the EAST single-word text detection model in terms of character region classification, bounding box detection, and rotation angle prediction; wherein:
[0126] Classification loss (classify_loss), you can choose the Dice Loss loss function to measure the classification accuracy of the model. In view of the sparse sample characteristics of oracle characters, the Dice Loss loss function can more effectively handle the imbalance problem of positive and negative samples, ensuring that the model pays more attention to the character area.
[0127] Geometry loss (geo_loss), including IOU loss and angle loss, is used to measure the accuracy of boundary prediction. IOU loss ensures that the bounding box generated by the model accurately coincides with the real boundary by maximizing the intersection of the bounding box and the angle loss ensures that the model can correctly learn the rotation direction of the character area by calculating the cosine difference between the predicted angle and the real angle.
[0128] The loss weight adjustment includes the weight parameters of classification loss, angle loss and IOU loss, so as to reasonably balance the contribution of different loss items in the total loss, which can enable the model to achieve the best balance between classification accuracy, boundary precision and angle prediction, making it more suitable for oracle bone character detection tasks.
[0129] 5. Use the original data after data enhancement and the set loss function to train the EAST single-word text detection model; during the training process, optimize the detection ability of the EAST model through forward propagation loss calculation, back propagation and optimization, and learning rate scheduling, and finally obtain the trained EAST single-word text detection model that can accurately identify the oracle bone characters in the oracle bone copy image and output the position information of each oracle bone character, that is, the coordinates of the four vertices of the character annotation box, so that all character areas in the reference image and the target image can be labeled through the EAST single-word text detection model.
[0130] In step C, the overall steps of performing pixel-level feature screening based on the character area are:
[0131] C11: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model;
[0132] First, for the reference image and the target image, the deep learning feature extractor Superpoint is used to extract pixel-level feature points respectively;
[0133] Secondly, the deep learning model Lightglue is used to match the feature points of the reference image and the target image to obtain high-quality feature matching point pairs;
[0134] Then, based on the feature matching point pairs, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship. In this way, the mutual correspondence between the character areas in the two images is obtained, providing a basis for subsequent image alignment and annotation box mapping.
[0135] C12: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system;
[0136] In step C12, the reference image is geometrically transformed using the homography matrix H, including operations such as translation, rotation, and scaling, so that the character area of the reference image overlaps with the target image in space. The above steps can ensure that the character areas of the two images are aligned, so that the annotation information can be accurately mapped between the two images. Through alignment, the differences between the two images caused by factors such as shooting angles and scales can be eliminated, ensuring that subsequent comparisons are more accurate.
[0137] To further ensure the accuracy of image alignment, in step C12, the image with fewer key points can be used as a reference image, the image with more key points can be used as a target image, the reference image can be aligned to the target image coordinate system, and the alignment result image can be stored as a new image.
[0138] C13: After image alignment, the character annotation box in the reference image is mapped to the aligned target image;
[0139] In step C13, the annotation file of the reference image is first read to obtain the coordinates of the vertex of the annotation box of the character area, and then the vertices of the annotation box are geometrically transformed using the homography matrix H to map the annotation box to the aligned target image. This mapping method can accurately retain the geometric position and size characteristics of the annotation box in the reference image, while realizing the corresponding annotation box mark in the target image. Through this process, the annotation information of the reference image can be completely and accurately transferred to the target image, ensuring that the character areas of the two images have the same annotation box reference;
[0140] C14: After the character region is mapped, the pixel-level feature matching degree of each character region is calculated by aligning the feature matching points in the corresponding character region in the image, and the average of the pixel-level feature matching degrees of all character regions in the reference image and the target image is used as the overall pixel-level matching degree based on the character region;
[0141] In step C14, firstly, the cv2.pointPolygonTest method is used to detect whether each feature point is located in the corresponding annotation box, so as to screen out the valid feature points belonging to the character area; secondly, the feature matching point pairs in the reference image and the target image that are located in the same annotation box are counted; then, the pixel-level feature matching degree of each character area is calculated, and the average of the pixel-level feature matching degrees of all the character areas in the reference image and the target image is taken as the overall pixel-level matching degree based on the character area;
[0142] In the present invention, the distribution and quantity of feature matching points are used to evaluate the similarity of character regions, and character regions with uniform distribution and similar quantity of feature matching points are judged to have higher similarity. Through the measurement method based on the distribution and quantity difference of feature points, the similarity of corresponding character regions in two images can be accurately evaluated, providing a quantitative basis for character matching tasks.
[0143] In the present invention, the calculation formula for the pixel-level feature matching degree of the character area is:
[0144]
[0145] Among them, let the feature point set of the reference image be P 1 ={p 1 ,p 2 ,..,p i ,..,p m}, the feature point set of the target image is P 2 = {q 1 ,q 2 ,..,q j ,..,q n}, p i and q j is the feature point extracted during the feature matching process; S is the pixel-level feature matching degree of the corresponding mapped character area B; and They are the feature points in the character area B in the reference image and the target image, respectively, which can be filtered by cv2.pointPolygonTest; and They represent the number of feature points in the set, M is the set of feature matching point pairs in the character area B, and the matching pairs (p i ,q j )∈M satisfies |M| is the number of feature matching point pairs in the character area B, reflecting the matching degree of the two images in the annotation box. It is a normalization factor to avoid the imbalance of similarity caused by the different total number of key points;
[0146] C15: According to the set third matching degree threshold, a set of replica pairs B selected based on the similarity of pixel-level features of the character region is obtained;
[0147] In this embodiment, the third matching degree threshold is not less than 1.5 times the second matching rate threshold; if the overall pixel-level matching degree based on the character area is greater than the third matching degree threshold, the two oracle bone replica images in the corresponding secondary matching pair are retained, otherwise the two oracle bone replica images in the corresponding secondary matching pair are deleted. By filtering based on the pixel-level features of the character area, a set of replica pairs B based on high pixel-level feature similarity of the character area can be further screened from a small-scale set of oracle bone replica images with high pixel-level similarity.
[0148] Pixel-level feature screening based on character regions accurately matches the local features of each character region in the image, calculates the pixel-level feature matching degree within the character region, and screens out character pairs with similar pixel features. This process focuses on the details of the character region and uses high-dimensional feature descriptors to precisely match the characters, thereby effectively reducing background noise and interference from irrelevant areas, improving the accuracy of matching. This is especially true when dealing with characters that are similar in form but have slight differences, which can significantly improve recognition accuracy. At the same time, focusing on the pixel-level features of the character region can eliminate the interference of irrelevant pixel-level features such as edge contour features and internal lines or separators on the results, ensuring more accurate results.
[0149] In step C, the overall steps for screening based on the character space arrangement order are:
[0150] C21: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model;
[0151] First, for the reference image and the target image, the deep learning feature extractor Superpoint is used to extract pixel-level feature points respectively;
[0152] Secondly, the deep learning model Lightglue is used to match the feature points of the reference image and the target image to obtain high-quality feature matching point pairs;
[0153] Then, based on the feature matching point pairs, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship. In this way, the mutual correspondence between the character areas in the two images is obtained, providing a basis for subsequent image alignment and annotation box mapping.
[0154] C22: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system;
[0155] In step C22, the reference image is geometrically transformed using the homography matrix H, including operations such as translation, rotation, and scaling, so that the character area of the reference image overlaps with the target image in space. The above steps can ensure that the character areas of the two images are aligned, so that the annotation information can be accurately mapped between the two images. Through alignment, the differences between the two images caused by factors such as shooting angles and scales can be eliminated, ensuring that subsequent comparisons are more accurate.
[0156] In order to further ensure the accuracy of image alignment, in step C22, the image with fewer key points can be used as the reference image, the image with more key points can be used as the target image, the reference image can be aligned to the target image coordinate system, and the alignment result image can be stored as a new image.
[0157] C23: After image alignment, the character annotation box in the reference image is mapped to the aligned target image;
[0158] In step C23, the annotation file of the reference image is first read to obtain the coordinates of the annotation box vertices of the character area, and then the homography matrix H is used to perform a geometric transformation on the annotation box vertices to map the annotation box to the aligned target image. This mapping method can accurately retain the geometric position and size characteristics of the annotation box in the reference image, while realizing the corresponding annotation box mark in the target image. Through this process, the annotation information of the reference image can be completely and accurately transferred to the target image, ensuring that the character areas of the two images have the same annotation box reference.
[0159] C24: After the character area is mapped, the annotation box of the reference image mapped in the target image is compared with the original annotation box of the target image in the target image coordinate system, and the nearest character pair existing in the same area of the reference image and the target image in the same coordinate system is determined by the centroid distance;
[0160] In step C24, the centroid position of each converted annotation box in the reference image is calculated in the same coordinate system (the target image coordinate system), and the Euclidean distance with the centroid of the annotation box in the target image is calculated one by one; if the distance between the two is less than the preset Euclidean distance threshold, the two annotation boxes are determined to be the closest character pair in the same area in the same coordinate system. In this embodiment, the Euclidean distance threshold can be 50 pixels;
[0161] C25: Save the nearest character pairs in the same area of the reference image and the target image in the same coordinate system into a csv file. The first column is the character box annotation serial number of the reference image, and the second column is the character box annotation serial number of the target image adjacent to the character box in the first column.
[0162] C26: Using the preset oracle bone character homonym determination model, obtain the oracle bone character similarity between the nearest character pair in the reference image and the target image;
[0163] In the present invention, the oracle bone character same-word determination model adopts a Siamese model based on a twin network to determine whether the single-word characters in two oracle bone copies are the same word.
[0164] During the construction and training of the Siamese model based on the twin network:
[0165] 1. First, construct the original data set; in the present invention, single-word characters of 5,000 oracle bone character images are cut out through annotation information, and a training data set containing positive and negative character pairs is constructed. In the original data set, single-word oracle bone character images with the same meaning but different writing styles stored in the same folder constitute positive samples, and single-word oracle bone character images in different folders serve as negative samples to guide the model to learn how to distinguish similar and different characters during training;
[0166] 2. Enhance the generalization ability of the model by performing data enhancement on the original data. In order to improve the generalization ability of the Siamese network model on different oracle bone character samples, we performed a variety of data enhancement operations on the images to ensure that the model can learn the similarities of characters under various transformations and different noise conditions. Data enhancement operations include: scaling, random rotation, and random cropping.
[0167] 3. A Siamese network model based on VGG16 as the backbone network is used to extract the image features of oracle bone inscription characters and perform similarity judgment on character image pairs;
[0168] The VGG16 backbone network can extract high-dimensional feature maps. These feature maps not only capture the edge contours of characters, but also retain the texture details and spatial structure information in the character images, providing a rich feature basis for character similarity. The Siamese network model measures the similarity of character images in the feature space by calculating the absolute difference (i.e., L1 distance) between the feature maps of two images. Through this difference calculation method, the Siamese network model based on VGG16 as the backbone network can be sensitive to subtle differences in characters, thereby accurately determining whether the characters are the same.
[0169] 4. In order to improve the performance of the Siamese network model in the character similarity discrimination task, a binary classification loss function is specially designed and the weights are adjusted to enhance the model's ability to distinguish positive and negative samples.
[0170] Among them, the binary classification loss (BCE Loss) uses BCE With Logits Loss to optimize the difference between the model output probability and the label. This loss function is suitable for similarity tasks and can help the model effectively distinguish between the same and different characters. Loss weight adjustment refers to the weight adjustment of different loss items (absolute difference loss and positive and negative sample loss) during the training process to ensure that the model performs more balanced on different types of samples.
[0171] 5. During the Siamese network model training process, the present invention performs batch sampling of data through a customized DataLoader component. Each batch of data contains positive sample pairs and negative sample pairs. The positive sample pairs are used to learn the similarity of character images, while the negative sample pairs help the model distinguish different characters.
[0172] In the forward propagation stage, the Siamese network model extracts features from each pair of input images, calculates their feature differences, and generates a similarity score through the L1 distance. The loss is calculated based on the similarity score and the true label, and a custom similarity loss function (such as cross entropy or BCE) is used to optimize feature comparison.
[0173] In the back-propagation phase, the loss is back-propagated through the SGD optimizer to update the model weights, and the learning rate is gradually adjusted in combination with the cosine annealing learning rate schedule to ensure that the model can converge smoothly during the training process, and finally obtain a model that is highly sensitive to character similarity.
[0174] Among them, the custom DataLoader component means that a pair of positive samples and a pair of negative samples will be generated each time data is acquired. First, the custom DataLoader component randomly selects a category and extracts two images from the category as a positive sample pair (i.e., similar images, with a label of 1). Then, the custom DataLoader component randomly selects a different category, selects an image from the category, and combines it with another image in the positive sample into a negative sample pair (i.e., heterogeneous images, with a label of 0). Next, the data loader applies data augmentation and preprocessing to each image, including random cropping, flipping, color transformation, etc., and finally returns an image tensor pair and its label suitable for network input. The positive and negative sample pairs constructed in this way help the model better learn the similarities and differences between images, thereby improving the recognition effect of the comparison task.
[0175] C27: The average of the oracle bone character similarities of all the nearest character pairs in the reference image and the target image is used as the screening result based on the character space arrangement order;
[0176] C28: screening according to the set fourth matching degree threshold to obtain a set C of copies based on the character space arrangement order;
[0177] In this embodiment, the fourth matching degree threshold is 60%.
[0178] The screening based on the spatial arrangement order of characters focuses on the relative position and order of characters in the image. By calculating the centroid distance of the character area, the closest character pair in the image is identified, and the oracle bone character similarity determination model is used to further verify whether these characters are the same. This step can effectively solve the arrangement differences caused by image rotation, scaling or slight deformation, ensure that the spatial order and position relationship of the characters are correctly identified, and thus avoid mismatching caused by disordered character order or position offset;
[0179] D: Perform an intersection operation on the copy pair set B selected based on the pixel-level feature similarity of the character area and the copy pair set C selected based on the character spatial arrangement order, and finally obtain the oracle bone copy image re-slice recognition result.
[0180] In the present invention, it is assumed that there are 7200 oracle bone copy images in the initial large-scale oracle bone copy image collection, and there are nearly 7200 factorial image pairs in the case of pairwise matching; after the initial screening operations in steps A and B of the present invention, a small-scale oracle bone copy image pair set A with high pixel-level similarity is obtained, including 2600 pairs of suspected duplicate images; then, after the fine screening operation in step C of the present invention, the corresponding copy pair set B and copy pair set C respectively contain about 400 pairs of suspected duplicate images after pixel-level feature screening based on the character area and screening based on the character space arrangement order; after the intersection operation in step D of the present invention, the oracle bone copy image duplicate recognition result, i.e., copy pair set D, is finally obtained, which contains both high pixel feature matching values of the character area and the results of the character-level spatial arrangement order, and finally contains about 100 pairs of duplicate recognition results, covering the true duplicates.
[0181] Figures 2 to 4 middle, Figure 2 This is a schematic diagram of the partial overlap of two oracle bone copies. Figure 3 This is a schematic diagram of two oracle bone copies completely overlapping; Figure 4 It is a schematic diagram of the partial overlap of three oracle bone copies. Experiments have proved that the present invention can shorten the calibration time of 7200 oracle bone copy images from several months of manual calibration time to half a day of machine calibration time, thereby greatly improving the efficiency of oracle bone copy image recognition and preventing the occurrence of missed calibration.
Claims
1. A method for automatic weight correction of oracle bone copy images by gradual refinement, characterized by: The following steps are involved: A: The oracle bone copy image to be re-identified is divided into a reference image and a target image to form an image pair, and then the feature points and corresponding feature descriptors of each oracle bone copy image are obtained through feature extraction; then the reference image and the target image are initially matched based on the feature points and feature descriptors, and finally the initial matching pairs that meet the first matching rate threshold are screened; B: For the reference image and target image in the initial matching pair, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship; Then, the reference image is perspective transformed by the homography matrix H, and the reference image is aligned to the target image coordinate system to obtain the alignment result image; Then, feature points and corresponding feature descriptors of the alignment result image and the target image are obtained through feature extraction; second feature matching is performed on the reference image and the target image based on the feature points and feature descriptors, and finally a second matching pair that meets the second matching rate threshold is obtained by screening; C: For the oracle bone copy images obtained in the secondary matching pair, all the character regions in the reference image and the target image are marked using the preset oracle bone character region recognition model; Then, after the image alignment and character region mapping, the pixel-level feature screening based on the character region and the character space arrangement order screening are performed respectively, and the sets of replica pairs are correspondingly stored as the similarity screening based on the pixel-level feature screening based on the character region and the character space arrangement order screening; D: Perform an intersection operation on the set of replica pairs selected based on the pixel-level feature similarity of the character area and the set of replica pairs selected based on the spatial arrangement order of the characters, and finally obtain the oracle bone replica image re-slice recognition result.
2. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1 is characterized in that: In the step C, the pixel-level feature screening based on the character area is performed by aligning the feature matching points in the corresponding character area in the image, calculating the pixel-level feature matching degree of each character area, and taking the average of the pixel-level feature matching degrees of all character areas in the reference image and the target image as the overall pixel-level matching degree based on the character area; finally, a set of replica pairs for pixel-level feature similarity screening of the character area is obtained based on the set third matching degree threshold.
3. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: In the step C, the screening based on the character space arrangement order is to obtain the nearest character pair existing in the same area of the reference image and the target image in the same coordinate system through the centroid distance; and use the preset oracle bone character same-word determination model to obtain the oracle bone character similarity in the nearest character pair in the reference image and the target image, and take the average of the oracle bone character similarities of all the nearest character pairs in the reference image and the target image as the screening result based on the character space arrangement order; finally, according to the set fourth matching degree threshold, the screening is performed to obtain a set of replica pairs based on the character space arrangement order.
4. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: The step A comprises the following specific steps: A1: Divide the oracle bone copy image to be recognized into a reference image and a target image, and form an image pair; A2: Using a deep learning feature extractor, obtain the feature points and corresponding feature descriptors of each oracle bone copy image in the image pair; the feature points are the prominent areas in the oracle bone copy image, and the feature descriptors are the high-dimensional feature representations of the feature points; A3: Based on feature points and feature descriptors, perform initial feature matching on the reference image and the target image in the image pair, and obtain a set of feature matching point pairs; A4: Using feature matching point pairs, calculate the ratio of the number of feature matching point pairs to the total number of feature points of the reference image and the target image, and take the maximum value of the two as the matching rate of the image pair; then use the set first matching rate threshold to screen out image pairs with a matching rate higher than the first matching rate, and use the screened image pairs as the initial matching pairs.
5. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: Described step B comprises the following steps: B1: Using the feature matching point pairs of the reference image and the target image calculated in the initial matching, the homography transformation matrix H from the reference image to the target image is calculated through the geometric transformation relationship; B2: Perform perspective transformation on the reference image through the homography matrix H, and align the reference image to the target image coordinate system to obtain the alignment result image; B3: Obtain feature points and corresponding feature descriptors of the alignment result image and the target image through feature extraction; then perform secondary feature matching on the reference image and the target image based on the feature points and feature descriptors, and finally screen out secondary matching pairs that meet the second matching rate threshold.
6. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: In step C, the overall steps of performing pixel-level feature screening based on the character area are: C11: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model; C12: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system; C13: After image alignment, the character annotation box in the reference image is mapped to the aligned target image; C14: After the character region is mapped, the pixel-level feature matching degree of each character region is calculated by aligning the feature matching points in the corresponding character region in the image, and the average of the pixel-level feature matching degrees of all character regions in the reference image and the target image is used as the overall pixel-level matching degree based on the character region; C15: According to the set third matching degree threshold, a set of replica pairs is obtained based on the similarity of pixel-level features in the character area.
7. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: In the step C, the overall steps of screening based on the character space arrangement order are: C21: Extract and match pixel-level feature points of the reference image and the target image using a deep learning feature extractor and a deep learning model; C22: Perform perspective transformation on the reference image through the homography matrix H to align the reference image to the target image coordinate system; C23: After image alignment, the character annotation box in the reference image is mapped to the aligned target image; C24: After the character area is mapped, the annotation box of the reference image mapped in the target image is compared with the original annotation box of the target image in the target image coordinate system, and the nearest character pair existing in the same area of the reference image and the target image in the same coordinate system is determined by the centroid distance; C25: Save the nearest character pairs in the same area of the reference image and the target image in the same coordinate system into a csv file. The first column is the character box annotation serial number of the reference image, and the second column is the character box annotation serial number of the target image adjacent to the character box in the first column. C26: Using the preset oracle bone character homonym determination model, obtain the oracle bone character similarity between the nearest character pair in the reference image and the target image; C27: The average of the oracle bone character similarities of all the nearest character pairs in the reference image and the target image is used as the screening result based on the character space arrangement order; C28: According to the set fourth matching degree threshold, a set of replica pairs selected based on the character space arrangement order is obtained.
8. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: In the step C, the oracle bone character area recognition model is constructed based on the EAST single-word text detection model; the oracle bone character area recognition model performs text detection on each oracle bone character in the oracle bone copy image, and outputs the position information of all oracle bone character annotation boxes in the oracle bone copy image, that is, the position information of the character area.
9. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 3 is characterized in that: The oracle bone character homonym determination model adopts a Siamese model based on a twin network to extract the image features of oracle bone single-word characters and perform similarity determination on character image pairs, and finally determine whether the single-word characters in two oracle bone copies are the same word.
10. The method for automatic weight correction of oracle bone copy images by step-by-step refinement according to claim 1, characterized in that: In the step A2, when obtaining the distribution of feature points, the feature extractor analyzes the significance of each position in the grayscale image, and finally outputs the position of the feature point and the significance of the feature point; The significance of feature points is the importance of each feature point expressed in numerical value. The feature extractor selects the top N feature points with the highest significance according to the significance scores of feature points. The feature extractor detects the surrounding range of each feature point and extracts the feature information of the local area within the surrounding range of the feature point, including brightness and edge direction, and finally generates a high-dimensional feature vector as a feature descriptor.
Citation Information
Patent Citations
An automatic annotation method for oracle bone script based on spatial proximity
CN111291750B
A method for piecing together oracle bone fragments based on time series similarity calculation
CN111292283B
A Deep Learning-Based Method for Detecting and Recognizing Oracle Bone Script Radicals
CN111539437B
Wide baseline image matching feature screening method based on NFSC
CN111126484A
Character string fuzzy matching system and method for image recognition result
CN112215216A
Cited By
Cross-modality coarse-to-fine registration method and device for oracle bone rubbing and copy image
CN122715174A