A semantic-based cultural relic image retrieval method

By identifying user intentions from aspects such as color, size, shape, etc., and performing matching searches based on image features, the problem that the cultural relics retrieval system in the existing technology cannot meet user needs is solved, and more accurate cultural relics image retrieval results are achieved.

CN114186087BActive Publication Date: 2024-09-06WUHAN DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111525439.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-09-06
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The existing cultural relics retrieval system only relies on basic information of cultural relics for retrieval, which cannot meet the retrieval needs of users. Moreover, there is a large gap between the simple visual features of images and rich semantics, making it difficult to achieve effective image retrieval.

Method used

By identifying user intentions from three aspects: color, size, and shape, combining image features for matching search, using the DeepLabv3+ model to extract shape features, Chinese word segmentation algorithm for word segmentation processing, and establishing a color, size, and shape feature lexicon to achieve based on Semantic artifact image retrieval.

Benefits of technology

The importance evaluation mechanism for shape features in images is implemented. Through weight value sorting, the accuracy of retrieval results and the matching of user intentions are improved to meet the user's retrieval needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114186087B
    Figure CN114186087B
Patent Text Reader

Abstract

The invention provides a cultural relic image retrieval method based on semantics. The cultural relic image description input by a user is first segmented into color keywords, size keywords and shape keywords. Based on a color feature word library and image main color information, image data is screened and image data with corresponding color labels is output. Based on a size feature word library, query parameters are quantified and image data within a size error range indicated by the query parameters is output. Based on a shape feature word library, image data is screened and sorted according to weight values ​​and image data containing corresponding shapes is output. The intersection of the three output results is taken to obtain a final retrieval result. The cultural relic image retrieval method based on semantics is reasonably designed. By analyzing user questions, the user intention is identified from three aspects of color, size and shape, and matching search is performed in combination with image features, thereby providing image data that meets the user's retrieval needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the fields of computer vision, image processing and mathematical technology, and in particular relates to a semantic-based cultural relic image retrieval method. Background Art

[0002] By the end of 2010, the cultural relics survey project had completed the collection of precious cultural relics data in all museums in the national cultural relics system, with a total of 1,660,275 cultural relics data collected, which basically clarified the precious cultural relics in the national cultural relics system. However, the current introduction of cultural relics is limited to the brief introduction of cultural relics provided by museums, which contains very limited information. Relying only on the basic information of cultural relics for retrieval obviously cannot meet the retrieval needs of users. If it is possible to associate cultural relic images with the corresponding target cultural relics through cultural relic image retrieval, it will play a great role in solving the problem of cultural relic retrieval.

[0003] To achieve effective image retrieval, the semantic gap between simple visual features and rich semantics of images must be reduced. By adding the transformation of high-level semantics to low-level features in the original retrieval system, semantic-based image retrieval can be achieved without changing the existing image feature library and matching method. To this end, the present invention proposes a semantic-based cultural relic image retrieval method. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides a semantic-based cultural relic image retrieval method. The semantic-based cultural relic image retrieval method is reasonably designed. By analyzing user questions, the user's intention is identified from three aspects: color, size, and shape, and matching search is performed in combination with image features, thereby providing image data that meets the user's retrieval needs.

[0005] In order to achieve the above object, the present invention is implemented by the following technical solution: a semantic-based cultural relic image retrieval method, characterized in that it includes the following steps:

[0006] Step 1: Import image dataset, collect image size information, and create image index;

[0007] Step 2: Determine the main color candidate set, label each element in the main color candidate set with a corresponding color label, and establish a color feature vocabulary;

[0008] Step 3: Determine the main color tone of the image based on the main color tone candidate set, and establish the association between the image and the color feature words;

[0009] Step 4: Quantitative definition of size terms: Quantify the words commonly used in life to express size into numerical values ​​in different ways, with the unit being pixels, and store the quantified data into the size feature word library;

[0010] Step 5: Image shape feature extraction: Use the DeepLabv3+ model to determine the point set of the object outline contained in the image, mark the object name and its synonyms, calculate the object area, the object's position from the center of the image, and the weight, store the above information, and establish a shape feature vocabulary to establish the association between the image and the shape feature;

[0011] Step 6: Segment the description using the Chinese word segmentation algorithm WMSeg;

[0012] Step 7: By comparing with the data in the color feature word library, size feature word library, and shape feature word library, the word segmentation results are divided into three categories: color keywords, size keywords, and shape keywords;

[0013] Step 8: Search for each type of keyword separately, merge the search results, and output the final results.

[0014] As a preferred implementation of the present invention, the quantitative definition of size terms in step 4 includes three situations:

[0015] (1) The area of ​​the corresponding image can be directly used as the quantized value;

[0016] (2) The area of ​​the corresponding image needs to obtain the matched value and then calculate it according to different formulas;

[0017] (3) The width and height information of the corresponding image must be quantized before calculation;

[0018] As a preferred embodiment of the present invention, the importance of the shape feature in the image in step 5 is determined by the area ratio and the degree of centering of the object. The weight value w=k1*n1+k2*n2. The larger w is, the greater the importance of the object in the image. The specific calculation method of the weight value is as follows:

[0019] 1) Set the area ratio coefficient n1=6 and the centering coefficient n2=4;

[0020] 2) Establish a rectangular coordinate system with the lower left corner of the image as the origin, and use pixels as the unit to calculate the number of pixels occupied by the object, recorded as m1; the total number of pixels occupied by the image, recorded as m2; obtain the proportion of the object area in the image: k1 = m1 / m2, the larger k1 is, the larger the proportion of the object in the image is;

[0021] 3) Using the distance formula between two points ((x1, y1) is the coordinate of the point on the object's edge, (x2, y2) is the coordinate of the center point of the image) Calculate the distance between each coordinate point on the edge of the object shape and the center point of the image, and compare to get the shortest distance, that is, the distance between the object and the center point of the image, recorded as: len;

[0022] 4) Calculate the length of the diagonal of the rectangle using the formula c = √( a 2+b 2 )(a, b are the width and height of the image respectively), get the maximum distance from any point in the image to the center point: maxLen = c / 2; the degree of centering of the object in the image: k2 = (maxLen-len) / maxLen, the larger k2 is, the closer the object is to the center of the image;

[0023] Calculate the weight of the shape feature: w=k1*n1+k2*n2.

[0024] Beneficial effects of the present invention:

[0025] 1. This semantic-based cultural relic image retrieval method proposes a mechanism to judge the importance of shape features in images: the importance of shape features in images is determined by the area ratio and the degree of centering of the object, and the weight value of the shape features is set according to these two parameters. Images are sorted according to the weight value during search.

[0026] 2. This semantic-based cultural relic image retrieval method proposes to identify user intentions from three aspects: color, size, and shape, and perform matching searches based on image features. The results retrieved in this way are more in line with people's search habits and can better match users' search intentions.

[0027] 3. This semantic-based cultural relic image retrieval method analyzes user questions, identifies user intentions from three aspects: color, size, and shape, and performs matching searches based on image features, thereby providing image data that meets user retrieval needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A flowchart of a semantic-based cultural relic image retrieval method of the present invention;

[0029] Figure 2 A schematic diagram of image main color tone candidates for a semantic-based cultural relic image retrieval method of the present invention. DETAILED DESCRIPTION

[0030] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.

[0031] See also Figure 1 to Figure 2The present invention provides a technical solution: a semantic-based cultural relic image retrieval method, characterized in that it includes the following steps:

[0032] Step 1: Import image dataset, collect image size information, and create image index;

[0033] Step 2: Determine the main color candidate set, label each element in the main color candidate set with a corresponding color label, and establish a color feature vocabulary;

[0034] Step 3: Determine the main color tone of the image based on the main color tone candidate set, and establish the association between the image and the color feature words;

[0035] Step 4: Quantitative definition of size terms: Quantify the words commonly used in life to express size into numerical values ​​in different ways, with the unit being pixels, and store the quantified data into the size feature word library;

[0036] Step 5: Image shape feature extraction: Use the DeepLabv3+ model to determine the point set of the object outline contained in the image, mark the object name and its synonyms, calculate the object area, the object's position from the center of the image, and the weight, store the above information, and establish a shape feature vocabulary to establish the association between the image and the shape feature;

[0037] Step 6: Segment the description using the Chinese word segmentation algorithm WMSeg;

[0038] Step 7: By comparing with the data in the color feature word library, size feature word library, and shape feature word library, the word segmentation results are divided into three categories: color keywords, size keywords, and shape keywords;

[0039] Step 8: Search for each type of keyword separately, merge the search results, and output the final results.

[0040] As a preferred implementation of the present invention, the quantitative definition of size terms in step 4 includes three situations:

[0041] (1) The area of ​​the corresponding image can be directly used as the quantized value;

[0042] (2) The area of ​​the corresponding image needs to obtain the matched value and then calculate it according to different formulas;

[0043] (3) The width and height information of the corresponding image must be quantized before calculation;

[0044] As a preferred embodiment of the present invention, the importance of the shape feature in the image in step 5 is determined by the area ratio and the degree of centering of the object. The weight value w=k1*n1+k2*n2. The larger w is, the greater the importance of the object in the image. The specific calculation method of the weight value is as follows:

[0045] 5) Set the area ratio coefficient n1=6 and the centering coefficient n2=4;

[0046] 6) Establish a rectangular coordinate system with the lower left corner of the image as the origin, and use pixels as the unit to calculate the number of pixels occupied by the object, recorded as m1; the total number of pixels occupied by the image, recorded as m2; obtain the proportion of the object area in the image: k1 = m1 / m2, the larger k1 is, the larger the proportion of the object in the image is;

[0047] 7) Using the distance formula between two points ((x1, y1) is the coordinate of the point on the object's edge, (x2, y2) is the coordinate of the center point of the image) Calculate the distance between each coordinate point on the edge of the object shape and the center point of the image, and compare to get the shortest distance, that is, the distance between the object and the center point of the image, recorded as: len;

[0048] 8) Calculate the length of the diagonal of the rectangle using the formula c = √(a 2 +b 2 )(a, b are the width and height of the image respectively), get the maximum distance from any point in the image to the center point: maxLen = c / 2; the degree of centering of the object in the image: k2 = (maxLen-len) / maxLen, the larger k2 is, the closer the object is to the center of the image;

[0049] Calculate the weight of the shape feature: w=k1*n1+k2*n2.

[0050] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

[0051] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A semantic-based cultural relic image retrieval method, comprising the following steps: Step 1: Import image dataset, collect image size information, and create image index; Step 2: Determine the main color candidate set, label each element in the main color candidate set with a corresponding color label, and establish a color feature vocabulary; Step 3: Determine the main color tone of the image based on the main color tone candidate set, and establish the association between the image and the color feature words; Step 4: Quantitative definition of size terms: Quantify the words commonly used in life to express size into numerical values ​​in different ways, with the unit being pixels, and store the quantified data into the size feature word library; Step 5: Image shape feature extraction: Use the DeepLabv3+ model to determine the point set of the object outline contained in the image, mark the object name and its synonyms, calculate the object area, the object's position from the center of the image, and the weight, store the above information, and establish a shape feature vocabulary to establish the association between the image and the shape feature; Step 6: Segment the description using the Chinese word segmentation algorithm WMSeg; Step 7: By comparing with the data in the color feature word library, size feature word library, and shape feature word library, the word segmentation results are divided into three categories: color keywords, size keywords, and shape keywords; Step 8: Search for each type of keyword respectively, merge the search results, and output the final results; The importance of the shape feature in the image in step 5 is determined by the area ratio and the degree of centering of the object. The weight value w = k1*n1+k2*n2. The larger w is, the more important the object is in the image. The specific calculation method of the weight value is as follows: 1) Set the area ratio coefficient n1 = 6 and the centering coefficient n2 = 4; 2) Establish a rectangular coordinate system with the lower left corner of the image as the origin, use pixels as the unit, and calculate the number of pixels occupied by the object, recorded as m1; The total number of pixels occupied by the image is recorded as m2; Get the proportion of the object area in the image: k1 = m1 / m2, the larger the k1, the larger the proportion of the object in the image; 3) Using the distance formula between two points (x1, y1) is the coordinate of the point on the object's edge, (x2, y2) is the coordinate of the center point of the image, and the distance between each coordinate point on the edge of the object shape and the center point of the image is calculated respectively. The shortest distance is the distance between the object and the center point of the image, which is recorded as: len; 4) Calculate the length of the diagonal of the rectangle using the formula a and b are the width and height of the image respectively. Get the maximum distance from any point in the image to the center point: maxLen = c / 2; the degree of centering of the object in the image: k2 = (maxLen- len) / maxLen. The larger k2 is, the closer the object is to the center of the image. Calculate the weight of the shape feature: w = k1*n1+k2*n2.

2. The method for relic image retrieval based on semantics according to claim 1, characterized in that: The quantitative definition of size terms described in step 4 includes three situations: 1) For the area of ​​the corresponding image, the quantized value can be used directly; 2) For the area of ​​the corresponding image, the matched value needs to be obtained and then calculated according to different formulas; 3) The width and height information of the corresponding image needs to be quantized before calculation.