Image Data Classification Method, Device, Computer Equipment and Storage Medium
The image feature information is processed through feature recognition and weighted models, and the problem of inaccurate image recognition in the prior art is solved, accurate and objective recognition of image types is achieved, and the risk of misdiagnosis is reduced.
Patent Information
- Application Number
- CN201910843937.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-06
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2039-09-06
AI Technical Summary
In the prior art, the image recognition method based on subjective factors cannot accurately identify the information in a specific picture, resulting in a high probability of misdiagnosis of skin diseases and the inability to obtain the picture type conveniently, effectively, objectively and accurately.
The feature recognition model and feature weighting model extract and empower image feature information, and use the association mapping table to find the alignment weighted fields with similar values higher than the threshold to determine the image type.
It improves the accuracy and objectivity of image recognition, can easily and effectively obtain the type of image, and reduces the probability of misdiagnosis.
Smart Images

Figure CN110751171B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to an image data classification method, apparatus, computer device, and storage medium. Background Art
[0002] With the rapid development of computer technology, artificial intelligence technology and image processing technology are also developing rapidly. People come into contact with various pictures every day, and these pictures contain various types of information. For example, some patients may suffer from certain skin diseases. When the skin disease is not serious, the patient may take a photo and send it to the doctor's terminal for consultation with an online doctor or the like. Or when a doctor examines a patient, after taking a photo of the patient's skin, the doctor directly makes a preliminary diagnosis of the corresponding skin disease. The same skin disease may show different skin damage manifestations at different stages, and doctors can only make a diagnosis based on experience, which may lead to a relatively high probability of misdiagnosis.
[0003] This way of relying solely on subjective factors for recognition cannot accurately identify various types of information in a specific picture, nor can it clearly know what meaning this type of information represents. Therefore, when a user wants to determine the picture category corresponding to a picture based on the information in the picture, it often results in inaccurate results, etc., and it is impossible to conveniently, effectively, objectively, and accurately obtain the type to which a specific picture belongs. Therefore, how to effectively improve the recognition accuracy of specific pictures has become a technical problem that needs to be solved currently. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide an image data classification method, apparatus, computer device, and storage medium that can accurately and effectively identify the target type of a picture to be measured.
[0005] An image data classification method, the method includes:
[0006] Obtain a target picture to be measured sent by a terminal;
[0007] Input the target picture to be measured into a trained feature recognition model, identify the feature field of the target picture to be measured, and output a target feature field corresponding to the target picture to be measured;
[0008] Input the target feature field into a trained feature weighting model, and output a target weighted field corresponding to the target feature field;
[0009] Obtain a preset association mapping table, and search in the association mapping table for a comparison weighted field whose similarity value with the target weighted field is higher than a preset threshold;
[0010] Obtain a first candidate picture type corresponding to the comparison weighted field;
[0011] Determine the target type of the target to-be-tested image according to the first candidate image type.
[0012] In one embodiment, before looking up in the association mapping table for a comparison weighted field whose similarity value with the target weighted field is higher than a preset threshold, the method further includes: obtaining a plurality of comparison sample images corresponding to the comparison image type; the comparison image type is at least one; inputting the plurality of comparison sample images into a trained feature recognition model, and outputting comparison feature fields corresponding to the comparison sample images; inputting the comparison feature fields into a trained feature weighting model, and outputting comparison weighted fields corresponding to the comparison feature fields; associating and storing the comparison weighted fields with the comparison image type to generate an association mapping table.
[0013] In one embodiment, the step of identifying the feature field of the target to-be-tested image includes: extracting multi-dimensional feature information in the target to-be-tested image through the feature recognition model; matching the multi-dimensional feature information with a feature library in the feature recognition model, and calculating the matching degree between the multi-dimensional feature information and multiple feature fields in the feature library; using the feature field whose matching degree meets the preset threshold as the target feature field corresponding to the target to-be-tested image.
[0014] In one embodiment, inputting the target feature field into a trained feature weighting model and outputting a target weighted field corresponding to the target feature field includes: obtaining a preset weighting algorithm corresponding to each target feature field in the feature weighting model; performing weighting processing on each target feature field according to the preset weighting algorithm to obtain a target weighted field corresponding to the target feature field.
[0015] In one embodiment, the method further includes: obtaining target to-be-tested information; the target to-be-tested information includes a comparison image type; obtaining comparison sample information corresponding to the comparison image type; the comparison image type includes at least one; inputting the target to-be-tested information and the comparison sample information into a trained text recognition model, and outputting comparison sample information whose text similarity is higher than a preset threshold; determining a second candidate image type corresponding to the comparison sample information; if the image types of the first candidate image type and the second candidate image type are the same, using the first candidate image type as the target type of the target to-be-tested image; if the image types of the first candidate image type and the second candidate image type are different, sending the first candidate image type and the second candidate image type to the terminal, so that the terminal determines the target type of the target to-be-tested image according to the first candidate image type and the second candidate image type.
[0016] An image data classification device, the device includes:
[0017] An image acquisition module, configured to acquire a target image to be measured sent by a terminal;
[0018] A feature recognition module, configured to input the target image to be measured into a trained feature recognition model, recognize the feature fields of the target image to be measured, and output a target feature field corresponding to the target image to be measured;
[0019] A feature weighting module, configured to input the target feature field into a trained feature weighting model, and output a target weighted field corresponding to the target feature field;
[0020] An image classification module, configured to obtain a preset association mapping table, search for a comparison weighted field in the association mapping table whose similarity value with the target weighted field is higher than a preset threshold; obtain a first candidate image type corresponding to the comparison weighted field; and determine the target type of the target image to be measured according to the first candidate image type.
[0021] In one embodiment, the feature recognition module is further configured to extract multi-dimensional feature information from the target image to be measured through the feature recognition model; match the multi-dimensional feature information with a feature library in the feature recognition model, and calculate the matching degree between the multi-dimensional feature information and multiple feature fields in the feature library; and use the feature field whose matching degree meets the preset threshold as the target feature field corresponding to the target image to be measured.
[0022] In one embodiment, the device further includes a to-be-measured information classification module, configured to obtain target to-be-measured information; the target to-be-measured information includes a comparison image type; obtain comparison sample information corresponding to the comparison image type; the comparison image type includes at least one; input the target to-be-measured information and the comparison sample information into a trained text recognition model, and output comparison sample information whose text similarity is higher than a preset threshold; determine a second candidate image type corresponding to the comparison sample information; the image classification module is further configured to, if the image types of the first candidate image type and the second candidate image type are the same, use the first candidate image type as the target type of the target image to be measured; if the image types of the first candidate image type and the second candidate image type are different, send the first candidate image type and the second candidate image type to the terminal, so that the terminal determines the target type of the target image to be measured according to the first candidate image type and the second candidate image type.
[0023] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the image data classification method provided in any embodiment of the present application are implemented.
[0024] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image data classification method provided in any embodiment of the present application are implemented.
[0025] In the above image data classification method, device, computer device, and storage medium, after the server obtains the target test picture, it inputs the target test picture into the trained feature recognition model, outputs the target feature field corresponding to the target test picture, extracts the feature information in the picture, and compares the feature information with the feature information pre-stored in the server to further determine the type of the target test picture. Then, it inputs the target feature field into the trained feature weighting model, outputs the target weighting field corresponding to the target feature field, and assigns weights to the feature information in each dimension of the picture, which can make the comparison result more objective and accurate. And it searches for the comparison weighting field in the association mapping table whose similarity value to the target weighting field is higher than the preset condition. The server obtains the first candidate picture type corresponding to the comparison weighting field and uses the first candidate picture type as the target type of the target test picture, which can conveniently, effectively, and objectively obtain the type to which the target test picture belongs, thereby effectively improving the classification recognition accuracy of the target test picture. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is an application scenario diagram of the image data classification method in an embodiment;
[0027] Figure 2 It is a flowchart of the image data classification method in an embodiment;
[0028] Figure 3 It is a flowchart of the feature recognition step in an embodiment;
[0029] Figure 4 It is a flowchart of the image data classification method in another embodiment;
[0030] Figure 5 It is a structural block diagram of the image data classification device in an embodiment;
[0031] Figure 6 It is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] In order to make the purpose, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] The image data classification method provided by the present application can be applied to, for exampleFigure 1 In the application environment shown, the terminal 102 communicates with the server 104 via a network. The terminal 102 can upload a target image to the server. After the server 104 obtains the target image, the server inputs the target image into a trained feature recognition model, outputs a target feature field corresponding to the target image, then inputs the target feature field into a trained feature weighting model, outputs a target weighting field corresponding to the target feature field, assigns weights to the feature information of each dimension in the image, and searches for a comparison weighting field in an association mapping table whose similarity value with the target weighting field is higher than a preset condition. The server obtains a first candidate image type corresponding to the comparison weighting field and uses the first candidate image type as the target type of the target image. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, and tablet computers. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0034] In one embodiment, Figure 2 As shown, a method for image data classification is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the server in the example:
[0035] Step 202: Obtain the target image to be tested sent by the terminal.
[0036] The target image to be tested refers to the image whose image type is to be obtained. The terminal can be a user terminal for an individual user or a medical terminal for a healthcare professional. The terminal can also send an image recognition request to the server, which includes the target image to be tested. The server receives the image recognition request from the terminal and obtains the target image to be tested included in the image recognition request.
[0037] Step 204 : Input the target image to be tested into the trained feature recognition model, identify the feature fields of the target image to be tested, and output the target feature fields corresponding to the target image to be tested.
[0038] The feature recognition model is a model used to identify feature information in an image. It is pre-trained and constructed using a large amount of training sample data. The feature recognition model can be a neural network-based model. The target feature field refers to the feature information in the target image to be tested, extracted by the feature recognition model. The target feature field includes field information from multiple dimensions.
[0039] In one embodiment, the target image to be measured can be the image information captured in real time, or the image data pre-stored in the terminal and sent by the terminal to the server. When the target image to be measured is a skin photo captured in real time, the target feature fields corresponding to the target image to be measured include, but are not limited to, field information such as width, texture, height, color, boundary, shape, range, part, content, transparency, skin shape of the interval part, satellite lesions, etc. The server can score the feature information in each dimension according to a preset scoring standard, and then score different skin lesion features.
[0040] In one embodiment, the feature recognition model is a pattern recognition model. A pattern recognition model refers to a model used to obtain feature information in an image. When performing matching recognition or classifier classification recognition in pattern recognition, the basis for judgment is the image feature. Among them, the feature information extracted by the server can represent the content of the entire image, and the target type of the image is matched or classified according to the feature information. For example, the following three feature extraction algorithms can be used to extract features from the target image to be measured: ① Based on color features: such as color histogram, color set, color moment, color aggregation vector, etc.; ② Based on texture features: such as Tamura texture features, autoregressive texture model, Gabor transform, wavelet transform, MPEG7 edge histogram, etc.; ③ Based on shape features: such as Fourier shape descriptor, invariant moment, wavelet contour descriptor, etc.
[0041] Step 206, input the target feature field into the trained feature weighting model, and output the target weighted field corresponding to the target feature field.
[0042] Among them, the feature weighting model refers to a model used to perform weighting processing on each target feature field. The feature weighting model is a model pre-trained and constructed using a large amount of training sample data. Weighting processing means assigning weights to each target feature field, and the forms of weight assignment include, but are not limited to, numerical form, percentage form or probability form. The target weighted field refers to the target feature field carrying weight information. It can be understood that the target feature field is at least one, and the target weighted field is at least one.
[0043] In one embodiment, the objective weighting model may adopt an objective weighting method, which includes but is not limited to the principal component analysis method, the entropy value method, etc. The server determines the reference weights according to the principal component analysis method, mainly including the following steps: (1) First, standardize the data, considering that the dimensions of different data are inconsistent, so dimensionless processing is required. (2) Conduct factor analysis (principal component method) on the standardized data, using variance maximization rotation. (3) Write out the principal factor scores and the equation contribution rates of each principal factor. (4) Calculate the characteristic weights, that is, the reference weights of each network environment reference data. The entropy value method refers to a mathematical method used to judge the dispersion degree of a certain feature. The greater the dispersion degree, the greater the impact of the feature on the comprehensive evaluation. The server can use the entropy value to judge the dispersion degree of a certain feature, further determine the reference weights corresponding to each target feature field according to the dispersion degree, and assign the reference weights to the corresponding target feature fields to obtain the target weighted fields.
[0044] Step 208, obtain the preset association mapping table, and search in the association mapping table for a comparison weighted field whose similarity value with the target weighted field is higher than the preset threshold.
[0045] Among them, the association mapping table refers to a mapping table storing the corresponding relationship between the comparison weighted field and the first candidate picture type. It can be understood that the first candidate picture type is at least one, and the comparison weighted fields corresponding to each first candidate picture type are at least one.
[0046] In one embodiment, when the first candidate picture type is a skin type picture, the comparison weighted fields include but are not limited to width, texture, height, color, boundary, shape, range, part, content, transparency, skin shape of the interval part, satellite foci, etc. The comparison weighted field refers to the feature field information pre-stored in the server's association mapping table, and the first candidate picture type refers to the picture of the existing picture type information pre-stored in the server. Specifically, the server searches in the association mapping table for a comparison weighted field whose similarity value with the target weighted field is higher than the preset condition, and the preset condition can be custom-set.
[0047] For example, when the target weighted fields are width 5 points, texture 5 points, height 3 points, and color 2 points, the server will compare each target weighted field with the comparison weighted fields corresponding to the candidate pictures of the same type one by one. Only when each comparison weighted field corresponding to the candidate pictures of the same type reaches the preset similarity condition with each target weighted field, the server obtains the first candidate picture type corresponding to this group of comparison weighted fields.
[0048] Step 210, obtain the first candidate picture type corresponding to the comparison weighted field.
[0049] Step 212: Determine the target type of the target to-be-tested picture according to the first candidate picture type.
[0050] After the server finds a comparison weighted field with a similarity value higher than a preset threshold for the target weighted field in the association mapping table, it obtains the first candidate picture type corresponding to this group of comparison weighted fields, and determines the target type of the target to-be-tested picture according to the first candidate picture type.
[0051] Among them, the server uses the first candidate picture type as the type of the target to-be-tested picture. That is, by comparing each target weighted field with the comparison weighted fields corresponding to the candidate pictures of the same type one by one, a comparison weighted field with a similarity value higher than the preset condition is obtained, and the first candidate picture type corresponding to this group of comparison weighted fields is determined as the target type of the target to-be-tested picture. By extracting the feature information in the target to-be-tested picture and comparing the feature information with the feature information pre-stored in the server, the type of the target to-be-tested picture is further determined, and after weighting the feature information in each dimension of the picture, a comparison weighted field with a similarity value higher than the preset condition for the target weighted field is searched in the association mapping table, so that the type of the target to-be-tested picture can be accurately and effectively identified.
[0052] In the above image data classification method, after the server obtains the target to-be-tested picture, it inputs the target to-be-tested picture into the trained feature recognition model, outputs the target feature field corresponding to the target to-be-tested picture, further determines the type of the target to-be-tested picture by extracting the feature information in the picture and comparing the feature information with the feature information pre-stored in the server, then inputs the target feature field into the trained feature weighting model, outputs the target weighted field corresponding to the target feature field, weights the feature information in each dimension of the picture, which can make the comparison result more objective and accurate, and searches in the association mapping table for a comparison weighted field with a similarity value higher than the preset condition for the target weighted field. The server obtains the first candidate picture type corresponding to the comparison weighted field and uses the first candidate picture type as the target type of the target to-be-tested picture, which can conveniently, effectively and objectively obtain the type to which the target to-be-tested picture belongs, thereby effectively improving the classification recognition accuracy of the target to-be-tested picture.
[0053] In one embodiment, as Figure 3 shown, before searching in the association mapping table for a comparison weighted field with a similarity value higher than a preset threshold for the target weighted field, it further includes the step of generating the association mapping table, and this step specifically includes the following content:
[0054] Step 302: Obtain multiple comparison sample pictures corresponding to the comparison picture type; the comparison picture type is at least one.
[0055] Step 304: Input a plurality of comparison sample images into the trained feature recognition model, and output comparison feature fields corresponding to the comparison sample images.
[0056] Step 306: Input the comparison feature field into the trained feature weighting model, and output the comparison weighting field corresponding to the comparison feature field.
[0057] Step 308: Associate the comparison weight field with the comparison picture type and store them to generate an association mapping table.
[0058] Among them, the comparison sample picture refers to the picture information corresponding to each comparison picture type pre-stored in the server. It can be understood that there is at least one comparison picture type and at least one comparison sample picture corresponding to the comparison picture type.
[0059] The server inputs the comparison sample image into a trained feature recognition model to extract feature information from the comparison sample image and outputs a comparison feature field corresponding to the comparison sample image. The server further inputs the comparison feature field into a trained feature weighting model to assign weights to each feature information and outputs a comparison weight field corresponding to the comparison feature field. The server associates and stores the comparison weight field with the comparison image type, generating an association mapping table.
[0060] Specifically, each comparison image type corresponds to multiple comparison weighted fields. When the server associates and stores the comparison weighted fields with the comparison image types, it groups the comparison weighted fields corresponding to the same comparison sample image, and stores each group of comparison weighted fields in a one-to-one correspondence with the comparison image type, generating an association mapping table. This effectively establishes the association mapping table. By generating the association mapping table, the server can conveniently search for comparison weighted fields whose similarity values with the target weighted fields exceed a preset condition during use, and use the first candidate image type corresponding to the comparison weighted field as the type of the target image to be tested, thereby accurately and effectively identifying the type of the target image to be tested.
[0061] In one embodiment, the step of identifying the feature fields of the target image to be tested includes: extracting multidimensional feature information from the target image to be tested through a feature recognition model; matching the multidimensional feature information with a feature library in the feature recognition model, and calculating the matching degree between the multidimensional feature information and multiple feature fields in the feature library; and using the feature field whose matching degree meets a preset threshold as the target feature field corresponding to the target image to be tested.
[0062] After the server obtains the target image to be tested, it inputs the target image to the trained feature recognition model. The feature recognition model first extracts features from the target image to extract the feature information in the target image to be tested.
[0063] Specifically, the server uses a feature recognition model to extract features from a target image to be measured according to a plurality of preset feature dimensions. The feature dimensions include dimension information such as width, texture, height, color, boundary, shape, range, part, content, transparency, skin shape of the interval part, satellite focus, etc. The server then extracts multi-dimensional feature information from the target image to be measured through the feature recognition model, matches and identifies the multi-dimensional feature information with the feature library in the feature recognition model, calculates the matching degree between the multi-dimensional feature information and multiple feature fields in the feature library, obtains the feature fields whose matching degree meets the preset threshold, and uses the feature fields that meet the preset threshold as the target feature fields corresponding to the target image to be measured, so as to accurately and effectively extract the multi-dimensional target feature fields in the target image to be measured.
[0064] For example, the target image to be measured can be a skin image to be measured corresponding to a skin damage type, and the server can identify and process the skin image to be measured to identify the skin damage degree type of the skin image to be measured. Specifically, the server can use the feature recognition model to extract features from skin images to be measured for different diseases, and extract feature dimension fields in multiple dimensions. The feature dimensions can include width, texture, height, color, boundary, shape, range, part, content, transparency, skin shape of the interval part, satellite focus, etc. The server can pre-configure the scoring criteria corresponding to each feature dimension and score different skin damages. By analyzing the skin damages of different diseases in the skin image to be measured, a feature database of various skin damage images is established, and using the big data model and the data governance and optimization model, each feature score range is processed and analyzed. For example, each feature score can be normalized to 0-1. Compare the score ranges of the same feature for different diseases. The greater the difference in the score ranges, the higher the specificity of this feature for this disease, which means that this skin damage feature is the main distinguishing feature in this disease, and relevant marks are given, which are used as the identification features of skin damage diseases.
[0065] In one embodiment, inputting the target feature field into a trained feature weighting model to output a target weighted field corresponding to the target feature field includes: obtaining a preset weighting algorithm corresponding to each target feature field in the feature weighting model; performing weighting processing on each target feature field according to the preset weighting algorithm to obtain a target weighted field corresponding to the target feature field.
[0066] After the server obtains the target image to be tested, it inputs the target image to be tested into the trained feature recognition model. The feature recognition model first extracts features from the target image to be tested and extracts the feature information in the target image to be tested. Specifically, the server extracts features from the target image to be tested according to a preset number of feature dimensions through the feature recognition model, matches the multi-dimensional feature information with the feature library in the feature recognition model, and calculates the matching degree between the multi-dimensional feature information and multiple feature fields in the feature library; the feature fields with the matching degree meeting the preset threshold are used as the target feature fields corresponding to the target image to be tested.
[0067] After the server identifies the target feature fields corresponding to the target image to be tested through the feature recognition model, it further inputs the target feature fields into the trained feature weighting model. The server performs weighting processing on each target feature field according to the preset weighting algorithm in the feature weighting model, obtains the target weighted fields corresponding to the target fields, and outputs the target weighted fields corresponding to the target feature fields through the feature weighting model.
[0068] Among them, the preset weighting algorithm refers to the rule algorithm used for weighting each target feature. The preset weighting algorithm includes, but is not limited to, that the objective weighting model can adopt the objective weighting method, and the objective weighting method includes, but is not limited to, the principal component analysis method and the entropy value method, etc. The preset weighting algorithm is used for the server to perform weighting processing on each target feature field according to the preset weighting algorithm and obtain the target weighted fields corresponding to the target feature fields. By performing weighting processing on the extracted target feature fields through the feature weighting model, the target weighted fields corresponding to the target image to be tested can be effectively obtained, so as to further accurately and effectively identify the target type corresponding to the target image to be tested.
[0069] In one embodiment, as Figure 4 shown, a method for classifying image data is provided. Taking the method applied to the Figure 1 server as an example for illustration, it specifically includes the following steps:
[0070] Step 402, obtain the target information to be tested; the target information to be tested includes the comparison picture type.
[0071] Step 404, obtain the comparison sample information corresponding to the comparison picture type; the comparison picture type includes at least one.
[0072] Step 406, input the target information to be tested and the comparison sample information into the trained text recognition model, and output the comparison sample information with the text similarity higher than the preset threshold.
[0073] Step 408, determine the second candidate picture type corresponding to the comparison sample information.
[0074] Step 410, if the image types of the first candidate image type and the second candidate image type are the same, use the first candidate image type as the target type of the target image to be measured.
[0075] Step 412, if the image types of the first candidate image type and the second candidate image type are different, send the first candidate image type and the second candidate image type to the terminal so that the terminal determines the target type of the target image to be measured according to the first candidate image type and the second candidate image type.
[0076] Among them, the target information to be measured can refer to the text information input for the target image type. The terminal can synchronously send the target information to be measured to the server when sending the target image to be measured. The comparison sample information refers to the text information pre-stored in the server for the corresponding comparison image type. The text similarity model refers to a pre-trained model for comparing the similarity between texts.
[0077] In one embodiment, the text similarity model can compare the text similarity based on the word frequency method. When using the word frequency method, it is generally used for texts with larger granularity such as sentence paragraphs. Here, the granularity can represent the degree of data refinement and integration. The server first performs word segmentation on the text and removes some unimportant stop words at the same time; then counts the number of occurrences of the already segmented words and extracts an appropriate number of high-frequency words; constructs a text vector through the high-frequency words; and finally obtains the similarity between the two texts through the cosine similarity algorithm.
[0078] In one embodiment, the text similarity model can use at least one algorithm to compare the similarity between the target information to be measured and the comparison sample information. Among them, the algorithms include but are not limited to Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, standardized Euclidean distance, Mahalanobis distance, cosine of the included angle, Hamming distance, Jaccard distance & Jaccard similarity coefficient, correlation coefficient & correlation distance, and information entropy, etc. The second candidate image type refers to the image type corresponding to the comparison sample information when the text similarity is higher than the preset condition. It can be understood that the server can pre-associate and store each comparison sample information with the candidate image type.
[0079] In one embodiment, the comparison sample information and the target information to be measured are mainly the feature information that cannot be obtained from the picture, such as the onset time, accompanying symptoms, etc. A small part of the feature information that can be obtained from the picture can also be extracted to optimize the feature information obtained from the picture. Score different features, establish a non-picture feature database for various skin lesions, and also process the score range of each feature (normalized to 0-1);
[0080] Specifically, while obtaining the target test picture sent by the terminal, the server can also obtain the target test information sent by the terminal, where the target test information includes the comparison picture type. After obtaining the target test picture, the server inputs the target test picture into the trained feature recognition model, outputs the target feature field corresponding to the target test picture, extracts the feature information in the picture, and compares the feature information with the feature information pre-stored in the server to further determine the type of the target test picture. Then, the target feature field is input into the trained feature weighting model, and the target weighting field corresponding to the target feature field is output, so as to weight the feature information in each dimension of the picture, making the comparison result more objective and accurate. Then, the server searches in the association mapping table for the comparison weighting field whose similarity value with the target weighting field is higher than the preset condition, and obtains the first candidate picture type corresponding to the comparison weighting field.
[0081] Meanwhile, the server can also identify the target test information. Specifically, the server inputs the target test information and the comparison sample information into the trained text similarity model, outputs the comparison sample information whose text similarity is higher than the preset condition, and determines the second candidate picture type corresponding to the comparison sample information. When the picture types of the first candidate picture type and the second candidate picture type are the same, it means that the conclusions obtained by using the feature information extraction and weighting comparison of the picture and the text information comparison are the same. Therefore, the first candidate picture type is used as the target type of the target test picture.
[0082] When the picture types of the first candidate picture type and the second candidate picture type are different, the first candidate picture type and the second candidate picture type are sent to the doctor terminal, so that the doctor terminal can determine the target type of the target test picture according to the first candidate picture type and the second candidate picture type, making the finally determined type of the target test picture more accurate, and thus effectively improving the classification recognition accuracy of the target test picture.
[0083] In one embodiment, when the target test picture is a test skin picture corresponding to the skin damage type, the dermatologist takes the test skin picture through the corresponding terminal according to the imaging requirements. The test skin picture can be multiple, for example, 1 to 3 pictures can be taken. It can include: a local skin picture, which can be a picture of a single skin damage and a certain range of surrounding skin within a set frame, and the local skin picture is a necessary test skin picture; an overall picture, which can be an overall picture of the skin damage corresponding to the occurrence site or occurrence range; it can also include a test skin picture containing other specific information.
[0084] The terminal can also input the information to be measured with non-picture features according to the prompt option information, where the non-picture features can be text information. The terminal can upload the captured skin picture to be measured and the information to be measured to the server at the same time. The server then automatically captures the effective features in the picture using the picture recognition model and identifies the picture type of the skin picture to be measured. The server also uses the text recognition model to extract and classify the text features of the information to be measured to obtain the corresponding text type. By combining the picture type and the text type, all skin damage types matching the relevant features can be quickly and accurately identified, sorted according to the matching similarity, and the skin damage types with the matching degree meeting the threshold conditions can be obtained. For example, the skin damage types with the top three matching degree values can be obtained and sent to the terminal corresponding to the dermatologist. The terminal corresponding to the dermatologist can further determine the final skin damage type according to the recognition result, so as to accurately and effectively identify the target type of the skin picture to be measured.
[0085] Furthermore, a disease-drug library that correlates all skin diseases with common drugs is also pre-stored in the server. When the terminal corresponding to the dermatologist determines the final skin damage type, the corresponding drug data can be further obtained from the disease-drug library according to the skin damage type, so that the drug data corresponding to the skin damage type can be effectively obtained.
[0086] It should be understood that although Figures 2 - 4 the steps in the flowchart of Figures 2 - 4 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear statement in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0087] In one embodiment, as Figure 5 shown, an image data classification device is provided, including: a picture acquisition module 502, a feature recognition module 504, a feature weighting module 506, and a picture classification module 508, where:
[0088] The picture acquisition module 502 is used to acquire the target picture to be measured sent by the terminal;
[0089] The feature recognition module 504 is used to input the target picture to be measured into the trained feature recognition model, identify the feature fields of the target picture to be measured, and output the target feature fields corresponding to the target picture to be measured;
[0090] A feature weighting module 506, configured to input a target feature field into a trained feature weighting model, and output a target weighted field corresponding to the target feature field;
[0091] An image classification module 508, configured to obtain a preset association mapping table, search in the association mapping table for a comparison weighted field whose similarity value with the target weighted field is higher than a preset threshold; obtain a first candidate image type corresponding to the comparison weighted field; and determine a target type of the target to-be-tested image according to the first candidate image type.
[0092] In one embodiment, the apparatus further includes an association mapping table construction module, configured to obtain a plurality of comparison sample images corresponding to a comparison image type; the comparison image type is at least one; input the plurality of comparison sample images into a trained feature recognition model, and output comparison feature fields corresponding to the comparison sample images; input the comparison feature fields into the trained feature weighting model, and output comparison weighted fields corresponding to the comparison feature fields; and associate and store the comparison weighted fields with the comparison image type to generate an association mapping table.
[0093] In one embodiment, the feature recognition module 504 is further configured to extract multi-dimensional feature information in the target to-be-tested image through the feature recognition model; match the multi-dimensional feature information with a feature library in the feature recognition model, and calculate a matching degree between the multi-dimensional feature information and a plurality of feature fields in the feature library; and use the feature fields whose matching degree meets the preset threshold as the target feature fields corresponding to the target to-be-tested image.
[0094] In one embodiment, the feature weighting module 506 is further configured to obtain preset weighting algorithms corresponding to each target feature field in the feature weighting model; and perform weighting processing on each target feature field according to the preset weighting algorithm to obtain a target weighted field corresponding to the target feature field.
[0095] In one embodiment, the apparatus further includes a to-be-tested information classification module, configured to obtain target to-be-tested information; the target to-be-tested information includes a comparison image type; obtain comparison sample information corresponding to the comparison image type; the comparison image type includes at least one; input the target to-be-tested information and the comparison sample information into a trained text recognition model, and output comparison sample information whose text similarity is higher than a preset threshold; determine a second candidate image type corresponding to the comparison sample information; the image classification module 508 is further configured to, if the image types of the first candidate image type and the second candidate image type are the same, use the first candidate image type as the target type of the target to-be-tested image; and if the image types of the first candidate image type and the second candidate image type are different, send the first candidate image type and the second candidate image type to a terminal, so that the terminal determines the target type of the target to-be-tested image according to the first candidate image type and the second candidate image type.
[0096] For the specific limitations of the image data classification device, reference may be made to the limitations of the image data classification method in the foregoing text, which will not be elaborated herein. Each module in the above image data classification device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0097] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 6 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as target test pictures, association mapping tables, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes the steps of the image data classification method provided in any one of the embodiments of the present application.
[0098] Those skilled in the art can understand that Figure 6 the structure shown in
[0099] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.
[0100] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0101] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0102] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.
Claims
1. A method for classifying image data, the method comprising: Get the target image to be tested sent by the terminal; The target image to be tested includes a skin image to be tested; Inputting the target image to be tested into a trained feature recognition model, and extracting multi-dimensional feature information from the target image to be tested according to multiple feature dimensions through the feature recognition model; the multiple feature dimensions include width, texture, height, color, boundary, shape, range, location, content, transparency, skin shape of the septum, and satellite lesions; Matching the multi-dimensional feature information with the feature library in the feature recognition model, and calculating the matching degree between the multi-dimensional feature information and the plurality of feature fields in the feature library; The feature field whose matching degree meets the preset threshold is used as the target feature field corresponding to the target image to be tested; The target feature field includes field information of the multiple feature dimensions; The target feature field is input into a trained feature weighting model to perform weighting processing on the target feature field using a preset objective weighting algorithm, and a target weighted field corresponding to the target feature field is output; the feature weighting model is a model pre-trained and constructed using training sample data, and the feature weighting model is used to assign weights to each input target feature field, and the target weighted field carries weight information; Obtaining a preset association mapping table, and searching the association mapping table for a comparison weighted field having a similarity value with the target weighted field that is higher than a preset threshold; Obtaining a first candidate picture type corresponding to the comparison weighted field; Determining the target type of the target picture to be tested according to the first candidate picture type; Obtain target information to be tested; the target information to be tested includes text information on the onset time, text information on accompanying symptoms, and comparison image type for the skin image to be tested; Acquire comparison sample information corresponding to the comparison picture type; the comparison picture type includes at least one; Inputting the target information to be tested and the comparison sample information into a trained text recognition model, and outputting comparison sample information whose text similarity is higher than a preset threshold; Determining a second candidate image type corresponding to the comparison sample information; If the first candidate image type is consistent with the second candidate image type, using the first candidate image type as the skin lesion type of the target image to be tested; If the first candidate picture type and the second candidate picture type are inconsistent, sending the first candidate picture type and the second candidate picture type to the terminal, so that the terminal determines the skin lesion type of the target picture to be tested according to the first candidate picture type and the second candidate picture type; According to the skin damage type, corresponding drug data is obtained from the disease drug library.
2. The method according to claim 1, characterized in that Before searching the association mapping table for a comparison weighted field having a similarity value with the target weighted field higher than a preset threshold, the method further includes: Acquire multiple comparison sample images corresponding to the comparison image type; the comparison image type is at least one; Inputting a plurality of comparison sample images into a trained feature recognition model, and outputting comparison feature fields corresponding to the comparison sample images; Inputting the comparison feature field into a trained feature weighting model, and outputting a comparison weighting field corresponding to the comparison feature field; The comparison weight field and the comparison picture type are associated and stored to generate an association mapping table.
3. The method according to claim 1, characterized in that The objective weighting algorithm includes principal component analysis or entropy method.
4. The method according to claim 1, wherein Inputting the target feature field into a trained feature weighting model to perform weighting processing on the target feature field using a preset objective weighting algorithm, and outputting a target weighted field corresponding to the target feature field, including: Obtaining a preset weighting algorithm corresponding to each target feature field in the feature weighting model; Each target feature field is weighted according to a preset weighting algorithm to obtain a target weighted field corresponding to the target feature field.
5. An image data classification device, comprising: The image acquisition module is used to obtain the target image to be tested sent by the terminal; The target image to be tested includes a skin image to be tested; A feature recognition module is configured to input the target image to be tested into a trained feature recognition model, and extract multidimensional feature information from the target image to be tested according to multiple feature dimensions through the feature recognition model; the multiple feature dimensions include width, texture, height, color, boundary, shape, range, location, contents, transparency, skin shape of the interval, and satellite lesions; match the multidimensional feature information with the feature library in the feature recognition model, and calculate the matching degree between the multidimensional feature information and multiple feature fields in the feature library; use the feature field whose matching degree meets a preset threshold as the target feature field corresponding to the target image to be tested; the target feature field includes field information of the multiple feature dimensions; A feature weighting module is configured to input the target feature field into a trained feature weighting model, perform weighting processing on the target feature field using a preset objective weighting algorithm, and output a target weighted field corresponding to the target feature field; the feature weighting model is a model pre-trained and constructed using training sample data, and is configured to assign weights to each input target feature field, wherein the target weighted field carries weight information; The image classification module is configured to obtain a preset association mapping table and search the association mapping table for a comparison weighted field having a similarity value with the target weighted field that is higher than a preset threshold; Obtaining a first candidate picture type corresponding to the comparison weighted field; Determining the target type of the target picture to be tested according to the first candidate picture type; The test information classification module is configured to obtain target test information, wherein the target test information includes text information on the onset time, text information on accompanying symptoms, and a comparison image type for the test skin image; obtain comparison sample information corresponding to the comparison image type; the comparison image type includes at least one; input the target test information and the comparison sample information into a trained text recognition model, and output comparison sample information whose text similarity exceeds a preset threshold; Determining a second candidate image type corresponding to the comparison sample information; If the first candidate image type is consistent with the second candidate image type, using the first candidate image type as the skin lesion type of the target image to be tested; If the first candidate picture type and the second candidate picture type are inconsistent, sending the first candidate picture type and the second candidate picture type to the terminal, so that the terminal determines the skin lesion type of the target picture to be tested according to the first candidate picture type and the second candidate picture type; The device is also used to obtain corresponding drug data from a disease drug library according to the skin damage type.
6. The device according to claim 5, characterized in that The device further comprises: An association mapping table construction module is used to obtain multiple comparison sample images corresponding to the comparison image type; the comparison image type is at least one; the multiple comparison sample images are input into a trained feature recognition model, and the comparison feature fields corresponding to the comparison sample images are output; the comparison feature fields are input into a trained feature weighting model, and the comparison weighting fields corresponding to the comparison feature fields are output; the comparison weighting fields are associated with the comparison image type and stored to generate an association mapping table.
7. The device according to claim 5, characterized in that The objective weighting algorithm includes principal component analysis or entropy method.
8. The device according to claim 5, characterized in that The feature weighting module is further used to obtain a preset weighting algorithm corresponding to each target feature field in the feature weighting model; and perform weighting processing on each target feature field according to the preset weighting algorithm to obtain a target weighted field corresponding to the target feature field.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
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 according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image classification method and device, server, user terminal, and storage medium
CN108304882A
Image classification method and apparatus, and terminal
CN108399409A
Positioning method and device based on image detection, equipment and storage medium
CN110070579A