Method and apparatus for recognizing fraudulent photography of certificate, computer device, and storage medium

By adjusting the backbone network and localization head network of the target detection model, a theft identification model was constructed, which solved the problem of low efficiency in document theft identification and achieved efficient end-to-end document theft identification.

WO2026016376A1PCT designated stage Publication Date: 2026-01-22E SURFING VISION TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/135744
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-16
Filing Date
2024-11-29
Publication Date
2026-01-22

Smart Images

  • Figure CN2024135744_22012026_PF_FP_ABST
    Figure CN2024135744_22012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a method and apparatus for recognizing fraudulent photography of a certificate, a computer device, and a storage medium. The method comprises: adjusting a trained target detection model, and obtaining a fraudulent photography recognition model to be trained; acquiring a first network structure parameter corresponding to a backbone network of the trained target detection model and a second network structure parameter corresponding to a localization head network; on the basis of the first network structure parameter, the second network structure parameter, and an annotated sample certificate image, training the fraudulent photography recognition model to be trained, and obtaining a trained fraudulent photography recognition model; acquiring a certificate image to be recognized; and inputting the certificate image to be recognized into the trained fraudulent photography recognition model, and determining a fraudulent photography recognition result corresponding to the certificate image to be recognized. On this basis, the category of a certificate image to be recognized can be directly predicted to obtain a corresponding fraudulent photography recognition result, thereby achieving end-to-end recognition of fraudulent photography of a certificate, and effectively improving the efficiency of fraudulent photography recognition of certificates.
Need to check novelty before this filing date? Find Prior Art

Description

Certificate photographing identification method and device, computer device and storage medium TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, in particular to a certificate photographing identification method and device, a computer device and a storage medium. BACKGROUND

[0002] With the development of Internet technology, more and more businesses can be handled online. Among them, some online businesses with high security level need users to shoot and upload real ID cards to obtain the real identity information of the users to realize real-name binding. However, in real life, some users upload non-personal ID cards to use the identity information of others to handle businesses, which is a serious challenge to online businesses. How to effectively identify these stolen ID cards is an important problem to be solved for online businesses.

[0003] In the prior art, a classification model is usually used to realize stolen image identification. Common classification models include two-stage target detection models such as FasterRCNN model. In the first stage, the FasterRCNN model and other two-stage target detection models generate candidate boxes through an RPN network, and then respectively intercept the regions of interest (ROI) corresponding to the candidate boxes on the last feature map of the backbone network. In the second stage, classification and position correction are performed based on the ROIs. However, in actual application, the two-stage target detection model needs to consume more time to generate candidate boxes when identifying stolen ID cards, and cannot directly predict the input ID card image, resulting in low efficiency of stolen ID card identification.

[0004] At present, there is no effective solution to the problem of low efficiency of stolen ID card identification in the prior art. SUMMARY

[0005] Therefore, it is necessary to provide a certificate photographing identification method, device, computer device and storage medium to solve the above technical problems.

[0006] In a first aspect, the present application provides a certificate photographing identification method, which comprises:

[0007] obtaining a labeled sample ID card image and a trained target detection model; the trained target detection model comprises a backbone network and a head network; the last layer of the backbone network is connected to the head network; the head network comprises a positioning head network and a classification head network;

[0008] adjusting the trained target detection model to obtain a stolen photographing identification model to be trained;

[0009] obtain first network structure parameters corresponding to a backbone network of the trained target detection model and second network structure parameters corresponding to a positioning head network;

[0010] train the to-be-trained photographing identification model based on the first network structure parameters, the second network structure parameters, and the labeled sample certificate image, to obtain a trained photographing identification model;

[0011] obtain a to-be-identified certificate image;

[0012] input the to-be-identified certificate image into the trained photographing identification model, and determine a photographing identification result corresponding to the to-be-identified certificate image.

[0013] In one of the embodiments, the obtaining of the labeled sample certificate image comprises:

[0014] obtain an original sample certificate image; the original sample certificate image comprises an original photographing certificate image and an original non-photographing certificate image;

[0015] label a category of the original sample certificate image and a position of a certificate in the original sample certificate image, to obtain a labeled sample certificate image; wherein annotation information corresponding to the labeled sample certificate image comprises category information and certificate position information; the category information comprises non-photographing and photographing; and the certificate position information comprises position coordinates of the certificate in the original sample certificate image.

[0016] In one of the embodiments, the adjusting of the trained target detection model to obtain the to-be-trained photographing identification model comprises:

[0017] adjust a classification head network of the trained target detection model to obtain an identification classification network; the identification classification network is sequentially composed of a feature fusion network and the classification head network; the feature fusion network comprises a feature fusion module, a batch normalization layer, and an activation function layer connected in sequence;

[0018] construct the to-be-trained photographing identification model according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network.

[0019] In one of the embodiments, the feature fusion module is configured to:

[0020] determine candidate box information based on a positioning result of the positioning head network; the candidate box information comprises first candidate box position information; the first candidate box position information comprises center coordinates, a width, and a height corresponding to a first candidate box;

[0021] adjusting each of the first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto;

[0022] based on the feature map output by the last layer of the backbone network, sequentially extracting a plurality of multi-channel regions of interest corresponding to each of the second candidate box position information;

[0023] sequentially connecting all the multi-channel regions of interest along the channel dimension to obtain a region of interest group;

[0024] based on the group convolution algorithm, performing channel compression on the region of interest group to obtain feature fusion data corresponding to each of the second candidate box position information.

[0025] In one of the embodiments, the feature fusion network further comprises an activation function; and the adjusting each of the first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto comprises:

[0026] if the first candidate box position information is multiple, the activation function is called to respectively expand the width and height in each of the first candidate box position information with the center coordinate in each of the first candidate box position information as the origin to obtain third candidate box position information corresponding to each of the first candidate box position information;

[0027] determining the minimum width and the minimum height according to the width and the height in all the third candidate box position information;

[0028] updating the width and the height in each of the third candidate box position information according to the minimum width and the minimum height to obtain a plurality of second candidate box position information corresponding thereto.

[0029] In one of the embodiments, the feature fusion network further comprises an activation function; and the adjusting each of the first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto comprises:

[0030] if the first candidate box position information is single, the activation function is called to expand the width and the height in the first candidate box position information with the center coordinate in the first candidate box position information as the origin to obtain the second candidate box position information corresponding thereto.

[0031] In one of the embodiments, the training the to-be-trained photographing identification model based on the first network structure parameter, the second network structure parameter and the labeled sample certificate image to obtain a trained photographing identification model comprises:

[0032] taking the first grid structure parameter as the network structure parameter corresponding to the backbone network of the to-be-trained photographing identification model;

[0033] the second mesh structure parameter is used as a network structure parameter corresponding to the positioning head network of the to-be-trained photographing identification model;

[0034] Based on the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain a trained photographing identification model; the annotation information corresponding to the labeled sample certificate image includes category information; and the identification result of the trained photographing identification model includes a classification result.

[0035] In a second aspect, the present application further provides a certificate photographing identification device, which comprises:

[0036] The first obtaining module is configured to obtain a labeled sample certificate image and a trained target detection model; the trained target detection model comprises a backbone network and a head network; the last layer of the backbone network is connected to the head network; and the head network comprises a positioning head network and a classification head network.

[0037] The first training module is configured to adjust the trained target detection model to obtain a to-be-trained photographing identification model.

[0038] The second obtaining module is configured to obtain first network structure parameters corresponding to the backbone network of the trained target detection model and second network structure parameters corresponding to the positioning head network.

[0039] The second training module is configured to train the to-be-trained photographing identification model based on the first network structure parameters, the second network structure parameters, and the labeled sample certificate image to obtain a trained photographing identification model.

[0040] The third obtaining module is configured to obtain a to-be-identified certificate image.

[0041] The photographing identification module is configured to input the to-be-identified certificate image into the trained photographing identification model to determine a photographing identification result corresponding to the to-be-identified certificate image.

[0042] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of any one of the embodiments of the first aspect when executing the computer program.

[0043] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of any one of the embodiments of the first aspect.

[0044] The certificate photographing identification method, device, computer device and storage medium, first, the labeled sample certificate image and the trained target detection model are obtained; wherein the trained target detection model comprises a backbone network and a head network; the last layer of the backbone network is connected with the head network; the head network comprises a positioning head network and a classification head network; secondly, the trained target detection model is adjusted to obtain a to-be-trained photographing identification model; further, the first network structure parameters corresponding to the backbone network of the trained target detection model and the second network structure parameters corresponding to the positioning head network are obtained; further, based on the first network structure parameters, the second network structure parameters and the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain a trained photographing identification model; finally, the to-be-identified certificate image is obtained; the to-be-identified certificate image is input into the trained photographing identification model to determine the photographing identification result corresponding to the to-be-identified certificate image; based on the trained target detection model, the last layer of the backbone network is connected with the head network; further, by adjusting the trained target detection model, the to-be-trained photographing identification model is obtained, and the trained photographing identification model is obtained by training the to-be-trained photographing identification model, based on which, the category of the to-be-identified certificate image can be directly predicted to obtain the corresponding photographing identification result, realizing end-to-end certificate photographing identification, and effectively improving the certificate photographing identification efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0045] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate the present application and, together with the description, further serve to explain the principles of the present application and to enable a person skilled in the relevant art(s) to make and use the present application. In the drawings:

[0046] FIG. 1 is a diagram of an application environment of a certificate photographing identification method according to an embodiment of the present application;

[0047] FIG. 2 is a flowchart of a certificate photographing identification method according to an embodiment of the present application;

[0048] FIG. 3 is a diagram of feature fusion according to an embodiment of the present application;

[0049] FIG. 4 is a diagram of a first candidate box and a third candidate box according to an embodiment of the present application;

[0050] FIG. 5 is a structural block diagram of a certificate photographing identification device according to an embodiment of the present application;

[0051] FIG. 6 is a diagram of the internal structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.

[0053] Unless otherwise defined, technical terms and scientific terms used in the present application shall have the same meaning as those commonly understood by a person of ordinary skill in the art to which the present application belongs. The terms "one", "a", "an", "the", "these", and similar terms in the present application do not mean "only one" or "exactly one", but can mean "one or more". The terms "include", "contain", "have", and any variant thereof in the present application are intended to cover the non-exclusive inclusion; for example, a process, method, and system, product or device including a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. The terms "connect", "connected", "couple", and similar terms in the present application are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The term "multiple" in the present application means two or more. The term "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. Generally, the character " / " means that the objects before and after are "or" relationship. The terms "first", "second", "third", and the like in the present application are only used to distinguish similar objects, and do not represent a specific order of the objects.

[0054] The certificate photographing method provided by the embodiments of the present application can be applied to the application environment as shown in FIG. 1. Wherein, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. Wherein, the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, the Internet of Things devices can be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be realized by an independent server or a server cluster composed of multiple servers.

[0055] In one embodiment, as shown in FIG. 2, FIG. 2 is a flowchart of the certificate photographing identification method in one embodiment; the present embodiment takes the method applied to the terminal as an example, it can be understood that the method can also be applied to the server, and can also be applied to the system including the terminal and the server, and is realized through the interaction of the terminal and the server. In the present embodiment, the method includes the following steps:

[0056] Step S201, obtaining the labeled sample certificate image and the trained target detection model.

[0057] The trained target detection model comprises a backbone network and a head network; the backbone network is connected to the head network at the last layer; the head network comprises a positioning head network and a classification head network; the target detection model is a decoupled head YOLO model; it should be noted that the decoupled head YOLO model can be, but is not limited to, YOLOX, YOLOV6, YOLOV8, ppyoloe, etc., and is not limited herein; the backbone network is responsible for feature extraction; the head network comprises a positioning head network and a classification head network, and is used for position detection and category detection; it should be noted that a general target detection model also comprises a feature neck network, but since the recognized target in this embodiment is a certificate, the category is relatively single, and the size of the certificate is also relatively single, so the neck network can be removed, and the classification head network and the positioning head network are connected to the last layer of the backbone network, and the specific configuration process is not described herein.

[0058] The labeled sample certificate image refers to a sample certificate image obtained after labeling or tagging an original sample certificate image; the certificate image comprises a stolen certificate image and a non-stolen certificate image; it should be noted that the labeling tool can be, but is not limited to, an open source tool such as labelMe or LabelImg, and is not limited herein.

[0059] Step S202, adjusting the trained target detection model to obtain a to-be-trained stolen photograph identification model.

[0060] Specifically, based on the trained target detection model, the classification head network in the trained target detection model is adjusted to obtain the to-be-trained stolen photograph identification model.

[0061] Step S203, obtaining first network structure parameters corresponding to the backbone network of the trained target detection model and second network structure parameters corresponding to the positioning head network.

[0062] The first network structure parameters corresponding to the backbone network and the second network structure parameters corresponding to the positioning head network are determined according to the training result of the trained target detection model, and are not described herein; it can be understood that the grid structure parameters comprise weight parameters.

[0063] Step S204, training the to-be-trained stolen photograph identification model based on the first network structure parameters, the second network structure parameters, and the labeled sample certificate image to obtain a trained stolen photograph identification model.

[0064] It should be noted that when training the to-be-trained photographing identification model, the label information corresponding to the labeled sample certificate image includes category information; the category information includes non-photographing and photographing; based on the first network structure parameter, the second network structure parameter and the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain the trained photographing identification model, and the photographing identification result of the trained photographing identification model includes photographing or non-photographing.

[0065] Step S205, obtaining a to-be-identified certificate image.

[0066] The to-be-identified certificate image may be, but is not limited to, a screen type ID image, an ID copy image, and the like, which is not limited here.

[0067] Step S206, inputting the to-be-identified certificate image into the trained photographing identification model to determine a photographing identification result corresponding to the to-be-identified certificate image.

[0068] Specifically, inputting the to-be-identified certificate image into the trained photographing identification model can obtain a photographing identification result corresponding to the to-be-identified certificate image as photographing or non-photographing.

[0069] In this embodiment, based on the trained target detection model, the to-be-trained photographing identification model is obtained by adjusting the trained target detection model, and then based on the first network structure parameter corresponding to the backbone network of the trained target detection model, the second network structure parameter corresponding to the positioning head network, and the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain the trained photographing identification model; based on this, inputting the to-be-identified certificate image into the trained photographing identification model can directly obtain the corresponding photographing identification result, realizing end-to-end certificate photographing identification and effectively improving the efficiency of certificate photographing identification.

[0070] In one embodiment, obtaining the labeled sample certificate image includes the following steps:

[0071] Step 1, obtaining an original sample certificate image.

[0072] The original sample certificate image includes an original photographing certificate image and an original non-photographing certificate image.

[0073] Step 2, labeling the category of the original sample certificate image and the position of the certificate in the original sample certificate image to obtain a labeled sample certificate image.

[0074] The label information corresponding to the labeled sample certificate image includes category information and certificate position information; the category information includes non-spy shooting and spy shooting; and the certificate position information includes position coordinates of the certificate in the original sample certificate image.

[0075] For example, online data is collected and images without certificates are cleaned to obtain original sample certificate images, i.e., original spy shooting certificate images and original non-spy shooting certificate images. It can be understood that the original sample certificate images can constitute an original sample data set. Further, the category information and the certificate position information of the original sample certificate images are labeled based on a labeling tool such as labelMe to obtain labeled sample certificate images, i.e., a labeled sample data set. The category information includes non-spy shooting and spy shooting, and the certificate position information includes position coordinates of the certificate in the original sample certificate image.

[0076] It should be noted that the labeled sample certificate images, i.e., the labeled sample data set, can be divided into data sets according to a preset ratio, and the labeled sample certificate images are divided into a training data set, a verification data set, and a test data set. The preset ratio can be set according to actual needs, and is not specifically limited herein. For example, the labeled sample certificate images are divided into data sets according to a ratio of 8:1:1 of the training data set, the verification data set, and the test data set. The training data set is used to train the model. The verification data set is used to evaluate the new model after each iteration. The test data set is used to test and select the best model after the model training is completed.

[0077] In this embodiment, the category of the original sample certificate image and the position of the certificate in the original sample certificate image are labeled to obtain labeled sample certificate images. Further, based on the labeled sample certificate images, a data foundation is laid for determining the trained target detection model and the trained spy shooting recognition model.

[0078] In one embodiment, the trained target detection model is adjusted to obtain a to-be-trained spy shooting recognition model, including:

[0079] Step 1. Adjusting the classification head network of the trained target detection model to obtain a recognition classification network.

[0080] The recognition classification network is composed of a feature fusion network and a classification head network in sequence. The feature fusion network includes a feature fusion module, a batch normalization layer, and an activation function layer connected in sequence. The batch normalization layer is used to prevent overfitting. The activation function layer is used to avoid network degradation into a linear network.

[0081] Step 2, constructing a to-be-trained photographing identification model according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network.

[0082] It should be noted that the training process of the target detection model includes the following steps: the present embodiment takes the YOLOX model as an example for illustration; S1, training the target detection model, i.e., the YOLOX model, based on the YOLOX model default training hyperparameters and the training data set obtained by data division on the labeled sample certificate image; verifying the target detection model obtained in this round of training using the verification data set obtained by data division on the labeled sample certificate image, recording the current iteration number epoch and the mean average precision (mAP) of the target detection model on the verification data set, and saving the target detection model obtained in this round of training; S2, determining whether the current iteration number epoch is greater than a preset threshold or whether the mean average precision mAP meets the early stopping condition; if the current iteration number epoch is greater than the preset threshold or the mean average precision mAP meets the early stopping condition, stopping the training of the target detection model, and performing S3; otherwise, proceeding to S1; S3, testing the saved target detection model using the test data set obtained by data division on the labeled sample certificate image to obtain a target detection model with the highest mean average precision mAP, denoted as the detection_best model; wherein the detection_best model is the final trained target detection model. It should be noted that the preset threshold and the early stopping condition need to be set according to the training requirements, and are not limited here.

[0083] Specifically, the classification head network of the trained target detection model is adjusted to obtain an identification classification network composed of a feature fusion network and a classification head network; wherein the feature fusion network includes a feature fusion module, a batch normalization layer, and an activation function layer connected in sequence; further, a to-be-trained photographing identification model is constructed according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network.

[0084] In the present embodiment, the classification head network of the trained target detection model is adjusted based on the trained target detection model, i.e., the classification head network is adjusted to an identification classification network; further, a to-be-trained photographing identification model is constructed according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network, laying a foundation for improving the accuracy of photographing identification results and improving the efficiency of certificate photographing identification.

[0085] In one embodiment, the feature fusion module is configured to:

[0086] determine the candidate box information based on the positioning result of the positioning head network; the candidate box information comprises first candidate box position information; the first candidate box position information comprises a center coordinate, a width and a height corresponding to the first candidate box;

[0087] adjust each first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto;

[0088] extract a plurality of multi-channel regions of interest corresponding to each second candidate box position information in sequence based on the feature map output by the last layer of the backbone network;

[0089] connect all the multi-channel regions of interest in sequence along the channel dimension to obtain a region of interest group;

[0090] perform channel compression on the region of interest group based on a group convolution algorithm to obtain feature fusion data corresponding to each second candidate box position information.

[0091] The positioning result of the positioning head network is a certificate position prediction result. The position prediction result comprises a position prediction coordinate of the certificate in the certificate image. The position prediction coordinate can include, but is not limited to, a left upper corner position prediction coordinate of the certificate and a right lower corner position prediction coordinate of the certificate. Based on the positioning result of the positioning head network, the corresponding first candidate box and the candidate box information corresponding to the first candidate box can be determined. It should be noted that the number of first candidate boxes can be one or multiple, which needs to be determined according to the actual number of certificates in the sample certificate image or the to-be-recognized certificate image input into the trained target detection model, which is not limited herein. For example, there can be multiple ID cards in a sample certificate image or a to-be-recognized certificate image, such as an ID card copy including the front and back of the ID card. Therefore, the positioning result obtained by the positioning head network of the trained target detection model comprises the position prediction result corresponding to the front and back of the ID card respectively. Further, based on the position prediction result corresponding to the front and back of the ID card respectively, the corresponding first candidate box can be obtained, and the number of first candidate boxes is two at this time. It can be understood that the positioning result of the positioning head network, i.e., the certificate position prediction result, is the first candidate box in this embodiment.

[0092] The candidate box information includes first candidate box position information; the first candidate box position information includes a center coordinate, a width, and a height corresponding to the first candidate box; it can be understood that based on the position prediction result, i.e., the predicted coordinates of the upper left corner of the certificate and the predicted coordinates of the lower right corner of the certificate, the first candidate box position information, i.e., the center coordinate, the width, and the height corresponding to the first candidate box, can be determined, denoted as (x, y, w1, h1), wherein (x, y) is the center coordinate corresponding to the first candidate box; w1 is the width corresponding to the first candidate box; and h1 is the height corresponding to the first candidate box. The second candidate box refers to an adjusted candidate box obtained by adjusting the first candidate box position information corresponding to the first candidate box; the second candidate box position information includes a center coordinate, a width, and a height corresponding to the second candidate box, denoted as (x, y, w2, h2), wherein (x, y) is the center coordinate corresponding to the second candidate box; w2 is the width corresponding to the second candidate box; and h2 is the height corresponding to the second candidate box. It should be noted that the center coordinate of the second candidate box is the same as the center coordinate of the corresponding first candidate box.

[0093] The feature map output by the last layer of the backbone network of the trained target detection model is used to obtain a plurality of channel regions of interest corresponding to each second candidate box position information; it can be understood that based on the second candidate box position information, a plurality of channel regions of interest corresponding to the second candidate box position information can be extracted from the feature map, and the regions of interest include a number of feature channels. It should be noted that the number of regions of interest is the same as the number of first candidate boxes and second candidate boxes; and the region of interest group is composed of all regions of interest connected in turn along the channel dimension.

[0094] For example, based on the positioning result of the positioning head network, the first candidate box and the first candidate box position information are determined, and it is assumed that the number of the first candidate boxes is bbox_num; each first candidate box position information is adjusted to obtain a plurality of second candidate boxes and second candidate box position information corresponding to the first candidate box position information; at this time, the number of the second candidate boxes is equal to the number of the first candidate boxes, which is equal to bbox_num; further, based on the feature map output by the last layer of the backbone network, a plurality of multi-channel regions of interest corresponding to each second candidate box position information are extracted in turn; at this time, the number of the regions of interest is equal to the number of the first candidate boxes, which is equal to the number of the second candidate boxes, which is equal to bbox_num; it is assumed that the number of channels corresponding to each region of interest is num_c; all regions of interest connected in turn along the channel dimension obtain a region of interest group corresponding to the number of channels bbox_num×num_c; further, based on the group convolution algorithm, the number of channels corresponding to the region of interest group is compressed from bbox_num×num_c to num_c, and based on the region of interest group after channel compression, the feature fusion data corresponding to each second candidate box position information can be obtained. It can be understood that the channel compression of the region of interest group is the channel compression of each region of interest connected in turn along the channel dimension; wherein the feature fusion schematic diagram is shown in FIG. 3.

[0095] In the embodiment, the positioning result of the positioning head network is taken as the first candidate box, and the corresponding first candidate box position information can be determined; further, each first candidate box position information is adjusted to obtain a plurality of second candidate box position information corresponding to the first candidate box position information; further, based on the feature map output by the last layer of the backbone network, a plurality of multi-channel regions of interest corresponding to each second candidate box position information can be accurately extracted, and then a region of interest group is obtained based on all the multi-channel regions of interest; by channel compression of the region of interest group, the feature fusion data corresponding to each second candidate box position information is obtained; based on this, by adjusting the first candidate box position information, not only can the features in the certificate be accurately extracted, but also the features of the area near the certificate can be fully considered, and then the feature fusion is realized based on the features in the certificate and the area near the certificate, which lays a foundation for improving the accuracy of the stolen shot recognition result, and at the same time, the interference of the background information can be effectively avoided.

[0096] In one embodiment, the feature fusion network further comprises an activation function; adjusting each first candidate box position information to obtain a plurality of second candidate box position information corresponding to the first candidate box position information comprises the following steps:

[0097] Step 1, if the first candidate frame position information is multiple, an activation function is called, and the width and height in each first candidate frame position information are respectively expanded with the center coordinates in each first candidate frame position information as the origin to obtain third candidate frame position information corresponding to each first candidate frame position information.

[0098] Step 2, the minimum width and the minimum height are determined according to the width and the height in all third candidate frame position information.

[0099] Step 3, the width and the height in each third candidate frame position information are updated according to the minimum width and the minimum height to obtain corresponding multiple second candidate frame position information.

[0100] Wherein, the activation function is a sigmoid function, which is used to expand the width and the height in the first candidate frame position information to balance the features in the first candidate frame and the features in the nearby area outside the first candidate frame, so as to achieve the purpose of fully utilizing the features in the certificate and the features in the nearby area outside the certificate for certificate photographing identification, while avoiding the interference of background information.

[0101] For example, assuming that the first candidate box position information is (x, y, w1, h1); wherein (x, y) is the center coordinate corresponding to the first candidate box; w1 is the width corresponding to the first candidate box; h1 is the height corresponding to the first candidate box; based on the activation function, i.e., the sigmoid function, the width and the height in each first candidate box position information are respectively expanded with the center coordinate in each first candidate box position information as the origin, i.e., w1 and h1 are expanded with (x, y) as the origin, to obtain third candidate box position information corresponding to each first candidate box position information, the third candidate box position information being (x, y, w3, h3); (x, y) is the center coordinate corresponding to the third candidate box; w3 is the width corresponding to the third candidate box, i.e., the width after expansion of w1; h3 is the height corresponding to the third candidate box, i.e., the height after expansion of h1; it should be noted that the center coordinate of the third candidate box is the same as that of the corresponding first candidate box; the expansion ratio is determined by the parameter of the activation function, i.e., the parameter of the sigmoid function, which is not specifically limited here; it should be noted that the parameter of the activation function, i.e., the parameter of the sigmoid function, needs to be determined in the training process of the to-be-trained photographing identification model, which is not described here; further, the minimum width w_min and the minimum height h_min are determined according to the width and the height in all third candidate box information; and the width w3 and the height h3 corresponding to each third candidate box position information are updated, i.e., each third candidate box is adjusted in size from w3 x h3 to w_min x h_min with the center coordinate as the origin, to obtain corresponding multiple second candidate box position information; it can be understood that the width in all second candidate box position information is w_min, and the height is h_min; i.e., the second candidate box position information (x, y, w2, h2) = (x, y, w_min, h_min).

[0102] In the embodiment, in the case where the first candidate box position information is multiple, the width and the height in the first candidate box position information are expanded based on the activation function to obtain corresponding third candidate box position information, which can balance the features inside the certificate and the features in the nearby area outside the certificate, and further can ensure that the features inside and outside the certificate can be fully utilized for certificate photographing identification, while the interference of background information on the photographing identification result can be effectively eliminated, laying a foundation for improving the accuracy of certificate photographing identification; the width and the height in the third candidate box information are updated to obtain corresponding multiple second candidate box position information, which can ensure that the sizes of all candidate boxes on the feature map remain consistent, based on which the multi-channel regions of interest corresponding to the second candidate box position information can be extracted from the feature map to ensure that feature fusion can be realized.

[0103] In one specific embodiment, referring to FIG. 4, assume that the first candidate box is denoted as B, and assume that the first candidate box position information is (X, Y, W1, H1); assume that the third candidate box is denoted as A; based on the activation function, i.e., the sigmoid function, the first candidate box B is constrained and expanded to obtain the corresponding third candidate box position information (X, Y, W2, H2); it can be understood that the center coordinates in the first candidate box position information are equal to the center coordinates in the corresponding third candidate box position information.

[0104] Based on the first candidate box position information (X, Y, W1, H1) and the third candidate box position information (X, Y, W2, H2), the process of the activation function, i.e., the sigmoid function, for constraining and expanding the first candidate box position information can be derived, which specifically includes: determining the intersection over union, i.e., IOU(A, B), of the third candidate box position information (X, Y, W2, H2) and the first candidate box position information (X, Y, W1, H2), which is specifically calculated as shown in equation (1).

[0105] wherein, is the difference between the width of the third candidate box A and the width of the first candidate box B; is the difference between the height of the third candidate box A and the height of the first candidate box B.

[0106] Further, based on the intersection over union, i.e., IOU(A, B), of the third candidate box position information, a plurality of constraint parameters can be determined, wherein the constraint parameters include: and Based on the activation function, i.e., the sigmoid function, the plurality of constraint parameters are fitted, i.e., and are fitted, which limits the constraint parameters within a preset range, as shown in equations (2) and (3). and

[0107] wherein, r1 and r2 are trainable parameters; it should be noted that r1 and r2 need to be trained simultaneously in the training process of the to-be-trained pirated shooting identification model to obtain the final fixed r1 and r2; as can be seen from equations (2) and (3), and are limited within the preset range, i.e., within the range of (0, 1); further, according to equations (2) and (3), the candidate box width expansion expression and the candidate box height expansion expression can be obtained, as shown in equations (4) and (5), respectively.

[0108] ​It can be known from the formulas (4) and (5) that the maximum expansion multiple corresponding to the width of the third candidate frame A will be constrained to one of the width of the first candidate frame B, and the maximum expansion multiple corresponding to the height of the third candidate frame A will be constrained to one of the height of the first candidate frame B, that is, the maximum expansion ratio of the third candidate frame A is one of the first candidate frame B. It should be noted that the final expansion ratio needs to be determined according to the trained r1 and r2, which is not specifically limited here. Based on the above derivation process, the first candidate frame position information (X, Y, W1, H1) can be constrained and expanded based on the activation function, that is, the sigmoid function, to obtain the corresponding third candidate frame position information (X, Y, W2, H2); wherein W2 is determined by the candidate frame width expansion expression, that is, formula (4); H2 is determined by the candidate frame height expansion expression, that is, formula (5).

[0109] In one embodiment, the feature fusion network further comprises an activation function; adjusting each first candidate frame position information to obtain a plurality of corresponding second candidate frame position information, comprising:

[0110] If the first candidate frame position information is single, the activation function is called to expand the width and height in the first candidate frame position information with the center coordinate in the first candidate frame position information as the origin to obtain the corresponding second candidate frame position information.

[0111] It should be noted that when the first candidate frame position information is single, the activation function can be directly called to expand the width and height in the first candidate frame position information with the center coordinate in the first candidate frame position information as the origin to obtain the corresponding second candidate frame position information.

[0112] For example, assuming that the first candidate box position information is (x, y, w1, h1); wherein (x, y) is the center coordinate corresponding to the first candidate box; w1 is the width corresponding to the first candidate box; h1 is the height corresponding to the first candidate box; based on the activation function, i.e., the sigmoid function, the center coordinate in the first candidate box position information is taken as the origin, the width and the height in the first candidate box position information are expanded accordingly, i.e., w1 and h1 are expanded accordingly with (x, y) as the origin, to obtain the second candidate box position information corresponding to the first candidate box position information, and the second candidate box position information is (x, y, w2, h2); (x, y) is the center coordinate corresponding to the second candidate box; w2 is the width corresponding to the second candidate box, i.e., the width after expansion of w1; h2 is the height corresponding to the second candidate box, i.e., the height after expansion of h1; it should be noted that the center coordinate of the second candidate box is the same as that of the corresponding first candidate box; the expansion ratio is determined by the parameter of the activation function, i.e., the sigmoid function, which is not limited here; it should be noted that the parameter of the activation function, i.e., the sigmoid function, needs to be determined in the training process of the to-be-trained photographing identification model, which is not described here.

[0113] In this embodiment, if the first candidate box position information is single, the activation function is directly called, the center coordinate in the first candidate box position information is taken as the origin, the width and the height in the first candidate box position information are expanded accordingly, to obtain the corresponding second candidate box position information, based on which the efficiency of the certificate photographing identification is further improved; at the same time, the features inside the certificate and the features in the nearby area outside the certificate can be balanced, so that the features inside and outside the certificate can be fully utilized for the certificate photographing identification, and the accuracy of the certificate photographing identification is improved.

[0114] In one embodiment, based on the first network structure parameter, the second network structure parameter and the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain the trained photographing identification model, including the following steps:

[0115] The first grid structure parameter is taken as the network structure parameter corresponding to the backbone network of the to-be-trained photographing identification model;

[0116] The second grid structure parameter is taken as the network structure parameter corresponding to the positioning head network of the to-be-trained photographing identification model;

[0117] Based on the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain the trained photographing identification model; the annotation information corresponding to the labeled sample certificate image includes the category information; the identification result of the trained photographing identification model includes the classification result.

[0118] It should be noted that, since the backbone network and the positioning head network of the to-be-trained photographing identification model are the same as the backbone network and the positioning head network of the trained target detection model, the first network structure parameters corresponding to the backbone network of the trained target detection model can be directly frozen, i.e., the first network structure parameters are taken as the network structure parameters corresponding to the backbone network of the to-be-trained photographing identification model, and the second network structure parameters corresponding to the positioning head network of the trained target detection model can be directly frozen, i.e., the second network structure parameters are taken as the network structure parameters corresponding to the positioning head network of the to-be-trained photographing identification model. Based on this, only the identification classification network corresponding to the to-be-trained photographing identification model needs to be trained, and the trained photographing identification model can be obtained. In other embodiments, the first network structure parameters and the second network structure parameters can also be frozen first, and the identification classification network corresponding to the to-be-trained photographing identification model is trained to obtain the trained photographing identification model. Further, the first network structure parameters and the second network structure parameters are unfrozen, and the trained photographing identification model is retrained to obtain the final trained photographing identification model. The training method of the to-be-trained photographing identification model is not specifically limited herein.

[0119] For example, the training process of the to-be-trained photographing identification model includes the following steps: S1, training the to-be-trained photographing identification model based on the first grid structure parameters, the second grid structure parameters, and the training data set obtained by data division on the labeled sample certificate images; verifying the photographing identification model obtained in this round of training using the verification data set obtained by data division on the labeled sample certificate images, recording the current iteration number epoch and the accuracy of the photographing identification model on the verification data set, and saving the photographing identification model obtained in this round of iteration; it should be noted that the labeled sample certificate images used to train the to-be-trained photographing identification model only include class information in the corresponding label information; S2, determining whether the current iteration number epoch is greater than a preset threshold or the accuracy satisfies an early stopping condition; if the current iteration number epoch is greater than the preset threshold or the accuracy satisfies the early stopping condition, stopping the training of the photographing identification model, and performing S3; otherwise, going to S1; S3, testing the saved photographing identification model using the test data set obtained by data division on the labeled sample certificate images, obtaining the photographing identification model with the highest accuracy, denoted as model_best model; wherein the model_best model is the final determined trained photographing identification model. It should be noted that the preset threshold and the early stopping condition need to be set according to actual training requirements and are not specifically limited herein.

[0120] Further, based on the trained photographing-against-will identification model, photographing-against-will identification can be performed on the to-be-identified certificate image to obtain a corresponding photographing-against-will identification result, the photographing-against-will identification result including photographing-against-will or non-photographing-against-will.

[0121] In this embodiment, the photographing-against-will identification model to be trained is trained based on the first grid structure parameter and the second grid structure parameter, the training efficiency of the photographing-against-will identification model to be trained is improved, and meanwhile, the trained photographing-against-will identification model with high accuracy can be obtained, and the accuracy of the photographing-against-will identification result is improved.

[0122] The certificate photographing identification method has the following advantages. First, based on the trained target detection model, the photographing identification model to be trained is obtained by adjusting the trained target detection model, and then the trained photographing identification model is trained based on the first network structure parameters corresponding to the backbone network of the trained target detection model, the second network structure parameters corresponding to the positioning head network, and the labeled sample certificate image, so that the trained photographing identification model is obtained. The trained photographing identification model can directly obtain the corresponding photographing identification result when the certificate image to be identified is input, realizing end-to-end certificate photographing identification and effectively improving the efficiency of certificate photographing identification. Second, based on the labeled sample certificate image, a data foundation is laid for determining the trained target detection model and the trained photographing identification model. Third, based on the trained target detection model, the classification head network of the trained target detection model is adjusted, that is, the classification head network is adjusted to an identification classification network. Then, based on the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network, the photographing identification model to be trained is constructed, laying a foundation for improving the accuracy of the photographing identification result and the efficiency of the certificate photographing identification. Fourth, based on the first candidate frame position information, a plurality of second candidate frame position information can be obtained. Then, based on the feature map output by the last layer of the backbone network, the region of interest corresponding to each second candidate frame position information can be accurately extracted. The region of interest group is obtained based on all the regions of interest. The channel compression is performed on the region of interest group to obtain the feature fusion data corresponding to each second candidate frame position information. Based on this, by adjusting the first candidate frame position information, the features in the certificate can be accurately extracted, and the features of the area near the certificate outside can also be fully considered. Then, based on the features of the certificate and the area near the certificate outside, the feature fusion is realized, laying a foundation for improving the accuracy of the photographing identification result and effectively avoiding the interference of background information. Fifth, when the first candidate frame position information is multiple, the width and height of the first candidate frame position information are expanded by using the activation function to obtain the corresponding third candidate frame position information, so that the features in the certificate and the features of the area near the certificate outside can be balanced. Then, the features in and outside the certificate can be fully utilized for certificate photographing identification, and the interference of background information on the photographing identification result can also be effectively eliminated, laying a foundation for improving the accuracy of the certificate photographing identification. The width and height of the third candidate frame information are updated to obtain a plurality of second candidate frame position information, so that the sizes of all the candidate frames on the feature map can be kept consistent. Based on this, the multi-channel region of interest corresponding to the second candidate frame position information can be extracted from the feature map to ensure that the feature fusion can be realized.In a sixth aspect, in a case where the first candidate box position information is single, based on an activation function, a center coordinate in the first candidate box position information is taken as an origin, a width and a height in the first candidate box position information are expanded correspondingly to obtain corresponding second candidate box position information, and based on this, a foundation is laid for further improving the efficiency of the certificate photographing recognition.

[0123] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the order of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0124] Based on the same inventive concept, the embodiments of the present application also provide a certificate photographing recognition device for implementing the above-mentioned certificate photographing recognition method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more certificate photographing recognition device embodiments provided below can refer to the limitations of the certificate photographing recognition method in the above text, which will not be repeated here.

[0125] In one embodiment, as shown in FIG. 5, FIG. 5 is a structural block diagram of a certificate photographing recognition device in one embodiment; the certificate photographing recognition device comprises: a first acquisition module 501, a first training module 502, a second acquisition module 503, a second training module 504, a third acquisition module 505, and a photographing recognition module 506;

[0126] The first acquisition module 501 is configured to acquire the labeled sample certificate image and the trained target detection model; the trained target detection model comprises a backbone network and a head network; the backbone network is connected to the head network at the last layer; the head network comprises a positioning head network and a classification head network;

[0127] The first training module 502 is configured to adjust the trained target detection model to obtain the to-be-trained photographing recognition model.

[0128] The second acquisition module 503 is configured to acquire first network structure parameters corresponding to a backbone network of the trained target detection model and second network structure parameters corresponding to a positioning head network.

[0129] The second training module 504 is configured to train the to-be-trained photographing identification model based on the first network structure parameters, the second network structure parameters, and the labeled sample certificate image, to obtain a trained photographing identification model.

[0130] The third acquisition module 505 is configured to acquire a to-be-identified certificate image.

[0131] The photographing identification module 506 is configured to input the to-be-identified certificate image into the trained photographing identification model, and determine a photographing identification result corresponding to the to-be-identified certificate image.

[0132] In an embodiment, the first acquisition module 501 is further configured to

[0133] acquire original sample certificate images; the original sample certificate images include original photographing certificate images and original non-photographing certificate images;

[0134] label a category of the original sample certificate image and a position of a certificate in the original sample certificate image, to obtain a labeled sample certificate image; wherein annotation information corresponding to the labeled sample certificate image includes category information and certificate position information; the category information includes non-photographing and photographing; and the certificate position information includes a position coordinate of the certificate in the original sample certificate image.

[0135] In an embodiment, the first training module 502 is further configured to

[0136] adjust the classification head network of the trained target detection model to obtain an identification classification network; the identification classification network is sequentially composed of a feature fusion network and a classification head network; the feature fusion network includes a feature fusion module, a batch normalization layer, and an activation function layer connected in sequence;

[0137] construct the to-be-trained photographing identification model according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model, and the identification classification network.

[0138] In an embodiment, the feature fusion module is configured to:

[0139] determine candidate box information based on a positioning result of the positioning head network; the candidate box information includes first candidate box position information; the first candidate box position information includes a center coordinate, a width, and a height corresponding to a first candidate box;

[0140] adjust each first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto;

[0141] Based on the feature map output by the last layer of the backbone network, a plurality of multi-channel regions of interest corresponding to each second candidate box position information are sequentially extracted;

[0142] All the multi-channel regions of interest are sequentially connected along the channel dimension to obtain a region of interest group.

[0143] Based on the group convolution algorithm, the channel compression is performed on the region of interest group to obtain feature fusion data corresponding to each second candidate box position information.

[0144] In one embodiment, the feature fusion network further comprises an activation function; and the feature fusion module is further configured to

[0145] If the first candidate box position information is a plurality, the activation function is called, and the width and the height in each first candidate box position information are expanded respectively with the center coordinates in each first candidate box position information as the origin to obtain third candidate box position information corresponding to each first candidate box position information.

[0146] The minimum width and the minimum height are determined according to the width and the height in all the third candidate box position information.

[0147] The width and the height in each third candidate box position information are updated according to the minimum width and the minimum height to obtain a plurality of second candidate box position information corresponding thereto.

[0148] In one embodiment, the feature fusion network further comprises an activation function; and the feature fusion module is further configured to

[0149] If the first candidate box position information is a single, the activation function is called, and the width and the height in the first candidate box position information are expanded with the center coordinates in the first candidate box position information as the origin to obtain second candidate box position information corresponding thereto.

[0150] In one embodiment, the second training module 504 is further configured to

[0151] The first grid structure parameter is taken as a network structure parameter corresponding to a backbone network of the to-be-trained photographing identification model.

[0152] The second grid structure parameter is taken as a network structure parameter corresponding to a positioning head network of the to-be-trained photographing identification model.

[0153] Based on the labeled sample certificate image, the to-be-trained photographing identification model is trained to obtain a trained photographing identification model; the labeling information corresponding to the labeled sample certificate image comprises category information; and the identification result of the trained photographing identification model comprises a classification result.

[0154] The modules in the above-mentioned certificate photographing identification device can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the modules.

[0155] In an embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store certificate photographing identification related data. The network interface of the computer device is configured to communicate with a terminal outside through a network connection. The computer program is executed by the processor to implement a certificate photographing identification method.

[0156] Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0157] In an embodiment, a computer device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.

[0158] In an embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.

[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0161] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0162] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for recognizing a stolen photograph of an identification document, characterized in that, The method comprises: obtaining the labeled sample certificate image and the trained target detection model; the trained target detection model comprises a backbone network and a head network; the last layer of the backbone network is connected to the head network; the head network comprises a positioning head network and a classification head network; adjusting the trained target detection model to obtain a to-be-trained photographing identification model; obtaining first network structure parameters corresponding to the backbone network of the trained target detection model and second network structure parameters corresponding to the positioning head network; training the to-be-trained photographing identification model based on the first network structure parameters, the second network structure parameters and the labeled sample certificate image to obtain a trained photographing identification model; obtaining a to-be-identified certificate image; inputting the to-be-identified certificate image into the trained photographing identification model to determine a photographing identification result corresponding to the to-be-identified certificate image.

2. The method of claim 1, wherein, The labeled sample certificate image is obtained, comprising: obtaining an original sample certificate image; the original sample certificate image comprises an original photographing certificate image and an original non-photographing certificate image; labeling the category of the original sample certificate image and the position of the certificate in the original sample certificate image to obtain a labeled sample certificate image; wherein the labeling information corresponding to the labeled sample certificate image comprises category information and certificate position information; the category information comprises non-photographing and photographing; the certificate position information comprises the position coordinates of the certificate in the original sample certificate image.

3. The method of claim 1, wherein, The trained target detection model is adjusted to obtain a to-be-trained photographing identification model, comprising: adjusting the classification head network of the trained target detection model to obtain an identification classification network; the identification classification network is composed of a feature fusion network and the classification head network in sequence; the feature fusion network comprises a feature fusion module, a batch normalization layer and an activation function layer connected in sequence; constructing the to-be-trained photographing identification model according to the backbone network of the trained target detection model, the positioning head network of the trained target detection model and the identification classification network.

4. The method of claim 3, wherein, The feature fusion module is used for: determining candidate box information based on the positioning result of the positioning head network; the candidate box information comprises first candidate box position information; the first candidate box position information comprises the center coordinates, width and height corresponding to the first candidate box; adjusting each first candidate box position information to obtain a plurality of second candidate box position information corresponding thereto; extracting a plurality of multi-channel regions of interest corresponding to each second candidate box position information in sequence based on the feature map output by the last layer of the backbone network; connecting all multi-channel regions of interest in sequence along the channel dimension to obtain a region of interest group; performing channel compression on the region of interest group based on a group convolution algorithm to obtain feature fusion data corresponding to each second candidate box position information.

5. The method of claim 4, wherein, The feature fusion network further comprises an activation function; the adjustment of each first candidate box position information to obtain a plurality of second candidate box position information comprises: If the first candidate box position information is multiple, the activation function is called, and the width and height of each first candidate box position information are expanded respectively based on the center coordinates in each first candidate box position information to obtain third candidate box position information corresponding to each first candidate box position information; The minimum width and minimum height are determined according to the width and height of all the third candidate box position information; The width and height of each third candidate box position information are updated according to the minimum width and minimum height to obtain corresponding multiple second candidate box position information.

6. The method of claim 4, wherein, The feature fusion network further comprises an activation function; and the adjusting of each first candidate box position information to obtain corresponding multiple second candidate box position information comprises: If the first candidate box position information is single, the activation function is called, and the width and height of the first candidate box position information are expanded based on the center coordinates in the first candidate box position information to obtain corresponding second candidate box position information.

7. The method of claim 1, wherein, The training of the to-be-trained photographing-identification model based on the first network structure parameter, the second network structure parameter, and the labeled sample certificate image to obtain a trained photographing-identification model comprises: The first grid structure parameter is taken as the network structure parameter corresponding to the backbone network of the to-be-trained photographing-identification model; The second grid structure parameter is taken as the network structure parameter corresponding to the positioning head network of the to-be-trained photographing-identification model; The to-be-trained photographing-identification model is trained based on the labeled sample certificate image to obtain a trained photographing-identification model; the annotation information corresponding to the labeled sample certificate image comprises category information; and the identification result of the trained photographing-identification model comprises a classification result.

8. A device for detecting a photographing of an identification document, characterized in that The device comprises: A first acquisition module configured to acquire a labeled sample certificate image and a trained target detection model; the trained target detection model comprises a backbone network and a head network; the last layer of the backbone network is connected to the head network; and the head network comprises a positioning head network and a classification head network; A first training module configured to adjust the trained target detection model to obtain a to-be-trained photographing-identification model; A second acquisition module configured to acquire a first network structure parameter corresponding to the backbone network of the trained target detection model and a second network structure parameter corresponding to the positioning head network; A second training module configured to train the to-be-trained photographing-identification model based on the first network structure parameter, the second network structure parameter, and the labeled sample certificate image to obtain a trained photographing-identification model; A third acquisition module configured to acquire a to-be-identified certificate image; A photographing-identification module configured to input the to-be-identified certificate image into the trained photographing-identification model to determine a photographing-identification result corresponding to the to-be-identified certificate image. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, which is executed by a processor, implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Certificate copying identification method and device, computer equipment and storage medium

    CN113344000A

  • Image copying recognition method, intelligent terminal and computer storage medium

    CN113486715A

  • Living body detection method and device, electronic equipment and storage medium

    CN114202807A

  • Copy certificate identification method and device, computer equipment and storage medium

    CN114677769A

  • Certificate identification model training method, certificate identification method and device

    CN118038252A