Picture feature extraction model selection method and device, storage medium and equipment
By inputting the attribute information of the scene graph and the target graph into the support vector machine model, and automatically selecting the optimal picture feature extraction model, the problem of low model selection efficiency in the existing technology is solved, and efficient feature information extraction effect is achieved.
Patent Information
- Application Number
- CN202411989494.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the selection efficiency of image feature extraction models is low, and it is difficult to achieve the best selection effect, and technicians need to invest a lot of time and energy in analysis and selection.
By inputting the first attribute information of the scene graph and the target graph into the trained support vector machine model, the image feature extraction model with the best effect of extracting the target graph feature information from the scene graph is automatically selected.
It realizes the automatic selection of the optimal image feature extraction model based on the picture, and efficiently achieves the optimal image feature information extraction effect, improving the efficiency and effect of model selection.
Smart Images

Figure CN119810477A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of picture recognition technology, and in particular to a method, device, storage medium and equipment for selecting a picture feature extraction model. Background Art
[0002] Currently, there are a variety of image feature extraction models in the field of image recognition, such as SIFT matching model, contour matching model, convolutional neural network model, etc. Since various image feature extraction models have different requirements for image data, image complexity, image feature extraction accuracy, and real-time settings, different image feature extraction models often obtain different feature extraction results for the same image.
[0003] In the prior art, technicians are usually required to analyze the amount of data of the image to be identified or the feature information requirements to be extracted, and select a model suitable for the image feature extraction according to the characteristics of the image feature extraction model. However, this method requires technicians to invest a lot of time and energy, and the selected image feature extraction model is not necessarily the best. The selection efficiency of the image feature extraction model is low, and it is difficult to achieve the best selection effect. Summary of the invention
[0004] Based on this, the present invention provides a method, device, storage medium and equipment for selecting a picture feature extraction model, inputting the first attribute information of the scene graph and the target graph that need to be feature extracted into a trained support vector machine model, and selecting the picture feature extraction model that has the best effect of extracting the target graph feature information from the scene graph. The optimal picture feature extraction model can be automatically selected according to the picture, and the optimal picture feature information extraction effect can be efficiently achieved.
[0005] In a first aspect, the present invention provides a method for selecting a picture feature extraction model, comprising:
[0006] Obtaining a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified;
[0007] Determining first attribute information of the target graph;
[0008] The first attribute information of the scene graph and the target graph is input into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
[0009] The first attribute information includes size information, number of feature points and color information of the target image.
[0010] Furthermore, the training method of the support vector machine model comprises the following steps:
[0011] Step S201, obtaining a sample scene graph set and a sample target graph set, wherein the sample scene graph set includes at least one sample scene graph, the sample target graph set includes at least one sample target graph, and the sample scene graph includes at least one sample target graph;
[0012] Step S202, marking the sample scene graph set and the sample object graph set to obtain a sample set, and dividing the sample set into at least two sub-sample sets according to a preset ratio;
[0013] Step S203, selecting any sub-sample set as a training verification set, and the other sub-sample sets as training sample sets;
[0014] Step S204, inputting the training sample set into the support vector machine model to be trained to adjust the parameters of the kernel function to obtain a preliminary support vector machine model;
[0015] Step S205, inputting the training verification set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model;
[0016] Step S206, repeating steps S203-S205 until all sub-sample sets are used as training and verification sets to obtain the accuracy of each preliminary support vector machine model;
[0017] Step S207, comparing the accuracy of all preliminary support vector machine models, and outputting the preliminary support vector machine model with the highest accuracy as the trained support vector machine model.
[0018] Furthermore, the process of labeling the sample scene graph set and the sample target graph set to obtain the sample set includes:
[0019] Step S301, extracting any sample scene graph from the sample scene graph set, and obtaining second attribute information of all sample target graphs in the sample scene graph;
[0020] Step S302, combining the sample scene graph and the second attribute information of any sample target graph included in the sample scene graph into a first training sample;
[0021] Step S303, inputting the first training sample into a first image feature extraction model and a second image feature model respectively to obtain a first recognition result and a second recognition result;
[0022] Step S304, respectively comparing the first recognition result, the second recognition result and the second attribute information to obtain a label of the sample target image;
[0023] Step S305, combining the label of the sample target image and the first training sample to obtain a second training sample;
[0024] Step S306, repeating steps S302-S305 until a second training sample set corresponding to all sample object graphs included in the sample scene graph is obtained;
[0025] Step S307, repeat steps S301-S306 until a second training sample set corresponding to all sample scene graphs is obtained and recorded as a sample set.
[0026] The second attribute information includes size information, number of feature points, color information and coordinate information of the sample target image.
[0027] Furthermore, the step of inputting the first training sample into a first image feature extraction model and a second image feature model to obtain a first recognition result and a second recognition result includes:
[0028] Inputting the first training sample into a first image feature extraction model to obtain first coordinates of a sample target image in the first training sample;
[0029] The first training sample is input into a second image feature extraction model to obtain a second coordinate of a sample target image in the first training sample.
[0030] Further, the step of comparing the first recognition result, the second recognition result and the second attribute information to obtain a label of the sample target image includes:
[0031] Compare the first coordinate and the second coordinate with the coordinate information of the second attribute information respectively;
[0032] If the difference between the first coordinate and the coordinate information is smaller than the difference between the second coordinate and the coordinate information, setting the label of the sample target image to the first label;
[0033] If the difference between the first coordinate and the coordinate information is greater than the difference between the second coordinate and the coordinate information, the label of the sample target image is set to the second label.
[0034] Furthermore, the step of inputting the training validation set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model includes:
[0035] Input each verification sample in the training verification set into a preliminary support vector machine model to obtain a final image feature extraction model for extracting feature information of a sample target image in the verification sample;
[0036] Compare the final image feature extraction model obtained from each verification sample with the label of the sample target image in the verification sample. If the final image feature extraction model is consistent with the feature extraction model indicated by the label, the output result of the preliminary support vector machine model is correct.
[0037] The accuracy of the preliminary support vector machine is obtained according to the output results of each verification sample in the preliminary support vector machine.
[0038] In a second aspect, the present invention further provides a device for selecting a picture feature extraction model, comprising:
[0039] An image information acquisition module, used to acquire a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified;
[0040] A target attribute determination module, used to determine first attribute information of the target graph;
[0041] The feature extraction model selection module is used to input the first attribute information of the scene graph and the target graph into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
[0042] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for selecting an image feature extraction model in any one of the first aspects are implemented.
[0043] In a fourth aspect, the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it executes any one of the methods for selecting a picture feature extraction model in the first aspect.
[0044] The beneficial effects of adopting the above technical solution are as follows: the present invention inputs the first attribute information of the scene graph and the target graph that need to be feature extracted into the trained support vector machine model, selects the image feature extraction model that has the best effect on extracting the feature information of the target graph from the scene graph, and can automatically select the optimal image feature extraction model according to the image, thereby efficiently achieving the optimal image feature information extraction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0046] Figure 1 A schematic diagram of a method for selecting a picture feature extraction model in one embodiment of the present application;
[0047] Figure 2 A schematic diagram of a device for selecting an image feature extraction model in one embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In order to explain the present invention in more detail, the selection method, device, storage medium and equipment of the image feature extraction model provided by the present invention are specifically described below in combination with the drawings.
[0049] Unless otherwise defined, the technical terms or scientific terms used in the disclosure of this application should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate a quantitative limit, but indicate that there is at least one. Similar words such as "include" or "include" mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship can also change accordingly.
[0050] There are many image feature extraction models in the current image recognition field, such as SIFT matching model, contour matching model, ORB matching model, FAST feature extraction model, AKAZE matching model, convolutional neural network model, etc. Various image feature extraction models have different accuracy, data processing volume and image feature extraction speed, and different feature extraction results are often obtained for the same image.
[0051] When technicians choose the model that best suits the current image features and feature extraction requirements from among many image feature extraction models, they need to consider the content and characteristics of the image to be identified (such as lighting conditions, clarity, noise level, etc.), the image feature extraction requirements (such as the position, size, grayscale value, etc. of the target object to be extracted), the efficiency and accuracy of the model in extracting features, and other conditions. If the feature extraction model of the image to be identified is selected based solely on the technician's experience, the technician needs to have a large knowledge reserve of feature extraction models and have accurate feature cognition of the image to be identified. In practice, the technician needs to spend a lot of energy to analyze the image to be identified and the candidate feature extraction models and then select a suitable feature extraction model. However, the feature extraction model selected is often not necessarily the optimal feature extraction model, which results in the inability to efficiently execute the image feature extraction model selection stage in the existing image recognition process, and the feature extraction of the image cannot achieve the optimal effect under the existing technology.
[0052] In this regard, the present invention provides a method for selecting a picture feature extraction model, which inputs the first attribute information of the scene graph and the target graph that need to be feature extracted into a trained support vector machine model, selects the picture feature extraction model with the best effect of extracting the target graph feature information from the scene graph, and automatically selects the best picture feature extraction model according to the picture, so as to efficiently achieve the best picture feature information extraction effect. This method is described by taking the application of the method to a terminal device as an example, and combined with the attached Figure 1 A schematic diagram showing a method for selecting a picture feature extraction model.
[0053] The present application embodiment provides an application scenario of the method for selecting a picture feature extraction model, and the application scenario includes the terminal device provided in the embodiment, and the terminal device includes but is not limited to a smart phone and a computer device, wherein the computer device can be at least one of a desktop computer, a portable computer, a laptop computer, a mainframe computer, a tablet computer, etc. The user operates the terminal device to obtain the picture feature extraction model with the best effect of extracting the feature information of the target image from the scene graph. For the specific process, please refer to the embodiment of the method for selecting a picture feature extraction model.
[0054] Step S101, obtaining a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified.
[0055] The target image is a screenshot of the region of interest for feature extraction of the scene image to be identified, and the scene image to be identified includes at least one target image. For example, a screenshot of the main interface of an application is used as the scene image to be identified, and the "Personal Center" object area of the main interface is used as the region of interest, then a screenshot of the "Personal Center" object area is used as the target image.
[0056] Step S102, determining first attribute information of the target graph.
[0057] The first attribute information includes the size information, number of feature points and color information of the target image. The first attribute information is used to support the classification of the scene image and the target image by the support vector machine model, and it can determine which feature information needs to be extracted from the target image according to the first attribute information and which image feature extraction model is better for extracting the feature information of the target image from the scene image.
[0058] Step S103, inputting the first attribute information of the scene graph to be identified and the target graph into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
[0059] Specifically, the support vector machine model can determine what feature information needs to be extracted from the target graph based on the first attribute information of the scene graph to be identified and the target graph, and in the process of extracting the feature information of the target graph from the scene graph, select which of the given image feature extraction models can achieve the best feature extraction effect, and output the final image feature extraction model.
[0060] Furthermore, for the support vector machine model used in step S103, a Gaussian kernel function is used to classify the attribute information of the input scene graph and the target graph, and a five-fold cross validation function is used to verify the training results to obtain the support vector machine model with the highest accuracy. The specific training process is as follows:
[0061] Step S201, obtaining a set of sample scene graphs and a set of sample target graphs, wherein the sample scene graph includes at least one sample target graph.
[0062] Specifically, the sample target graph is a screenshot of the region of interest that needs to be extracted from the sample scene graph. For example, a screenshot of the main interface of an application is a sample scene graph, and the "Personal Center" object area of the main interface is the region of interest that needs to be extracted from features. Then a screenshot of the "Personal Center" object area is a sample target graph. Object areas in the main interface of an application that are connected and can trigger actions can be used as regions of interest that need to be extracted from features, such as the "Personal Center" object and the "Home Button" object.
[0063] Step S202: Mark the sample scene graph set and the sample object graph set to obtain a sample set, and divide the sample set into at least two sub-sample sets according to a preset ratio.
[0064] Step S203: select any one of the sub-sample sets as a training verification set, and select the other sub-sample sets as training sample sets.
[0065] Step S204, input the training sample set into the support vector machine model to be trained to adjust the parameters of the kernel function to obtain a preliminary support vector machine model.
[0066] Among them, the kernel function in the embodiment of the present application can adopt a linear kernel function, a polynomial kernel function, a Gaussian kernel function or a Sigmoid kernel function. Specifically, the support vector machine model in this embodiment adopts a Gaussian kernel function, and the regularization parameter and bandwidth of the Gaussian kernel function need to be adjusted during the training process of the support vector machine model.
[0067] Step S205, inputting the training validation set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model.
[0068] Step S206, repeating steps S203-S205 until all sub-sample sets are used as training and verification sets to obtain the accuracy of each preliminary support vector machine model.
[0069] Step S207, comparing the accuracy of all preliminary support vector machine models, and outputting the preliminary support vector machine model with the highest accuracy as the trained support vector machine model.
[0070] If the sample set is divided into K sub-sample sets, steps S203-S205 are repeated K times to obtain K preliminary support vector machine models, and the accuracy of the K preliminary support vector machine models when each sub-sample set is used as a training verification set is calculated. The preliminary vector machine model with the highest accuracy among the K preliminary support vector machine models is used as the trained support vector machine model. The trained support vector machine model has an extremely high accuracy in selecting the image feature extraction model, and can efficiently and accurately select the image feature extraction model with the best effect of extracting the target image feature information according to the first attribute information of the scene graph and the target graph.
[0071] The process of labeling the sample scene graph set and the sample target graph set in step S202 to obtain a sample set specifically includes the following steps:
[0072] Step S301: extract any sample scene graph from the sample scene graph set, and obtain the second attribute information of all sample target graphs in the sample scene graph.
[0073] Among them, in this embodiment, the second attribute information includes the size information, number of feature points, color information and coordinate information of the sample target image. The second attribute information is compared with the first attribute information, and the second attribute information also includes the feature information that needs to be extracted from the target image, which is used to compare with the feature information obtained by inputting the sample data into the image feature extraction model to be selected, to determine which image feature extraction model can obtain better results for the sample data, and to generate a label; in this embodiment, the feature information that needs to be extracted from the target image is coordinate information, and can also be grayscale value, contour information, etc. of the target image.
[0074] Step S302: Combine the sample scene graph and the second attribute information of any sample object graph included in the sample scene graph into a first training sample.
[0075] Step S303: input the first training sample into the first image feature extraction model and the second image feature model respectively to obtain the first recognition result and the second recognition result.
[0076] In this embodiment, the first image feature extraction model and the second image feature extraction model are any two models in the prior art that can extract features from an image, and can be any two of a SIFT matching model, a contour matching model, a FAST feature extraction model, an ORB model, and a convolutional neural network. This embodiment is described by taking the first image feature extraction model as a SIFT matching model and the second image feature extraction model as a contour matching model.
[0077] Specifically, the first training sample is input into the first image feature extraction model to obtain the first coordinates of the sample target map in the first training sample; the first training sample is input into the second image feature extraction model to obtain the second coordinates of the sample target map in the first training sample.
[0078] Step S304, respectively compare the first recognition result, the second recognition result and the second attribute information to obtain a label of the sample target image.
[0079] Specifically, the first coordinate and the second coordinate are compared with the coordinate information of the second attribute information respectively;
[0080] If the difference between the first coordinate and the coordinate information is less than the difference between the second coordinate and the coordinate information, setting the label of the sample target image to the first label, and the first label may be recorded as 1;
[0081] If the difference between the first coordinate and the coordinate information is greater than the difference between the second coordinate and the coordinate information, the label of the sample target image is set to the second label, and the second label can be recorded as -1 or 0.
[0082] Step S305: Combine the label of the sample target image with the first training sample to obtain a second training sample.
[0083] Step S306, repeating steps S302-S305 until a second training sample set corresponding to all sample object graphs included in the sample scene graph is obtained;
[0084] Step S307, repeat steps S301-S306 until a second training sample set corresponding to all sample scene graphs is obtained and recorded as a sample set.
[0085] Therefore, each element in the sample set includes the sample scene graph, the second attribute information of the sample target graph and the label of the sample target graph.
[0086] Furthermore, since the support vector machine model in the embodiment of the present application is verified using the K-fold cross-validation algorithm, K is an integer value greater than 2, and the specific value of K is selected according to the data ratio of the training verification set and the training sample set. For example, if the data ratio of the training verification set and the training sample set is 1:4, K is 5; or if the data ratio of the training verification set and the training sample set is 1:3, K is 4.
[0087] Specifically, the above step S205 inputs the training validation set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model, including the following steps:
[0088] Step S401, input each verification sample in the training verification set into a preliminary support vector machine model to obtain a final image feature extraction model for extracting feature information of the sample target image in the verification sample.
[0089] Step S402, compare the final image feature extraction model obtained from each verification sample with the label of the sample target image in the verification sample. If the final image feature extraction model is consistent with the feature extraction model indicated by the label, the output result of the preliminary support vector machine model is correct.
[0090] Step S403, obtaining the accuracy of the preliminary support vector machine according to the output results of each verification sample in the preliminary support vector machine.
[0091] In order to more clearly illustrate the above-mentioned method of selecting the image feature extraction model and the training process of the support vector machine model, a screenshot of the main interface of a business application is used as the scene graph to be identified, and a screenshot of each UI object area in the main interface is used as the target graph.
[0092] First, the method for selecting the image feature extraction model is as follows:
[0093] Step S501, obtaining a screenshot of the main interface of the business application and a screenshot of the UI object area that needs to be feature extracted.
[0094] Step S502: determine the size information, the number of feature points and the color information of the UI object area screenshot, and use them as the first attribute information of the UI object area screenshot.
[0095] Step S503, input the first attribute information of the main interface screenshot and the UI object area screenshot into a support vector machine model, wherein the kernel function in the support vector machine model is classified according to the attribute information, and the optional image feature extraction models in the support vector machine model include a SIFT matching model and a contour matching model; the SIFT matching model is output as the final image feature extraction model for extracting the feature information of the UI object area screenshot.
[0096] Then, the training process of the support vector machine model used in step S503 of the above-mentioned method for selecting a model for image feature extraction is specifically as follows:
[0097] Step S601, obtain M main interface screenshots of application business programs as a sample scene graph set, each main interface screenshot contains N UI object area screenshots as a sample target graph set, that is, the sample scene graph set contains M sample scene graphs, each sample scene graph and N sample target Figure 1 One match.
[0098] Step S602, obtaining the size information, number of feature points, color information and coordinate information of each sample target image, and recording them as the second attribute information of the sample target image.
[0099] Step S603: record the combination of the second attribute information of each sample scene graph and the sample target graph that matches the sample scene graph as a first training sample. In this example, there are a total of M*N first training samples.
[0100] Step S604: input each first training sample into the SIFT matching model and the contour matching model respectively to obtain first coordinate information and second coordinate information of the sample target image corresponding to the training sample.
[0101] Step S605, if the difference between the first coordinate information and the coordinate information is smaller than the difference between the second coordinate information and the coordinate information, it means that the SIFT matching algorithm is better at extracting the features of the coordinate information of the sample target image, and the label of the sample target image is set to 1; if the difference between the first coordinate information and the coordinate information is larger than the difference between the second coordinate information and the coordinate information, it means that the contour matching algorithm is better at extracting the coordinate information of the sample target image, and the label of the sample target image is set to -1.
[0102] Step S606: Combine each training sample with the label of the corresponding sample target graph to obtain a second training sample, and the second training sample also has M*N pieces.
[0103] Step S607: record the M*N second training samples as a sample set, and randomly divide the sample set into 5 sub-sample sets.
[0104] Step S608, any one of the subsample sets is recorded as a training validation set, and the other subsample sets are recorded as training sample sets; it can be understood that the training validation set contains (M*N) / 5 second training samples, and the training sample set contains (M*N*4) / 5 second training samples.
[0105] Step S609: input the training sample set into a support vector machine model using a Gaussian kernel function, adjust the regularization parameter and bandwidth of the Gaussian kernel function, and obtain a preliminary support vector machine model.
[0106] Step S610, input the training verification set into the preliminary support vector machine model to obtain the final image feature extraction model selected for extracting the feature information of the sample target image in the training verification set. If the final image feature extraction model is consistent with the feature extraction model indicated by the label in the training verification sample, the output result of the preliminary support vector machine model is correct (for example, the final draft image feature extraction model is a SIFT matching model, and the label of the training verification sample is 1, indicating a SIFT matching model, then the two are consistent, and the output result of the preliminary support vector machine is correct). The training accuracy is obtained according to the accuracy of the output result of the training verification set in the preliminary support vector machine model; the above 5 sub-sample sets are used as training verification sets in turn, and the other sub-sample sets are used as training sample sets. The support vector machine model is repeatedly trained with different combinations of training verification sets and training sample sets to obtain 5 preliminary support vector machine models and corresponding training accuracy;
[0107] Step S611, comparing the training accuracies of the five preliminary support vector machine models, and selecting the preliminary support vector machine model with the highest training accuracy as the trained support vector machine model.
[0108] It should be understood that although the present embodiment uses the need to extract the coordinate information of the target image in the scene graph as an example for explanation, it does not mean that the image feature extraction model in the present embodiment can only extract the coordinate information of the target image. The image feature extraction model can also extract other feature information of the target image in the scene graph, such as the color, grayscale value, contour, etc. of the target image.
[0109] It should be understood that although the Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 1At least part of the steps may include multiple sub-steps or sub-stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0110] The above embodiments of the present invention describe in detail the image feature extraction model selection method. The above methods disclosed in the present invention can be implemented by various devices. Therefore, the present invention also discloses an image feature extraction model selection device corresponding to the above method. Figure 2 , specific embodiments are given below to explain in detail.
[0111] The image information acquisition module 701 is used to acquire a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified;
[0112] A target attribute determination module 702, used to determine first attribute information of the target graph;
[0113] The feature extraction model selection module 703 is used to input the first attribute information of the scene graph and the target graph into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
[0114] For the image feature extraction model selection device, please refer to the above definition of the method, which will not be repeated here. Each module in the above device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor of the terminal device in the form of hardware, or stored in the memory of the terminal device in the form of software, so that the processor calls and executes the operations corresponding to the above modules.
[0115] In one embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned image feature extraction model selection method are implemented.
[0116] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM (erasable programmable read-only memory), a hard disk or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has a storage space for program codes for executing any method step of the above method. These program codes may be read from or written into one or more computer program products, and the program codes may be compressed in an appropriate form.
[0117] In one embodiment, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the above-mentioned image feature extraction model selection method when executing the computer program.
[0118] The computer device includes a memory, a processor, and one or more computer programs, wherein the one or more computer programs can be stored in the memory and configured to be executed by one or more processors, and the one or more application programs are configured to execute the above-mentioned image feature extraction model selection method.
[0119] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire computer device, and executes various functions of the computer device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a reporting verifier (Graphics Processing Unit, GPU) for buried data, and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but may be implemented separately through a communication chip.
[0120] The memory may include a random access memory (RAM) or a read-only memory (ROM). The memory may be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the terminal device during use, etc.
[0121] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for selecting a picture feature extraction model, characterized in that: include: Obtaining a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified; Determining first attribute information of the target graph; The first attribute information of the scene graph and the target graph is input into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
2. The method for selecting a picture feature extraction model according to claim 1, wherein: The first attribute information includes size information, number of feature points and color information of the target image.
3. The method for selecting a picture feature extraction model according to claim 1, wherein: The training method of the support vector machine model comprises the following steps: Step S201, obtaining a sample scene graph set and a sample target graph set, wherein the sample scene graph set includes at least one sample scene graph, the sample target graph set includes at least one sample target graph, and the sample scene graph includes at least one sample target graph; Step S202, marking the sample scene graph set and the sample object graph set to obtain a sample set, and dividing the sample set into at least two sub-sample sets according to a preset ratio; Step S203, selecting any sub-sample set as a training verification set, and the other sub-sample sets as training sample sets; Step S204, inputting the training sample set into the support vector machine model to be trained to adjust the parameters of the kernel function to obtain a preliminary support vector machine model; Step S205, inputting the training verification set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model; Step S206, repeating steps S203-S205 until all sub-sample sets are used as training and verification sets to obtain the accuracy of each preliminary support vector machine model; Step S207, comparing the accuracy of all preliminary support vector machine models, and outputting the preliminary support vector machine model with the highest accuracy as the trained support vector machine model.
4. The method for selecting a picture feature extraction model as claimed in claim 3, characterized in that: The process of labeling the sample scene graph set and the sample target graph set to obtain the sample set includes: Step S301, extracting any sample scene graph from the sample scene graph set, and obtaining second attribute information of all sample target graphs in the sample scene graph; Step S302, combining the sample scene graph and the second attribute information of any sample target graph included in the sample scene graph into a first training sample; Step S303, inputting the first training sample into a first image feature extraction model and a second image feature model respectively to obtain a first recognition result and a second recognition result; Step S304, respectively comparing the first recognition result, the second recognition result and the second attribute information to obtain a label of the sample target image; Step S305, combining the label of the sample target image and the first training sample to obtain a second training sample; Step S306, repeating steps S302-S305 until a second training sample set corresponding to all sample object graphs included in the sample scene graph is obtained; Step S307, repeat steps S301-S306 until a second training sample set corresponding to all sample scene graphs is obtained and recorded as a sample set.
5. The method for selecting a picture feature extraction model according to claim 4, wherein: The second attribute information includes size information, number of feature points, color information and coordinate information of the sample target image.
6. The method for selecting a picture feature extraction model according to claim 5, wherein: The step of inputting the first training sample into the first image feature extraction model and the second image feature model to obtain the first recognition result and the second recognition result comprises: Inputting the first training sample into a first image feature extraction model to obtain first coordinates of a sample target image in the first training sample; The first training sample is input into a second image feature extraction model to obtain a second coordinate of a sample target image in the first training sample.
7. The method for selecting a picture feature extraction model according to claim 6, wherein: The step of comparing the first recognition result, the second recognition result and the second attribute information to obtain a label of the sample target image comprises: Compare the first coordinate and the second coordinate with the coordinate information of the second attribute information respectively; If the difference between the first coordinate and the coordinate information is smaller than the difference between the second coordinate and the coordinate information, setting the label of the sample target image to the first label; If the difference between the first coordinate and the coordinate information is greater than the difference between the second coordinate and the coordinate information, the label of the sample target image is set to the second label.
8. The method for selecting a picture feature extraction model according to claim 3, wherein: The step of inputting the training validation set into the preliminary support vector machine model to obtain the accuracy of the preliminary support vector machine model comprises: Input each verification sample in the training verification set into a preliminary support vector machine model to obtain a final image feature extraction model for extracting feature information of a sample target image in the verification sample; Compare the final image feature extraction model obtained from each verification sample with the label of the sample target image in the verification sample. If the final image feature extraction model is consistent with the feature extraction model indicated by the label, the output result of the preliminary support vector machine model is correct. The accuracy of the preliminary support vector machine is obtained according to the output results of each verification sample in the preliminary support vector machine.
9. A device for selecting a picture feature extraction model, characterized in that: include: An image information acquisition module, used to acquire a scene graph to be identified and a target graph, wherein the target graph is a subset of the scene graph to be identified; A target attribute determination module, used to determine first attribute information of the target graph; The feature extraction model selection module is used to input the first attribute information of the scene graph and the target graph into a support vector machine model to obtain a final image feature extraction model for extracting feature information of the target graph.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for selecting an image feature extraction model according to any one of claims 1 to 8 are implemented.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, it performs the method for selecting an image feature extraction model according to any one of claims 1 to 8.