Image recognition method, and training method and device of image recognition model

By acquiring image blocks from the target object region of the image to be identified and performing transformation processing, combined with feature extraction, fusion and classification modules, the problem of low accuracy in the recognition of reproduced images in the existing technology is solved, and higher recognition accuracy is achieved.

CN116128805BActive Publication Date: 2026-07-24MASHANG CONSUMER FINANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MASHANG CONSUMER FINANCE CO LTD
Filing Date
2022-12-01
Publication Date
2026-07-24

Smart Images

  • Figure CN116128805B_ABST
    Figure CN116128805B_ABST
Patent Text Reader

Abstract

The application discloses a kind of identification method of rephotographing image, the training method and device of rephotographing identification model.The identification method of rephotographing image includes: obtaining target image block from the target object area of the image to be identified, and the first transformed image of image feature enhancement is obtained by image transformation processing to the image to be identified;The image to be identified, target image block and first transformed image are input into target rephotographing identification model to determine whether the image to be identified is the rephotographing image of target object;Target rephotographing identification model includes feature extraction module, fusion module and classification module;Feature extraction module is used to extract features to the image to be identified, target image block and first transformed image respectively, and obtain multiple image features;Fusion module is used to fuse multiple image features to obtain fused image features;Classification module is used to rephotographing identification based on fused image features to the image to be identified, to determine whether the image to be identified is rephotographing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method for recognizing reproduced images, a training method for a reproduced image recognition model, and an apparatus. Background Technology

[0002] Image copying involves using a camera to photograph a real image a second time. In recent years, with the development of mobile internet and artificial intelligence technologies, criminals have been using fake online documents, contracts, business licenses, and facial images of others to seek illicit gains. A large portion of these fake images are obtained through image copying. Therefore, accurately identifying copied images is particularly important.

[0003] In related technologies, the image to be identified is typically divided into multiple regions, and these regions are then stitched together according to certain rules to obtain a reconstructed image. The image to be identified and the reconstructed image are then input together into a neural network for classification to determine whether the image is a copy. However, this approach causes the neural network to focus only on fine-grained image features, ignoring the influence of other image features on the copy identification results, leading to inaccurate copy identification results. Summary of the Invention

[0004] The purpose of this application is to provide a method for recognizing reproduced images, a method and apparatus for training a reproduced image recognition model, and to solve the problem of low recognition accuracy in related technologies for recognizing reproduced images.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, embodiments of this application provide a method for recognizing reproduced images, comprising:

[0007] Obtain a target image patch from the target object region of the image to be identified, wherein the target object region is the image region of the image to be identified that contains the target object;

[0008] The image to be identified is subjected to image transformation processing to obtain a first transformed image with enhanced image features;

[0009] The image to be identified, the target image block, and the first transformed image are input into the target re-image recognition model to determine whether the image to be identified is a re-image of the target object.

[0010] The target image re-photograph recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the image to be recognized, the target image block, and the first transformed image to obtain multiple image features. The fusion module is used to fuse the multiple image features to obtain fused image features. The classification module is used to perform image re-photograph recognition on the image to be recognized based on the fused image features to determine whether the image to be recognized is a re-photograph of the target object.

[0011] The image recognition method for reproduced images provided in this application obtains a target image patch from the target object region of the image to be recognized, enabling the target image patch to reflect the local features of the target object; it enhances the image features of the image to be recognized by performing image transformation processing, resulting in a first transformed image with enhanced image features; by inputting the image to be recognized, the target image patch, and the first transformed image into a target image reproduction recognition model, the feature extraction module of the target image reproduction recognition model extracts features from these images respectively. This allows for the extraction of global image features reflecting the overall characteristics of the image to be recognized, local image features reflecting the local features of the target object from the target image patch, and decoupled image features reflecting the enhanced image features of the image to be recognized from the first transformed image. Therefore, these multiple image features can be extracted from different... The angle reflects the characteristics of the image to be identified. Furthermore, considering that the local and global image features of a reproduced image should be consistent, and that the decoupled image features of images taken in different shooting scenarios differ, the fusion module of the target reproduction model fuses multiple image features to obtain fused image features. The classification module of the target reproduction recognition model then performs reproduction recognition on the image to be identified based on the fused image features. This allows multiple images to complement and reinforce each other, playing their respective roles in subsequent reproduction recognition. Consequently, the classification module can fully utilize the decoupled image features of the image to be identified to adapt to the shooting scenario to which the image to be identified belongs, and use the consistency between the global and local image features of the image to be identified to make an accurate judgment on whether the image to be identified is a reproduced image, thereby improving the accuracy of the reproduction recognition results.

[0012] Secondly, embodiments of this application provide a training method for a re-photographing recognition model, comprising:

[0013] Obtain a sample image containing a sample object and an image tag corresponding to the sample image, wherein the image tag is used to indicate whether the sample image is a photocopy of the sample object;

[0014] Obtain sample image blocks from the sample object region of the sample image, wherein the sample object region is the image region of the sample image that contains sample objects;

[0015] The sample image is subjected to image transformation processing to obtain a second transformed image with enhanced image features;

[0016] The sample image, the sample image block, and the second transformed image are input into the re-image recognition model to obtain the re-image recognition result of the sample image. The re-image recognition result is used to indicate whether the sample image is a re-image of the sample object.

[0017] Based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image, the model parameters of the re-photographing recognition model are updated to obtain the target re-photographing recognition model;

[0018] The re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image to obtain multiple image features. The fusion module is used to fuse the multiple image features to obtain fused image features. The classification module is used to perform re-photographing recognition on the sample image based on the fused image features to obtain the re-photographing recognition result of the sample image.

[0019] The training method for the re-photographing recognition model provided in this application embodiment obtains sample image patches from the sample object region of a sample image, enabling the sample image patches to reflect the local characteristics of the sample object; by performing image transformation processing on the sample image, the image features of the sample image are enhanced, resulting in a second transformed image with enhanced image features; by inputting the sample image, sample image patches, and second transformed image into the re-photographing recognition model, the feature extraction module of the re-photographing recognition model extracts features from these images respectively. This allows for the extraction of global image features reflecting the overall characteristics of the sample image from the sample image, local image features reflecting the local characteristics of the sample object from the sample image patches, and decoupled image features reflecting the enhanced image features of the sample image from the second transformed image. Therefore, these multiple image features can reflect the characteristics of the sample image from different perspectives. Furthermore, considering that for a re-photographed image, its local image features and global image features... Features should remain consistent, and the decoupled image features of images captured in different shooting scenarios differ. Based on this, the fusion module of the re-photographing recognition model fuses multiple image features, allowing them to complement and reinforce each other, thus enabling them to function effectively in subsequent re-photographing recognition. The classification module of the re-photographing recognition model performs re-photographing recognition on sample images based on the fused image features, and updates the model parameters based on the re-photographing recognition results and corresponding image labels of the sample images. This allows the classification module to fully learn and utilize the decoupled image features of the sample images to adapt to the shooting scenario to which the sample images belong, and to fully learn and utilize the consistency between the global and local image features of the sample images for re-photographing recognition. This enhances the training effect and robustness of the re-photographing recognition model, resulting in a target re-photographing recognition model with high recognition accuracy and applicability to re-photographing image recognition in various re-photographing scenarios.

[0020] Thirdly, embodiments of this application provide a device for recognizing reproduced images, comprising:

[0021] The first preprocessing unit is used to obtain a target image block from the target object region of the image to be identified, and to perform image transformation processing on the image to be identified to obtain a first transformed image with enhanced image features, wherein the target object region is the image region of the image to be identified that contains the target object;

[0022] The first recognition unit is used to input the image to be recognized, the target image block and the first transformed image into the target re-image recognition model to determine whether the image to be recognized is a re-image of the target object;

[0023] The target image re-photograph recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the image to be recognized, the target image block, and the first transformed image to obtain multiple image features. The fusion module is used to fuse the multiple image features to obtain fused image features. The classification module is used to perform image re-photograph recognition on the image to be recognized based on the fused image features to determine whether the image to be recognized is a re-photograph of the target object.

[0024] Fourthly, embodiments of this application provide a training apparatus for a copy recognition model, comprising:

[0025] The acquisition unit is used to acquire a sample image containing a sample object and an image tag corresponding to the sample image, wherein the image tag is used to indicate whether the sample image is a photocopy of the sample object;

[0026] The second preprocessing unit is used to obtain sample image blocks from the sample object region of the sample image, and to perform image transformation processing on the sample image to obtain a second transformed image with enhanced image features, wherein the sample object region is the image region of the sample image that contains sample objects;

[0027] The second recognition unit is used to input the sample image, the sample image block and the second transformed image into the re-photographing recognition model to obtain the re-photographing recognition result of the sample image. The re-photographing recognition result is used to indicate whether the sample image is a re-photographed image of the sample object.

[0028] The update unit is used to update the model parameters of the re-photographing recognition model based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image, so as to obtain the target re-photographing recognition model;

[0029] The re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image to obtain multiple image features. The fusion module is used to fuse the multiple image features to obtain fused image features. The classification module is used to perform re-photographing recognition on the sample image based on the fused image features to obtain the re-photographing recognition result of the sample image.

[0030] Fifthly, embodiments of this application provide an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in the first aspect; or, the processor is configured to execute the instructions to implement the method as described in the second aspect.

[0031] In a sixth aspect, embodiments of this application provide a computer-readable storage medium that, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described in the first aspect; or, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described in the second aspect. Attached Figure Description

[0032] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0033] Figure 1 A schematic diagram illustrating an application scenario of the image recognition method for reproduced images provided in this application embodiment;

[0034] Figure 2 A flowchart illustrating a method for recognizing reproduced images, provided as an embodiment of this application;

[0035] Figure 3 A flowchart illustrating a method for acquiring an image to be identified, provided as an embodiment of this application;

[0036] Figure 4 A schematic diagram illustrating image transformation processing of an image to be recognized, provided as an embodiment of this application;

[0037] Figure 5 A flowchart illustrating a method for recognizing reproduced images, provided as another embodiment of this application;

[0038] Figure 6A A schematic diagram illustrating the feature fusion process of a fusion module provided in one embodiment of this application;

[0039] Figure 6B A schematic diagram of a cascaded image feature provided for one embodiment of this application;

[0040] Figure 7 A flowchart illustrating a training method for a re-photographing recognition model, provided as an embodiment of this application;

[0041] Figure 8 A flowchart illustrating a training method for a re-photographing recognition model, provided for another embodiment of this application;

[0042] Figure 9 A schematic diagram of the structure of a device for recognizing reproduced images provided in one embodiment of this application;

[0043] Figure 10A schematic diagram of the structure of a training device for a copy recognition model provided in one embodiment of this application;

[0044] Figure 11 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0046] The terms "first," "second," etc., used in this specification and claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in this specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0047] Explanation of some concepts:

[0048] Moiré patterns are high-frequency interference stripes that appear on the photosensitive element of devices such as digital cameras or scanners. They are irregular, high-frequency stripes that can cause images to appear colored.

[0049] As mentioned earlier, related technologies typically involve dividing the image to be identified into multiple regions, then stitching these regions together according to certain rules to obtain a reconstructed image. The image to be identified and the reconstructed image are then input into a neural network for classification to determine whether the image is a copy. However, this approach causes the neural network to focus only on fine-grained image features, ignoring the influence of other image features on the copy identification results, leading to inaccurate copy identification results.

[0050] In view of this, the embodiments of this application aim to propose a method for recognizing reproduced images. This method involves obtaining a target image patch from the target object region of the image to be recognized, enabling the target image patch to reflect the local features of the target object; performing image transformation processing on the image to be recognized to enhance its image features, resulting in a first transformed image with enhanced image features; inputting the image to be recognized, the target image patch, and the first transformed image into a target reproduced image recognition model, and using the feature extraction module of the target reproduced image recognition model to extract features from these images respectively. This allows for the extraction of global image features reflecting the overall characteristics of the image to be recognized, local image features reflecting the local features of the target object from the target image patch, and decoupled image features reflecting the enhanced image features of the image to be recognized from the first transformed image. Therefore, these multiple image features can... This approach reflects the characteristics of the image to be identified from different perspectives. Furthermore, considering that the local and global image features of a reproduced image should remain consistent, and that the decoupled image features of images taken in different shooting scenarios differ, the target reproduction model's fusion module fuses multiple image features to obtain fused image features. The target reproduction recognition model's classification module then uses these fused image features to perform reproduction recognition on the image to be identified. This allows multiple images to complement and reinforce each other, playing their respective roles in subsequent reproduction recognition. Consequently, the classification module can fully utilize the decoupled image features of the image to be identified to adapt to the shooting scenario to which the image belongs, and by leveraging the consistency between the global and local image features of the image to be identified, it can accurately determine whether the image to be identified is a reproduced image, thereby improving the accuracy of the reproduction recognition results.

[0051] This application also proposes a training method for a re-photographing recognition model. This method involves obtaining sample image patches from the sample object region of a sample image, enabling these patches to reflect the local characteristics of the sample object. Image transformation processing is applied to the sample image to enhance its image features, resulting in a second transformed image with enhanced image features. The sample image, sample image patches, and the second transformed image are input into the re-photographing recognition model. The model's feature extraction module extracts features from these images, thereby extracting global image features reflecting the overall characteristics of the sample image, local image features reflecting the local characteristics of the sample object from the sample image patches, and decoupled image features reflecting the enhanced image features of the sample image from the second transformed image. These multiple image features can reflect the characteristics of the sample image from different perspectives. Furthermore, considering that for re-photographed images, their local image features and global image features are related... Image features should remain consistent, and the decoupled image features of images taken in different shooting scenarios differ. Based on this, the fusion module of the re-image recognition model fuses multiple image features, making them complementary and mutually reinforcing, thus enabling them to play their respective roles in subsequent re-image recognition. The classification module of the re-image recognition model performs re-image recognition on sample images based on the fused image features, and updates the model parameters based on the re-image recognition results and corresponding image labels of the sample images. This allows the classification module to fully learn and utilize the decoupled image features of the sample images to adapt to the shooting scenario to which the sample images belong, and to fully learn and utilize the consistency between the global and local image features of the sample images for re-image recognition. This enhances the training effect and robustness of the re-image recognition model, resulting in a target re-image recognition model with high recognition accuracy and applicability to re-image recognition in various re-image scenarios.

[0052] It should be understood that the image recognition method and image recognition model training method provided in the embodiments of this application can both be executed by electronic devices or software installed in electronic devices. The electronic devices referred to herein may include terminal devices, such as smartphones, tablets, laptops, desktop computers, smart voice interaction devices, smart home appliances, smartwatches, vehicle terminals, aircraft, etc.; or, the electronic devices may also include servers, such as independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.

[0053] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0054] The image recognition method for reproduced images provided in this application can be applied to, for example... Figure 1The scenario shown may include: terminal device 1 and server 2.

[0055] Terminal device 1 can acquire an image containing the target object to be identified, and perform image re-recognition on the image to be identified using a target re-recognition model deployed locally to determine whether the image to be identified is a re-recognition of the target object; alternatively, terminal device 1 can send the image to be identified to server 2, which will then perform image re-recognition on the image to be identified using a pre-deployed target re-recognition model to determine whether the image to be identified is a re-recognition of the target object, and return the re-recognition result to terminal device 1.

[0056] Specifically, the target object can be various types of objects, including but not limited to ID cards, contracts, business licenses, and user faces. The image to be identified containing the target object can be an image obtained by photographing the physical entity of the target object, such as an image obtained by photographing the physical entity of an ID card; or, the image to be identified containing the target object can be an image obtained by photographing an image containing the target object, such as an image obtained by photographing an ID card photo, i.e., a photocopy of the ID card. In this embodiment, a pre-deployed target photocopy recognition model is used to perform photocopy recognition on the image to be identified, that is, to identify whether the image to be identified is a photocopy of the target object. If it is, it indicates that the image to be identified is an image obtained by photographing an image containing the target object; if it is identified that the image to be identified is not a photocopy of the target object, it indicates that the image to be identified is an image obtained by photographing the physical entity of the target object.

[0057] The image recognition method provided in this application embodiment will describe in detail how the terminal device 1 or server 2 identifies whether the image to be recognized is a image of the target object. The image recognition model training method provided in this application embodiment will describe in detail how to train a target image recognition model for recognizing image copies.

[0058] Please see Figure 2 The following is a flowchart illustrating a method for recognizing reproduced images, provided as an embodiment of this application. The method may include the following steps:

[0059] S202, Obtain a target image block from the target object region of the image to be identified, wherein the target object region is the image region of the image to be identified that contains the target object.

[0060] The image to be identified refers to an image containing the target object that needs to be photographed for recognition. The target object can be of various types, including but not limited to ID cards, contracts, business licenses, and user faces.

[0061] In practical applications, the image to be identified can be an unprocessed original image containing the target object, or it can be an image obtained after preprocessing the original image. Preferably, the image to be identified is an image obtained after preprocessing the original image containing the target object. Preprocessing may include, but is not limited to, rotation and cropping.

[0062] Considering that for images where the target object is an identification document (such as an ID card or passport), factors such as the shooting angle can cause the target object to appear skewed or mismatched with the valid recognition frame, thus affecting the accuracy of the image recognition result. Therefore, if the target object is an identification document, the image to be recognized can be an image obtained by preprocessing the original image containing the target object.

[0063] Specifically, such as Figure 3 As shown, the image to be recognized can be obtained by preprocessing the original image through the following steps: S302, obtaining the original image containing the target object; S304, inputting the original image into the corner recognition model to obtain the target corner information of the target object, wherein the target corner information of the target object includes the position of the corner of the target object in the original image, and the target corner information may include the position of the corner of the target object in the original image, etc. The corner recognition model is trained based on multiple sample document images and the corner label corresponding to each sample document image. The sample document image is an image containing sample documents, and the corner label is used to indicate the position of the corner of the sample document in the corresponding sample document image; S306, aligning the original image based on the target corner information and the reference corner information corresponding to the original image to obtain the image to be recognized. The reference corner information corresponding to the original image may include the reference position of the corner of the target object in the original image, which can be set according to actual needs, and this embodiment does not limit this.

[0064] In this context, the corner points of the target object in the original image include the intersection of any two sides of the target object. Therefore, the position of each corner point can be represented by its coordinates within the original image; that is, the corner point position can include the coordinates of the intersection of any two sides of the target object within the original image. For example, if the target object is an ID card, then its corner points include the intersection of any two of the four sides of the ID card, thus the target object has four corner points. Accordingly, the corner point position can include the coordinates of the intersection of any two of the four sides of the ID card within the original image.

[0065] For example, taking an ID card as the target object, multiple sample ID card images can be collected in advance, and the positions of the corner points of the ID card in each sample ID card image can be marked as corner point labels for each sample ID card image. Then, the model is trained using each sample ID card image as a training sample and the corresponding corner point label of each sample ID card image as the label corresponding to the training sample, to obtain a corner point recognition model. Then, the original ID card image to be recognized is input into the corner point recognition model, and the positions of the corner points of the ID card in the original ID card image can be quickly and accurately identified. Further, the mapping relationship between the target corner point information and the reference corner point information corresponding to the original ID card image is determined, and based on the mapping relationship, the positions of the corner points of the ID card in the original image are aligned with their corresponding reference positions in the original image using various image alignment processing methods commonly used in this field. The resulting image is the image to be recognized.

[0066] In practical applications, corner recognition models can have any appropriate structure, and the specific choice can be made according to actual needs. For example, corner recognition models can use neural networks with image recognition capabilities, etc. This application does not limit this.

[0067] The target object region refers to the image region in the image to be identified that contains the target object; that is, the image region in the image to be identified where the target object is located. The size of this image region is smaller than or equal to the size of the image to be identified. Specifically, various image recognition algorithms commonly used in this field can be used to identify the target object in the image to be identified, and then the image region where the target object is located can be determined from the image to be identified. Furthermore, image blocks are randomly cropped from this image region as target image blocks. Since the target image blocks are obtained from the target object region, they can reflect the local features of the target object.

[0068] S204, perform image transformation processing on the image to be recognized to obtain the first transformed image with enhanced image features.

[0069] Because the image features of images captured in different shooting scenarios are somewhat different—for example, an image captured of a physical object will not show moiré patterns, but an image captured of the object displayed on a screen will show moiré patterns—in order to adapt to the shooting scenario to which the image to be identified belongs and to enhance the image features in that shooting scenario, an image transformation process can be performed on the image to be identified, so that the image features of the image to be identified are enhanced, and the image features of the first transformed image are more significant than the image features of the image to be identified.

[0070] In this embodiment, the image transformation processing of the image to be recognized can employ any appropriate one or more preset image transformation strategies. Image transformation processing is performed on the image to be recognized to obtain a first transformed image corresponding to each preset image transformation strategy. That is, the number of first transformed images can be one or more, and there is a one-to-one correspondence between the first transformed images and the preset image transformation strategies. The preset image transformation strategies can include at least one of the following transformation strategies: Discrete Wavelet Transform (DWT), Laplace transform, artifact transform, etc.

[0071] Optionally, to better adapt to the shooting scene to which the image to be identified belongs, and to further enhance the image features of the image to be identified in its shooting scene, such as... Figure 4 As shown, the above S204 may include: performing image transformation processing on the image to be recognized based on a variety of preset image transformation strategies to obtain a variety of first transformed images, each of which corresponds to a preset image transformation strategy.

[0072] For example, such as Figure 4 As shown, in the above S204, the above-mentioned multiple preset image transformation strategies include at least wavelet discrete transformation, Laplace transform, artifact transformation, etc.

[0073] For wavelet discrete transform, the two-dimensional Haar wavelet transform can be used to perform image transformation processing on the image to be recognized using the following formula (1), to obtain the low-frequency component in the horizontal direction and the high-frequency component in the vertical direction LH, the high-frequency component in the horizontal direction and the low-frequency component in the vertical direction HL, and the high-frequency component in the horizontal direction and the high-frequency component in the vertical direction HH; further, these components are stacked to obtain the transformed RGB image and used as the first transformed image corresponding to the wavelet discrete transform (i.e., Figure 4 The first transformed image shown is 1).

[0074]

[0075] Where ψ(t) represents the discrete wavelet basis function, and t represents time.

[0076] It is understandable that since moiré patterns are caused by high-frequency interference from the sensor of the image acquisition device, resulting in the overlap of digital grids, by performing wavelet discrete transformation on the image to be identified, the moiré pattern features become more obvious when the image to be identified is a reproduced image, which is beneficial for the target reproduced image recognition model to recognize reproduced images.

[0077] For the Laplacian transform, Gaussian filtering can first be used to denoise the image to be recognized. Then, low-pass filtering is used, and Laplacian convolution is performed on the grayscale image of the denoised image based on the following formula (2) to obtain an image with obvious edge features, which is used as the first transformed image corresponding to the Laplacian transform (i.e., Figure 4 The first transformed image shown (2) has more obvious edge features compared to the image to be recognized. The size of the convolution kernel can be set according to actual needs; for example, the kernel size can be 3*3. This embodiment does not limit this setting.

[0078]

[0079] in, Let f(x,y) represent the Laplacian operator, and let f(x,y) represent the pixel value at position (x,y) in the image to be identified. This indicates that a Laplacian transform is applied to the image to be recognized. Let f(x,y) represent the second-order partial derivative of f(x,y) with respect to the x-coordinate. Let f(x,y) represent the second partial derivative of f(x,y) with respect to the ordinate y, f(x,y+1) represent the pixel value at position (x,y+1) in the image to be recognized, f(x,y-1) represent the pixel value at position (x,y-1) in the image to be recognized, f(x+1,y) represent the pixel value at position (x+1,y) in the image to be recognized, and f(x-1,y) represent the pixel value at position (x-1,y) in the image to be recognized.

[0080] It is understandable that, during the process of capturing an image of the target object displayed on the screen, the edges of the captured screen are fused together. By performing a Laplacian transform on the image to be recognized, the edge features of the target object in the image to be recognized can be enhanced, which is beneficial for the target re-encoding model to re-encode the image to be recognized.

[0081] For artifact transformation, a projection technique commonly used in this field can be employed to project the image to be identified from the RGB color space to the YCrCb color space, thereby obtaining the first transformed image corresponding to the artifact transformation (i.e., Figure 4 The first transformed image shown is 3). It can be understood that during the process of photographing the image of the target object, multiple reflections will occur due to different angles. The color and brightness information contained in the RGB color space are not conducive to distinguishing reflections, while the color and brightness information in the YCrCb color space are separated, which is more conducive to distinguishing reflections. This makes it easier for the target photographing recognition model to perform photographing recognition of the image to be recognized.

[0082] S206, input the image to be identified, the target image block, and the first transformed image into the target re-image recognition model to determine whether the image to be identified is a re-image of the target object.

[0083] In this embodiment, the target re-photographing recognition model refers to a pre-trained artificial intelligence model with the function of recognizing re-photographed images. It can have any appropriate structure, and can be set according to actual needs. This embodiment does not limit this.

[0084] Optionally, such as Figure 5 As shown, the target re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module.

[0085] Specifically, such as Figure 5 As shown, the feature extraction module is used to extract features from the image to be recognized, the target image patch, and the first transformed image, respectively, to obtain various image features. These various image features can include global image features, local image features, and decoupled image features. The feature extraction module can extract global image features reflecting the overall characteristics of the image to be recognized from the image to be recognized, local image features reflecting the local characteristics of the target object from the target image patch, and decoupled image features reflecting the enhanced image characteristics of the image to be recognized from the first transformed image. Therefore, these multiple image features can reflect the characteristics of the image to be recognized from different perspectives.

[0086] More specifically, when the first transformed image includes first transformed images corresponding to multiple preset image transformation strategies, the aforementioned multiple image features may include global image features, local image features, and decoupled image features corresponding to each first transformed image. That is, the feature extraction module can be used to extract features from the image to be recognized to obtain global image features, extract features from the target image block to obtain local image features, and extract features from multiple first transformed images to obtain decoupled image features corresponding to each of the multiple first transformed images.

[0087] In practical applications, the feature extraction module can use various networks with feature extraction functions commonly used in the field, such as lightweight feature extraction networks like MobileNetV2. The specific configuration can be set according to actual needs, and this application embodiment does not limit this.

[0088] like Figure 5 As shown, the fusion module is used to fuse multiple image features to obtain fused image features. It is understandable that, since multiple image features reflect the characteristics of the image to be identified from different perspectives, the fusion module fuses these features, allowing them to complement and reinforce each other, thus enhancing the accuracy of the image recognition results.

[0089] Specifically, the fusion module can fuse multiple image features in any appropriate manner.

[0090] Optionally, the fusion module can employ commonly used stitching techniques in the field to stitch together multiple image features to achieve feature fusion and obtain fused image features.

[0091] Optionally, in order to enable the classification module to better utilize the respective roles of multiple image features in the image copy recognition, thereby further improving the accuracy of the image copy recognition results, the fusion module can dynamically assign corresponding adaptive weight coefficients to each image feature. For example, a larger adaptive weight coefficient can be assigned to image features that play a greater role in image copy recognition, while a smaller adaptive weight coefficient can be assigned to image features that play a smaller role in image copy recognition. This allows for adaptive adjustment of the proportion of different image features, which helps the classification module maximize the utilization of the respective roles of multiple image features and make an accurate judgment on whether the image to be recognized is a copy image, adapting to the shooting scene to which the image to be recognized belongs.

[0092] More specifically, such as Figure 6A As shown, the fusion module can include a cascaded layer, an adaptive layer, and a fusion layer. The cascaded layer concatenates multiple image features to obtain cascaded image features. The adaptive layer determines the adaptive weight coefficients corresponding to the row vectors in the cascaded image features based on the distribution characteristics of the row vectors. The adaptive weight coefficient for each row vector represents the correlation between that row vector and the image being scanned for recognition. A larger adaptive weight indicates a higher correlation between the row vector and the image being scanned for recognition, and vice versa. The fusion layer performs a weighted sum of the row vectors in the cascaded image features based on the adaptive weight coefficients, resulting in fused image features.

[0093] For example, such as Figure 6B As shown, each image feature can include multiple row vectors, and each row vector is used to represent a sub-feature of that image feature. After obtaining the global image feature, local image feature, and decoupled image feature, the cascade layer can cascade the row vectors in each image feature in a preset order, such as global image feature -> local image feature -> decoupled image feature, to obtain a cascaded feature vector. Thus, each row vector in the cascaded feature vector represents a sub-feature of an image feature.

[0094] Furthermore, the adaptive layer can analyze the row vectors in the cascaded image features to obtain the distribution characteristics of these row vectors. These distribution characteristics can reflect the role of each row vector in the re-image recognition, that is, the degree of correlation between each row vector and the re-image recognition result of the image to be recognized. Then, the adaptive weight coefficient is used to characterize this degree of correlation.

[0095] Optionally, the adaptive layer can analyze all row vectors in the cascaded image features to obtain the distribution characteristics of these row vectors, and then assign corresponding adaptive weight coefficients to all row vectors; correspondingly, the fusion layer can perform weighted summation of all row vectors based on the adaptive weight coefficients corresponding to each row vector in the cascaded image features to obtain the fused features.

[0096] Optionally, the adaptive layer can filter multiple target row vectors in the cascaded image features that meet preset filtering conditions based on the magnitude of each row vector in the cascaded image features, and determine the distribution characteristics of the multiple target row vectors; further, based on the distribution characteristics of the multiple target row vectors, it determines the weight coefficients corresponding to the multiple target row vectors respectively. Correspondingly, the fusion layer performs a weighted summation of the multiple target row vectors based on the adaptive weight coefficients corresponding to the multiple target row vectors respectively, to obtain the fused image features.

[0097] The preset filtering conditions can be set according to actual needs. For example, the preset filtering conditions can be set to the modulus exceeding the preset modulus or the sorting result being in the first preset number of positions, etc. This application embodiment does not limit this.

[0098] For example, the adaptive layer can sort each row vector in the cascaded image features in descending order of magnitude, and then select the row vectors in the first K positions of the sorted order as the target row vectors. Accordingly, the fusion layer can fuse multiple target row vectors using the following formula (3).

[0099]

[0100] Among them, F out This represents the fused image features, where K represents the number of target row vectors, and F... i Let λ represent the i-th target row vector. i This represents the adaptive weight coefficient corresponding to the i-th target row vector.

[0101] Understandably, since the problem of recognizing reproduced images is actually a classification problem and also a matching problem, let's assume W... i Let X be the center vector of the i-th category, and let X be the fused image feature of an image of the i-th category. Then we have y i =W i X = ||W i ||||X||cosθi , where θ i W i The angle between X and X means that the magnitude of each row vector in the cascaded feature vector can reflect the quality of the row vector to a certain extent. Based on this, by incorporating the magnitude into the dimension considered in the recognition of re-photographed images, multiple target row vectors that meet the preset screening conditions are selected from the cascaded image features. In fact, the above are potential sub-features that are more helpful for re-photographing recognition. Further feature fusion based on the selected target row vectors not only helps to improve the accuracy of the re-photographing recognition results, but also reduces the workload of fusion processing, thereby improving the efficiency of re-photographing recognition.

[0102] like Figure 5 As shown, the classification module is used to perform photocopy recognition on the image to be identified based on the features of the fused image, and to determine whether the image to be identified is a photocopy of the target object.

[0103] Specifically, since the local and global image features of a reproduced image should be consistent, and the decoupled image features of images taken in different shooting scenarios are different, the classification module, based on fused image features, can make full use of the decoupled image features of the image to be identified to adapt to the shooting scenario to which the image to be identified belongs, and use the consistency between the global and local image features of the image to be identified to make an accurate judgment on whether the image to be identified is a reproduced image, thereby improving the accuracy of the reproduced image identification results.

[0104] In practical applications, the classification module can be any appropriate module with classification function, such as a fully connected layer, etc. The specific configuration can be set according to actual needs, and this application embodiment does not limit it.

[0105] The image recognition method for reproduced images provided in one or more embodiments of this application above obtains a target image patch from the target object region of the image to be recognized, so that the target image patch can reflect the local features of the target object; by performing image transformation processing on the image to be recognized, the image features of the image to be recognized are enhanced, resulting in a first transformed image with enhanced image features; by inputting the image to be recognized, the target image patch, and the first transformed image into a target image reproduction recognition model, the feature extraction module of the target image reproduction recognition model extracts features from these images respectively, thereby extracting global image features reflecting the overall features of the image to be recognized from the image to be recognized, local image features reflecting the local features of the target object from the target image patch, and decoupled image features reflecting the enhanced image features of the image to be recognized from the first transformed image. Therefore, these multiple image features can... This method reflects the characteristics of the image to be identified from different perspectives. Furthermore, considering that the local and global image features of a reproduced image should remain consistent, and that the decoupled image features of images taken in different shooting scenarios differ, the fusion module of the target reproduced image model fuses multiple image features to obtain fused image features. The classification module of the target reproduced image recognition model then uses these fused image features to perform reproduced image recognition on the image to be identified. This allows multiple images to complement and reinforce each other, playing their respective roles in subsequent reproduced image recognition. Consequently, the classification module can fully utilize the decoupled image features of the image to be identified to adapt to the shooting scenario to which the image belongs, and use the consistency between the global and local image features of the image to accurately determine whether the image to be identified is a reproduced image, thereby improving the accuracy of the reproduced image recognition results. The reproduced image recognition method provided in this application embodiment has a certain ability to distinguish between reproduced images in the indomain (i.e., known homogeneous data distribution) and outdomain (i.e., unknown non-homogeneous data distribution), and is suitable for recognizing multiple reproduced images in complex scenarios as well as for recognizing reproduced images with different resolutions and screen displays.

[0106] This application also provides a training method for a re-photographing recognition model, used to train a target re-photographing recognition model with re-photographing recognition functionality. Please refer to... Figure 7 The following is a flowchart illustrating a training method for a re-photographing recognition model, provided as an embodiment of this application. The method may include the following steps:

[0107] S702, Obtain the sample image containing the sample object and the image label corresponding to the sample image.

[0108] The image labels can be pre-labeled to indicate whether the sample image is actually a copy of the sample object.

[0109] Considering that the number of sample images containing sample objects is limited in actual business scenarios, such as the information on ID cards being sensitive and resulting in a limited number of ID card images that can be obtained, in order to expand the number of sample images used to train the photocopy recognition model, in one optional implementation, in the above S702, obtaining sample images containing sample objects includes: obtaining the original image containing the sample image, and performing data augmentation processing on the original image to obtain the sample image.

[0110] Optionally, considering that for images obtained by photographing sample objects, the varying degrees of outward expansion of the sample object's edges can cause significant differences in the image feature expression of the image, thus affecting the image's re-photographing recognition result, the original image region containing the sample object in the sample image can be expanded outward to enhance the difference in image feature expression between the re-photographed image and the non-re-photographed image, thereby improving the recognition accuracy of the re-photographing recognition model.

[0111] Specifically, performing data augmentation on the original image to obtain a sample image may include: obtaining the original image region containing the sample object in the original image; enlarging the original image region in the original image based on at least one preset scaling ratio to obtain the at least one magnified image, wherein the magnified image corresponds one-to-one with the preset scaling ratio; and using both the original image and the at least one magnified image as the sample image.

[0112] For example, various image recognition algorithms commonly used in the art can be used to identify sample objects in a sample image, and then the image region where the sample object is located can be determined from the sample image. This image region is the original image region mentioned above. Furthermore, the original image region can be enlarged according to at least one preset scaling ratio while maintaining the size of the entire original image unchanged, to obtain at least one enlarged image.

[0113] In practical applications, at least one preset scaling ratio can be set according to actual needs, and this application embodiment does not limit this. For example, at least one preset scaling ratio may include multiple scaling ratios such as 1:1.2, 1:1.4, and 1:1.6. Taking a scaling ratio of 1:1.2 as an example, it means that the width of the original image area is enlarged by 1.2 times, and the height of the original image area is also enlarged by 1.2 times.

[0114] Of course, if the preset scaling ratio causes the size of the enlarged original image area to exceed that of the original image, then the size of the original image will be used as the size of the enlarged original image area. In other words, the original image area can only be enlarged to the size of the original image.

[0115] S704, Obtain a sample image block from the sample object region of the sample image.

[0116] The sample object region is the image region in the sample image that contains the sample object.

[0117] The specific implementation of S704 is similar to that of S202. For details, please refer to the detailed explanation of S202 above, which will not be repeated here.

[0118] S706, perform image transformation processing on the sample image to obtain a second transformed image with enhanced image features.

[0119] The specific implementation of S706 is similar to that of S204. For details, please refer to the detailed explanation of S204 above, which will not be repeated here.

[0120] S708, input the sample image, sample image block and second transformed image into the re-photographing recognition model to obtain the re-photographing recognition result of the sample image.

[0121] The copy recognition result is used to indicate whether a sample image is a copy of a sample object.

[0122] Among them, such as Figure 8 As shown, the re-image recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module extracts features from the sample image, sample image patches, and the second transformed image, obtaining various image features. The sample image is obtained from the original image containing the sample image; the sample image patch is obtained from the image region containing the sample object; and the second transformed image is obtained by performing image transformation processing on the sample image. The fusion module fuses these various image features to obtain fused image features. The classification module performs re-image recognition on the sample image based on the fused image features, obtaining the re-image recognition result. This result indicates whether the sample image is a re-image of the sample object; that is, it indicates whether the model recognizes the sample image as a re-image of the sample object. Simultaneously, based on the re-image recognition result and the corresponding image label, the model parameters of the re-image recognition model are updated to obtain the target re-image recognition model. The image label corresponding to the sample image indicates whether the actual labeled sample image is a re-image of the sample object.

[0123] The specific implementation of S708 is similar to that of S206. For details, please refer to the detailed explanation of S206 above. It will not be repeated here.

[0124] S710 updates the model parameters of the re-photographing recognition model based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image to obtain the target re-photographing recognition model.

[0125] The model parameters of the re-photographing recognition model include at least the module parameters of the feature extraction module, the module parameters of the fusion module, and the module parameters of the classification module. Specifically, for each module, the module parameters may include, but are not limited to, the number of processing nodes (such as neurons) in the module, the connection relationships between processing nodes in different network layers and the weights of the connection edges, and the biases corresponding to the processing nodes in each network layer.

[0126] Specifically, in the above S710, the recognition loss of the re-photographing recognition model can be determined based on the preset loss function, the re-photographing recognition result of the sample image, and the image label corresponding to the sample image; further, based on the gradient descent algorithm, the backpropagation algorithm, and the recognition loss of the re-photographing recognition model, the module parameters of the classification module, the module parameters of the fusion module, and the module parameters of the feature extraction module are adjusted in sequence.

[0127] The recognition loss of the re-photographing recognition model is used to represent the difference between the re-photographing recognition result of the sample image and the image label corresponding to the sample image, and thus can reflect the learning effect of the re-photographing recognition model.

[0128] In practical applications, any appropriate loss function can be used as the preset loss function, and the specific function can be selected according to actual needs. This application does not limit this. For example, the preset loss function can be the cross-entropy loss function, etc.

[0129] The training method for the re-photographing recognition model provided in one or more embodiments of this application above obtains sample image patches from the sample object region of a sample image, enabling the sample image patches to reflect the local features of the sample object; by performing image transformation processing on the sample image, the image features of the sample image are enhanced, resulting in a second transformed image with enhanced image features; by inputting the sample image, sample image patches, and second transformed image into the re-photographing recognition model, the feature extraction module of the re-photographing recognition model extracts features from these images respectively, thereby extracting global image features reflecting the overall characteristics of the sample image from the sample image, local image features reflecting the local features of the sample object from the sample image patches, and decoupled image features reflecting the enhanced image features of the sample image from the second transformed image. Therefore, these multiple image features can reflect the characteristics of the sample image from different perspectives; furthermore, considering that for re-photographed images, their local image features and Global image features should remain consistent, and the decoupled image features of images captured in different shooting scenarios differ. Based on this, the fusion module of the re-image recognition model fuses multiple image features, allowing them to complement and reinforce each other, thus enabling them to function effectively in subsequent re-image recognition. The classification module of the re-image recognition model performs re-image recognition on sample images based on the fused image features, and updates the model parameters based on the re-image recognition results and corresponding image labels of the sample images. This allows the classification module to fully learn and utilize the decoupled image features of the sample images to adapt to the shooting scenario to which the sample images belong, and to fully learn and utilize the consistency between the global and local image features of the sample images for re-image recognition. This enhances the training effect and robustness of the re-image recognition model, resulting in a target re-image recognition model with high recognition accuracy and applicability to re-image recognition in various re-image scenarios.

[0130] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0131] In addition, with the above Figure 1 Corresponding to the image recognition method shown, this application also provides an image recognition device. Please refer to... Figure 9 The diagram below illustrates the structure of a photographic image recognition device 900 according to an embodiment of this application. The device 900 may include:

[0132] The first preprocessing unit 910 is used to obtain a target image block from the target object region of the image to be identified, and to perform image transformation processing on the image to be identified to obtain a first transformed image with enhanced image features, wherein the target object region is the image region of the image to be identified that contains the target object;

[0133] The first identification unit 920 is used to input the image to be identified, the target image block and the first transformed image into the target re-image identification model to determine whether the image to be identified is a re-image of the target object;

[0134] The target image re-photograph recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the image to be recognized, the target image block, and the first transformed image to obtain multiple image features. The fusion module is used to fuse the multiple image features to obtain fused image features. The classification module is used to perform image re-photograph recognition on the image to be recognized based on the fused image features to determine whether the image to be recognized is a re-photograph of the target object.

[0135] Optionally, the fusion module includes a cascaded layer, an adaptive layer, and a fusion layer; the cascaded layer is used to cascade the multiple image features to obtain cascaded image features; the adaptive layer is used to determine the adaptive weight coefficients corresponding to the row vectors in the cascaded image features based on the distribution characteristics of the row vectors in the cascaded image features, wherein the adaptive weight coefficients are used to represent the correlation between the corresponding row vectors and the re-image recognition result of the image to be recognized; the fusion layer is used to perform a weighted summation of the row vectors in the cascaded image features based on the adaptive weight coefficients corresponding to the row vectors in the cascaded image features to obtain the fused image features.

[0136] Optionally, the adaptive layer is specifically used for: selecting multiple target row vectors that meet preset screening conditions from the cascaded image features based on the magnitude of each row vector in the cascaded image features, and determining the distribution characteristics of the multiple target row vectors; determining the adaptive weight coefficients corresponding to the multiple target row vectors based on the distribution characteristics of the multiple target row vectors; and the fusion layer is used for weighted summation of the multiple target row vectors based on the adaptive weight coefficients corresponding to the multiple target row vectors to obtain the fused image features.

[0137] Optionally, the first preprocessing unit performs image transformation processing on the image to be identified to obtain a first transformed image, including: performing image transformation processing on the image to be identified based on multiple preset image transformation strategies to obtain multiple first transformed images, each first transformed image corresponding to a preset image transformation strategy.

[0138] Optionally, the multiple image features include global image features, local image features, and decoupled image features corresponding to the multiple first transformed images respectively. The feature extraction module is specifically used to: extract features from the image to be identified to obtain the global image features; extract features from the target image block to obtain the local image features; and extract features from the multiple first transformed images respectively to obtain decoupled image features corresponding to the multiple first transformed images respectively.

[0139] Optionally, the type of the target object is an identification document;

[0140] The image to be identified is obtained as follows: An original image containing the target object is obtained; the original image is input into a corner recognition model to obtain target corner information of the target object, the target corner information including the position of the corner of the target object in the original image, wherein the corner recognition model is trained based on multiple sample document images and corner labels corresponding to each sample document image, the sample document image being an image containing a sample document, and the corner label being used to indicate the position of the corner of the sample document in the corresponding sample document image; based on the target corner information and the reference corner information corresponding to the original image, the original image is aligned to obtain the image to be identified.

[0141] Optionally, the image transformation processing includes at least one of the following processing methods: wavelet discrete transform, Laplace transform, and artifact transform.

[0142] Obviously, the image recognition device for reproduced images provided in this application embodiment can be used as... Figure 1 The entity executing the image recognition method shown is, for example, Figure 1 In the method for recognizing reproduced images shown, steps S102 and S104 can be performed by... Figure 9 The first preprocessing unit in the image recognition device shown is responsible for executing step S106, which can be executed by the first recognition unit in the image recognition device.

[0143] According to another embodiment of this application, Figure 9The units in the image recognition device shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effect of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the image recognition device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0144] According to another embodiment of this application, a general-purpose computing device, such as a computer, including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can run an application capable of performing tasks such as... Figure 1 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 9 The present invention describes a device for recognizing reproduced images and a method for recognizing reproduced images to implement embodiments of the present application. The computer program may be recorded on, for example, a computer-readable storage medium, and may be transferred to and run in an electronic device via such a medium.

[0145] In addition, with the above Figure 7 Corresponding to the training method of the re-photographing recognition model shown, this application embodiment also provides a training device for the re-photographing recognition model. Please refer to... Figure 10 The diagram below illustrates the structure of a training device 1000 for a copy recognition model, provided as an embodiment of this application. The device 1000 may include:

[0146] The acquisition unit 1010 is used to acquire a sample image containing a sample object and an image tag corresponding to the sample image, wherein the image tag is used to indicate whether the sample image is a photocopy of the sample object;

[0147] The second preprocessing unit 1020 is used to obtain sample image blocks from the sample object region of the sample image, and to perform image transformation processing on the sample image to obtain a second transformed image with enhanced image features, wherein the sample object region is the image region of the sample image that contains sample objects;

[0148] The second recognition unit 1030 is used to input the sample image, the sample image block and the second transformed image into the re-photographing recognition model to obtain the re-photographing recognition result of the sample image. The re-photographing recognition result is used to indicate whether the sample image is a re-photographed image of the sample object.

[0149] The update unit 1040 is used to update the model parameters of the re-photographing recognition model based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image, so as to obtain a target re-photographing recognition model; wherein, the re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module; the feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image respectively to obtain multiple image features; the fusion module is used to fuse the multiple image features to obtain fused image features; the classification module is used to perform re-photographing recognition on the sample image based on the fused image features to obtain the re-photographing recognition result of the sample image.

[0150] Optionally, the acquisition unit acquires a sample image containing a sample object, including: acquiring an original image containing the sample image; and performing data augmentation processing on the original image to obtain the sample image.

[0151] Optionally, the acquisition unit performs data augmentation processing on the original image to obtain the sample image, including: acquiring the original image region containing the sample object in the original image; enlarging the original image region in the original image based on at least one preset scaling ratio to obtain the at least one magnified image, wherein the magnified image corresponds one-to-one with the preset scaling ratio; and using both the original image and the at least one magnified image as the sample image.

[0152] Obviously, the training device for the re-photographing recognition model provided in this application embodiment can be used as... Figure 7 The entity executing the training method of the reproduced image recognition model shown is, for example, Figure 10 In the training method of the reproduced image recognition model shown, step S702 can be performed by... Figure 10 The acquisition unit in the training device of the reproduced image recognition model shown is executed, steps S704 and S706 can be executed by the second preprocessing unit in the training device of the reproduced image recognition model, step S708 can be executed by the second recognition unit in the training device of the reproduced image recognition model, and step S710 can be executed by the update unit in the training device of the reproduced image recognition model.

[0153] According to another embodiment of this application, Figure 10The units in the training device for the reproduced image recognition model shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effect of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the training device for the reproduced image recognition model may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0154] According to another embodiment of this application, a general-purpose computing device, such as a computer, including processing elements and storage elements such as a central processing unit, random access storage medium, and read-only storage medium, can be used to run an application capable of performing tasks such as... Figure 7 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 10 The diagram illustrates a training apparatus for a copy recognition model, and a training method for implementing the copy recognition model according to embodiments of this application. The computer program may be recorded on, for example, a computer-readable storage medium, and may be transferred to and run in an electronic device via that medium.

[0155] Figure 11 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 11 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0156] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0157] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0158] The processor reads the corresponding computer program from non-volatile memory into memory and then runs it, forming a device for recognizing reproduced images at the logical level. The processor executes the program stored in memory and specifically performs the following operations: obtaining a target image block from the target object region of the image to be recognized, wherein the target object region is an image region in the image to be recognized containing the target object; performing image transformation processing on the image to be recognized to obtain a first transformed image with enhanced image features; inputting the image to be recognized, the target image block, and the first transformed image into a target reproduced image recognition model to determine whether the image to be recognized is a reproduced image of the target object; wherein the target reproduced image recognition model includes a feature extraction module, a fusion module, and a classification module; the feature extraction module is used to extract features from the image to be recognized, the target image block, and the first transformed image respectively to obtain multiple image features; the fusion module is used to fuse the multiple image features to obtain fused image features; the classification module is used to perform reproduced image recognition on the image to be recognized based on the fused image features to determine whether the image to be recognized is a reproduced image of the target object.

[0159] Alternatively, the processor reads the corresponding computer program from non-volatile memory into memory and runs it, forming a training device for the copy recognition model at the logical level. The processor executes the program stored in memory and specifically performs the following operations: acquiring a sample image containing a sample object and an image label corresponding to the sample image, the image label indicating whether the sample image is a copy of the sample object; acquiring a sample image block from the sample object region of the sample image, the sample object region being the image region in the sample image containing the sample object; performing image transformation processing on the sample image to obtain a second transformed image with enhanced image features; inputting the sample image, the sample image block, and the second transformed image into the copy recognition model to obtain a copy recognition result for the sample image, the copy recognition result representing the copy of the sample object. The system determines whether the image is a copy of the sample object; based on the copy recognition result of the sample image and the image label corresponding to the sample image, the model parameters of the copy recognition model are updated to obtain the target copy recognition model; wherein, the copy recognition model includes a feature extraction module, a fusion module, and a classification module; the feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image respectively to obtain multiple image features; the fusion module is used to fuse the multiple image features to obtain fused image features; the classification module is used to perform copy recognition on the sample image based on the fused image features to obtain the copy recognition result of the sample image.

[0160] The above is as stated in this application. Figure 1 The illustrated embodiment discloses a method performed by a device for recognizing reproduced images, or the method described above in this application. Figure 7The method executed by the training device for the copy recognition model disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0161] The electronic device can also perform Figure 1 The method, and the realization of the image recognition device in the reproduced image Figures 1 to 6B The illustrated embodiment may also perform the functions of the electronic device, or the electronic device may also perform the functions of the embodiment shown. Figure 7 The method, and the training device for the re-photographing recognition model in Figure 7 , Figure 8 The functions of the embodiments shown are not described in detail here.

[0162] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0163] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figure 1 The method of the illustrated embodiment is specifically used to perform the following operations: obtaining a target image patch from a target object region of an image to be identified, wherein the target object region is an image region in the image to be identified that contains a target object; performing image transformation processing on the image to be identified to obtain a first transformed image with enhanced image features; inputting the image to be identified, the target image patch, and the first transformed image into a target re-image recognition model to determine whether the image to be identified is a re-image of the target object; wherein the target re-image recognition model includes a feature extraction module, a fusion module, and a classification module; the feature extraction module is used to extract features from the image to be identified, the target image patch, and the first transformed image respectively to obtain multiple image features; the fusion module is used to fuse the multiple image features to obtain fused image features; the classification module is used to perform re-image recognition on the image to be identified based on the fused image features to determine whether the image to be identified is a re-image of the target object.

[0164] Alternatively, when executed by a portable electronic device that includes multiple applications, the instruction can enable the portable electronic device to perform... Figure 1 The method of the illustrated embodiment is specifically used to perform the following operations: obtaining a sample image containing a sample object and an image tag corresponding to the sample image, the image tag indicating whether the sample image is a reproduced image of the sample object; obtaining a sample image patch from the sample object region of the sample image, the sample object region being the image region of the sample image containing the sample object; performing image transformation processing on the sample image to obtain a second transformed image with enhanced image features; inputting the sample image, the sample image patch, and the second transformed image into a reproduced image recognition model to obtain a reproduced image recognition result for the sample image, the reproduced image recognition result indicating whether the sample image is a reproduced image of the sample object. Whether it is a reproduced image of the sample object; based on the reproduced image recognition result and the image label corresponding to the sample image, update the model parameters of the reproduced image recognition model to obtain the target reproduced image recognition model; wherein, the reproduced image recognition model includes a feature extraction module, a fusion module and a classification module; the feature extraction module is used to extract features from the sample image, the sample image block and the second transformed image respectively to obtain multiple image features; the fusion module is used to fuse the multiple image features to obtain fused image features; the classification module is used to perform reproduced image recognition on the sample image based on the fused image features to obtain the reproduced image recognition result of the sample image.

[0165] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0166] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0167] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0168] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0169] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A method for recognizing reproduced images, characterized in that, include: Obtain a target image patch from the target object region of the image to be identified, wherein the target object region is the image region of the image to be identified that contains the target object; The image to be identified is subjected to image transformation processing to obtain a first transformed image with enhanced image features; The image to be identified, the target image block, and the first transformed image are input into the target re-image recognition model to determine whether the image to be identified is a re-image of the target object. The target re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the image to be identified, the target image block, and the first transformed image respectively, to obtain multiple image features, including global image features, local image features, and decoupled image features corresponding to each first transformed image; the fusion module is used to fuse the global image features, the local image features, and the decoupled image features corresponding to each first transformed image to obtain fused image features; the classification module is used to perform re-photographing identification on the image to be identified based on the fused image features, using the decoupled image features to adapt to the shooting scene to which the image to be identified belongs, and using the consistency state between the global image features and the local image features, to determine whether the image to be identified is a re-photographed image of the target object.

2. The method according to claim 1, characterized in that, The fusion module includes a cascaded layer, an adaptive layer, and a fusion layer; The cascaded layer is used to cascade the global image features, the local image features, and the decoupled image features corresponding to each first transformed image to obtain cascaded image features; The adaptive layer is used to determine the adaptive weight coefficients corresponding to the row vectors in the cascaded image features based on the distribution characteristics of the row vectors in the cascaded image features. The adaptive weight coefficients are used to represent the degree of correlation between the corresponding row vectors and the re-image recognition result of the image to be recognized. The fusion layer is used to perform weighted summation of the row vectors in the cascaded image features based on the adaptive weight coefficients corresponding to the row vectors in the cascaded image features, to obtain the fused image features.

3. The method according to claim 2, characterized in that, The adaptive layer is specifically used for: Based on the magnitude of each row vector in the cascaded image features, multiple target row vectors that meet preset filtering conditions are selected from the cascaded image features, and the distribution characteristics of the multiple target row vectors are determined. Based on the distribution characteristics of the multiple target row vectors, the adaptive weight coefficients corresponding to the multiple target row vectors are determined respectively; The fusion layer is used to perform a weighted summation of the multiple target row vectors based on the adaptive weight coefficients corresponding to the multiple target row vectors, so as to obtain the fused image features.

4. The method according to claim 1, characterized in that, The number of the first transformed images is multiple; the step of performing image transformation processing on the image to be identified to obtain the first transformed image with enhanced image features includes: Based on a variety of preset image transformation strategies, the image to be identified is processed to obtain multiple first transformed images, each of which corresponds to a preset image transformation strategy.

5. The method according to claim 4, characterized in that, The feature extraction module is specifically used for: Feature extraction is performed on the image to be identified to obtain the global image features; Feature extraction is performed on the target image patch to obtain the local image features; Feature extraction is performed on the plurality of first transformed images to obtain the decoupled image features corresponding to the plurality of first transformed images respectively.

6. The method according to claim 1, characterized in that, The type of the target object is a certificate; The image to be identified is obtained in the following manner: Obtain the original image containing the target object; The original image is input into the corner recognition model to obtain the target corner information of the target object. The target corner information includes the position of the corner of the target object in the original image. The corner recognition model is trained based on multiple sample document images and the corner label corresponding to each sample document image. The sample document image is an image containing sample documents. The corner label is used to indicate the position of the corner of the sample document in the corresponding sample document image. Based on the target corner information and the reference corner information corresponding to the original image, the original image is aligned to obtain the image to be identified.

7. A training method for a copy recognition model, characterized in that, include: Obtain a sample image containing a sample object and an image tag corresponding to the sample image, wherein the image tag is used to indicate whether the sample image is a photocopy of the sample object; Obtain sample image blocks from the sample object region of the sample image, wherein the sample object region is the image region of the sample image that contains sample objects; The sample image is subjected to image transformation processing to obtain a second transformed image with enhanced image features; The sample image, the sample image block, and the second transformed image are input into the re-image recognition model to obtain the re-image recognition result of the sample image. The re-image recognition result is used to indicate whether the sample image is a re-image of the sample object. Based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image, the model parameters of the re-photographing recognition model are updated to obtain the target re-photographing recognition model; The re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module; The feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image respectively, to obtain multiple image features, including global image features, local image features, and decoupled image features corresponding to each second transformed image; the fusion module is used to fuse the global image features, the local image features, and the decoupled image features corresponding to each second transformed image to obtain fused image features; the classification module is used to perform re-photographing recognition on the sample image based on the fused image features, using the decoupled image features to adapt to the shooting scene to which the sample image belongs, and using the consistency state between the global image features and the local image features, to obtain the re-photographing recognition result of the sample image.

8. A device for recognizing reproduced images, characterized in that, include: The first preprocessing unit is used to obtain a target image block from the target object region of the image to be identified, and to perform image transformation processing on the image to be identified to obtain a first transformed image with enhanced image features, wherein the target object region is the image region of the image to be identified that contains the target object; The first recognition unit is used to input the image to be recognized, the target image block and the first transformed image into the target re-image recognition model to determine whether the image to be recognized is a re-image of the target object; The target re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module. The feature extraction module is used to extract features from the image to be identified, the target image block, and the first transformed image respectively, to obtain multiple image features, including global image features, local image features, and decoupled image features corresponding to each first transformed image; the fusion module is used to fuse the global image features, the local image features, and the decoupled image features corresponding to each first transformed image to obtain fused image features; the classification module is used to perform re-photographing identification on the image to be identified based on the fused image features, using the decoupled image features to adapt to the shooting scene to which the image to be identified belongs, and using the consistency state between the global image features and the local image features, to determine whether the image to be identified is a re-photographed image of the target object.

9. A training device for a copy recognition model, characterized in that, include: The acquisition unit is used to acquire a sample image containing a sample object and an image tag corresponding to the sample image, wherein the image tag is used to indicate whether the sample image is a photocopy of the sample object; The second preprocessing unit is used to obtain sample image blocks from the sample object region of the sample image, and to perform image transformation processing on the sample image to obtain a second transformed image with enhanced image features, wherein the sample object region is the image region of the sample image that contains sample objects; The second recognition unit is used to input the sample image, the sample image block and the second transformed image into the re-photographing recognition model to obtain the re-photographing recognition result of the sample image. The re-photographing recognition result is used to indicate whether the sample image is a re-photographed image of the sample object. The update unit is used to update the model parameters of the re-photographing recognition model based on the re-photographing recognition result of the sample image and the image label corresponding to the sample image, so as to obtain the target re-photographing recognition model. The re-photographing recognition model includes a feature extraction module, a fusion module, and a classification module; The feature extraction module is used to extract features from the sample image, the sample image block, and the second transformed image respectively, to obtain multiple image features, including global image features, local image features, and decoupled image features corresponding to each second transformed image; the fusion module is used to fuse the global image features, the local image features, and the decoupled image features corresponding to each second transformed image to obtain fused image features; the classification module is used to perform re-photographing recognition on the sample image based on the fused image features, using the decoupled image features to adapt to the shooting scene to which the sample image belongs, and using the consistency state between the global image features and the local image features, to obtain the re-photographing recognition result of the sample image.

10. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 6; or the processor is configured to execute the instructions to implement the method as described in claim 7.

11. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1 to 6; or, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in claim 7.