Falsification identification method and apparatus, computer device, and storage medium

By performing corner regression correction and text recognition of the recognized images, generating tampered images and training recognition models, the problems of high cost and low efficiency of tampered photos in the prior art are solved, and automated recognition and efficient and accurate tampered recognition effects are achieved.

WO2025060963A1PCT designated stage expired Publication Date: 2025-03-27ZHONGAN ONLINE P&C INSURANCE CO LTD

Patent Information

Application Number
PCT/CN2024/118849
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-22
Filing Date
2024-09-13
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

In the prior art, when identifying tampered photos, manual review costs are high, low efficiency, and fine tampering is difficult to detect.

Method used

By obtaining the image to be identified, corner regression correction and text recognition are performed, multiple tampered images are generated, and the tampered area is marked, and the tampered recognition model is trained to identify tampered in the image.

Benefits of technology

Automatic tamper recognition is realized, reducing the cost and time of manual review, and improving the accuracy and efficiency of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118849_27032025_PF_FP_ABST
    Figure CN2024118849_27032025_PF_FP_ABST
Patent Text Reader

Abstract

A falsification identification method and apparatus, a computer device, and a storage medium. The method comprises: acquiring an image to be identified, the image to be identified comprising a target to be identified (S10); performing corner regression correction on said target in the image to be identified, to obtain a target image conforming to a target contour (S11); performing text identification on the target image, to obtain a text position in the target image (S12); on the basis of the text position, performing image restoration and image generation on the target image, to obtain a plurality of falsified images, and respectively annotating position information of falsified regions in the plurality of falsified images (S13); correspondingly using the target image and the plurality of falsified images as samples, respectively, and on the basis of the samples and the position information of the corresponding falsified regions, training a falsification identification model to be trained, to obtain a trained falsification identification model (S14); and identifying the target image by means of the trained falsification identification model, to obtain a falsification identification result (S15).
Need to check novelty before this filing date? Find Prior Art

Description

Tamper identification method, device, computer equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on September 22, 2023, with application number 202311231238.0, and application name “A tamper identification method, device, computer equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of artificial intelligence, and in particular to a tampering identification method, apparatus, computer equipment, and storage medium. Background Art

[0004] With the development of the internet and big data, more and more businesses are adopting online business models. Simply uploading photos of the target to be identified, such as ID cards, vehicle registration certificates, and driver's licenses, and passing the review process allows for complete business processing. This has led to the emergence of unauthorized users tampering with target photos. These users use image editing software to modify the content of captured photos of the target to be identified, thereby committing commercial fraud. Given the high volume and concurrency of internet business, manual review is burdensome, resulting in poor real-time performance and low accuracy. Furthermore, some sample manipulations are subtle, making them difficult for manual review to detect. Therefore, identifying tampering with target photo information is a key issue.

[0005] Currently, the mainstream method is to manually tamper with and annotate a large number of real images of the target to be identified, and then conduct supervised training of target detection or semantic segmentation models on this dataset to achieve tampering identification of the target information to be identified. However, the inventors realized that this would lead to two difficulties. First, the types of targets to be identified are diverse, and manual tampering is a demanding task, labor-intensive, and relatively costly. Second, the types of text tampering are also diverse, with dozens of fonts alone, making it difficult to exhaustively enumerate the tampering methods.

[0006] Summary of the Invention

[0007] In a first aspect, the present application provides a tampering identification method, comprising:

[0008] Acquire an image to be identified, where the image to be identified contains an object to be identified;

[0009] Perform corner regression correction on the target to be identified in the image to obtain a target image that meets the target contour;

[0010] Perform text recognition on the target image to obtain the text position in the target image;

[0011] According to the text position, the target image is repaired and generated to obtain multiple tampered images, and the position information of the tampered areas in the multiple tampered images is marked respectively;

[0012] The target image and the plurality of tampered images are respectively used as samples, and the tampering recognition model to be trained is trained according to the position information of the samples and the corresponding tampered areas to obtain a trained tampering recognition model; and

[0013] The target image is identified through the trained tampering recognition model to obtain the tampering recognition result.

[0014] In some embodiments, the tamper identification result includes an identified tamper location and also includes:

[0015] According to the tampering identification results, determine whether the target image has been tampered with;

[0016] In response to the tampering identification result being that no tampering has occurred, the tampering identification of the target image is terminated, or, in response to the tampering identification result being that tampering has occurred, the target image is determined to have been tampered with by calculating the intersection-and-union ratio of the tampering position and the text position, and, in response to the intersection-and-union ratio of the tampering position and the text position satisfying a preset threshold condition, it is determined that tampering has occurred in the target image, or, in response to the intersection-and-union ratio of the tampering position and the text position not satisfying a preset threshold condition, it is determined that tampering has not occurred in the target image.

[0017] In some embodiments, performing corner regression correction on the target to be identified to obtain a target image that conforms to the target contour includes:

[0018] Detecting the position coordinates of each corner point of the target to be identified in the image to be identified through the algorithm model; and

[0019] According to the position coordinates of each corner point, the target to be identified is corrected to a target image that conforms to the target contour through perspective transformation.

[0020] In some embodiments, the algorithm model includes a coordinate value regression model, and the method further includes:

[0021] The image to be recognized is encoded into a multi-dimensional vector through the coordinate value regression model to be trained, and the multi-dimensional vector represents the position coordinates of each corner point in turn;

[0022] According to the multidimensional vector and the position coordinates of each pre-marked corner point, the corresponding loss function is calculated by the mean absolute error or mean square error; and

[0023] Through gradient back propagation and optimizer algorithms, the internal parameters of the coordinate value regression model to be trained are optimized so that the loss function is reduced to close to 0, and the trained coordinate value regression model is obtained.

[0024] In some embodiments, image restoration and image generation are performed on a target image based on the text position to obtain multiple tampered images, and the position information of the tampered areas in the multiple tampered images are respectively annotated, including:

[0025] According to the target image and the text position, an image restoration model is used to obtain a text-free target image after removing the text content; and

[0026] According to the text position and the text-free target image, different tampered images are generated through the image generation model, and the location information of the tampered area in the tampered image is marked.

[0027] In some embodiments, obtaining a text-free target image after removing text content by an image restoration model includes:

[0028] According to the text position, the text area of ​​the target image is filled with background texture through the image restoration model to obtain a text-free target image after removing the text content.

[0029] In some embodiments, different tampered images are generated by an image generation model, and location information of tampered areas in the tampered images is annotated, including:

[0030] According to the text position and the text-free target image, the different tampered entries generated by text rendering are restored to the corresponding text areas in the text-free target image to obtain the tampered image, and the position information of the tampered area in the tampered image is marked.

[0031] In a second aspect of the present application, a tamper identification device is provided, comprising:

[0032] An acquisition module is used to acquire an image to be identified, where the image to be identified contains an object to be identified;

[0033] Correction module, which is used to perform corner regression correction on the target to be identified in the image to be identified, and obtain a target image that meets the target contour;

[0034] The tampered image generation module is used to perform text recognition on the target image, obtain the text position in the target image, and perform image restoration and image generation on the target image based on the text position to obtain multiple tampered images, and respectively mark the position information of the tampered areas in the multiple tampered images;

[0035] A training module, which is used to respectively correspond the target image and the plurality of tampered images as samples, train the tampering recognition model to be trained based on the position information of the samples and the corresponding tampered areas, and obtain a trained tampering recognition model; and

[0036] The recognition module is used to identify the target image through the trained tampering recognition model to obtain the tampering recognition result.

[0037] In a third aspect of the present application, a computer device is provided, comprising one or more processors; and one or more memories associated with the one or more processors, the one or more memories being used to store computer-readable instructions, which, when read and executed by the one or more processors, execute the steps of any one of the above-mentioned tamper identification methods.

[0038] In a fourth aspect, a non-volatile computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the steps of any of the above-mentioned tampering identification methods are performed. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] FIG1 is a schematic flow chart of a tamper identification method provided in one or more embodiments of the present application;

[0040] FIG2 is a flow chart of a tamper recognition model training method provided in one or more embodiments of the present application;

[0041] FIG3 is a structural block diagram of a tamper identification device provided in one or more embodiments of the present application;

[0042] FIG4 is a diagram showing the internal structure of a computer device provided in one or more embodiments of the present application. DETAILED DESCRIPTION

[0043] As shown in FIG1 , in some embodiments of the present application, a tampering identification method is provided, including:

[0044] S10, obtaining an image to be identified, where the image to be identified contains an object to be identified;

[0045] S11, performing corner regression correction on the target to be identified in the image to be identified to obtain a target image that conforms to the target contour;

[0046] Furthermore, the position coordinates of each corner point of the target to be identified in the image to be identified are detected by the algorithm model;

[0047] Furthermore, the algorithm model includes a coordinate value regression model, and the above method also includes:

[0048] The image to be recognized is encoded into a multi-dimensional vector through the coordinate value regression model to be trained, and the multi-dimensional vector represents the position coordinates of each corner point in turn;

[0049] According to the multidimensional vector and the position coordinates of each pre-marked corner point, the corresponding loss function is calculated by the mean absolute error or mean square error; and

[0050] Through gradient back propagation and optimizer algorithms, the internal parameters of the coordinate value regression model to be trained are optimized so that the loss function is reduced to close to 0, and the trained coordinate value regression model is obtained.

[0051] According to the position coordinates of each corner point, the target to be identified is corrected to a target image that conforms to the target contour through perspective transformation.

[0052] Specifically, a correction module is designed to perform corner regression correction on the target to be identified. An algorithmic model is used to detect the coordinates of the target's corner points in the image to be identified. For example, if the image to be identified is a photo and the target to be identified is an ID, the algorithmic model can detect the coordinates of the ID's four corner points in the photo. A perspective transformation is then used to correct the ID area to a rectangle, eliminating background information outside the target. The target area is then transformed into a target image that conforms to the target's outline, facilitating subsequent tampering detection tasks.

[0053] Common neural network-based corner detection methods include coordinate regression, Gaussian heatmaps, and image segmentation. For example, if the image to be identified is a photograph and the object to be identified is an ID, the coordinate regression method uses a neural network to directly encode the photograph into the coordinates of the ID's four corner points—an 8-dimensional vector representing the horizontal and vertical coordinates of each corner point. Based on the output 8-dimensional vector and the label information of the ID's four corner points, a corresponding loss function is calculated using mean absolute error (MAE) or mean squared error (MSE). The corner point labels are manually annotated corner point coordinates. This label information is used to guide / train the model, ensuring that the model's encoding output is as consistent as possible with the labels. For subsequent images without annotated labels, the model's inference results can be used directly as corner point coordinates. The calculated loss value is then subjected to gradient backpropagation, and the optimizer algorithm optimizes the model's internal parameters to reduce the loss value until it approaches 0, indicating that the fitting and model training are complete. Then, the perspective transformation algorithm is used to perform operations such as image rotation and pixel interpolation, and finally a target image that conforms to the target contour is obtained, eliminating background interference, unifying the layout of the image content, and reducing the difficulty of fitting the subsequent tampering recognition model.

[0054] S12, performing text recognition on the target image to obtain the text position in the target image;

[0055] S13. Perform image restoration and image generation on the target image according to the text position to obtain multiple tampered images, and mark the position information of the tampered areas in the multiple tampered images respectively;

[0056] Furthermore, according to the target image and the text position, an image restoration model is used to obtain a text-free target image after removing the text content.

[0057] Furthermore, according to the position of the text, the text area of ​​the target image is filled with the background texture through the image restoration model to obtain a text-free target image after removing the text content.

[0058] According to the text position and the text-free target image, different tampered images are generated through the image generation model, and the location information of the tampered area in the tampered image is marked.

[0059] Furthermore, according to the text position and the text-free target image, the different tampered entries generated by text rendering are restored to the corresponding text areas in the text-free target image to obtain the tampered image, and the position information of the tampered area in the tampered image is marked.

[0060] Specifically, the tampered image generation module is designed to consist of three parts: text recognition, image restoration, and image generation. First, text recognition uses conventional OCR (Optical Character Recognition) technology to determine the location of text within the image. Next, using the text region and the document image as input, an image restoration model is used to obtain the document image with the corresponding text removed, simultaneously desensitizing the document information. Finally, the text content and background texture are selected for fusion, and tampered entries with different fonts, sizes, colors, and other features are generated through text rendering. These entries are then restored to the corresponding area of ​​the original image, while also generating annotation information for the tampered area.

[0061] For example, the ID number and its position corresponding to the ID image are obtained through OCR recognition, and image restoration and text rendering technology are used to generate a tampered image with the same background but different content. In terms of spatial position, the image is put back to its original position through perspective transformation and the corresponding position label is recorded, thereby realizing automatic image tampering and label generation.

[0062] Among them, the main process of the image restoration module is as follows: the pixel position of the text on the document is marked using the OCR detection model to obtain a binary mask that can distinguish the target area. This mask and the original image are used as inputs of the image restoration model. The text area corresponding to the original image can be filled with the background texture. At this time, the document image with the text information removed can be obtained for the next step of text rendering.

[0063] S14, corresponding the target image and the multiple tampered images as samples, and training the tampering recognition model to be trained according to the samples and the position information of the corresponding tampered areas to obtain a trained tampering recognition model;

[0064] Specifically, as shown in Figure 2, training a tampering recognition model, primarily a semantic / instance segmentation or object detection model, involves the following process: A target image is used as training input. The tampered image generation module then generates a tampered image of the target image. This module also generates annotation information for the tampered area, such as pixel-level location labels or rectangle-level labels, to generate tampered samples.

[0065] The target image and the tampered image are combined into positive and negative sample pairs. Several sets of positive and negative sample pairs are added to the same training batch to achieve the effect of contrastive learning, thereby improving the effectiveness of model training.

[0066] S15. Identify the target image using the trained tampering identification model to obtain a tampering identification result.

[0067] According to the tampering identification results, determine whether the target image has been tampered with;

[0068] In response to the tampering identification result being that tampering does not exist, ending the tampering identification of the target image, or, in response to the tampering identification result being that tampering exists, determining whether the target image has been tampered with by calculating an intersection-over-union ratio of the tampering position and the text position; and

[0069] In response to the intersection-and-union ratio of the tampered position and the text position satisfying a preset threshold condition, it is determined that the target image has been tampered with, or in response to the intersection-and-union ratio of the tampered position and the text position not satisfying the preset threshold condition, it is determined that the target image has not been tampered with.

[0070] Specifically, in the application of target image tampering identification, the tampering area A identified by the tampering identification model and the text area B identified by OCR will be positionally verified and the intersection-over-union (IOU) of the two areas will be compared. A threshold can be set. If the threshold is not reached, it is considered that there is no tampering. If the threshold is exceeded or reached, the target image is considered to have been tampered with. This method can prevent the misjudgment of the entire document caused by additional traces such as watermarks and notes in non-critical field areas. IOU = (A∩B) / (A∪B)

[0071] Specifically, the tampering recognition model to be trained includes a backbone module, a feature pyramid module and a last sampling module. By inputting the document image into the model and encoding the information through the above three modules in sequence, a segmentation feature map with the same length and width as the original image can be obtained. The tampered area will be highlighted in this map, thereby achieving the effect of automatic tampering recognition.

[0072] It should be understood that, although the various steps in the flowchart of FIG1 are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in FIG1 may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0073] As shown in FIG3 , in some other embodiments of the present application, a tamper identification device is provided, including:

[0074] An acquisition module 30 is used to acquire an image to be identified, wherein the image to be identified includes an object to be identified;

[0075] Correction module 31, which is used to perform corner regression correction on the target to be identified in the image to be identified, to obtain a target image that conforms to the target contour;

[0076] Furthermore, the correction module is also used to:

[0077] The position coordinates of each corner point of the target to be identified in the image to be identified are detected through the algorithm model;

[0078] According to the position coordinates of each corner point, the target to be identified is corrected to a target image that conforms to the target contour through perspective transformation.

[0079] Furthermore, the algorithm model includes a coordinate value regression model, and the correction module is also used to:

[0080] The image to be recognized is encoded into a multi-dimensional vector through the coordinate value regression model to be trained, and the multi-dimensional vector represents the position coordinates of each corner point in turn;

[0081] According to the multidimensional vector and the position coordinates of each pre-marked corner point, the corresponding loss function is calculated by the mean absolute error or mean square error; and

[0082] Through gradient back propagation and optimizer algorithms, the internal parameters of the coordinate value regression model to be trained are optimized so that the loss function is reduced to close to 0, and the trained coordinate value regression model is obtained.

[0083] a tampered image generation module 32, which is used to perform text recognition on the target image, obtain the text position in the target image, and perform image restoration and image generation on the target image based on the text position, obtain multiple tampered images, and mark the position information of the tampered areas in the multiple tampered images;

[0084] Furthermore, the tampered image generation module is also used to:

[0085] According to the target image and text position, the image restoration model is used to obtain the text-free target image after removing the text content;

[0086] Furthermore, the tamper generation module is also used to:

[0087] According to the text position, the text area of ​​the target image is filled with background texture through the image restoration model to obtain a text-free target image after removing the text content.

[0088] According to the text position and the text-free target image, different tampered images are generated through the image generation model, and the location information of the tampered area in the tampered image is marked.

[0089] Furthermore, the tamper generation module is also used to:

[0090] According to the text position and the text-free target image, the different tampered entries generated by text rendering are restored to the corresponding text areas in the text-free target image to obtain the tampered image, and the position information of the tampered area in the tampered image is marked.

[0091] A training module 33 is configured to use a target image and multiple tampered images as samples, train a tampering recognition model to be trained based on the samples and the position information of the corresponding tampered areas, and obtain a trained tampering recognition model;

[0092] The recognition module 34 is used to recognize the target image through the trained tampering recognition model to obtain a tampering recognition result.

[0093] Furthermore, the tampering identification result includes an identified tampering location, and the apparatus further includes:

[0094] A determination module, configured to determine whether the target image has been tampered with based on the tampering identification result, and to terminate the tampering identification of the target image in response to the tampering identification result being no tampering;

[0095] Furthermore, the tamper detection module is also used to:

[0096] In response to the tampering identification result being that tampering has occurred, it is determined whether the target image has been tampered with by calculating the intersection-and-union ratio of the tampering position and the text position, and in response to the intersection-and-union ratio of the tampering position and the text position satisfying a preset threshold condition, it is determined that the target image has been tampered with, or in response to the intersection-and-union ratio of the tampering position and the text position not satisfying the preset threshold condition, it is determined that the target image has not been tampered with.

[0097] For the specific definition of the tamper identification device, please refer to the definition of the tamper identification method above and will not be repeated here. The various modules in the above-mentioned tamper identification device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of one or more processors in the computer device in hardware form, or can be stored in one or more memories in the computer device in software form, so that one or more processors can call and execute the operations corresponding to the above modules.

[0098] In some embodiments of the present application, a computer device is provided, comprising one or more memories, one or more processors, and computer-readable instructions stored on the one or more memories and executable on the one or more processors, wherein the one or more processors implement the steps of any one of the above-mentioned tamper identification methods when executing the computer-readable instructions.

[0099] When the program instructions are read and executed by one or more processors, they can also perform operations corresponding to the various steps in the above-mentioned method embodiments. Please refer to the description above and will not be repeated here. Referring to Figure 4, it exemplarily shows the architecture of a computer device, which may include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The above-mentioned processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420 can be communicatively connected via a communication bus 430.

[0100] Among them, the processor 410 can be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in this application.

[0101] The memory 420 can be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 420 can store an operating system 421 for controlling the operation of the computer device 400, and a basic input and output system (BIOS) 422 for controlling the low-level operations of the computer device 400. In addition, a web browser 423, a data storage management 424, and an icon font processing system 425, etc. can also be stored. The above-mentioned icon font processing system 425 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.

[0102] The input / output interface 413 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0103] The network interface 414 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0104] The bus 430 comprises a pathway for transmitting information between the various components of the device (eg, the processor 410 , the video display adapter 411 , the disk drive 412 , the input / output interface 413 , the network interface 414 , and the memory 420 ).

[0105] In addition, the computer device 400 can also obtain information on specific collection conditions from the virtual resource object collection condition information database 441 to perform condition judgment, etc.

[0106] It should be noted that although the computer device 400 shown above only includes a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, a memory 420, a bus 430, etc., in a specific implementation, the computer device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the solution of the present application, and does not necessarily include all the components shown in the figure.

[0107] From the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, a cloud server, or a network device, etc.) to execute the methods of various embodiments of the present application or certain portions of the embodiments.

[0108] In some further embodiments of the present application, a non-volatile computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the steps of any of the above-mentioned tampering identification methods are implemented.

[0109] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM). The technical features of the above embodiments can be combined in any manner. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they should not be understood as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several variations and improvements can be made without departing from the concept of the present application, and these all fall within the scope of protection of the present application. Therefore, the scope of protection of the patent in this application should be based on the appended claims.

Claims

1. A tampering identification method, characterized in that: The method comprises: Acquire an image to be identified, wherein the image to be identified contains an object to be identified; Performing corner point regression correction on the target to be identified in the image to be identified to obtain a target image that conforms to the target contour; Performing text recognition on the target image to obtain a text position in the target image; According to the text position, performing image restoration and image generation on the target image to obtain a plurality of tampered images, and marking the position information of the tampered areas in the plurality of tampered images respectively; The target image and a plurality of tampered images are respectively used as samples, and a tampering recognition model to be trained is trained according to the samples and the position information of the corresponding tampered areas to obtain a trained tampering recognition model; and The trained tampering recognition model is used to recognize the target image to obtain a tampering recognition result.

2. The method according to claim 1, characterized in that: The tampering identification result includes an identified tampering location, and the method further includes: According to the tampering identification result, determining whether the target image has been tampered with; In response to the tampering identification result being that no tampering has occurred, tampering identification of the target image is terminated; or, in response to the tampering identification result being that tampering has occurred, determining whether the target image has been tampered with by calculating the intersection-and-union ratio of the tampering position and the text position; and, in response to the intersection-and-union ratio of the tampering position and the text position satisfying a preset threshold condition, determining that tampering has occurred in the target image; or, in response to the intersection-and-union ratio of the tampering position and the text position not satisfying a preset threshold condition, determining that tampering has not occurred in the target image.

3. The method according to claim 1, characterized in that: The step of performing corner point regression correction on the target to be identified to obtain a target image that conforms to the target contour includes: Detecting the position coordinates of each corner point of the target to be identified in the image to be identified by using an algorithm model; and According to the position coordinates of each corner point, the target to be identified is corrected to a target image that conforms to the target contour through perspective transformation.

4. The method according to claim 3, characterized in that: The algorithm model includes a coordinate value regression model, and the method further includes: Encoding the image to be identified into a multi-dimensional vector through a coordinate value regression model to be trained, wherein the multi-dimensional vector sequentially represents the position coordinates of each corner point; According to the multidimensional vector and the position coordinates of each pre-marked corner point, a corresponding loss function is calculated by using a mean absolute error or a mean square error; and Through gradient back propagation and optimizer algorithms, the internal parameters of the coordinate value regression model to be trained are optimized so that the loss function is reduced to a value close to 0, thereby obtaining a trained coordinate value regression model.

5. The method according to claim 1, characterized in that: The method of performing image restoration and image generation on the target image according to the text position to obtain a plurality of tampered images, and respectively marking the position information of the tampered areas in the plurality of tampered images, comprises: According to the target image and the text position, obtaining a text-free target image after removing the text content through an image restoration model; and Different tampered images are generated according to the text position and the target image without text through an image generation model, and the position information of the tampered area in the tampered image is marked.

6. The method according to claim 5, characterized in that: The step of obtaining a text-free target image after removing text content through an image restoration model includes: According to the text position, the text area of ​​the target image is filled with the background texture through the image restoration model to obtain a text-free target image after the text content is removed.

7. The method according to claim 5, characterized in that: The generating different tampered images by using the image generation model and marking the position information of the tampered areas in the tampered images includes: According to the text position and the text-free target image, different tampered entries generated by text rendering are restored to corresponding text areas in the text-free target image to obtain a tampered image, and the position information of the tampered area in the tampered image is marked.

8. A tamper detection device, characterized in that: The device comprises: An acquisition module, the acquisition module is used to acquire an image to be identified, wherein the image to be identified contains a target to be identified; A correction module, the correction module is used to perform corner point regression correction on the target to be identified in the image to be identified, so as to obtain a target image that conforms to the target contour; a tampered image generation module, the tampered image generation module is used to perform text recognition on the target image, obtain the text position in the target image, and tamper with the target image according to the text position Performing image restoration and image generation to obtain a plurality of tampered images, and marking position information of tampered areas in the plurality of tampered images respectively; A training module, wherein the training module is used to respectively correspond the target image and a plurality of tampered images as samples, train a tampering recognition model to be trained according to the samples and position information of the corresponding tampered areas, and obtain a trained tampering recognition model; and The recognition module is used to recognize the target image through the trained tampering recognition model to obtain a tampering recognition result.

9. A computer device comprising one or more memories, one or more processors, and computer-readable instructions stored in the one or more memories and executable on the one or more processors, characterized in that: When the one or more processors execute the computer-readable instructions, the steps of the tampering identification method according to any one of claims 1 to 7 are implemented.

10. A non-volatile computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by one or more processors, the steps of the tampering identification method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment and readable medium

    CN114821588A

  • Text image generation method and device, electronic equipment and storage medium

    CN115588211A

  • Transform-based scene image character modification method and device, electronic equipment and storage medium

    CN115908639A

  • Tamper identification method and device, computer equipment and storage medium

    CN117115823A

  • Method of changing character part with image, computer equipment, and computer program

    JP2022107580A

Cited By

  • Unified detection method for cross-domain image tampering operation constructed based on positive and negative sample pairs

    CN121170556A