A method and device for obtaining hyperparameters of an image segmentation model

By using convolutional neural network and grayscale symbiosis matrix model to obtain fusion feature results in the image segmentation model, the problem of complex debugging of image segmentation model parameters is solved, and fast and accurate hyperparameter determination and model training are achieved.

CN114419122BActive Publication Date: 2025-03-28INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011081729.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-12
Publication Date
2025-03-28
Estimated Expiration
2040-10-12

AI Technical Summary

Technical Problem

In the prior art, the parameter debugging of the image segmentation model is too complex, the labor cost is high, and the debugged model is low in reliability.

Method used

By obtaining the sample image with the target identification, input it to the preset convolutional neural network model and the grayscale symbiosis matrix model, the fusion feature results are obtained, which are used to determine the hyperparameters of the image segmentation model and realize model training without manual participation.

Benefits of technology

It realizes the rapid and accurate determination of the hyperparameter values ​​of the image segmentation model, improves the reliability and usage efficiency of the model, and reduces the cost of manual debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419122B_ABST
    Figure CN114419122B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for obtaining hyperparameters of an image segmentation model, wherein the method comprises: obtaining a sample image with a target identifier; inputting the sample image into a preset convolutional neural network model to obtain a first feature result; processing the sample image with a grayscale co-occurrence matrix to obtain a second feature result; obtaining a fused feature result based on the first feature result, the second feature result and a preset fully connected neural network model; inputting the fused feature result and the sample image into an image segmentation model to obtain a first segmented image; using the feature values ​​contained in the fused feature result as hyperparameters of the image segmentation model; and obtaining target hyperparameters based on the first segmented image and the target identifier. The present invention can realize rapid and accurate determination of the number of hyperparameters and parameter values ​​of the image segmentation model, and the determination process is completed through model training without manual participation, thereby improving the reliability of the image segmentation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and device for obtaining hyperparameters of an image segmentation model. Background Art

[0002] With the rapid development of deep learning in machine vision technology in recent years, it has become a major trend to combine deep learning with existing digital image processing technology and apply it to various industries to further improve model performance.

[0003] Taking the segmentation of navel orange surface defects as an example, it is usually necessary to classify the navel oranges based on the defect type and proportion segmented from the surface and exclude interference from the pedicle and navel on the surface. However, the image segmentation model that currently implements this process requires manual debugging of hundreds of parameters before it can perform defect segmentation on navel orange images. For inexperienced personnel, the debugging process takes a lot of time and effort, which greatly hinders the rapid promotion and application threshold of the model; moreover, it is not user-friendly for ordinary users, and requires professionals to come to the site to debug the model parameters.

[0004] It can be seen that the existing technology has the problems that the parameter debugging of the image segmentation model is too complicated, the labor cost is high, and the reliability of the debugged model is low. Summary of the invention

[0005] In view of the above problems, the present invention proposes a method and device for obtaining hyperparameters of an image segmentation model, which can quickly and accurately determine the hyperparameter values ​​of the image segmentation model. The determination process is completed through model training without human participation, thereby improving the reliability of the image segmentation model.

[0006] In the first aspect, the present application provides the following technical solution through an embodiment:

[0007] A method for obtaining hyperparameters of an image segmentation model, comprising:

[0008] Acquire a sample image with a target identification; input the sample image into a preset convolutional neural network model to obtain a first feature result; process the sample image using a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result; obtain a fused feature result based on the first feature result, the second feature result and a preset fully connected neural network model; input the fused feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fused feature result is used as a hyperparameter of the image segmentation model; obtain a target hyperparameter based on the first segmented image and the target identification.

[0009] Optionally, the processing the sample image with a gray level co-occurrence matrix to obtain a second feature result includes:

[0010] The sample image is subjected to grayscale processing and Gaussian blur filtering processing to obtain a grayscale image and a filter image; a mask image is obtained based on the filter image and the grayscale image; a distinguishing feature image is obtained based on the mask image and the sample image; a grayscale co-occurrence matrix is ​​obtained based on the non-zero pixels in the distinguishing feature image; a second feature result is obtained based on the statistics of the grayscale co-occurrence matrix; wherein one element in the second feature result corresponds to one statistic.

[0011] Optionally, the statistics include any one or more of the following:

[0012] Angular second moment energy, entropy, contrast, homogeneity, inverse difference matrix, mean, variance, standard deviation, dissimilarity, and correlation.

[0013] Optionally, obtaining a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model includes:

[0014] The first feature result and the second feature result are concatenated to obtain a third feature result; and the third feature result is input into the fully connected neural network model to obtain the fused feature result.

[0015] Optionally, obtaining a target hyperparameter according to the first segmented image and the target identifier includes:

[0016] According to the first segmented image and the target identifier, determine whether the preset loss function meets the loss threshold; if so, obtain the target hyperparameters; if not, feedback adjust the parameters of the convolutional neural network model and the parameters of the fully connected neural network model; obtain the second segmented image according to the sample image, the adjusted convolutional neural network model and the adjusted fully connected neural network model, until the loss function meets the loss threshold or reaches the preset number of feedback adjustments, and obtain the target hyperparameters.

[0017] Optionally, the convolutional neural network model is a DenseNet network model.

[0018] In the second aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:

[0019] A device for obtaining hyperparameters of an image segmentation model, comprising:

[0020] An acquisition module is used to acquire a sample image with a target identification; a feature extraction module is used to input the sample image into a preset convolutional neural network model to obtain a first feature result; the sample image is processed by a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result; a feature fusion module is used to obtain a fused feature result based on the first feature result, the second feature result and a preset fully connected neural network model; an image segmentation module is used to input the fused feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fused feature result is used as a hyperparameter of the image segmentation model; a hyperparameter acquisition module is used to obtain a target hyperparameter based on the first segmented image and the target identification.

[0021] Optionally, the feature extraction module is specifically used to:

[0022] The sample image is subjected to grayscale processing and Gaussian blur filtering processing to obtain a grayscale image and a filter image; a mask image is obtained based on the filter image and the grayscale image; a distinguishing feature image is obtained based on the mask image and the sample image; a grayscale co-occurrence matrix is ​​obtained based on the non-zero pixels in the distinguishing feature image; a second feature result is obtained based on the statistics of the grayscale co-occurrence matrix; wherein one element in the second feature result corresponds to one statistic.

[0023] Optionally, the feature fusion module is specifically used to:

[0024] The first feature result and the second feature result are concatenated to obtain a third feature result; and the third feature result is input into the fully connected neural network model to obtain the fused feature result.

[0025] In the third aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:

[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.

[0027] A method and device for obtaining hyperparameters of an image segmentation model provided in an embodiment of the present invention obtains a sample image with a target identifier; and inputs the sample image into a preset convolutional neural network model to obtain a first feature result, and the convolutional neural network model has strong feature extraction and data fitting capabilities. The sample image is processed by a gray level co-occurrence matrix to obtain a second feature result, and the gray level co-occurrence matrix can effectively extract texture statistical features in digital images. Then, according to the first feature result, the second feature result and the preset fully connected neural network model, a fusion feature result is obtained; and the fusion feature result is determined by the first feature result and the second feature result, and the advantages of the features extracted by the convolutional neural network and the gray level co-occurrence matrix are combined, the richness of the features and the significance of the features are guaranteed, and the speed and accuracy of obtaining the hyperparameters of the image segmentation model are improved. Finally, the fusion feature result and the sample image are input into the image segmentation model to obtain a first segmented image; according to the first segmented image and the target identifier, the target hyperparameter is obtained to realize the accuracy verification of the fusion feature result, so as to determine whether the fusion feature result finally outputted can be used as the hyperparameter of the image segmentation model. Therefore, the method or device of the embodiment of the present invention can quickly and accurately determine the hyperparameter values ​​of the image segmentation model, and the determination process is completed through model training without human participation. It can be effectively used for a large number of model parameter adjustments, thereby improving the reliability and utilization efficiency of the image segmentation model.

[0028] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0030] Figure 1 A flowchart of a method for obtaining hyperparameters of an image segmentation model provided by a first embodiment of the present invention is shown;

[0031] Figure 2 A schematic diagram of the structure of a hyperparameter acquisition device for an image segmentation model provided by a second embodiment of the present invention is shown. DETAILED DESCRIPTION

[0032] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0033] First embodiment

[0034] See also Figure 1 , Figure 1 A flowchart of a method for obtaining hyperparameters of an image segmentation model provided by a first embodiment of the present invention is shown, and the method comprises:

[0035] Step S10: Acquire a sample image with a target identifier.

[0036] In step S10, the sample image is an image corresponding to the object that needs to be segmented / identified. The target identifier is used to distinguish the part of the sample image that needs to be identified and segmented. The part of the sample image with the target identifier can be used as a separate image for subsequent verification; the target identifier can be manually marked. For example, the target identifier marks the defects in the sample image, and the target identifier marks the target object that needs to be segmented in the sample image.

[0037] For example, when the object is a navel orange, the sample image corresponds to the image of the navel orange, and the target identifier marks the surface defects of the navel orange; when the object is an apple, the sample image corresponds to the image of the apple, and the target identifier marks the surface defects of the apple; it can also be a surface sensory image of other types of objects.

[0038] Step S20: Input the sample image into a preset convolutional neural network model to obtain a first feature result; process the sample image with a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result.

[0039] In step S20, the various parameter settings in the convolutional neural network model can be adaptively set with reference to the solutions in the prior art. Specifically, the convolutional neural network model in this implementation is preferably a DenseNet (Dense Convolutional Network) network model; the DenseNet network model can save parameters, save calculations, resist overfitting, and has better generalization performance. Both the first feature result and the second feature result can be expressed in the form of feature vectors. In addition, when the sample images are respectively input into the convolutional neural network model and processed with the grayscale co-occurrence matrix, they are all sample images of uniform size.

[0040] The sample image is processed by gray level co-occurrence matrix to obtain the second feature result, which specifically includes the following process:

[0041] Step S21: grayscale processing and Gaussian blur filtering are performed on the sample image to obtain a grayscale image and a filtered image.

[0042] In step S21, after receiving the sample image, grayscale processing is performed to obtain a grayscale image. Specifically, the grayscale image is a single-channel image after the received RGB sample image is grayscaled. Then, the grayscale image is subjected to Gaussian blur filtering to obtain a filtered image.

[0043] Step S22: Obtain a mask image according to the filter image and the grayscale image.

[0044] In step S22, the filter image can be divided by the grayscale image to obtain the stamp image. Specifically, if a grayscale value of zero is encountered in the grayscale image, the grayscale value of the point is kept at zero during the division operation. In addition, when the grayscale value exceeds 255, the grayscale value is uniformly set to 255 for truncation.

[0045] Then, the stamp image is binarized to obtain a mask image. Specifically, in the mask image after binarization, the black part with a gray value of 0 is covered, and the white part with a gray value of 1 is exposed.

[0046] Step S23: Obtain a distinguishing feature map according to the mask map and the sample image.

[0047] In step S23, the single-channel mask image is channel-expanded into three channels, and the mask after channel expansion is multiplied with the sample. The portion with a grayscale value of 0 in the mask image will cover the corresponding pixel in the sample image, while the portion with a grayscale value of 1 in the mask image will retain the corresponding pixel grayscale value in the sample image, thereby obtaining a distinguishing feature map. The distinguishing feature map in this embodiment is an image that needs to be segmented, such as a defective portion that needs to be segmented and identified in the surface recognition of a fruit.

[0048] Step S24: Obtain a gray level co-occurrence matrix according to the non-zero pixels in the distinguishing feature map.

[0049] Step S25: obtaining a second feature result according to the statistics of the gray level co-occurrence matrix; wherein one element in the second feature result corresponds to one statistic.

[0050] Specifically, there may be multiple statistics of the gray level co-occurrence matrix. In this embodiment, the statistics may be obtained as follows:

[0051] Convention, gray-level co-occurrence matrix (GLCM): P ij ; Normalized gray-level co-occurrence matrix (normalized GLCM): Grayscale number (the number of gray levels): N g .

[0052] Therefore, the statistics may include any one or more of the following: angular second moment energy, entropy, contrast, homogeneity, inverse difference matrix, mean, variance, standard deviation, non-similarity, and correlation. Specifically:

[0053] Angular Second Moment, ASM; Energy:

[0054] Entropy (ENT):

[0055] Contrast:

[0056] Homogeneity:

[0057] Inverse Differential Moment (IDM):

[0058] Mean:

[0059] Variance:

[0060] Standard Deviation (Std):

[0061] Dissmilarity:

[0062] Correlation:

[0063] Preferably, by using all the above-mentioned statistics, it can be more accurately and effectively applied in the surface sensory image recognition and feature extraction of objects.

[0064] Step S30: Obtain a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model.

[0065] In step S30, the fused feature result contains N features, where N is an integer greater than 1; by fusing the first feature result and the second feature result, the advantages of the features extracted by the convolutional neural network and the gray-level co-occurrence matrix can be effectively combined; the richness and significance of the features are guaranteed, and the hyperparameter accuracy of the image segmentation model is improved.

[0066] Specifically, feature fusion can be:

[0067] The first feature result and the second feature result are spliced ​​to obtain a third feature result; the specific splicing method can be to splice the first feature result and the second feature result end to end. It should be noted that the dimensions of the first feature result and the second feature result are consistent, both are two-dimensional, including a batch dimension and a feature number dimension, wherein the feature number may be different.

[0068] The third feature result is input into the fully connected neural network model to obtain a fused feature result. The number of fused feature results obtained from the fully connected neural network is equal to the number of hyperparameters input into the image segmentation model, that is, N. In this embodiment, the type of the fully connected neural network model is not limited. The fully connected neural network model is a publicly available common technology. It is not technically difficult for relevant technicians to implement it, and it will not be repeated in this embodiment.

[0069] Step S40: inputting the fused feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fused feature result is used as a hyperparameter of the image segmentation model.

[0070] In step S40, the image segmentation model can be any model. For example, the algorithm used by the image segmentation model can be a multi-threshold segmentation method, a region growing method, an edge segmentation method, a watershed algorithm, and the like. The above-mentioned image segmentation model is an existing technology, and those skilled in the art can understand and use it without difficulty. Taking the image segmentation model corresponding to the multi-threshold segmentation algorithm as an example, the hyperparameters involved that need to be trained are as follows: the threshold setting is a batch of parameters, and the light correction and image correction before the multi-threshold segmentation are a batch of parameters; in addition, when further calculation is required between the segmented images, a batch of weight parameters will be added. The input to the image segmentation model is the sample image to be segmented and the hyperparameter settings for the model. Then, the output result of the image segmentation model should be consistent with the size of the sample image, and the segmented part of the image is marked in the first segmentation map.

[0071] Step S50: Obtain target hyperparameters according to the first segmented image and the target identifier.

[0072] In step S50, the difference between the first segmented image and the sample image marked with the target identifier can be measured by the loss function to determine whether the training process meets the requirements to be achieved. If the requirements are met, the target hyperparameters are output. If the requirements are not met, the parameters of the convolutional neural network model and the fully connected neural network model are updated until they are met. The parameter update method can be updated by the back propagation algorithm. The specific implementation steps of step S50 are as follows:

[0073] Step S51: judging whether a preset loss function satisfies a loss threshold according to the first segmented image and the target identifier.

[0074] Step S52: If yes, obtain the target hyperparameters.

[0075] Step S53: If not, feedback is performed to adjust the parameters of the convolutional neural network model and the parameters of the fully connected neural network model.

[0076] Step S54: Acquire a second segmented image according to the sample image, the adjusted convolutional neural network model, and the adjusted fully connected neural network model, until the loss function meets the loss threshold or reaches a preset number of feedback adjustments, and obtain the target hyperparameters.

[0077] In step S54, it can be understood that in the process of training the convolutional neural network model and the fully connected neural network model, steps S10-S50 will be executed iteratively, and the fusion feature results output by the fully connected neural network model will be continuously updated until the loss function corresponding to the image segmentation model meets the preset loss threshold or reaches the preset number of feedback adjustments, and then the target hyperparameters are obtained. The size of the loss threshold and the number of feedback adjustments can be determined according to the training accuracy and the type of sample image. The target hyperparameter is the fusion feature result obtained in the last training, that is, the model parameter value that needs to be set when using the image segmentation model.

[0078] In summary, a method for obtaining hyperparameters of an image segmentation model provided in this embodiment obtains a sample image with a target identifier; and inputs the sample image into a preset convolutional neural network model to obtain a first feature result, and the convolutional neural network model has strong feature extraction and data fitting capabilities. The sample image is processed by a gray level co-occurrence matrix to obtain a second feature result, and the gray level co-occurrence matrix can effectively extract texture statistical features in digital images. Then, according to the first feature result, the second feature result and the preset fully connected neural network model, a fusion feature result is obtained, and the fusion feature result contains N features; and the fusion feature result is determined by the first feature result and the second feature result, and the advantages of the features extracted by the convolutional neural network and the gray level co-occurrence matrix are combined, and the richness and feature significance of the features are ensured, and the speed and accuracy of the acquisition of the hyperparameters of the image segmentation model are improved. Finally, the fusion feature result and the sample image are input into the image segmentation model to obtain a first segmented image; according to the first segmented image and the target identifier, the target hyperparameter is obtained to realize the accuracy verification of the fusion feature result to determine whether the fusion feature result finally output can be used as a hyperparameter of the image segmentation model. Therefore, the method of this embodiment can quickly and accurately determine the hyperparameter values ​​of the image segmentation model, and the determination process is completed through model training without human intervention. It can be effectively applied to a large number of model parameter adjustments, thereby improving the reliability and utilization efficiency of the image segmentation model.

[0079] Second embodiment

[0080] See also Figure 2 Based on the same inventive concept, a second embodiment of the present invention provides a hyperparameter acquisition device 300 for an image segmentation model. Figure 2 A schematic structural diagram of a hyperparameter acquisition device 300 for an image segmentation model provided in a second embodiment of the present invention is shown.

[0081] The hyperparameter acquisition device 300 of the image segmentation model comprises:

[0082] An acquisition module 301 is used to acquire a sample image with a target identification;

[0083] The feature extraction module 302 is used to input the sample image into a preset convolutional neural network model to obtain a first feature result; and process the sample image with a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result;

[0084] A feature fusion module 303, used to obtain a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model;

[0085] An image segmentation module 304 is used to input the fusion feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fusion feature result is used as a hyperparameter of the image segmentation model;

[0086] The hyperparameter acquisition module 305 acquires target hyperparameters according to the first segmented image and the target identifier.

[0087] As an optional implementation, the feature extraction module 302 is specifically used for:

[0088] The sample image is subjected to grayscale processing and Gaussian blur filtering processing to obtain a grayscale image and a filter image; a mask image is obtained based on the filter image and the grayscale image; a distinguishing feature image is obtained based on the mask image and the sample image; a grayscale co-occurrence matrix is ​​obtained based on the non-zero pixels in the distinguishing feature image; a second feature result is obtained based on the statistics of the grayscale co-occurrence matrix; wherein one element in the second feature result corresponds to one statistic.

[0089] As an optional implementation, the feature fusion module 303 is specifically used to:

[0090] The first feature result and the second feature result are concatenated to obtain a third feature result; and the third feature result is input into the fully connected neural network model to obtain the fused feature result.

[0091] It should be noted that the hyperparameter acquisition device 300 for the image segmentation model provided in the embodiment of the present invention has the same specific implementation and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0092] Third embodiment

[0093] Based on the same inventive concept, the third embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the methods described in the first embodiment are implemented.

[0094] It should be noted that, in the computer-readable storage medium provided in the embodiment of the present invention, the specific implementation of the steps executed when the program is executed by the processor and the technical effects produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the aforementioned method embodiment.

[0095] The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0096] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0097] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0098] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0100] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0101] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for obtaining hyperparameters of an image segmentation model, characterized in that: include: Obtain a sample image with a target identifier; Inputting the sample image into a preset convolutional neural network model to obtain a first feature result; Processing the sample image with a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result; Obtaining a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model; Inputting the fused feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fused feature result is used as a hyperparameter of the image segmentation model; Obtaining target hyperparameters according to the first segmented image and the target identifier; The processing of the sample image with a gray level co-occurrence matrix to obtain a second feature result includes: Performing grayscale processing and Gaussian blur filtering processing on the sample image to obtain a grayscale image and a filtered image; Obtaining a mask image according to the filter image and the grayscale image; Obtaining a distinguishing feature map according to the mask map and the sample image; Obtaining a gray level co-occurrence matrix according to the non-zero pixels in the distinguishing feature map; Obtaining a second feature result according to the statistics of the gray level co-occurrence matrix; wherein one element in the second feature result corresponds to one statistic; The statistics include any one or more of the following: Angular second moment energy, entropy, contrast, homogeneity, inverse difference matrix, mean, variance, standard deviation, nonsimilarity, and correlation; The step of obtaining a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model includes: Concatenate the first feature result and the second feature result to obtain a third feature result; Inputting the third feature result into the fully connected neural network model to obtain the fused feature result; The step of obtaining target hyperparameters according to the first segmented image and the target identifier includes: Determining whether a preset loss function satisfies a loss threshold according to the first segmented image and the target identifier; If yes, then obtain the target hyperparameters; If not, feedback is used to adjust the parameters of the convolutional neural network model and the parameters of the fully connected neural network model; A second segmented image is obtained according to the sample image, the adjusted convolutional neural network model and the adjusted fully connected neural network model, until the loss function meets the loss threshold or reaches a preset number of feedback adjustments, thereby obtaining the target hyperparameters.

2. The method according to claim 1, characterized in that The convolutional neural network model is a DenseNet network model.

3. A device for acquiring hyperparameters of an image segmentation model, the device being used to implement the steps of the method according to any one of claims 1 to 2, characterized in that: include: An acquisition module, used for acquiring a sample image with a target identification; A feature extraction module, used for inputting the sample image into a preset convolutional neural network model to obtain a first feature result; Processing the sample image with a gray level co-occurrence matrix to obtain a second feature result; wherein the convolutional neural network model corresponds to the first feature result, and the gray level co-occurrence matrix model corresponds to the second feature result; A feature fusion module, used to obtain a fusion feature result according to the first feature result, the second feature result and a preset fully connected neural network model; An image segmentation module, used for inputting the fusion feature result and the sample image into the image segmentation model to obtain a first segmented image; wherein the feature value contained in the fusion feature result is used as a hyperparameter of the image segmentation model; A hyperparameter acquisition module obtains target hyperparameters according to the first segmented image and the target identifier.

4. The device according to claim 3, characterized in that The feature extraction module is specifically used for: Performing grayscale processing and Gaussian blur filtering processing on the sample image to obtain a grayscale image and a filtered image; Obtaining a mask image according to the filter image and the grayscale image; Obtaining a distinguishing feature map according to the mask map and the sample image; Obtaining a gray level co-occurrence matrix according to the non-zero pixels in the distinguishing feature map; A second feature result is obtained according to the statistics of the gray level co-occurrence matrix; wherein an element in the second feature result corresponds to a statistic.

5. The device according to claim 3, characterized in that The feature fusion module is specifically used for: Concatenate the first feature result and the second feature result to obtain a third feature result; The third feature result is input into the fully connected neural network model to obtain the fused feature result.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • An expert knowledge constraint-based occlusion image ship target detection method and system

    CN109740665A