Sensitive picture recognition method, device, equipment and computer program product

Through sample enhancement and labeling of sensitive images, combined with the iterative module and the maximum expectation attention mechanism, the attention mechanism and text classification are used to solve the problem of slow processing speed and low processing speed of existing sensitive image recognition methods when computing resources are limited and the amount of data is small. It solves the problem of poor detection results and achieves fast and accurate sensitive image recognition.

CN118799902APending Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311132353.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing sensitive image recognition methods have slow processing speeds when computing resources are limited, and the prediction time for large batches of data is long, or the detection effect is poor when the amount of data is small.

Method used

Through sample enhancement and annotation of sensitive pictures, the target detection model is trained, combined with the iterative module and the maximum expectation attention mechanism, and the attention mechanism is used to focus the network detection on sensitive signs and sensitive text, and further improves the recognition and text classification by recognizing text and text. Determine whether the image contains sensitive information.

Benefits of technology

It achieves rapid identification of sensitive images under limited computing resources, reduces the amount of calculation, and improves the accuracy and efficiency of identifying sensitive information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799902A_ABST
    Figure CN118799902A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image recognition, and provides a sensitive picture recognition method, device and equipment and a computer program product. The sensitive picture recognition method comprises the following steps: performing sample enhancement on a crawled sensitive picture to obtain an enhanced sample picture; labeling the enhanced sample picture to obtain a labeling category frame coordinate; training to obtain a target detection model based on the enhanced sample picture and the marked category box coordinate; and inputting a to-be-detected picture into the target detection model, and determining whether the to-be-detected picture is a sensitive picture or not. According to the method, the traditional expectation maximization algorithm thought is combined into the deep neural network through iteration, the network detection gravity center is concentrated on sensitive marks and sensitive characters through an attention mechanism, and the calculation amount is small. On the other hand, through character recognition and text classification, whether sensitive characters are contained in the picture or not is further judged, and sensitive picture recognition is carried out by combining the character recognition and the text classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition, and specifically to a sensitive picture recognition method, device, equipment and computer program product. Background Art

[0002] There are three main methods for identifying sensitive images. The first is to replace the network's CSP (Cross Stage Partial) module with a Transformer module. The Transformer module includes a spatial attention module, a channel attention module, and an MLP (Multilayer Perceptron) to enhance the network's positioning capability. However, the spatial attention, channel attention, and fully connected layers require large amounts of computation. In existing networks, when there is a large amount of data and no GPU (graphics processing unit), the processing speed is slow.

[0003] The second method removes the prediction of the deepest feature of the backbone network, uses channel attention and spatial attention on the prediction of the two lower-level features, and replaces the backbone network with resnet101 (a convolutional neural network with a depth of 101 layers). This method has a large amount of computation, long training time, and long prediction time, whether it is the attention mechanism or the replaced backbone network, and is not suitable for the prediction of large batches of data in the existing network.

[0004] The third type has poor detection effect on categories with small amounts of data and cannot recognize sensitive information attached to ordinary images. Summary of the invention

[0005] The embodiments of the present application provide a sensitive image recognition method, apparatus, device and computer program product to solve the technical problems existing in the above-mentioned existing sensitive image recognition methods.

[0006] In a first aspect, an embodiment of the present application provides a sensitive image recognition method, comprising:

[0007] Perform sample enhancement on the crawled sensitive images to obtain enhanced sample images;

[0008] Annotating the enhanced sample image to obtain the coordinates of the annotated category box;

[0009] Based on the enhanced sample image and the labeled category box coordinates, training a target detection model;

[0010] The image to be detected is input into the target detection model to determine whether the image to be detected is a sensitive image.

[0011] In one embodiment, performing sample enhancement on the crawled sensitive images to obtain enhanced sample images includes:

[0012] Crawl sensitive images and target scene graphs based on preset key words and preset key symbols;

[0013] The preset key text, the preset key mark and the target scene graph are synthesized to obtain an enhanced sample image.

[0014] In one embodiment, the annotated category frame coordinates include a logo category frame coordinates and a text category frame coordinates, and the annotating the enhanced sample image to obtain the annotated category frame coordinates includes:

[0015] Based on the core features of the preset key mark, annotate the enhanced sample image containing the preset key mark to obtain the mark category box coordinates;

[0016] The text box in the enhanced sample image containing the key text is marked to obtain the text category box coordinates.

[0017] In one embodiment, the target detection model includes a backbone network and an iteration module, and the sensitive image recognition method further includes:

[0018] The backbone network is used to extract the features of the enhanced sample image to obtain a sample feature map;

[0019] The iteration module is used to iterate the sample feature map to obtain a multi-scale feature map.

[0020] In one embodiment, the backbone network includes a concentration module, a first cross-stage fusion module, and a second cross-stage fusion module, and the sensitive image recognition method further includes:

[0021] The centralization module is used to slice the enhanced sample image and send the sliced ​​enhanced sample image to the first cross-stage fusion module;

[0022] The first cross-stage fusion module includes a convolution layer, a normalization layer and an activation function; the second cross-stage fusion module includes a standard convolution module, a residual module and a convolution layer;

[0023] The first cross-stage fusion module and the second cross-stage fusion module are used to extract features of the sliced ​​enhanced sample image to obtain a sample feature map.

[0024] In one embodiment, the sensitive image identification method further includes:

[0025] The iterative module includes a spatial pyramid pooling module, a path aggregation module and a maximum expected attention module;

[0026] The spatial pyramid pooling module is used to perform multi-scale feature fusion on the sample feature map to obtain a fused feature map;

[0027] The maximum expected attention module is used to deform the fused feature map to obtain a deformed feature map;

[0028] The deformation feature map is iterated to obtain a multi-scale feature map.

[0029] In one embodiment, the target detection model further includes a prediction module, and the sensitive image recognition method further includes:

[0030] The prediction module is used to remove the borders smaller than the target confidence in the predicted borders generated by the multi-scale feature map through non-maximum suppression to train the target detection model.

[0031] In a second aspect, an embodiment of the present application provides a sensitive image recognition device, including:

[0032] The sample image crawling module is used to perform sample enhancement on the crawled sensitive images to obtain enhanced sample images;

[0033] A sample image annotation module, used to annotate the enhanced sample image to obtain the coordinates of the annotation category box;

[0034] A model training module, used for training a target detection model based on the enhanced sample image and the labeled category box coordinates;

[0035] The sensitive image recognition module is used to input the image to be detected into the target detection model to determine whether the image to be detected is a sensitive image.

[0036] In a third aspect, an embodiment of the present application provides a device, comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, the sensitive image recognition method described in the first aspect is implemented.

[0037] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the sensitive image recognition method described in the first aspect.

[0038] The sensitive image recognition method, device, equipment and computer program product provided in the embodiments of the present application combine the traditional maximum expectation algorithm idea into the deep neural network through iteration, and use the attention mechanism to focus the network detection on sensitive signs and sensitive texts, with low computational complexity. On the other hand, by identifying text and text classification, it is further determined whether the image contains sensitive text, and the two are combined to perform sensitive image recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 It is a flowchart of a sensitive image recognition method provided in an embodiment of the present application;

[0041] Figure 2 It is a structural schematic diagram of the target detection model in the sensitive image recognition method provided in the embodiment of the present application;

[0042] Figure 3 is a schematic diagram of the structure of a sensitive image recognition device provided in an embodiment of the present application;

[0043] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] Reference Figure 1 , Figure 1 This is one of the flowcharts of the sensitive image recognition method in the embodiment of the present application. The sensitive image recognition method provided in the embodiment of the present application may include:

[0046] Step 100, performing sample enhancement on the crawled sensitive images to obtain enhanced sample images;

[0047] The above step 100 may further include:

[0048] Step 110, crawling sensitive images and target scene graphs based on preset key words and preset key symbols;

[0049] Step 120, synthesizing the preset key text, the preset key mark and the target scene graph to obtain an enhanced sample image.

[0050] Specifically, first, images are crawled from the Internet, and images with sensitive signs and images containing sensitive keywords are obtained through crawling with multiple sensitive keywords, thereby obtaining an image dataset containing n sensitive images.

[0051] Secondly, the dataset is expanded through image synthesis, and a small amount of image sample data is enhanced. The steps of image synthesis are as follows: crawl scene images (including street scenes, home scenes, work scenes, square scenes, and park scenes) on the Internet through crawlers, and then randomly synthesize the above sensitive signs and sensitive keywords into the crawled scene images, thereby expanding the number of sample images and obtaining enhanced sample images.

[0052] Step 200, annotating the enhanced sample image to obtain the coordinates of the annotated category box;

[0053] The above step 200 may further include:

[0054] Step 210, based on the core features of the preset key mark, annotate the enhanced sample image containing the preset key mark to obtain the mark category box coordinates;

[0055] Step 220, marking the text box in the enhanced sample image containing the key text, and obtaining the text category box coordinates.

[0056] Specifically, after obtaining the enhanced sample images, the enhanced sample images are labeled. For the occlusion and deformation contained in the images containing sensitive symbols, the core features of each sensitive symbol are determined, and the images in the sample image set are labeled using the core features through LabelImg (labeling tool). For images containing sensitive text, the text box needs to be labeled, and the sensitive text category is taken as an additional category to obtain the coordinates of the category box.

[0057] Step 300, training an object detection model based on the enhanced sample image and the labeled category box coordinates;

[0058] Step 400: input the image to be detected into the target detection model to determine whether the image to be detected is a sensitive image.

[0059] Specifically, the present application uses an improved YOLOv5 (a single-stage target detection algorithm) model to identify sensitive images. The improved YOLOv5 model is the target detection model in this embodiment. The target detection model includes Backbone (backbone network), Neck (iterative module) and Prediction (prediction module). The structure of the target detection model is as follows: Figure 2The image to be detected is input into the trained model for detection to determine whether the image to be detected contains sensitive symbols and sensitive text.

[0060] This embodiment combines the traditional EM (maximum expectation) algorithm idea into the deep neural network through iteration, and uses the attention mechanism to focus the network detection on sensitive signs and sensitive texts, with low computational complexity. On the other hand, by identifying text and text classification, it is further determined whether the image contains sensitive text, and the two are combined for sensitive image recognition.

[0061] In one embodiment, in the sensitive image recognition method provided by the embodiment of the present application, the target detection model includes a backbone network, an iteration module and a prediction module, wherein:

[0062] The backbone network is used to extract the features of the enhanced sample image to obtain a sample feature map; wherein:

[0063] The backbone network includes a concentration module, a first cross-stage fusion module and a second cross-stage fusion module;

[0064] The centralization module is used to slice the enhanced sample image and send the sliced ​​enhanced sample image to the first cross-stage fusion module;

[0065] The first cross-stage fusion module includes a convolution layer, a normalization layer and an activation function; the second cross-stage fusion module includes a standard convolution module, a residual module and a convolution layer;

[0066] The first cross-stage fusion module and the second cross-stage fusion module are used to extract features of the sliced ​​enhanced sample image to obtain a sample feature map.

[0067] Specifically, the backbone network adopts the backbone network CSPDarknet53 of yolov5, which is used to extract the features of the enhanced sample image to obtain the sample feature map. The backbone network mainly includes the Focus module (i.e. the concentration module in the present embodiment), the CSP1_1 module (i.e. the first cross-stage fusion module in the present embodiment) and the CSP1_3 module (i.e. the second cross-stage fusion module in the present embodiment). Among them, the concentration module is used to slice the enhanced sample image, and then the sliced ​​enhanced sample image is sent to the first cross-stage fusion module structure. The first cross-stage fusion module includes a convolutional layer (Conv), a normalization layer (BN) and a Leaky_relu activation function. The second cross-stage fusion module includes an improved CBL (conv bn leakyrelu, standard convolution module) module, a residual module, a convolutional layer and Concat (for connecting two or more arrays).

[0068] The iteration module is used to iterate the sample feature map to obtain a multi-scale feature map; wherein:

[0069] The iterative module includes a spatial pyramid pooling module, a path aggregation module and a maximum expected attention module;

[0070] The spatial pyramid pooling module is used to perform multi-scale feature fusion on the sample feature map to obtain a fused feature map;

[0071] The maximum expected attention module is used to deform the fused feature map to obtain a deformed feature map;

[0072] The deformation feature map is iterated to obtain a multi-scale feature map.

[0073] Specifically, the Neck part (iterative module) adds EMA (expectation-maximization attention) to the SPPF (Spatial pyramid poolingfast) module and PANet (Path Aggregation Network) module of the target detection model. The SPPF module serially passes the sample feature map through multiple MaxPool (maximum pooling) layers (size can be 5*5), and then performs multi-scale feature fusion through the Concat operation.

[0074] In order to make the target detection model more focused on identifying sensitive signs and sensitive texts, this application proposes a maximum expected attention module. The maximum expected attention module mainly performs the following processing: the fused feature shape is (B, C, H, W), the fused feature shape is first deformed to obtain x (i.e., the deformed feature map in this embodiment), the shape of x is (B, C, H*W), the data y is initialized, the shape is (B, C, K), and then iterates.

[0075] Here are the steps:

[0076] 1. Swap the dimensions of the deformation feature map to x_t, whose shape is (B, H*W, C). Then, perform matrix multiplication of x_t and y to obtain z, whose shape is (B, H*W, K). Then, normalize z to obtain a new z, whose shape is (B, H*W, K), which is equivalent to the operation of expectation E in the maximum expectation algorithm (EM).

[0077] 2. Normalize the result of matrix multiplication of the deformed feature map and the new z to obtain a new y. The shape of the new y is also (B, C, K), which is equivalent to the maximization M operation in the maximum expectation algorithm.

[0078] Iterate the above 1 and 2 multiple times, then swap the dimensions of the iterated z to obtain z_t, the shape of z_t is (B, K, H*W), multiply the iterated y and z_t to obtain x1, the shape of x1 is (B, C, H*W), then transform x1 into (B, C, H, W) and pass it through a 1*1 convolution module.

[0079] The path aggregation network structure is composed of two parts: FPN (feature pyramid networks) and PAN (Path Aggregation Network). FPN (extracted low-resolution feature information) obtains the predicted feature map through upsampling; PAN further transfers and fuses the feature map obtained by FPN through downsampling to obtain the predicted feature map, shortening the information path between the top and bottom features. The combination of the two can aggregate features from different backbone layers to different detection layers, further strengthening feature extraction.

[0080] The prediction module is used to remove the borders smaller than the target confidence in the predicted borders generated by the multi-scale feature map through non-maximum suppression to train the target detection model.

[0081] Specifically, the predicted bounding boxes generated by feature maps of various scales are used to remove bounding box targets with a smaller confidence level through non-maximum suppression, and the detection box regression loss function is calculated using the CIOU (complete intersection over union) loss function to train the object detection model.

[0082] This embodiment combines the traditional maximum expectation algorithm idea into the deep neural network through iteration, and uses the attention mechanism to focus the network detection on sensitive signs and sensitive texts, which reduces the amount of calculation. On the other hand, by identifying text and text classification, it is further determined whether the image contains sensitive text, and the two are combined to perform sensitive image recognition.

[0083] Specifically, for the pictures that need to be detected, they are input into the above-mentioned trained model for detection to determine whether the pictures that need to be detected contain various sensitive signs and texts. The text recognition model uses the CRNN (Convolutional Recurrent Neural Network) model, and the process is as follows: the cropped picture with text is sent to the convolution module, then to the LSTM module, and then to the transcription module to finally recognize the text in the picture.

[0084] The image area where the detected text box is located is cropped, pre-processed and input into the CRNN network, and the text in the box is recognized by the text recognition algorithm. The CRNN network includes the following three models:

[0085] Convolutional layer: It mainly extracts feature sequences from the input image. First, the cropped image is converted into a grayscale image, then scaled to 32*W*1, and then transformed into batchsize*512*1*(W / 4) after passing through CNN. Then the third dimension is removed, becoming batchsize*512*(W / 4), and then the three dimensions are swapped, becoming (W / 4)*batchsize*512;

[0086] Circular layer: It mainly predicts the label (i.e. true value) distribution of the feature sequence obtained from the convolutional layer, and outputs the feature sequence as a vector of T*batchsize*nclass through LSTM;

[0087] Transcription layer: It mainly converts the label distribution obtained from the circulation layer into the final recognition result through operations such as de-duplication and integration, and optimizes CTCLoss as the loss function.

[0088] The text classification algorithm uses the fast-text algorithm. By collecting text data from the network and crawling some text data on the Internet, a sensitive text library is constructed. The text is preprocessed using the word2vec word vector conversion model, the text is converted into word vectors, and trained using the mainstream fast-text model. When used, texts less than a specified threshold (for example, 0.7) are judged as insensitive, and texts greater than the threshold are judged as sensitive.

[0089] refer to Figure 3 , Figure 3 It is a structural diagram of the sensitive picture recognition device in the embodiment of the present application. The sensitive picture recognition device provided in the embodiment of the present application is described below. The sensitive picture recognition device described below and the sensitive picture recognition method described above can be referenced to each other.

[0090] The sample image crawling module 301 is used to perform sample enhancement on the crawled sensitive images to obtain enhanced sample images;

[0091] A sample image annotation module 302 is used to annotate the enhanced sample image to obtain the coordinates of the annotation category box;

[0092] A model training module 303 is used to train a target detection model based on the enhanced sample image and the labeled category box coordinates;

[0093] The sensitive picture identification module 304 is used to input the picture to be detected into the target detection model to determine whether the picture to be detected is a sensitive picture.

[0094] In one embodiment, the sample image crawling module includes:

[0095] A sample image crawling unit, used to crawl sensitive images and target scene graphs based on preset key words and preset key symbols;

[0096] The image synthesis unit is used to synthesize the preset key text, the preset key mark and the target scene graph to obtain an enhanced sample image.

[0097] In one embodiment, the annotated category frame coordinates include logo category frame coordinates and text category frame coordinates, and the sample image annotating module includes:

[0098] A sample image annotation unit, used to annotate the enhanced sample image containing the preset key mark based on the core features of the preset key mark, and obtain the mark category box coordinates;

[0099] The text frame marking unit is used to mark the text frame in the enhanced sample image containing the key text to obtain the text category frame coordinates.

[0100] In one embodiment, the target detection model includes a backbone network and an iteration module, and the sensitive image recognition device further includes:

[0101] The backbone network is used to extract the features of the enhanced sample image to obtain a sample feature map;

[0102] The iteration module is used to iterate the sample feature map to obtain a multi-scale feature map.

[0103] In one embodiment, the backbone network includes a concentration module, a first cross-stage fusion module, and a second cross-stage fusion module, and the sensitive image recognition device also includes:

[0104] The centralization module is used to slice the enhanced sample image and send the sliced ​​enhanced sample image to the first cross-stage fusion module;

[0105] The first cross-stage fusion module includes a convolution layer, a normalization layer and an activation function; the second cross-stage fusion module includes a standard convolution module, a residual module and a convolution layer;

[0106] The first cross-stage fusion module and the second cross-stage fusion module are used to extract features of the sliced ​​enhanced sample image to obtain a sample feature map.

[0107] In one embodiment, the sensitive image recognition device further includes:

[0108] The iterative module includes a spatial pyramid pooling module, a path aggregation module and a maximum expected attention module;

[0109] The spatial pyramid pooling module is used to perform multi-scale feature fusion on the sample feature map to obtain a fused feature map;

[0110] The maximum expected attention module is used to deform the fused feature map to obtain a deformed feature map;

[0111] The deformation feature map is iterated to obtain a multi-scale feature map.

[0112] In one embodiment, the target detection model further includes a prediction module, and the sensitive image recognition device further includes:

[0113] The prediction module is used to remove the borders smaller than the target confidence in the predicted borders generated by the multi-scale feature map through non-maximum suppression to train the target detection model.

[0114] Figure 4 The following is an example of a physical structure diagram of a device, such as Figure 4 As shown, the device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call a computer program in the memory 430 to execute the steps of the sensitive image recognition method.

[0115] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0116] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the sensitive image recognition method provided in the above embodiments.

[0117] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the sensitive image recognition method described in each embodiment or some parts of the embodiment.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A sensitive image recognition method, characterized in that: include: Perform sample enhancement on the crawled sensitive images to obtain enhanced sample images; Annotating the enhanced sample image to obtain the coordinates of the annotated category box; Based on the enhanced sample image and the labeled category box coordinates, training a target detection model; The image to be detected is input into the target detection model to determine whether the image to be detected is a sensitive image.

2. The sensitive image recognition method according to claim 1, characterized in that: The crawled sensitive images are sample enhanced to obtain enhanced sample images including: Crawl sensitive images and target scene graphs based on preset key words and preset key symbols; The preset key text, the preset key mark and the target scene graph are synthesized to obtain an enhanced sample image.

3. The sensitive image recognition method according to claim 2, characterized in that: The annotated category frame coordinates include a logo category frame coordinates and a text category frame coordinates, and the annotating the enhanced sample image to obtain the annotated category frame coordinates includes: Based on the core features of the preset key mark, annotate the enhanced sample image containing the preset key mark to obtain the mark category box coordinates; The text box in the enhanced sample image containing the key text is marked to obtain the text category box coordinates.

4. The sensitive image recognition method according to claim 1, characterized in that: The target detection model includes a backbone network and an iteration module, and the sensitive image recognition method also includes: The backbone network is used to extract the features of the enhanced sample image to obtain a sample feature map; The iteration module is used to iterate the sample feature map to obtain a multi-scale feature map.

5. The sensitive image recognition method according to claim 4, characterized in that: The backbone network includes a concentration module, a first cross-stage fusion module and a second cross-stage fusion module, and the sensitive image recognition method also includes: The centralization module is used to slice the enhanced sample image and send the sliced ​​enhanced sample image to the first cross-stage fusion module; The first cross-stage fusion module includes a convolution layer, a normalization layer and an activation function; the second cross-stage fusion module includes a standard convolution module, a residual module and a convolution layer; The first cross-stage fusion module and the second cross-stage fusion module are used to extract features of the sliced ​​enhanced sample image to obtain a sample feature map.

6. The sensitive image recognition method according to claim 4, characterized in that: The sensitive image recognition method further includes: The iterative module includes a spatial pyramid pooling module, a path aggregation module and a maximum expected attention module; The spatial pyramid pooling module is used to perform multi-scale feature fusion on the sample feature map to obtain a fused feature map; The maximum expected attention module is used to deform the fused feature map to obtain a deformed feature map; The deformation feature map is iterated to obtain a multi-scale feature map.

7. The sensitive image recognition method according to claim 4, characterized in that: The target detection model further includes a prediction module, and the sensitive image recognition method further includes: The prediction module is used to remove the borders smaller than the target confidence in the predicted borders generated by the multi-scale feature map through non-maximum suppression to train the target detection model.

8. A sensitive image recognition device, characterized in that: include: The sample image crawling module is used to perform sample enhancement on the crawled sensitive images to obtain enhanced sample images; A sample image annotation module, used to annotate the enhanced sample image to obtain the coordinates of the annotation category box; A model training module, used for training a target detection model based on the enhanced sample image and the labeled category box coordinates; The sensitive image recognition module is used to input the image to be detected into the target detection model to determine whether the image to be detected is a sensitive image.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the sensitive image recognition method described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the sensitive image recognition method described in any one of claims 1 to 7 is implemented.