Image processing method, device, equipment, storage medium and program product
By averaging the feature maps in the ENet semantic segmentation network model and utilizing a variety of eyeball image data, the problem of feature conflicts caused by semantic differences in feature maps is solved, the accuracy and robustness of image processing are improved, and it is achieved in different situations. Stable performance under environmental conditions.
Patent Information
- Application Number
- CN202410751020.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-12
AI Technical Summary
In the image processing process of the ENet semantic segmentation network model, due to the large semantic differences in feature map addition and fusion, feature conflicts may occur. In addition, early technology has poor performance against noise and interference, making it difficult to maintain stable performance in different environments.
Using an image processing method that averages the first feature map and the second feature map with the same or similar spatial resolution, the noise impact is reduced by averaging multiple feature maps, and through multiple types of eyeball image data (iris, iris, etc.) Pupil, target ring) to obtain richer information, perform classification and positioning processing to determine the semantic segmentation results of eyeball images.
It reduces the impact of noise and outliers in the fusion process, improves the accuracy and robustness of image processing, can accurately locate pupils and other features under complex backgrounds or light conditions, and improves the reliability of early diagnosis.
Smart Images

Figure CN118351589B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, device, equipment, storage medium and program product. Background Art
[0002] In recent years, long-term use of electronic devices has put the eyes in a state of high tension, resulting in an increasing prevalence of esophagus myopia. Therefore, it is crucial to detect and accurately measure myopia symptoms early.
[0003] Research has found that accurate measurements of key features such as the eyeball, cornea, and pupil can provide a better understanding of the patient's eye condition. In early technologies, key features such as the eyeball, cornea, and pupil were measured using grayscale projection, ellipse fitting, and radial symmetry transformation algorithms to determine the patient's eye condition.
[0004] However, early technologies performed relatively poorly with noise and interference in images, resulting in the inability to accurately locate the pupil under complex backgrounds or lighting conditions. And due to the limitations of the algorithm design principles, the parameters in early technologies usually need to be manually set according to specific scenarios, which may introduce subjective factors and make it difficult to maintain stable performance in different environments.
[0005] In order to solve the problems of early technologies, the application of artificial intelligence in image processing can automatically analyze various features in eye images, such as pupil, iris, fundus, etc. Specifically, the ENet semantic segmentation network model used can accurately detect eye features, accurately segment the eyeball structure, and diagnose eye diseases at an early stage.
[0006] However, in the process of image processing, the fusion strategy of the ENet semantic segmentation network model (Efficient Neural Network for Real-Time Semantic Segmentation) is to add feature maps. If there are large differences in semantics between two feature maps, direct addition fusion may lead to feature conflicts. Summary of the invention
[0007] In view of this, the present invention provides an image processing method, apparatus, device, storage medium and program product to solve the problem that direct additive fusion may cause feature conflict when there are large semantic differences between two feature maps.
[0008] In a first aspect, the present invention provides an image processing method, the method comprising: acquiring eyeball image data; wherein the eyeball image data comprises: iris data, pupil data and target ring data; processing the eyeball image data to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the first feature map and the second feature map fused to have the same or similar spatial resolution are averaged; processing the third feature map to obtain a semantic segmentation result corresponding to the eyeball image data.
[0009] The image processing method provided in this embodiment can fully utilize the information of the two feature maps by averaging the first feature map and the second feature map with the same or similar spatial resolution, and can reduce the influence of noise or outliers that may be generated in the fusion process. Moreover, since multiple feature maps are averaged, even if an abnormality or noise exists in a feature map, its influence will be averaged by other feature maps, thereby reducing the influence on the entire fusion result.
[0010] In addition, by collecting multiple types of eye image data, namely iris data, pupil data and target ring data, richer information can be obtained, thereby gaining a more comprehensive understanding of the physiological state and characteristics of the eye.
[0011] In an optional embodiment, the third feature map is processed to obtain a semantic segmentation result corresponding to the eye image data, including: classifying the third feature map to determine the category of the eye image data, and positioning the third feature map to determine the center position and radius size information of the eye image data; and using the category, center position and radius size information as the semantic segmentation result.
[0012] The image processing method provided in this embodiment can accurately distinguish different areas and features in the eye image by classifying the third feature map, and can determine the center position and radius size information of the key area in the eye image by positioning the third feature map, thereby achieving the effect of fine recognition of the eye image information.
[0013] In an optional embodiment, the third feature map is positioned and processed to determine the center position and radius size information of the eye image data, including: obtaining the horizontal coordinate of the center, the vertical coordinate of the center, the radius value, the horizontal coordinate offset, the vertical coordinate offset and the radius offset corresponding to the pupil data, the iris data and the target ring data respectively; determining the target horizontal coordinate of the center position based on the horizontal coordinate of the center, the horizontal coordinate offset and the radius value; determining the target vertical coordinate of the center position based on the vertical coordinate of the center, the vertical coordinate offset and the radius value; determining the radius size information based on the radius value and the radius offset.
[0014] The image processing method provided in this embodiment can very accurately determine the center positions of the pupil, iris and target ring by calculating the values of the horizontal coordinate of the center, the vertical coordinate of the center and the radius, thereby highly accurately determining the eye structure or evaluating the eye state.
[0015] And by calculating the target abscissa, target ordinate and radius size information through the abscissa of the center, the ordinate of the center, the value of the radius, the abscissa offset, the ordinate offset and the radius offset, the specific position and size of the eyeball features can be intuitively understood. And because multiple factors (center coordinates, radius value and offset) are taken into account, good robustness can still be maintained when processing complex or blurred eyeball images. Even in the case of poor image quality or unclear features, relatively accurate positioning results can be obtained.
[0016] In an optional implementation, the center position and radius size information are determined by the following formula:
[0017] ;
[0018] ;
[0019] ;in, For radius size information, is the value of the radius, is the radius offset, is the vertical coordinate of the center of the circle, is the target ordinate, is the vertical axis offset, is the target horizontal coordinate, is the horizontal coordinate of the center of the circle, is the horizontal axis offset.
[0020] In an optional embodiment, the third feature map is processed to obtain a semantic segmentation result corresponding to the eye image, including: performing sliding window processing on the third feature map to obtain a candidate area; wherein the candidate area is composed of vectors corresponding to each anchor point; normalizing the candidate area to obtain a target feature map; processing the target feature map to obtain a semantic segmentation result corresponding to the eye image.
[0021] The image processing method provided in this embodiment can traverse the entire feature map through sliding window processing, and then extract the candidate area through preset anchor points, which can effectively capture the key area in the eye image.
[0022] In addition, normalization makes the pixel values of the candidate area more evenly distributed, which helps reduce the differences between different images and improves the accuracy of subsequent semantic segmentation. Through normalization, the model can better learn the features in the image and more accurately determine the category of each pixel.
[0023] In an optional embodiment, the above method also includes: performing pixel segmentation processing on the third feature map to obtain pixel points corresponding to iris data, pupil data and target ring data; and drawing binary mask maps corresponding to iris data, pupil data and target ring data based on the pixel points.
[0024] The image processing method provided in this embodiment can accurately distinguish the iris, pupil and target ring areas in the third feature map from the background or other irrelevant areas through pixel segmentation processing, and simplify the complex image data into an image containing only two values (usually 0 and 1) by generating a binary mask image, so as to display the position and shape of the iris, pupil and target ring in the image in an intuitive manner.
[0025] In an optional embodiment, the first feature map, the second feature map and the third feature map are obtained by a pre-trained semantic segmentation network model; wherein the pre-trained semantic segmentation network model includes: a backbone network and a region recommendation network, and the backbone network includes: an encoder structure and a decoder structure;
[0026] The eye image data is the input of the encoder structure, the first feature map is the output of the encoder structure and part of the input of the t-th decoder structure, the second feature map is the output of the t-1-th decoder structure and another part of the input of the t-th decoder structure, the third feature map is the output of the t-th decoder structure and the input of the region recommendation network, t is an integer greater than 1, and the semantic segmentation result is the output of the region recommendation network.
[0027] The image processing method provided in this embodiment can automatically convert complex eye image data into structured feature maps and final semantic segmentation results through a pre-trained network model, without the need to manually design feature extraction and classification rules, greatly improving processing efficiency and accuracy. In addition, the encoder structure can extract deep features in the eye image through operations such as convolution and pooling, which are crucial for subsequent segmentation tasks. At the same time, the decoder structure is responsible for decoding these deep features into feature maps of the same size as the original image, maintaining the spatial resolution of the features.
[0028] In addition, through multiple decoder structures (t>1), the network is able to fuse feature information of different scales. This multi-scale feature fusion helps improve the model's segmentation performance for objects of different scales, especially when processing irises, pupils, and target rings of different sizes in eye images.
[0029] In addition, the region recommendation network can accurately recommend areas where objects may exist based on the feature maps extracted by the encoder and decoder structures. This helps reduce the amount of computation required for subsequent processing, improves overall processing speed, and enables the model to focus more on processing key areas.
[0030] In a second aspect, the present invention provides an image processing device, which includes: an acquisition module, used to acquire eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data; a first processing module, used to process the eyeball image to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the first feature map and the second feature map fused to have the same or similar spatial resolution are averaged; a second processing module, used to process the third feature map to obtain a semantic segmentation result corresponding to the eyeball image.
[0031] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image processing method of the first aspect or any corresponding embodiment thereof.
[0033] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the image processing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 is a flowchart of an image processing method according to an embodiment of the present invention;
[0036] Figure 2 is a flowchart of another image processing method according to an embodiment of the present invention;
[0037] Figure 3is a schematic diagram of a specific network structure of a backbone network according to an embodiment of the present invention;
[0038] Figure 4 2. It is a schematic diagram of implementing multi-task learning of eyeball images using a semantic segmentation network model according to an embodiment of the present invention;
[0039] Figure 5 is a schematic diagram of a specific network structure of a regional recommendation network according to an embodiment of the present invention;
[0040] Figure 6 is a schematic diagram of eye image detection based on a region recommendation network according to an embodiment of the present invention;
[0041] Figure 7 is a structural block diagram of an image processing device according to an embodiment of the present invention;
[0042] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0044] Based on relevant technologies, it is known that currently, the application of artificial intelligence in image processing can automatically analyze various features in eye images, such as pupil, iris, fundus, etc. Specifically, the ENet semantic segmentation network model used can accurately detect eye features, accurately segment the eyeball structure, and diagnose eye diseases at an early stage.
[0045] However, in the process of image processing, the fusion strategy of the ENet semantic segmentation network model is to add feature maps. If there are large differences in semantics between two feature maps, direct addition fusion may lead to feature conflicts.
[0046] Based on this, the present invention provides an image processing method, which can fully utilize the information of the two feature maps by averaging the first feature map and the second feature map with the same or similar spatial resolution, and can reduce the influence of noise or outliers that may be generated in the fusion process. Moreover, since multiple feature maps are averaged, even if there is anomaly or noise in a feature map, its influence will be averaged by other feature maps, thereby reducing the impact on the entire fusion result.
[0047] According to an embodiment of the present invention, an image processing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0048] In this embodiment, an image processing method is provided, which can be used in computer devices, such as computers, servers, etc. Figure 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0049] Step S101, acquiring eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data.
[0050] Eyeball image data is used to characterize various features and states of the eyeball. Eyeball image data includes: iris data, pupil data, and target ring data. The iris is the annular part between the black pupil and the white sclera. The iris data contains many interlaced spots, filaments, coronal shapes, stripes, crypts and other detailed features; pupil data is used to characterize the size of the pupil, etc., which can reflect a variety of physiological and psychological states of the human body. For example, changes in the diameter of the pupil can reflect the vital signs of the human body, including changes in blood pressure, heart rate, and respiration. Target ring data is used to characterize a specific area or mark in the eye image, which is used to mark the iris.
[0051] Specifically, the eye image data can be collected by a camera that captures infrared light or light of a specific wavelength, or can be collected by other collection devices, which is not specifically limited here.
[0052] Step S102, processing the eye image data to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the fusion is performed by averaging the first feature map and the second feature map having the same or similar spatial resolution.
[0053] Specifically, an image processing algorithm or a neural network model can be used to generate the first feature map and the second feature map to ensure that the first image and the second image have the same or similar spatial resolution for subsequent fusion. For example: image segmentation, edge detection, feature extraction and other technologies are not specifically limited here and can be implemented by those skilled in the art. Among them, the first feature map and the second feature map record certain specific features of the eyeball image, such as edges, textures or shapes, etc., which are not specifically limited here.
[0054] The first feature map and the second feature map may be averaged by using a pixel average value, a neural network model, etc. to obtain a third feature map, wherein the third feature map contains information of the first feature map and the second feature map.
[0055] Step S103, processing the third feature map to obtain a semantic segmentation result corresponding to the eye image data.
[0056] The semantic segmentation result can be used to characterize the coordinates, radius, etc. of the iris data, pupil data, and target ring data, and is not specifically limited here. Specifically, the third feature map can be processed by a neural network model, edge detection, threshold segmentation, etc. to obtain the semantic segmentation result corresponding to the eyeball image data, which is not specifically limited here and can be implemented by those skilled in the art.
[0057] The image processing method provided in this embodiment can fully utilize the information of the two feature maps by averaging the first feature map and the second feature map with the same or similar spatial resolution, and can reduce the influence of noise or outliers that may be generated in the fusion process. Moreover, since multiple feature maps are averaged, even if an abnormality or noise exists in a feature map, its influence will be averaged by other feature maps, thereby reducing the influence on the entire fusion result.
[0058] In addition, by collecting multiple types of eye image data, namely iris data, pupil data and target ring data, richer information can be obtained, thereby gaining a more comprehensive understanding of the physiological state and characteristics of the eye.
[0059] In this embodiment, an image processing method is provided, which can be used in the above-mentioned computer equipment, such as a computer, a server, etc. Figure 2 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0060] Step S201, obtaining eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0061] Step S202, processing the eyeball image data to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the first feature map and the second feature map having the same or similar spatial resolution are averaged. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0062] Step S203: Process the third feature map to obtain a semantic segmentation result corresponding to the eye image data.
[0063] Specifically, the above step S203 includes:
[0064] Step S2031, classify the third feature map to determine the category of the eye image data.
[0065] The category of the eyeball image data can be used to characterize the category of the iris, pupil, and target ring. Specifically, the third feature map is processed by a classification algorithm (such as a support vector machine, a random forest, a neural network, etc.) to determine the category of the eyeball image data, which is not specifically limited here and can be implemented by those skilled in the art.
[0066] Step S2032: perform positioning processing on the third feature map to determine the center position and radius size information of the eyeball image data.
[0067] After determining the category of the eyeball image data, the position and size of specific structures (such as pupils, irises, etc.) in the image are located. Specifically, the center position and radius size information can be determined by neural networks, circle or ellipse detection in the image, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0068] The above step S2032 includes:
[0069] Step a1, respectively obtain the horizontal coordinate of the center of the circle, the vertical coordinate of the center of the circle, the value of the radius, the horizontal coordinate offset, the vertical coordinate offset and the radius offset corresponding to the pupil data, the iris data and the target ring data.
[0070] The values of the horizontal coordinate of the center of the circle, the vertical coordinate of the center of the circle, and the radius can respectively represent the values of the horizontal coordinate of the center of the circle, the vertical coordinate of the center of the circle, and the radius of the pupil, the iris, and the target ring. Specifically, the horizontal coordinate offset, the vertical coordinate offset, and the radius offset can be directly obtained by the measurement method, and can be used to represent the position of the pupil, the iris, and the target ring that deviates from the center point. For example: the offset is used to describe the deviation between the center of the detected target bounding box and the theoretical or predicted center point. In algorithms such as the target detection algorithm (You Only Look Once, YOLO), these offsets are obtained through learning to better adapt to the actual position of the target in the image.
[0071] Step a2, determining the target horizontal coordinate of the center position of the circle based on the horizontal coordinate of the center of the circle, the horizontal coordinate offset and the value of the radius.
[0072] Step a3, determining the target ordinate of the center of the circle based on the ordinate of the center of the circle, the ordinate offset and the radius.
[0073] Step a4, determining radius size information based on the radius value and the radius offset.
[0074] The center position and radius size information are determined by the following formula:
[0075] ;
[0076] ;
[0077] ;in, For radius size information, is the value of the radius, is the radius offset, is the vertical coordinate of the center of the circle, is the target ordinate, is the target horizontal coordinate, is the horizontal coordinate of the center of the circle, is the horizontal axis offset.
[0078] Step S2033, taking the category, circle center position and radius size information as the semantic segmentation result.
[0079] The semantic segmentation result consists of the categories, center positions and radius size information corresponding to the pupil data, iris data and target ring data respectively.
[0080] The image processing method provided in this embodiment can accurately distinguish different areas and features in the eye image by classifying the third feature map, and can determine the center position and radius size information of the key area in the eye image by positioning the third feature map, thereby achieving the effect of fine recognition of the eye image information.
[0081] In addition, by calculating the values of the horizontal coordinate of the center of the circle, the vertical coordinate of the center of the circle, and the radius, the center positions of the pupil, iris, and target ring can be determined very accurately, thereby highly accurately determining the structure of the eyeball or evaluating the state of the eyeball.
[0082] And by calculating the target abscissa, target ordinate and radius size information through the abscissa of the center, the ordinate of the center, the value of the radius, the abscissa offset, the ordinate offset and the radius offset, the specific position and size of the eyeball features can be intuitively understood. And because multiple factors (center coordinates, radius value and offset) are taken into account, good robustness can still be maintained when processing complex or blurred eyeball images. Even in the case of poor image quality or unclear features, relatively accurate positioning results can be obtained.
[0083] In an optional implementation, the third feature map is processed in the above step S104 to obtain a semantic segmentation result corresponding to the eye image, including:
[0084] Step b1, performing sliding window processing on the third feature map to obtain a candidate region; wherein the candidate region is composed of vectors corresponding to each anchor point.
[0085] Sliding window processing can be used for object detection. Specifically, on a given feature map (the third feature map), the sliding window processing places a fixed-size window and traverses the entire third feature map (sliding the window). At each window position, some operation (for example, applying a pre-trained classifier) is performed to detect whether the area contains the object of interest (in this case, a part of the eyeball).
[0086] The result of the sliding window processing is a series of candidate regions that contain the detected objects. In the object detection task, these candidate regions are usually defined by anchors, which are preset rectangular boxes with different sizes and proportions.
[0087] Step b2: normalize the candidate region to obtain the target feature map.
[0088] Normalization is used to adjust the data range. In object detection or semantic segmentation, normalization can ensure that candidate regions of different sizes and positions have similar weights or influences in subsequent processing. Specifically, the candidate region can be scaled to a fixed size so that it can be input into the fully connected layer or other layers that require a fixed input size.
[0089] The feature map obtained after normalization is usually called the target feature map, which contains the normalized candidate region information and is used for subsequent classification or segmentation tasks.
[0090] Step b3, processing the target feature map to obtain the semantic segmentation result corresponding to the eye image.
[0091] Assign a class label to each pixel in the target feature map. In the context of eyeball images, each pixel of the image is classified as a different part of the eyeball (such as iris, pupil, etc.).
[0092] To obtain semantic segmentation results, the algorithm usually uses one or more convolutional layers, fully connected layers, or other types of neural network layers to process the target feature map. These layers may learn how to map the normalized candidate regions to corresponding category labels. Finally, these category labels are combined into a segmentation map of the same size as the input image, where each pixel is labeled with its corresponding category.
[0093] The image processing method provided in this embodiment can traverse the entire feature map through sliding window processing, and then extract the candidate area through preset anchor points, which can effectively capture the key area in the eye image.
[0094] In addition, normalization makes the pixel values of the candidate area more evenly distributed, which helps reduce the differences between different images and improves the accuracy of subsequent semantic segmentation. Through normalization, the model can better learn the features in the image and more accurately determine the category of each pixel.
[0095] In an optional embodiment, the above method further includes:
[0096] Step c1, performing pixel segmentation processing on the third feature map to obtain pixel points corresponding to iris data, pupil data and target ring data.
[0097] Pixel segmentation processing is used to segment the third feature map into multiple regions. In this step, the third feature map is classified at the pixel level to distinguish different regions such as the iris, pupil, and target ring (which may refer to a specific mark in the image used for vision testing or training). Among them, the pixels of different regions of the iris data, pupil data, and target ring data are a collection of pixels. The iris is a part of the eye that is located around the pupil and has a unique texture and color. The pupil is the circular hole in the center of the iris, which will grow or shrink as the light changes. The target ring is used to guide the tester to look at or judge the area.
[0098] Step c2, drawing binary mask images corresponding to the iris data, pupil data and target ring data based on the pixel points.
[0099] A binary mask is an image where each pixel has only two possible values (usually 0 and 1) to represent the presence or absence of different areas in the image. In this step, the pixels obtained in step c1 are used to create three binary mask maps: one for the iris, one for the pupil, and one for the target ring. Specifically, the drawing process involves comparing each pixel in the third feature map with the pixels of the iris, pupil, and target ring. If a pixel is classified as part of the iris, then at that pixel position, the corresponding position of the binary mask map of the iris will be set to 1 (indicating presence), otherwise it will be set to 0 (indicating absence). Similarly, corresponding binary mask maps are created for the pupil and target ring.
[0100] The image processing method provided in this embodiment can accurately distinguish the iris, pupil and target ring areas in the third feature map from the background or other irrelevant areas through pixel segmentation processing, and simplify the complex image data into an image containing only two values (usually 0 and 1) by generating a binary mask image, so as to display the position and shape of the iris, pupil and target ring in the image in an intuitive manner.
[0101] In an optional embodiment, the first feature map, the second feature map and the third feature map are obtained through a pre-trained semantic segmentation network model; wherein the pre-trained semantic segmentation network model includes: a backbone network and a region recommendation network, and the backbone network includes: an encoder structure and a decoder structure; the eye image data is the input of the encoder structure, the first feature map is the output of the encoder structure and a part of the input of the t-th decoder structure, the second feature map is the output of the t-1th decoder structure and another part of the input of the t-th decoder structure, the third feature map is the output of the t-1th decoder structure and the input of the region recommendation network, t is an integer greater than 1, and the semantic segmentation result is the output of the region recommendation network.
[0102] Specifically, the above steps S101 to S103, steps S2031 to S2033, steps a1 to a4, steps b1 to b3, and steps c1 to c2 can all be implemented by a pre-trained semantic segmentation network model. The pre-trained semantic segmentation network model includes: a backbone network and a regional recommendation network, and the backbone network includes: an encoder structure and a decoder structure; the eye image data is the input of the encoder structure, the first feature map is the output of the encoder structure and a part of the input of the t-th decoder structure, the second feature map is the output of the t-1th decoder structure and another part of the input of the t-th decoder structure, the third feature map is the output of the t-th decoder structure and the input of the regional recommendation network, t is greater than 1, and the semantic segmentation result is the output of the regional recommendation network.
[0103] Preferably, in the convolutional neural network backbone architecture of the Encoder-Decoder structure, it is used to process the eye image data and extract image features through the backbone network. This process gradually transforms the original eye image into a high-level abstract feature map through operations such as convolution and pooling, so as to more effectively capture the key information in the image.
[0104] Specifically, the encoder structure (Encoder) and the decoder structure (Decoder) both include multiple bottleneck modules; the bottleneck module is the basic building block of the semantic segmentation network model, which consists of a 1x1 convolution layer, a 3x3 convolution layer and another 1x1 convolution layer. This structure helps to reduce the number of parameters of the model.
[0105] Combination Figure 3 As shown, Encoder: The first three stages belong to the decoding stage. Stage 1: It includes 5 bottleneck modules. The first bottleneck module performs downsampling, and the following 4 repeated bottleneck modules perform downsampling and upsampling operations. Stage 2-3: The bottleneck 2.0 module of stage 2 performs downsampling, and can add hollow convolution or decomposed convolution. Stage 3 does not perform downsampling, and other operations are the same as stage 2. Among them, stage is usually a concept of organizing network structure, which is used to divide different parts of the model into logically related groups or levels.
[0106] Combination Figure 3 As shown in the figure, Decoder: includes an upsampling layer and two bottleneck modules, which gradually restore the size of the feature map to the size of the original input image and produce the final segmentation result.
[0107] More specifically, in the encoder part, the width and height of the feature map are doubled and the depth is doubled after each layer; in the decoder part, the width and height of the feature map are doubled and the depth is doubled after each layer. The dimension change table of each layer can be [3, 32, 64, 128, 256, 512, 256, 128, 64 32].
[0108] The convolutional network in this embodiment changes the residual structure of the upsampling stage to an average fusion strategy. This strategy reduces the requirements of the fusion process for feature changes and feature retention to some extent. ;in, is the third characteristic graph, is the first feature map, is the second feature map.
[0109] Combination Figure 4 as well as Figure 5 As shown in Figure 1, the Region Proposal Network (RPN) structure consists of a 3X3 convolutional layer and two 1X1 convolutional layers connected to it (i.e. Figure 4 , Figure 51X1 Conv in ). RPN performs sliding window processing on each position of the third feature map through a 3x3 convolution layer (RolNorm), and generates K vectors through K anchors (circle anchor) of different scales and aspect ratios, where K is a positive integer greater than 2. Among them, the two detection branches are the classification network and the regression network. The main task of the first branch is to classify the candidate regions. This means that RPN can identify potential eyeball areas and assign a confidence to each area, thereby providing targeted candidate regions. The second is to regress the boundary information of the pupil, iris, and target ring to provide high-precision location information.
[0110] The classification network classifies each anchor point and calculates the target probability value for the pupil, iris, and target ring. The regression network obtains their specific positions through regression. RPN generates K anchor points of different sizes at each position in the feature map, and each anchor point consists of 3 variables . are respectively the horizontal coordinate, vertical coordinate and radius of the center of each target.
[0111] Furthermore, the specific positions of the pupil, iris, and target ring are obtained through regression. Specifically, three variables are known: Respectively represent the target circle center horizontal coordinate, target circle center vertical coordinate, and target radius value of each anchor point. The three coordinate offsets are ( ) correspond to the translation and scaling values of the three variables of the target point respectively. The three coordinate offsets can be obtained through regression through the output of the RPN network. The final candidate target center and radius values generated by the RPN can be obtained by the following formula:
[0112] .
[0113] .
[0114] ; Among them, please refer to the above step a4 for the specific content, and no further details will be given here.
[0115] In an optional embodiment, the steps of determining the classification network loss and the regression network loss are as follows:
[0116] Combination Figure 6 As shown, for each candidate box, the cross entropy loss function is used to measure the classification accuracy of the model for the target category. To predict the category confidence of the eyeball, is the coordinate of the predicted category , is the predicted radius of the circle corresponding to the coordinates; the loss function of the Region of Interest (ROI) is used to calculate the coordinates of GroundTrue (true) and Prediction (predicted), so as to obtain the center coordinates of the iris, pupil, and target ring.
[0117] ;in, is the classification loss, is the circle center coordinate regression loss, is the radius length regression loss, is the loss function of RPN.
[0118] Preferably, after the convolutional neural network of the Encoder-Decoder structure extracts the third feature map and performs the RPN network, the third branch mask network is a full convolutional network, including four 3X3 convolutional layers, followed by a 2X2 transposed convolutional layer and a 1X1 convolutional layer that outputs a binary mask. The mask network uses a pixel-level binary cross-entropy loss to represent the probability between the binary segmentation mask of each pixel in the normalized candidate area and the actual segmentation mask.
[0119] In an optional embodiment, the steps of determining the mask network loss are as follows:
[0120] ;in, is the mask loss; is the mask network loss, m is the true value, and m* is the predicted value.
[0121] The overall loss function of the neural network specifically includes: the loss function of the classification network and regression network (CRN) and the loss function of the mask network. The total loss function of the semantic segmentation network model is:
[0122] ; Where L is the total loss function of the semantic segmentation network model.
[0123] The image processing method provided in this embodiment realizes a fully automated learning process by applying the optimized Enet semantic segmentation network to eyeball image segmentation and positioning, thereby accurately obtaining the segmented and normalized iris image and generating the corresponding binary mask image. This process ensures a high degree of accuracy and consistency.
[0124] In an application scenario, the training process of the semantic segmentation network model includes: OpenCV's dnn module uses the ENet structure for semantic segmentation. All experiments use the same optimizer and learning strategy: the optimizer uses Adam, the initial learning rate is 0.001, the weight decay is set to 5e-4, the adaptive learning rate adjustment strategy is adopted, and the maximum epoch is 150. All models are trained using 1 Nvidia GPU, and deployed and inference are performed on i5 series CPUs.
[0125] The biometric instrument collects data on the observer, and the data image contains three target objects on the surface of the eyeball: the iris, the pupil, and the target ring.
[0126] The iris pixels of the sample eye image are labeled as 0, the pupil pixels are labeled as 1, and the target ring pixels are labeled as 2, that is, multi-classification labeling is achieved to generate a mask map of the real target area.
[0127] Before training the segmentation network, it is necessary to annotate the sample image set for training. The annotation includes: 1) generating binary mask images of the iris, pupil and target ring area in the eye image; 2) annotating the center position and radius size of the iris, pupil and target ring. The data is divided into training set, validation set and test set. The Encoder-Decoder structure is used as the backbone to extract image features, and the multi-branch tasks of the fine-tuning decoding structure are implemented to achieve multi-task learning, and the model training can be completed.
[0128] The labeled sample eyeball images are respectively input into the semantic segmentation network model, and the semantic segmentation network model is trained until the model of the semantic segmentation network model converges.
[0129] The network parameters and activation values are quantized to lower-bit representations using quantization techniques, thereby reducing the model's memory footprint and computational effort. During training, the model's weights and activation values are calculated using single-precision floating-point numbers. The weights and activation values of the trained model are mapped to lower-precision representations of 8-bit integers during the inference phase.
[0130] The iris image that needs to be segmented is input into the trained Enet segmentation network to obtain the boundary size, center position, and binary mask map of the iris, pupil, and target ring.
[0131] In this embodiment, an image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0132] This embodiment provides an image processing device, such as Figure 7 As shown, it includes: an acquisition module 701, used to acquire eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data; a first processing module 702, used to process the eyeball image to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the first feature map and the second feature map fused to have the same or similar spatial resolution are averaged; a second processing module 703, used to process the third feature map to obtain a semantic segmentation result corresponding to the eyeball image.
[0133] In an optional embodiment, the second processing module 703 includes: a first processing unit, used to classify the third feature map to determine the category of the eye image data; a second processing unit, used to position the third feature map to determine the center position and radius size information of the eye image data; a first determination unit, used to use the category, center position and radius size information as the semantic segmentation result.
[0134] In an optional embodiment, the second processing unit includes: an acquisition subunit, used to respectively acquire the horizontal coordinate of the center of the circle, the vertical coordinate of the center of the circle, the value of the radius, the horizontal coordinate offset, the vertical coordinate offset and the radius offset corresponding to the pupil data, the iris data and the target ring data respectively; a first determination subunit, used to determine the target horizontal coordinate of the center position based on the horizontal coordinate of the center of the circle, the horizontal coordinate offset and the value of the radius; a second determination subunit, used to determine the target vertical coordinate of the center position based on the vertical coordinate of the center of the circle, the vertical coordinate offset and the value of the radius; a third determination subunit, used to determine the radius size information based on the radius value and the radius offset.
[0135] In an optional embodiment, the above device further includes: a determination module, configured to determine the center position and radius size information by the following formula:
[0136] .
[0137] .
[0138] ;in, For radius size information, is the value of the radius, is the radius offset, is the vertical coordinate of the center of the circle, is the target ordinate, is the vertical axis offset, is the target horizontal coordinate, is the horizontal coordinate of the center of the circle, is the horizontal axis offset.
[0139] In an optional embodiment, the second processing module 703 includes: a sliding window processing unit, used to perform sliding window processing on the third feature map to obtain a candidate area; wherein the candidate area is composed of vectors corresponding to each anchor point; a normalization processing unit, used to perform normalization processing on the candidate area to obtain a target feature map; a third processing unit, used to process the target feature map to obtain a semantic segmentation result corresponding to the eye image.
[0140] In an optional embodiment, the above-mentioned device also includes: a pixel segmentation processing module, which is used to perform pixel segmentation processing on the third feature map to obtain pixel points corresponding to iris data, pupil data and target ring data; a drawing module, which is used to draw binary mask images corresponding to iris data, pupil data and target ring data based on pixel points.
[0141] In an optional embodiment, the first feature map, the second feature map and the third feature map are obtained through a pre-trained semantic segmentation network model; wherein the pre-trained semantic segmentation network model includes: a backbone network and a region recommendation network, and the backbone network includes: an encoder structure and a decoder structure; the eye image data is the input of the encoder structure, the first feature map is the output of the encoder structure and a part of the input of the t-th decoder structure, the second feature map is the output of the t-1th decoder structure and another part of the input of the t-th decoder structure, the third feature map is the output of the t-1th decoder structure and the input of the region recommendation network, t is greater than 1, and the semantic segmentation result is the output of the region recommendation network.
[0142] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0143] The image processing device in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0144] The embodiment of the present invention also provides a computer device having the above Figure 7 The image processing device shown.
[0145] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0146] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0147] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0148] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0150] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0151] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0152] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0153] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data; Processing the eyeball image data to generate a first feature map, a second feature map, and a third feature map obtained by fusing the first feature map and the second feature map; wherein the fusion is averaging the first feature map and the second feature map having the same or similar spatial resolution; Processing the third feature map to obtain a semantic segmentation result corresponding to the eyeball image data; The processing of the third feature map to obtain a semantic segmentation result corresponding to the eye image data includes: Performing classification processing on the third feature map to determine the category of the eyeball image data, and performing positioning processing on the third feature map to determine the center position and radius size information of the eyeball image data; The category, the center position and the radius size information are used as the semantic segmentation result.
2. The image processing method according to claim 1, characterized in that: Performing positioning processing on the third feature map to determine the center position and radius size information of the eyeball image data includes: Respectively obtain the abscissa of the center of the circle, the ordinate of the center of the circle, the value of the radius, the abscissa offset, the ordinate offset and the radius offset corresponding to the pupil data, the iris data and the target ring data; Determine the target horizontal coordinate of the center of the circle based on the horizontal coordinate of the center of the circle, the horizontal coordinate offset, and the radius; Based on the values of the circle center ordinate, the ordinate offset, and the radius, determine the target ordinate of the circle center position; Based on the value of the radius and the radius offset, radius size information is determined.
3. The image processing method according to claim 2, characterized in that: The center position and radius size information are determined by the following formula: ; ; ;in, For radius size information, is the value of the radius, is the radius offset, is the vertical coordinate of the center of the circle, is the target ordinate, is the vertical axis offset, is the target horizontal coordinate, is the horizontal coordinate of the center of the circle, is the horizontal axis offset.
4. The image processing method according to claim 1, characterized in that: The processing of the third feature map to obtain a semantic segmentation result corresponding to the eyeball image includes: Performing sliding window processing on the third feature map to obtain a candidate region; wherein the candidate region is composed of vectors corresponding to each anchor point; Normalizing the candidate region to obtain a target feature map; The target feature map is processed to obtain a semantic segmentation result corresponding to the eyeball image.
5. The image processing method according to claim 1, characterized in that: The method further comprises: Performing pixel segmentation processing on the third feature map to obtain pixel points corresponding to iris data, pupil data and target ring data; Based on the pixel points, binary mask images corresponding to the iris data, pupil data and target ring data are drawn respectively.
6. The image processing method according to any one of claims 1 to 5, characterized in that: The first feature map, the second feature map and the third feature map are obtained by a pre-trained semantic segmentation network model; wherein the pre-trained semantic segmentation network model includes: a backbone network and a region recommendation network, and the backbone network includes: an encoder structure and a decoder structure; The eye image data is the input of the encoder structure, the first feature map is the output of the encoder structure and a part of the input of the t-th decoder structure, the second feature map is the output of the t-1th decoder structure and another part of the input of the t-th decoder structure, the third feature map is the output of the t-th decoder structure and the input of the region recommendation network, t is an integer greater than 1, and the semantic segmentation result is the output of the region recommendation network.
7. An image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring eyeball image data; wherein the eyeball image data includes: iris data, pupil data and target ring data; A first processing module is used to process the eyeball image to generate a first feature map, a second feature map and a third feature map for fusion with the first feature map, wherein the fusion is to average the first feature map and the second feature map with the same or similar spatial resolution, and the third feature map is a feature map obtained by averaging the first feature map and the second feature map; A second processing module is used to process the third feature map to obtain a semantic segmentation result corresponding to the eye image; The second processing module includes: a first processing unit, used to classify the third feature map to determine the category of the eye image data; a second processing unit, used to position the third feature map to determine the center position and radius size information of the eye image data; and a first determination unit, used to use the category, center position and radius size information as the semantic segmentation result.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image processing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image processing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the image processing method according to any one of claims 1 to 6.
