Search

CN-121982751-A - Image generation method, electronic device, and computer-readable medium

CN121982751ACN 121982751 ACN121982751 ACN 121982751ACN-121982751-A

Abstract

The embodiment of the application discloses an image generation method, electronic equipment and a computer readable medium. The method comprises the steps of obtaining an original fingerprint image, editing the original fingerprint image based on a mask image to generate an edited fingerprint image, conducting noise adding processing on the edited fingerprint image to generate a noisy fingerprint image, and conducting noise removing processing on the noisy fingerprint image through a pre-trained diffusion model to generate an augmented fingerprint image. This embodiment improves the authenticity of the augmented fingerprint image.

Inventors

  • LI SHUHENG
  • TANG YAO

Assignees

  • 天津极豪科技有限公司

Dates

Publication Date
20260505
Application Date
20250815

Claims (10)

  1. 1. An image generation method, the method comprising: acquiring an original fingerprint image; editing the original fingerprint image based on the mask image to generate an edited fingerprint image; carrying out noise adding processing on the edited fingerprint image to generate a noisy fingerprint image; And denoising the noisy fingerprint image through a pre-trained diffusion model to generate an augmented fingerprint image.
  2. 2. The method of claim 1, wherein editing the original fingerprint image based on the mask image to generate an edited fingerprint image comprises: Randomly acquiring a mask image, wherein the mask image comprises a target area, and the pixel value of the target area is determined based on the type of the fingerprint image to be simulated; And taking the region corresponding to the target region in the original fingerprint image as an editing region, and replacing the editing region with the target region to obtain the edited fingerprint image.
  3. 3. The method of claim 1, wherein editing the original fingerprint image based on the mask image to generate an edited fingerprint image comprises: randomly acquiring a mask image, wherein the mask image comprises a target area, and the pixel value of the target area is a non-zero preset value; Determining weights of the mask image and the original fingerprint image based on the type of the fingerprint image to be simulated; And taking the region corresponding to the target region in the original fingerprint image as an editing region, replacing the pixel value of each pixel point in the editing region with a weighted summation result to obtain the editing fingerprint image, wherein the weighted summation result is obtained based on the weight and the pixel values of the target region and the editing region.
  4. 4. The method of claim 1, wherein the denoising the edited fingerprint image generates a noisy fingerprint image, comprising: adding noise to the edited fingerprint image to a target time step, and generating the noisy fingerprint image, wherein the target time step is smaller than or equal to a maximum time step, and the maximum time step is used for converting the edited fingerprint image into pure Gaussian noise; Denoising the noisy fingerprint image through a pre-trained diffusion model to generate an augmented fingerprint image, comprising: and performing denoising processing on the noisy fingerprint image from the target time step through a pre-trained fingerprint diffusion model to generate an augmented fingerprint image.
  5. 5. The method according to one of claims 1 to 4, wherein said acquiring an original fingerprint image comprises: Extracting a first sample from a sample set, wherein the first sample comprises a first fingerprint image, a second fingerprint image and labeling information, and the labeling information is used for indicating whether the first fingerprint image and the second fingerprint image are fingerprint images of the same finger or not; extracting the first fingerprint image or the second fingerprint image from the first sample as the original fingerprint image; After the generating the augmented fingerprint image, the method further comprises: performing quality detection on the augmented fingerprint image; If the quality detection is passed, summarizing the unextracted fingerprint image, the augmented fingerprint image and the labeling information in the first sample into a second sample; storing the second sample to the sample set.
  6. 6. The method of claim 5, wherein said quality detecting said augmented fingerprint image comprises: Inputting the original fingerprint image and the augmented fingerprint image into a pre-trained classification model to obtain a classification result, wherein the classification model is used for determining whether the two fingerprint images are the fingerprint images of the same finger; the quality detection passing condition comprises that the classification result indicates that the original fingerprint image and the augmented fingerprint image are fingerprint images of the same finger, and the quality detection failing condition comprises that the classification result indicates that the original fingerprint image and the augmented fingerprint image are fingerprint images of different fingers.
  7. 7. The method of claim 5, wherein said quality detecting said augmented fingerprint image comprises: Determining a structural similarity of the original fingerprint image and the augmented fingerprint image; The quality detection passing condition comprises that the structural similarity is larger than or equal to a threshold value, and the quality detection failing condition comprises that the structural similarity is smaller than the threshold value, and the quality detection failing condition is determined.
  8. 8. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the method according to any of claims 1-7.
  9. 9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1-7.

Description

Image generation method, electronic device, and computer-readable medium Technical Field The embodiment of the application relates to the technical field of computers, in particular to an image generation method, electronic equipment and a computer readable medium. Background With the development of biometric identification technology, there is an increasing demand for a large amount of high-quality image data. In fields such as fingerprint identification, data augmentation of fingerprint images has become a key means for improving model performance. In the prior art, the existing fingerprint image is usually processed by rotation, translation, scaling, affine transformation or noise disturbance to obtain an augmented fingerprint image, or the augmented fingerprint image is generated by using a generation countermeasure network. The former can not generate a fingerprint image with real fingerprint textures, and the later generates a fingerprint image with artifacts or lost details, so that the image quality is difficult to meet the requirement of a model on reality. Disclosure of Invention The embodiment of the application provides an image generation method, electronic equipment and a computer readable medium, which improve the authenticity of an augmented fingerprint image. In a first aspect, an embodiment of the present application provides an image generating method, where the method includes obtaining an original fingerprint image, editing the original fingerprint image based on a mask image to generate an edited fingerprint image, performing noise adding processing on the edited fingerprint image to generate a noisy fingerprint image, and performing noise removing processing on the noisy fingerprint image through a pre-trained diffusion model to generate an augmented fingerprint image. In a second aspect, an embodiment of the application provides an electronic device comprising one or more processors, storage means having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method as described in the first aspect. In a third aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in the first aspect. In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the method described in the first aspect. The image generation method, the electronic device and the computer readable medium provided by the embodiment of the application are characterized in that an original fingerprint image is firstly obtained, then the original fingerprint image is edited based on a mask image to generate an edited fingerprint image, then the edited fingerprint image is subjected to noise adding processing to generate a noisy fingerprint image, and finally the noisy fingerprint image is subjected to noise removing processing through a pre-trained diffusion model to generate an augmented fingerprint image. In the process, the original fingerprint image is edited based on the mask image, fingerprint change conditions in various practical application scenes can be simulated, the generated edited fingerprint image has characteristic change which is closer to the real scenes, the authenticity of the subsequent augmented fingerprint image is improved, the noisy fingerprint image is subjected to denoising processing through the diffusion model, local textures of the noisy fingerprint image can be repaired and optimized by utilizing knowledge learned by the diffusion model, the generated augmented fingerprint image is more real in detail and texture, and the authenticity of the augmented fingerprint image is further improved. Drawings Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which: FIG. 1 is a flow chart of one embodiment of an image generation method according to the present application; FIG. 2 is a flow chart of yet another embodiment of an image generation method according to the present application; fig. 3 is a schematic structural view of an embodiment of an image generating apparatus according to the present application; fig. 4 is a schematic structural diagram of an electronic device for implementing an embodiment of the present application. Detailed Description The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in