Object recognition method and device based on image segmentation, and electronic device

By combining image segmentation and classification models, segmented images of 3D objects are generated, solving the problem of needing to add hardware for 3D shape recognition and achieving cost-effective image segmentation and depth acquisition.

CN117152440BActive Publication Date: 2026-03-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies require additional hardware for image segmentation and recognition of three-dimensional shapes, leading to increased costs, and financial institutions do not have the hardware modification capabilities for their cameras.

Method used

By inputting the image to be identified into the segmentation model, a probability matrix is ​​generated and integrated into pixel blocks. The target classification model outputs position and category information, and combined with color filling processing, a target segmentation image is generated to identify three-dimensional objects, backgrounds, and edges.

Benefits of technology

It can perform image segmentation and recognition of three-dimensional shapes without adding hardware, reducing costs and obtaining depth information, making it suitable for customer facial recognition in financial institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152440B_ABST
    Figure CN117152440B_ABST
Patent Text Reader

Abstract

The application discloses a kind of object identification method and device based on image segmentation, electronic equipment, it is related to artificial intelligence technical field or other related technical fields, the method includes: the picture to be identified is input into segmentation model, output probability matrix, the object information of three-dimensional object contained in the picture to be identified, each pixel point in probability matrix is integrated, generate N pixel block, pixel block is input into target classification model, output the position information and category information where the pixel block is located;Based on the position information and category information where each pixel block is located, color filling processing is carried out to pixel block, and based on the color filling result of all pixel blocks, output target segmentation picture, the identification result of three-dimensional object, picture background, object and background edge is contained in target segmentation picture.The application solves the technical problem of additional increase of hardware equipment and cost increase in the related art when carrying out image segmentation identification of three-dimensional shape.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology or other related fields, and more specifically, to an object recognition method and apparatus, and an electronic device based on image segmentation. Background Technology

[0002] Currently, real-time image segmentation and object recognition are required in many scenarios, such as facial recognition or third-party portrait recognition for login verification in financial systems, and object localization during camera photography. In related technologies, the image segmentation algorithms used are generally designed to identify the object to be segmented and its surrounding background; therefore, many networks output images with only black and white colors (white for the object to be segmented and black for the background). For 3D object shape recognition, the common approach is to add hardware, such as a telephoto camera or a radar sensor.

[0003] However, current image segmentation and recognition of three-dimensional shapes requires additional hardware and extra expenses. Financial institutions do not have the conditions for hardware modification of their existing cameras, and the modification cost is high.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides an object recognition method, apparatus, and electronic device based on image segmentation, which at least solves the technical problem in related technologies that additional hardware equipment is required and costs are increased when performing image segmentation and recognition of three-dimensional shapes.

[0006] According to one aspect of the present invention, an object recognition method based on image segmentation is provided, comprising: inputting an image to be recognized into a segmentation model and outputting a probability matrix, wherein the image to be recognized contains object information of a three-dimensional object, the segmentation model is used to segment each pixel of the image to be recognized, and each number in the probability matrix represents the probability value of the pixel being the pixel at the location of the three-dimensional object; integrating the pixels in the probability matrix to generate N pixel blocks, wherein N is a positive integer; inputting the pixel blocks into a target classification model and outputting the location information and category information of the pixel blocks; performing color filling processing on the pixel blocks based on the location information and category information of each pixel block, and outputting a target segmented image based on the color filling results of all pixel blocks, wherein the target segmented image contains: the three-dimensional object, the image background, and the recognition results of the object and the background edges.

[0007] Optionally, the segmentation model is pre-trained. Training the segmentation model includes: acquiring a set of object images collected by the financial institution's business terminal during a historical time period, and object segmentation results. The object image set contains M images involving historical 3D objects, and the 3D objects contain T business processing objects using the business terminal and / or P customer objects. The object segmentation results include object segmentation results obtained after segmenting each image involving the historical 3D objects, where M, T, and P are integers greater than or equal to 2. Based on the object image set and the object segmentation results, a training set and a validation set are generated. The training set is used to train the initial network. The model is trained, wherein the initial network model includes an input layer, an activation function, a loss function, and an output layer. The input layer is used to input images, and the activation function and the loss function are used to adjust the segmentation network and network permission parameters for each historical 3D object in the image. The output layer is used to output the object segmentation result. After all images in the training set have been input, the initial network model is used to verify the segmentation similarity using the validation set. If the similarity between the objects obtained after the initial network model segments the input images and the segmented objects in the object segmentation result exceeds a preset similarity threshold, the training is confirmed to be complete, and the segmentation model is output.

[0008] Optionally, the step of inputting the image to be identified into the segmentation model and outputting a probability matrix includes: after inputting the image to be identified into the segmentation model, using the segmentation model to segment all pixels of the image to be identified according to a preset segmentation ratio parameter; using the segmentation model to perform object recognition on the pixels and outputting the probability value of the pixel being the three-dimensional object; and integrating all the pixels to generate the probability matrix.

[0009] Optionally, the probability matrix has the same size as the image size of the image to be identified, and the length and width parameters of the probability matrix are set according to the length and width parameters of the image to be identified.

[0010] Optionally, the step of integrating each pixel in the probability matrix to generate N pixel blocks includes: receiving N predefined pixel adjacent ranges for the image to be identified; and aggregating all pixels within each pixel adjacent range to generate the N pixel blocks.

[0011] Optionally, the step of inputting the pixel block into a target classification model and outputting the location information and category information of the pixel block includes: inputting the pixel block into a decision tree device in the target classification model and outputting a first classification result, wherein the first classification result includes the location information and category information of the pixel block; inputting the pixel block into a Naive Bayes classification device in the target classification model and outputting a second classification result, wherein the second classification result includes the location information and category information of the pixel block; for each pixel block, comparing the first classification result and the second classification result corresponding to the pixel block; and based on the comparison result, outputting the location information and category information of the pixel block.

[0012] Optionally, the step of outputting the location information and category information of the pixel block based on the comparison result includes: outputting the location information and category information of the pixel block when the comparison result indicates that the first classification result and the second classification result are consistent; or, expanding the pixel neighbor range of the pixel block when the comparison result indicates that the first classification result and the second classification result are different; performing the step of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block to obtain a new comparison result; and outputting the location information and category information of the pixel block when the new comparison result indicates that the first classification result and the second classification result of the pixel block are the same.

[0013] Optionally, the step of color-filling the pixel block based on the location information and category information of each pixel block includes: filling the pixel block with a first identifier color when the location information and category information indicate that the pixel block is at the edge of the object and the background; filling the pixel block with a second identifier color when the location information and category information indicate that the pixel block is inside the object of the three-dimensional object; and filling the pixel block with a third identifier color when the location information and category information indicate that the pixel block is inside the background of the image, wherein the first identifier color, the second identifier color, and the third identifier color are different from each other.

[0014] According to another aspect of the present invention, an object recognition device based on image segmentation is also provided, comprising: an image input unit, configured to input an image to be recognized into a segmentation model and output a probability matrix, wherein the image to be recognized contains object information of a three-dimensional object, the segmentation model is configured to segment each pixel of the image to be recognized, and each number in the probability matrix represents the probability value of the pixel being the pixel at the location of the three-dimensional object; a pixel integration unit, configured to integrate each pixel in the probability matrix to generate N pixel blocks, wherein N is a positive integer; a pixel block input unit, configured to input the pixel blocks into a target classification model and output the location information and category information of the pixel blocks; and a recognition unit, configured to perform color filling processing on the pixel blocks based on the location information and category information of each pixel block, and output a target segmented image based on the color filling results of all pixel blocks, wherein the target segmented image includes: the three-dimensional object, the image background, and the recognition results of the object and the background edges.

[0015] Optionally, the segmentation model is pre-trained. When training the segmentation model, the following modules are used: an acquisition module, used to acquire a set of object images collected by the financial institution's business terminal during a historical time period, and object segmentation results, wherein the object image set contains M images involving historical 3D objects, the 3D objects contain T business processing objects using the business terminal and / or P customer objects, and the object segmentation results contain object segmentation results obtained after segmenting each image involving the historical 3D objects, where M, T, and P are integers greater than or equal to 2; a generation module, used to generate a training set and a validation set based on the object image set and the object segmentation results; and a training module, used to use the training... The training set trains an initial network model, which includes an input layer, an activation function, a loss function, and an output layer. The input layer is used to input images, and the activation function and loss function are used to adjust the segmentation network and network permission parameters for each historical 3D object in the image. The output layer is used to output the object segmentation result. A verification module is used to verify the segmentation similarity of the initial network model with all images in the training set. A confirmation module is used to confirm the training is complete and output the segmentation model if the similarity between the objects obtained after the initial network model segments the input images and the segmented objects in the object segmentation result exceeds a preset similarity threshold.

[0016] Optionally, the image input unit includes: a segmentation module, used to segment all pixels of the image to be identified according to a preset segmentation ratio parameter after the image to be identified is input into the segmentation model; a recognition module, used to perform object recognition on the pixels using the segmentation model and output the probability value of the pixel being the three-dimensional object; and an integration module, used to integrate all the pixels to generate the probability matrix.

[0017] Optionally, the size of the probability matrix is ​​the same as the size of the image to be identified, and the length and width parameters of the probability matrix are set according to the length and width parameters of the image to be identified.

[0018] Optionally, the pixel integration unit includes: a first receiving module, configured to receive N predefined pixel adjacent ranges for the image to be identified; and an aggregation processing module, configured to aggregate all pixels within the adjacent range of each pixel to generate the N pixel blocks.

[0019] Optionally, the pixel block input unit includes: a first input module, configured to input the pixel block into a decision tree device in the target classification model and output a first classification result, wherein the first classification result includes the location information and category information of the pixel block; a second input module, configured to input the pixel block into a Naive Bayes classification device in the target classification model and output a second classification result, wherein the second classification result includes the location information and category information of the pixel block; a comparison module, configured to compare the first classification result and the second classification result corresponding to each pixel block; and an output module, configured to output the location information and category information of the pixel block based on the comparison result.

[0020] Optionally, the output module includes: a first output submodule, configured to output the location information and category information of the pixel block when the comparison result indicates that the first classification result and the second classification result are consistent; or, an expansion submodule, configured to expand the pixel adjacent range of the pixel block when the comparison result indicates that the first classification result and the second classification result are different; an execution submodule, configured to perform the step of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block to obtain a new comparison result; and a second output submodule, configured to output the location information and category information of the pixel block when the new comparison result indicates that the first classification result and the second classification result of the pixel block are the same.

[0021] Optionally, the recognition unit includes: a first filling module, configured to fill the pixel block with a first identifier color when the location information and the category information indicate that the pixel block is at the edge of the object and the background; a second filling module, configured to fill the pixel block with a second identifier color when the location information and the category information indicate that the pixel block is inside the object of the three-dimensional solid object; and a third filling module, configured to fill the pixel block with a third identifier color when the location information and the category information indicate that the pixel block is inside the background of the image, wherein the first identifier color, the second identifier color, and the third identifier color are different from each other.

[0022] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform any of the above-described object recognition methods based on image segmentation.

[0023] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the image segmentation-based object recognition method described above.

[0024] In this disclosure, the image to be identified is input into a segmentation model, which segments each pixel of the image and outputs a probability matrix. Each number in the probability matrix represents the probability value of the pixel being the location of a 3D object. The pixels in the probability matrix are integrated to generate N pixel blocks. The pixel blocks are input into a target classification model, which outputs the location information and category information of the pixel block. Based on the location information and category information of each pixel block, the pixel blocks are color-filled. Based on the color-filling results of all pixel blocks, a target segmented image is output. The target segmented image includes: the recognition results of the 3D object, the image background, and the edges between the object and the background.

[0025] In this disclosure, the probability matrix identified by the segmentation model can be fully utilized, combined with the classification model of conventional machine learning, to identify the information of each pixel position in the image, obtain the depth information of the three-dimensional object in the image, and distinguish the three-dimensional object, background and edge information. The depth information can be obtained by only image segmentation and recognition software / system, without the need for additional hardware equipment, thus reducing costs. This solves the technical problem in related technologies that require additional hardware equipment and increase costs when performing image segmentation and recognition of three-dimensional shapes.

[0026] This invention utilizes the results of image segmentation for processing to obtain the 3D shape information of the original object, and finally generates a corresponding color-filled image, thereby reducing the need for additional hardware. Attached Figure Description

[0027] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0028] Figure 1 This is a flowchart of an optional object recognition method based on image segmentation according to an embodiment of the present invention;

[0029] Figure 2 This is the overall flow of a semantic-based image segmentation training method according to an embodiment of the present invention;

[0030] Figure 3 This is a flowchart of a semantic-based image segmentation method according to an embodiment of the present invention;

[0031] Figure 4 This is a schematic diagram of an optional image segmentation-based object recognition device according to an embodiment of the present invention;

[0032] Figure 5 This is a hardware structure block diagram of an electronic device (or mobile device) for an object recognition method for image segmentation according to an embodiment of the present invention. Detailed Implementation

[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0035] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:

[0036] Object depth of field refers to the representation of how far away an object is in an image. Mastering object depth of field can be used to emphasize the three-dimensional main object in an image and present a unique visual effect.

[0037] Segmentation models refer to the task of assigning each pixel in an image to a different category using computer vision techniques.

[0038] FCN, or Fully Convolutional Network, is one of the earliest segmentation network structures. It achieves pixel-level segmentation by replacing fully connected layers with convolutional layers.

[0039] U-Net is a commonly used segmentation network architecture, similar in structure to an encoder-decoder architecture. U-Net improves segmentation accuracy by using skip connections to combine low-level and high-level features.

[0040] DeepLab is a segmentation network structure based on FCN. It expands the receptive field and improves the accuracy of segmentation by adding operations such as dilated convolution and spatial pyramid pooling.

[0041] A decision tree is a machine learning algorithm used for classification and regression problems. It is a tree-like structure where each internal node represents a feature or attribute, each branch represents different values ​​of that feature, and each leaf node represents a class or a numerical value. Decision trees partition features, select branches based on feature values, and ultimately reach a leaf node to make a prediction.

[0042] The Naive Bayes model is a classification algorithm based on probability statistics and Bayes' theorem. The working principle of the Naive Bayes model is as follows: First, the prior probability of each class and the conditional probability of each feature in each class are calculated using the training dataset. Then, for a new sample, the posterior probability of it belonging to each class is calculated according to Bayes' theorem. Finally, the class with the highest posterior probability is selected as the prediction result.

[0043] It should be noted that the object recognition method and apparatus based on image segmentation in this disclosure can be used in the field of artificial intelligence technology to segment and recognize 3D objects in images to be recognized, and can also be used in any field other than artificial intelligence technology to segment and recognize 3D objects in images to be recognized. This disclosure does not limit the application field of the object recognition method and apparatus based on image segmentation.

[0044] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) disclosed herein are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of each region, and corresponding access points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information must be sent to the aforementioned user or organization through the interface, and the relevant information will be obtained only after receiving consent from the aforementioned user or organization.

[0045] The following embodiments of the present invention can be applied to various systems / applications / devices that verify encrypted data based on artificial intelligence. The present invention fully utilizes the probability matrix identified by the segmentation model, combined with the one-dimensional matrix classification strength of conventional machine learning, to correct areas where lighting may affect image segmentation, thereby obtaining object depth information. This not only eliminates the need for hardware upgrades to existing image acquisition devices, but also allows for depth acquisition through software operations. For common customer face recognition in financial institutions (detecting whether a photograph is used; real faces possess depth information), the final segmentation results generated by the present invention can be used to determine object depth and achieve face detection.

[0046] This invention utilizes the results of image segmentation for processing to obtain the 3D shape information of the original object, and finally generates a corresponding color-filled image, thereby reducing the need for additional hardware.

[0047] The present invention will now be described in detail with reference to various embodiments.

[0048] Example 1

[0049] According to an embodiment of the present invention, an embodiment of an object recognition method based on image segmentation is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0050] Figure 1 This is a flowchart of an optional object recognition method based on image segmentation according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0051] Step S101: Input the image to be identified into the segmentation model and output a probability matrix. The image to be identified contains object information of a three-dimensional object. The segmentation model is used to segment each pixel of the image to be identified. Each number in the probability matrix represents the probability value of the pixel being the pixel of the location of the three-dimensional object.

[0052] Step S102: Integrate the pixels in the probability matrix to generate N pixel blocks, where N is a positive integer;

[0053] Step S103: Input the pixel block into the target classification model and output the location information and category information of the pixel block;

[0054] Step S104: Based on the location information and category information of each pixel block, perform color filling processing on the pixel block, and output the target segmentation image based on the color filling results of all pixel blocks. The target segmentation image includes: the recognition results of the three-dimensional object, the image background, and the object and background edges.

[0055] Through the above steps, the image to be identified can be input into the segmentation model, which segments each pixel of the image and outputs a probability matrix. Each number in the probability matrix represents the probability value of that pixel being the location of a 3D object. The pixels in the probability matrix are integrated to generate N pixel blocks. These pixel blocks are input into the target classification model, which outputs the location and category information of each pixel block. Based on the location and category information of each pixel block, color filling is performed on the pixel blocks, and the target segmented image is output based on the color filling results of all pixel blocks. The target segmented image includes the recognition results of the 3D object, the image background, and the edges between the object and the background. In this embodiment, the probability matrix identified by the segmentation model can be fully utilized, combined with a conventional machine learning classification model, to identify the location information of each pixel in the image, obtain the depth information of the 3D object in the image, and distinguish the 3D object, background, and edge information. The depth information can be obtained using only image segmentation and recognition software / system, without the need for additional hardware, thus reducing costs. This solves the technical problem in related technologies where additional hardware is required and costs are increased when performing image segmentation and recognition of 3D shapes.

[0056] The embodiments of the present invention will now be described in detail with reference to the steps described above.

[0057] In this embodiment of the invention, to achieve accurate identification of depth objects / 3D objects / 3D objects in images, a segmentation model needs to be pre-trained to segment each pixel in the image. Optionally, the segmentation model is pre-trained. Training the segmentation model includes: acquiring a set of object images collected by the financial institution's business terminal during a historical time period, along with object segmentation results. The object image set contains M images involving historical 3D objects, and the 3D objects include T business processing objects using the business terminal and / or P customer objects. The object segmentation results include the object segmentation results obtained after segmenting each image involving historical 3D objects, where M, T, and P are integers greater than or equal to 2. Based on the object image set and object segmentation results, a training set and a validation set are generated. The training set is used to test the initial network... The network model is trained, and the initial network model includes an input layer, an activation function, a loss function, and an output layer. The input layer is used to input images, the activation function and loss function are used to adjust the segmentation network and network permission parameters for each historical 3D object in the image, and the output layer is used to output the object segmentation results. All images in the training set have been input, and the initial network model is used to verify the segmentation similarity using a validation set. If the similarity between the objects obtained after the initial network model segments the input images and the segmented objects in the object segmentation results exceeds a preset similarity threshold, the training is considered complete, and the segmentation model is output.

[0058] In this embodiment of the invention, the segmentation model can be any common segmentation network structure, and it has been trained to segment basic objects (faces, hands, etc.). The segmentation network structure refers to the deep learning network structure used for segmentation tasks, such as the FCN network structure, the U-Net network structure, and the DeepLab network structure. Depending on the specific application scenario and requirements, a suitable network structure can be selected for image segmentation tasks.

[0059] Step S101: Input the image to be recognized into the segmentation model and output the probability matrix.

[0060] In this embodiment of the invention, the image to be identified contains object information of a three-dimensional object. The segmentation model is used to segment each pixel of the image to be identified. Each number in the probability matrix represents the probability value of the pixel being the pixel at the location of the three-dimensional object.

[0061] The image to be identified can be any image containing a three-dimensional object / 3D object, such as a video frame image that commonly contains customer facial information in financial institutions.

[0062] It should be noted that the three-dimensional objects mentioned in this embodiment can refer to objects with three-dimensional spatial attributes, or they can be a three-dimensional part of an object, such as a customer's limbs (e.g., head, face, upper body, arms, etc.) in the context of a financial institution. When collecting images to be identified, video may be collected first, and then images containing three-dimensional objects may be extracted from the video and used as the images to be identified. A single image to be identified may contain one or more three-dimensional objects.

[0063] Optionally, the size of the probability matrix involved in this embodiment is the same as the size of the image to be identified, and the length and width parameters of the probability matrix are set according to the length and width parameters of the image to be identified.

[0064] Optionally, step S101 includes: after inputting the image to be recognized into the segmentation model, using the segmentation model to segment all pixels of the image to be recognized according to a preset segmentation ratio parameter; using the segmentation model to perform object recognition on the pixels and outputting the probability value of the pixel being a three-dimensional object; integrating all pixels to generate a probability matrix.

[0065] In this embodiment, the probability matrix refers to the result generated after the segmentation model. This result is a matrix with the same dimensions as the original image, and each number in the matrix represents the probability that the pixel is an object.

[0066] The image to be identified is used as the original image and input into the segmentation model. Then, the segmentation model, which has been trained and optimized, is used to segment the image to be identified and outputs a probability matrix. The probability matrix can be numerically represented to indicate whether it is a three-dimensional object. For example, the value of a pixel containing a three-dimensional object is defined as 1, and the background is defined as 0.

[0067] Step S102: Integrate the pixels in the probability matrix to generate N pixel blocks, where N is a positive integer.

[0068] Optionally, step S102 includes: receiving N predefined adjacent ranges of pixels in the image to be identified; and aggregating all pixels within the adjacent range of each pixel to generate N pixel blocks.

[0069] In existing technologies, after obtaining the probability matrix, a certain threshold is set, and then binarization is performed. However, this one-size-fits-all approach, while generally satisfying the needs of object segmentation, ignores the object's three-dimensional information and can lead to misidentification.

[0070] Therefore, in this embodiment, after obtaining the probability matrix, a dynamic threshold method is used to select pixels within a certain range for further judgment to avoid misidentification. However, pixels within a certain range may be very scattered and numerous, so it is necessary to integrate them, combining pixels from adjacent ranges to generate multiple new pixel blocks.

[0071] It should be noted that the pixel block in this embodiment is a large pixel composed of n adjacent pixels. For example, using a clustering algorithm to calculate pixel blocks with a threshold between 0.3 and 0.85, since this threshold range is relatively large, a large number of pixels that meet the criteria may appear and be quite scattered. Therefore, it is necessary to use a certain method to aggregate pixels to form pixel blocks in order to reduce the amount of computation.

[0072] Optionally, when aggregating all pixels within the adjacent range of each pixel, the aggregation method can be any clustering algorithm, or a histogram can be used directly. The goal is to aggregate pixels within a certain distance to form pixel blocks. Pixel blocks may contain pixels outside the threshold, in order to preserve the image information of the original image to be identified.

[0073] Optionally, there are many ways to aggregate all pixels within the adjacent range of each pixel in this embodiment, such as mean aggregation, median aggregation, maximum value aggregation, and weighted average aggregation. The appropriate aggregation method needs to be selected according to the specific application scenario and requirements.

[0074] Step S103: Input the pixel block into the target classification model and output the location information and category information of the pixel block.

[0075] Optionally, step S103 includes: inputting a pixel block into a decision tree device in the target classification model and outputting a first classification result, wherein the first classification result includes the location information and category information of the pixel block; inputting a pixel block into a Naive Bayes classification device in the target classification model and outputting a second classification result, wherein the second classification result includes the location information and category information of the pixel block; for each pixel block, comparing the first classification result and the second classification result corresponding to the pixel block; and based on the comparison result, outputting the location information and category information of the pixel block.

[0076] The location information includes, but is not limited to: pixel block coordinates determined after establishing a coordinate system with the top corner of the image to be identified as the origin point, or pixel block coordinates determined after establishing a coordinate system with any landmark point of the three-dimensional object as the origin point.

[0077] The category information can include: background category, object category, and edge category, achieving a three-class classification operation. In this embodiment, multiple newly generated pixel blocks are input into a decision tree with three-class classification and a Naive Bayes classification device for classification. Here, the three classifications refer to the three categories: 3D object / body and background edge, 3D object / body within and background. The results of the two classifications intersect, and a judgment can only be made if the results of the two classifications are completely consistent.

[0078] Decision trees and Naive Bayes classification yield three categories. Generally, segmentation algorithms can lead to misidentification due to factors such as lighting and shooting angle. This invention adds a classification algorithm to address this issue, classifying the objects as either within the 3D object or within the background. The edges of the 3D object and background are a crucial basis for determining object depth. Object edges often create shadows due to varying light reflection, which are often ignored in traditional segmentation models that use a one-size-fits-all approach, resulting in uneven edges. Therefore, edge detection is critical for obtaining object depth.

[0079] Optionally, the step of outputting the location information and category information of the pixel block based on the comparison result includes: outputting the location information and category information of the pixel block when the comparison result indicates that the first classification result and the second classification result are consistent; or, expanding the pixel neighbor range of the pixel block when the comparison result indicates that the first classification result and the second classification result are different; performing the step of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block to obtain a new comparison result; and outputting the location information and category information of the pixel block when the new comparison result indicates that the first classification result and the second classification result of the pixel block are the same.

[0080] In this embodiment, two classification algorithms are used for classification. The purpose is to verify each other. That is, the classification probabilities of the two algorithms need to be consistent or close before it can be decided whether to adopt the classification result. If the two algorithms classify completely differently, the area of ​​the pixel block needs to be increased and the classification is performed again until the two classifications are consistent.

[0081] Step S104: Based on the location information and category information of each pixel block, perform color filling processing on the pixel blocks, and output the target segmentation image based on the color filling results of all pixel blocks.

[0082] The target segmentation image includes: the recognition results of the three-dimensional object, the image background, and the edges of the object and the background.

[0083] Optionally, step S104 includes: filling the pixel block with a first identifier color when the location information and category information indicate that the pixel block is at the edge of the object and the background; filling the pixel block with a second identifier color when the location information and category information indicate that the pixel block is inside the object of the three-dimensional solid object; and filling the pixel block with a third identifier color when the location information and category information indicate that the pixel block is inside the background of the image, wherein the first identifier color, the second identifier color, and the third identifier color are different from each other.

[0084] In this embodiment, the fill color is defined by the user and there are no specific restrictions. For example, the first identifier color is gray, the second identifier color is white, and the third identifier color is black, and a three-color gradient identifier is formed by gray, black, and white.

[0085] Optionally, in this embodiment, after color filling, a segmentation result with a gradient effect is generated based on the subsequent judgment result and the segmentation result.

[0086] In addition, after color filling processing, this embodiment can also fill the pixel blocks that have been filled with color into a pre-generated probability matrix.

[0087] Through the above embodiments, not only is it unnecessary to upgrade existing image acquisition devices, but depth acquisition can also be completed through software operations. For customer face recognition commonly used by financial institutions (detecting whether a photo is used, and real faces have depth information), the final segmentation results generated by the embodiments of the present invention can be used to determine the object depth and realize face detection.

[0088] The present invention will now be described with reference to a specific embodiment.

[0089] Figure 2 This is the overall flow of a semantic-based image segmentation training method according to an embodiment of the present invention, such as... Figure 2 As shown, it includes:

[0090] S0: Input the image to be recognized into the pre-trained segmentation model to obtain the segmented probability matrix.

[0091] The image to be identified can be any image containing a three-dimensional object, such as customer facial information commonly seen in financial institutions.

[0092] The probability matrix mentioned in this embodiment refers to the result generated after the segmentation model. This result is a matrix with the same dimensions as the original image, and each number in the matrix represents the probability that the pixel is an object.

[0093] The image to be identified is used as the original image, and the original image is used as the model input. The label is the target matrix, where the value inside the object is 1 and the background is 0. In image visualization, this means that the background is black except for the object, which is white.

[0094] S1: Input the pixels around a certain threshold in the probability matrix into the decision tree and the Naive Bayes model to make judgments and obtain the judgment results.

[0095] This invention employs a dynamic thresholding method to select pixels within a certain range for further evaluation to avoid misidentification. However, pixels within a certain range may be highly dispersed and numerous, necessitating consolidation. This involves integrating pixels from adjacent ranges to generate a new n*n pixel block. For example, in segmented finger information, a certain range represents the boundary between the finger and the background, and 50 pixels in this vicinity meet the threshold. Therefore, a new n*n pixel block can be generated by selecting the region containing these 50 pixels, where n is dynamically variable.

[0096] The newly generated pixel blocks are input to a decision tree with three classification methods and a Naive Bayes algorithm for classification processing. Here, the three classifications refer to object and background edges, object interior, and background. The results of the two methods intersect, and a judgment can only be made if the results of the two methods are completely consistent.

[0097] S2: Generate a segmentation result with a gradient effect based on the post-judgment result and the segmentation result.

[0098] After processing by the classification model, the specific location information of different pixel blocks in the object and background can be obtained. Then, the probability matrix of the pixel block in the original segmentation is processed. If the pixel block is at the edge junction, the result is represented by different shades of gray (the gray depth is adjusted according to the probability). If the pixel block is inside the object, it is represented by white. If it is in the background, it is represented by black.

[0099] Figure 3 This is a flowchart of a semantic-based image segmentation method according to an embodiment of the present invention, such as... Figure 3 As shown, the image segmentation method includes:

[0100] S21: Input the image to be recognized into the pre-trained segmentation model to obtain the segmented probability matrix.

[0101] S22: Use a clustering algorithm to calculate pixel blocks with a threshold between 0.3 and 0.85.

[0102] Because this threshold has a large range, a large number of pixels that meet the criteria may appear scattered. Therefore, it is necessary to use a certain method to aggregate pixels into pixel blocks to reduce the amount of computation.

[0103] It should be noted that the aggregation method can use any clustering algorithm, or even a histogram. The goal is to aggregate pixels within a certain distance to form pixel blocks. Pixel blocks may contain pixels outside the threshold, in order to preserve the information of the original image.

[0104] S23: Input the pixel blocks into the trained decision tree and the Naive Bayes model respectively to obtain the classification of the pixel blocks.

[0105] The decision tree and Naive Bayes algorithm have three classification methods: object and background edge, object inside, and background inside. Generally, segmentation algorithms can lead to misidentification due to factors such as lighting and shooting angle. The classification algorithm added in this embodiment of the invention is designed to solve this problem, corresponding to the two categories of object inside and background inside.

[0106] The portion located at the edge of the object and the background is an important basis for judging the depth of field of the object in the embodiments of the present invention. The object edge often casts shadows due to different light reflections. However, shadows are ignored in the traditional segmentation model with its one-size-fits-all approach, resulting in uneven edges. Therefore, judging the edge is particularly crucial for obtaining the depth of field of the object.

[0107] Two classification algorithms are used here for mutual verification. That is, the classification probabilities of the two algorithms need to be close to determine which classification to use. If the two algorithms classify completely different categories, the area of ​​the pixel block needs to be increased and the classification is performed again until the two classifications are consistent.

[0108] S24: Process the pixel blocks according to the classification of pixel blocks based on the two algorithms in S23.

[0109] If a pixel is located at an edge, the result is represented by different shades of gray (the gray depth is adjusted according to probability). If the pixel is inside an object, it is represented by white, and if it is in the background, it is represented by black.

[0110] S25: Fill the pixel blocks into the generated probability matrix to obtain a color gradient image.

[0111] Currently, object depth recognition relies on adding hardware to directly acquire object depth information. While this method yields more accurate depth information, it increases hardware costs and is inconvenient to use. This invention improves upon this by proposing an image segmentation-based 3D object shape recognition strategy. It fully utilizes the probability matrix identified by the segmentation model and combines it with the one-dimensional matrix classification capabilities of conventional machine learning to correct for potential lighting effects in image segmentation, thereby obtaining object depth information.

[0112] The post-processing method of this invention not only does not require upgrading existing image acquisition devices, but also only requires software-level operation to complete the acquisition of depth of field. For customer face recognition commonly used in financial institutions (detecting whether a photo is used, and real faces have depth information), the final segmentation results generated by the embodiments of this invention can be used to determine the object depth of field and realize the detection of faces.

[0113] The following is a detailed description with reference to another embodiment.

[0114] Example 2

[0115] The object recognition device based on image segmentation provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.

[0116] Figure 4This is a schematic diagram of an optional image segmentation-based object recognition device according to an embodiment of the present invention, such as... Figure 4 As shown, the object recognition device based on image segmentation may include: an image input unit 40, a pixel integration unit 41, a pixel block input unit 42, and a recognition unit 43.

[0117] The image input unit 40 is used to input the image to be recognized into the segmentation model and output a probability matrix. The image to be recognized contains object information of a three-dimensional object. The segmentation model is used to segment each pixel of the image to be recognized. Each number in the probability matrix represents the probability value of the pixel being the pixel of the location of the three-dimensional object.

[0118] Pixel integration unit 41 is used to integrate each pixel in the probability matrix to generate N pixel blocks, where N is a positive integer;

[0119] The pixel block input unit 42 is used to input pixel blocks into the target classification model and output the location information and category information of the pixel block;

[0120] The recognition unit 43 is used to perform color filling processing on the pixel blocks based on the location information and category information of each pixel block, and output the target segmentation image based on the color filling results of all pixel blocks. The target segmentation image includes: the recognition results of the three-dimensional object, the image background, and the object and background edges.

[0121] The aforementioned object recognition device based on image segmentation can input the image to be recognized into the segmentation model through the image input unit 40. The segmentation model segments each pixel of the image to be recognized and outputs a probability matrix. Each number in the probability matrix represents the probability value of the pixel being the location of a three-dimensional object. The pixel integration unit 41 integrates the pixels in the probability matrix to generate N pixel blocks. The pixel block input unit 42 inputs the pixel blocks into the target classification model and outputs the location information and category information of the pixel block. The recognition unit 43 performs color filling processing on the pixel blocks based on the location information and category information of each pixel block, and outputs the target segmentation image based on the color filling results of all pixel blocks. The target segmentation image includes: the recognition results of the three-dimensional object, the image background, and the object and background edges. In this embodiment, the probability matrix identified by the segmentation model can be fully utilized, combined with the classification model of conventional machine learning, to identify the information of each image pixel position, obtain the depth information of the three-dimensional object in the image, and distinguish the three-dimensional object, background and edge information. The depth information can be obtained by only image segmentation and recognition software / system without the need for additional hardware equipment, thus reducing costs. This solves the technical problem in related technologies that additional hardware equipment is required and costs are increased when performing image segmentation and recognition of three-dimensional shapes.

[0122] Optionally, the segmentation model is pre-trained. During training, the following modules are used: an acquisition module, used to acquire a set of object images collected by the financial institution's business terminal during a historical time period, along with object segmentation results. The object image set contains M images involving historical 3D objects, and the 3D objects contain T business processing objects and / or P customer objects. The object segmentation results include the object segmentation results obtained after segmenting each image involving historical 3D objects, where M, T, and P are integers greater than or equal to 2; a generation module, used to generate a training set and a validation set based on the object image set and object segmentation results; and a training module, used to employ training... The training set trains the initial network model, which includes an input layer, activation function, loss function, and output layer. The input layer takes in the images, while the activation and loss functions adjust the segmentation network and network permission parameters for each historical 3D object in the image. The output layer outputs the object segmentation results. The validation module verifies the segmentation similarity of the initial network model with all images in the training set. The confirmation module confirms the training is complete and outputs the segmentation model if the similarity between the objects obtained after the initial network model segments the input images and the segmented objects in the object segmentation results exceeds a preset similarity threshold.

[0123] Optionally, the image input unit includes: a segmentation module, used to segment all pixels of the image to be recognized according to a preset segmentation ratio parameter after the image to be recognized is input into the segmentation model; a recognition module, used to perform object recognition on the pixels using the segmentation model and output the probability value of the pixel being a three-dimensional object; and an integration module, used to integrate all pixels and generate a probability matrix.

[0124] Optionally, the size of the probability matrix is ​​the same as the size of the image to be identified, and the length and width parameters of the probability matrix are set according to the length and width parameters of the image to be identified.

[0125] Optionally, the pixel integration unit includes: a first receiving module for receiving N predefined adjacent pixel ranges of the image to be identified; and an aggregation processing module for aggregating all pixels within the adjacent range of each pixel to generate N pixel blocks.

[0126] Optionally, the pixel block input unit includes: a first input module for inputting the pixel block into a decision tree device in the target classification model and outputting a first classification result, wherein the first classification result includes the location information and category information of the pixel block; a second input module for inputting the pixel block into a Naive Bayes classification device in the target classification model and outputting a second classification result, wherein the second classification result includes the location information and category information of the pixel block; a comparison module for comparing the first classification result and the second classification result corresponding to each pixel block; and an output module for outputting the location information and category information of the pixel block based on the comparison result.

[0127] Optionally, the output module includes: a first output submodule, configured to output the location information and category information of the pixel block when the comparison result indicates that the first classification result and the second classification result are consistent; or, an extension submodule, configured to extend the pixel adjacent range of the pixel block when the comparison result indicates that the first classification result and the second classification result are different; an execution submodule, configured to perform the steps of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block to obtain a new comparison result; and a second output submodule, configured to output the location information and category information of the pixel block when the new comparison result indicates that the first classification result and the second classification result of the pixel block are the same.

[0128] Optionally, the recognition unit includes: a first filling module, used to fill the pixel block with a first identifier color when the location information and category information indicate that the pixel block is at the edge of the object and the background; a second filling module, used to fill the pixel block with a second identifier color when the location information and category information indicate that the pixel block is inside the object of the three-dimensional object; and a third filling module, used to fill the pixel block with a third identifier color when the location information and category information indicate that the pixel block is inside the background of the image, wherein the first identifier color, the second identifier color, and the third identifier color are different from each other.

[0129] The aforementioned object recognition device based on image segmentation may also include a processor and a memory. The image input unit 40, pixel integration unit 41, pixel block input unit 42, recognition unit 43, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0130] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, 3D object recognition based on image segmentation can be achieved. Based on the location and category information of each pixel block, color filling processing is performed on the pixel blocks, and the target segmentation image is output based on the color filling results of all pixel blocks. The target segmentation image includes: the 3D object, the image background, and the recognition results of the object and background edges.

[0131] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0132] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: inputting an image to be recognized into a segmentation model and outputting a probability matrix, wherein the image to be recognized contains object information of a three-dimensional object, the segmentation model is used to segment each pixel of the image to be recognized, and each number in the probability matrix represents the probability value of the pixel being the pixel at the location of the three-dimensional object; integrating the pixels in the probability matrix to generate N pixel blocks, wherein N is a positive integer; inputting the pixel blocks into a target classification model and outputting the location information and category information of the pixel block; performing color filling processing on the pixel blocks based on the location information and category information of each pixel block, and outputting a target segmented image based on the color filling results of all pixel blocks, wherein the target segmented image contains: the recognition results of the three-dimensional object, the image background, and the object and background edges.

[0133] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any of the above-described object recognition methods based on image segmentation.

[0134] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the image segmentation-based object recognition method described above.

[0135] Figure 5 This is a hardware structure block diagram of an electronic device (or mobile device) for an object recognition method for image segmentation according to an embodiment of the present invention. Figure 5 As shown, an electronic device may include one or more ( Figure 5 The processor 502 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 504 for storing data may also be included. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 5 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown.

[0136] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0137] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0139] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0142] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An object recognition method based on image segmentation, characterized in that, include: The image to be identified is input into the segmentation model, and a probability matrix is ​​output. The image to be identified contains object information of a three-dimensional object. The segmentation model is used to segment each pixel of the image to be identified. Each number in the probability matrix represents the probability value that the pixel is the pixel of the position of the three-dimensional object. The pixels in the probability matrix are integrated to generate N pixel blocks, where N is a positive integer; The pixel block is input into the target classification model, which outputs the location information and category information of the pixel block. Based on the location and category information of each pixel block, the pixel block is color-filled, and a target segmentation image is output based on the color-filling results of all pixel blocks. The target segmentation image includes: the three-dimensional object, the image background, and the recognition results of the object and background edges. The step of integrating the pixels in the probability matrix to generate N pixel blocks includes: Receive a predefined N-pixel adjacent range for the image to be identified; All pixels within the adjacent range of each pixel are aggregated to generate the N pixel blocks; The location information includes at least: pixel block coordinate information determined after establishing a coordinate system with the top corner of the image to be identified as the origin point, or pixel block coordinate information determined after establishing a coordinate system with any marker point of the three-dimensional object as the origin point. The category information includes: background category, object category, and edge category.

2. The object recognition method according to claim 1, characterized in that, The segmentation model is pre-trained, and training the segmentation model includes: Obtain a set of object images and object segmentation results collected by the financial institution's business terminal during a historical time period. The set of object images contains M images involving historical 3D objects. The 3D objects contain T business processing objects using the business terminal and / or P customer objects. The object segmentation results contain the object segmentation results obtained after segmenting each image involving the historical 3D objects. M, T, and P are integers greater than or equal to 2. Based on the object image set and the object segmentation results, a training set and a validation set are generated; The initial network model is trained using the training set, wherein the initial network model includes: an input layer, an activation function, a loss function, and an output layer. The input layer is used to input images, the activation function and the loss function are used to adjust the segmentation network and network permission parameters of each historical 3D object in the image, and the output layer is used to output the object segmentation results. All images in the training set have been input, and the initial network model is used to verify the segmentation similarity using the validation set. If the similarity between the objects obtained after the initial network model performs object segmentation on the input image and the segmented objects in the object segmentation result exceeds a preset similarity threshold, the training is confirmed to be complete, and the segmentation model is output.

3. The object recognition method according to claim 2, characterized in that, The steps of inputting the image to be recognized into the segmentation model and outputting the probability matrix include: After the image to be identified is input into the segmentation model, the segmentation model is used to segment all pixels of the image to be identified according to a preset segmentation ratio parameter; The segmentation model is used to identify objects in the pixels, and the probability value of the pixel being the three-dimensional object is output. Integrate all the aforementioned pixels to generate the probability matrix.

4. The object recognition method according to any one of claims 1 to 3, characterized in that, include: The size of the probability matrix is ​​the same as the size of the image to be identified, and the length and width parameters of the probability matrix are set according to the length and width parameters of the image to be identified.

5. The object recognition method according to claim 1, characterized in that, The steps of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block include: The pixel block is input into the decision tree device in the target classification model, and a first classification result is output, wherein the first classification result includes the location information and category information of the pixel block; The pixel block is input into the Naive Bayes classification device in the target classification model, and a second classification result is output, wherein the second classification result includes the location information and category information of the pixel block; For each pixel block, compare the first classification result corresponding to the pixel block with the second classification result; Based on the comparison results, the location and category information of the pixel block are output.

6. The object recognition method according to claim 5, characterized in that, Based on the comparison results, the steps for outputting the location and category information of the pixel block include: If the comparison result indicates that the first classification result is consistent with the second classification result, the location information and category information of the pixel block are output; or... If the comparison result indicates that the first classification result and the second classification result are different, the pixel adjacent range of the pixel block is expanded; the step of inputting the pixel block into the target classification model and outputting the location information and category information of the pixel block is performed to obtain a new comparison result; if the new comparison result indicates that the first classification result and the second classification result of the pixel block are the same, the location information and category information of the pixel block are output.

7. The object recognition method according to claim 1, characterized in that, The step of color-filling the pixel block based on its location and category information includes: When the location information and the category information indicate that the pixel block is at the edge of the object and the background, the pixel block is filled with a first identifier color; When the location information and the category information indicate that the pixel block is inside the object of the three-dimensional solid object, the pixel block is filled with a second identification color; When the location information and the category information indicate that the pixel block is inside the image background, the pixel block is filled with a third identifier color, wherein the first identifier color, the second identifier color and the third identifier color are all different from each other.

8. An object recognition device based on image segmentation, characterized in that, include: The image input unit is used to input the image to be recognized into the segmentation model and output a probability matrix. The image to be recognized contains object information of a three-dimensional object. The segmentation model is used to segment each pixel of the image to be recognized. Each number in the probability matrix represents the probability value that the pixel is the pixel of the position of the three-dimensional object. A pixel integration unit is used to integrate each pixel in the probability matrix to generate N pixel blocks, where N is a positive integer; The pixel block input unit is used to input the pixel block into the target classification model and output the location information and category information of the pixel block. The recognition unit is used to perform color filling processing on the pixel block based on the location information and category information of each pixel block, and output a target segmentation image based on the color filling results of all pixel blocks. The target segmentation image includes: the recognition results of the three-dimensional object, the image background, and the object and background edges. The pixel integration unit includes: a first receiving module, used to receive N predefined adjacent pixel ranges of the image to be identified; and an aggregation processing module, used to aggregate all pixels within the adjacent range of each pixel to generate N pixel blocks. The location information includes at least: pixel block coordinate information determined after establishing a coordinate system with the top corner of the image to be identified as the origin point, or pixel block coordinate information determined after establishing a coordinate system with any marker point of the three-dimensional object as the origin point. The category information includes: background category, object category, and edge category.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the object recognition method based on image segmentation as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the object recognition method based on image segmentation as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multiple organ segmentation method based on deep convolutional neural network and regional competition model

    CN106204587A

  • Image segmentation method and device, electronic device and storage medium

    CN110349161A