A Uyghur language detection method, device, medium and equipment
By introducing compression and excitation attention mechanism module and expansion coding module in the CenterNet network, the Uyghur detection method is improved, the problem of low detection accuracy in the prior art is solved, and higher detection accuracy and more accurate boundary positioning are achieved.
Patent Information
- Application Number
- CN202411349877.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The existing Uyghur detection method based on YOLO series networks or convolutional neural networks has low Uyghur resolution and large character gap changes in the image, so the detection accuracy is not high.
Add compression and excitation attention mechanism modules to the ResNet50 module of the original CenterNet network, and add expansion encoding modules to the output of the deconvolution module to form an improved CenterNet network. This method extracts multi-channel feature maps through the residual connection module, uses the compression and excitation attention mechanism module to give weights, restores the feature map size through the deconvolution module, and searches at different scales through the expansion coding module to improve detection accuracy.
Through the improved CenterNet network, the detection accuracy can be improved and more accurate Uyghur detection results can be output when the Uyghur resolution in the image is not high and the character gap changes are large.
Smart Images

Figure CN119314182B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text detection, and in particular to a Uighur text detection method, device, medium and equipment. Background Art
[0002] With the development of informatization, the detection and recognition of Uyghur language has become an urgent need in the fields of image content understanding and photo translation. Detecting Uyghur language in images can not only help realize the automatic translation between Uyghur language and other languages, but also better preserve and spread the cultural heritage of the Uyghur people.
[0003] At present, Uyghur detection methods based on deep learning have gradually become mainstream. Li et al. proposed a Uyghur detection method based on improved YOLOV3. This method replaced the Res block with a Dense block and used the TridentBlock structure to replace the FPN network, alleviating the problem of a single receptive field in the network structure. Xu et al. constructed a fused multi-layer feature network based on a convolutional neural network and used a regional recommendation network and ROIAlign method to obtain the location of Uyghur.
[0004] However, due to factors such as light exposure and imaging environment when taking pictures, the resolution of Uyghur characters in the image will be low; and the character spacing within and between Uyghur words varies greatly, and this change in spacing will affect the accurate judgment of the position boundary of Uyghur characters. For the above reasons, the current methods based on YOLO series networks or convolutional neural networks have low detection accuracy when detecting Uyghur characters in images. Summary of the invention
[0005] Based on this, it is necessary to provide a Uyghur language detection method, device, medium and equipment to address the above technical issues.
[0006] The present invention provides a Uyghur language detection method, comprising:
[0007] A compression and excitation attention mechanism module is added to the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, wherein the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; a dilation coding module is added to the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and an improved CenterNet network including the improved ResNet50 module, the improved deconvolution module and the prediction module in the original CenterNet network is constructed;
[0008] Collect images containing Uyghur characters to build a data set, use the data set to train the improved CenterNet network, and obtain a detection model for detecting Uyghur characters;
[0009] The Uyghur image to be detected is input into the detection model, and the feature extraction of the Uyghur image to be detected is performed by improving the residual module in the ResNet50 module. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain the Uyghur multi-channel feature map; the compression and incentive attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain the Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain the Uyghur recovery feature map; the expansion coding module is used to search the position of Uyghur in the Uyghur recovery feature map at different scales to obtain the Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output.
[0010] Furthermore, the improved ResNet50 module further includes:
[0011] Replace the batch normalization layer in the residual module with an instance-batch normalization layer;
[0012] The instance-batch normalization layer is achieved by dividing the intermediate multi-channel feature map generated by the residual module during the Uyghur feature extraction process into half; normalizing one half of the map according to the feature distribution of a single channel, and normalizing the other half according to the feature distribution of all channels; and fusing the two normalized parts to enhance the generalization performance of the extracted Uyghur features.
[0013] Furthermore, the compression and stimulation attention mechanism module assigns weights to each channel according to the relevance between each channel and the Uyghur language in the Uyghur language multi-channel concatenated feature map to obtain a Uyghur language weighted feature map, specifically including:
[0014] By compressing and stimulating the attention mechanism module, the Uyghur multi-channel concatenated feature map is compressed along its spatial dimension direction, and the feature map of each channel is reduced in dimension;
[0015] Different weights are assigned to the feature maps of each channel after dimensionality reduction and compression according to the relevance of different feature channels to Uyghur. The weights corresponding to each channel are multiplied channel by channel with the Uyghur multi-channel splicing feature map to obtain the Uyghur weighted feature map.
[0016] Furthermore, the dilation coding module includes four parallel hole residual modules;
[0017] Each dilated residual module performs zero padding of different numbers between the elements of the convolution kernel to expand the observation area of the convolution kernel in the Uyghur restored feature map without increasing the number of parameters, and performs searches of different scales in the Uyghur restored feature map.
[0018] The outputs of four parallel atrous residual modules are fused to obtain the Uyghur position feature map.
[0019] The present invention provides a Uighur language detection device, comprising:
[0020] A model building module, for adding a compression and excitation attention mechanism module to the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, wherein the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; adding a dilation coding module to the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and constructing an improved CenterNet network including the improved ResNet50 module, the improved deconvolution module and the prediction module in the original CenterNet network;
[0021] The model training module is used to collect images containing Uyghur characters to build a data set, and use the data set to train the improved CenterNet network to obtain a detection model for detecting Uyghur characters;
[0022] The Uyghur detection module is used to input the Uyghur image to be detected into the detection model, and extract features of the Uyghur image to be detected by improving the residual module in the ResNet50 module. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain a Uyghur multi-channel feature map; the compression and excitation attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain a Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain a Uyghur recovery feature map; the expansion coding module is used to search for the position of Uyghur in the Uyghur recovery feature map at different scales to obtain a Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output.
[0023] The present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned Uyghur detection method is implemented.
[0024] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned Uyghur detection method when executing the program.
[0025] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:
[0026] In the Uyghur detection method provided by the present invention, a compression and incentive attention mechanism module and an expansion coding module are added to the original CenterNet network to improve the detection accuracy of the CenterNet network for Uyghur in the image. Specifically, the compression and incentive attention mechanism module weights the feature channels significantly related to Uyghur in the Uyghur multi-channel feature map, so that the model can automatically learn which channel features are more critical for the Uyghur detection task, even if the resolution of the Uyghur in the image is not high, the model can also accurately focus on useful Uyghur features. The expansion coding module searches for the position of Uyghur in the Uyghur recovery feature map at different scales, so that the model can more accurately judge the change of the character spacing, thereby more accurately locating the boundary of the Uyghur word and outputting a more accurate Uyghur detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 A schematic diagram of a Uighur detection method provided by the present invention;
[0029] Figure 2 The original CenterNet network structure diagram provided by the present invention;
[0030] Figure 3 The improved CenterNet network structure diagram provided by the present invention;
[0031] Figure 4 The example provided by the present invention - batch normalization layer structure diagram;
[0032] Figure 5 The structural diagram of the expansion coding module provided by the present invention;
[0033] Figure 6The module structure diagram of the compression and incentive attention mechanism provided by the present invention;
[0034] Figure 7 The original image containing Uyghur characters provided by the present invention;
[0035] Figure 8 The present invention provides Figure 7 An image obtained by performing brightness enhancement;
[0036] Fig. 9 The present invention provides Figure 7 The image obtained by adding noise;
[0037] Fig.10 The present invention provides Figure 7 The image obtained by flipping;
[0038] Fig.11 The loss function iteration curve provided by the present invention, wherein the dotted line is the change of loss value during the original CenterNet network training process, and the solid line is the change of loss value during the improved CenterNet network training process;
[0039] Fig.12 The average precision iteration curve provided by the present invention, wherein the dotted line is the average precision value change during the original CenterNet network training process, and the solid line is the average precision value change during the improved CenterNet network training process;
[0040] Fig.13 The detection accuracy of the model obtained by training the original CenterNet network provided by the present invention;
[0041] Fig.14 The detection accuracy of the model obtained by improving CenterNet network training provided by the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Modern Uyghur is a writing system based on Arabic letters, with 8 vowels and 24 consonants, written from right to left. The writing form will be different depending on the position of the letters in the word. There are 126 ways to write 32 letters. Traditional detection methods are easily affected by complex environments, making it difficult to capture key semantic information and unable to meet the needs of actual detection speed and accuracy. Uyghur detection methods based on deep learning have gradually replaced traditional detection methods. In the process of Uyghur detection, three main difficulties are encountered: 1) Affected by factors such as light exposure and imaging environment during photography, the image is blurred, skewed, and has low resolution; 2) The background of natural scene images is complex and diverse, and the text is easily blocked, making it difficult to detect the text area. 3) Uyghur itself has a complex structure and various forms, and the image may be mixed with texts of different languages.
[0044] In view of the above difficulties, this embodiment proposes a Uyghur detection method based on an improved CenterNet. The SE (Squeeze and Excitation) attention mechanism is introduced into the CenterNet network to improve the model's ability to extract features. And an expansion coding module is added after the upsampling network (deconvolution module) of the CenterNet network to increase the receptive field of the model.
[0045] Figure 1 The flow chart of the Uighur language detection method of this embodiment is shown in FIG. Figure 1 The Uyghur detection method is described in detail, which specifically includes the following steps:
[0046] S1: A compression and excitation attention mechanism module is added to the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, and the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; a dilation coding module is added to the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and an improved CenterNet network including an improved ResNet50 module, an improved deconvolution module and a prediction module in the original CenterNet network is constructed.
[0047] The original CenterNet is a single-stage anchor-free target detection algorithm. Compared with the anchor-based target detection algorithm, it does not require non-maximum suppression, which makes the algorithm more advantageous in detection speed. The CenterNet network consists of a backbone network, a deconvolution module, and a prediction module. Among them, three types of backbone networks are designed, namely ResNet (ResidualNet), Hourglass Net, and DLANet (DeepLayerAggregation Net). CenterNet regards the target as a key point, predicts the target category through Gaussian heat maps and performs center regression, and predicts the length and width of the target in combination with Gaussian diffusion. Therefore, the prediction layer includes three head structures: heat map prediction, target width and height prediction, and center point offset prediction. The network structure of the original CenterNet is as follows Figure 2 shown.
[0048] The CenterNet network model has good detection performance, so this embodiment is improved on the basis of CenterNet. In this embodiment, the backbone network is a ResNet50 network, including Conv+BN+ReLU operations, maximum pooling operation layers and 4 residual modules. The upsampling network consists of 3 upsampling layers. If the input image size is 512×512×3, the ResNet50 backbone network will input the 512x512x3 picture, and after the first Conv+BN+ReLU operation, obtain a 256x256x64 feature map, and then reduce it to 128x128x64 through the maximum pooling (MaxPool) operation, and then perform convolution and downsampling operations through multiple residual modules. Each operation will increase the number of channels of the feature map to obtain a 16×16×2048 feature map. After three upsamplings, a high-resolution feature map of 128×128×64 is obtained. Finally, this feature map is sent to three head prediction modules for detection, and finally two 128x128x2 feature maps representing the center point offset and the width and height of the target box are output, as well as a 128x128xc heat map.
[0049] Based on the ResNet50 network, in order to enable the model to focus on the effective information of the image data and fully extract the features of Uyghur when the target is occluded, the background information is complex, and the image quality is unstable, this embodiment introduces the SE attention mechanism in the ResNet50 backbone network of the model. In view of the diverse size of Uyghur targets, an expansion coding module is added after upsampling three times to improve the robustness of the model. The network structure of CenterNet is improved as follows: Figure 3As shown in Figure 2, the improved network embeds a SE attention module after the first three residual modules of the original ResNet50 backbone network, and inserts a dilation coding module between the upsampling network and the head prediction module.
[0050] The structure of the compression and incentive attention mechanism module is as follows Figure 4 As shown in the figure, the SE attention mechanism obtains the importance of each channel of the feature map by using a fully connected network to automatically learn. Feature channels with high importance will receive higher attention weights, so that the network can focus on important features and suppress useless background features, and detect Uyghur targets more accurately. The operations of the SE attention mechanism include compression, excitation, and expansion. The compression operation is performed by inputting feature maps U∈R H×W×C Perform global average pooling on the spatial dimension (H×W) to obtain the compressed feature map Z∈R C , the calculation formula of its cth element is as follows:
[0051]
[0052] In the formula, F sq is the average pooling operation, u c is the c-th channel of the feature map U.
[0053] The excitation operation builds the correlation between feature channels through two fully connected layers, generates the weight value of each feature channel, and obtains the weighted feature map. The calculation formula is as follows:
[0054] s=F ex (z,W)=σ(W2δ(W1z))
[0055] Where δ is the ReLU activation function, σ is the sigmoid activation function. W1 and W2 are the weight variables of the fully connected layer and
[0056] Add the obtained weights to the channels corresponding to the feature maps to obtain the output feature maps The characteristic calculation formula of the cth channel is as follows:
[0057]
[0058] Where F scale Represents a scalar s c With the feature map u c ∈R H×W Multiply.
[0059] In order to better expand the receptive field of the feature layer and improve the algorithm performance, this embodiment introduces an expansion coding module after the three deconvolution upsampling operations. The structure of the expansion coding module is as follows: Figure 5As shown in the figure. After three times of deconvolution upsampling, the high-resolution feature map is input into the dilation coding module, and then the dimension is first reduced by Conv1×1, and then the semantic information is further refined by Conv3×3 to refine the features. Next, four consecutive dilated residual modules are used, each of which consists of 1×1 convolution, 3×3 convolution and 1×1 convolution connected in sequence. The 3×3 convolution layer uses dilated convolution with different dilation rates. The results obtained by each residual block will be added continuously to obtain feature outputs with multiple receptive fields to cope with Uyghur characters of different target sizes, which can greatly improve the adaptability to Uyghur targets.
[0060] Furthermore, this embodiment uses IBN (Instance Batch Normalization) to replace BN (Batch Normalization) in the shallow network of CenterNet to improve the robustness of the model to changes in image hue and brightness, and improve the model's ability to learn features. In each residual module of the ResNet50 backbone network, the normalization layer uses BN. BN normalizes the same channel of each image in a batch together. Although it can prevent model gradient diffusion and overfitting problems, the effect is poor when the batch size is small. IN (Instance Normalization) normalizes a single channel of a single image and is not affected by the batch size. Although IN can better learn the correlation of visual performance changes, the extracted features weaken the differences between data. In order to improve the robustness of the model to changes in hue and brightness, and at the same time ensure that content-related information can be smoothly transmitted to the deep network, this embodiment replaces BN in the shallow network of ResNet50 with IBN. IBN can split the feature map in half, one half for IN operation and the other half for BN operation, which can better learn features and improve the generalization performance of the model. The structure of the instance-batch normalization layer structure is as follows Figure 6 As shown, the convolution kernel size of the 2D convolution is 64, the instance normalization size is 32, the batch normalization size is 32, the activation function is the ReLU activation function, and the size of the ReLU activation function is 64.
[0061] S2: Collect images containing Uyghur characters to build a dataset, use the dataset to train the improved CenterNet network, and obtain a detection model for detecting Uyghur characters.
[0062] S201: Collect images containing Uyghur characters to build a dataset.
[0063] This embodiment uses Uyghur characters in images as the detection target, so a large number of images containing Uyghur characters need to be prepared as data sets for experimental research. Since there is no data set suitable for Uyghur target detection in the existing public data sets, this embodiment creates a data set by collecting real scene images containing Uyghur characters and synthesizing Uyghur characters. The collected images include door heads, plaques, road name signs, road signs, book covers, etc. In order to expand the data set required for model training and improve the generalization ability and robustness of the model, this embodiment performs data enhancement on real scene images. The data enhancement methods used include contrast enhancement, brightness enhancement, horizontal flipping, rotation angle, noise addition, Cutout random cropping, and image miscutting. The original image containing Uyghur characters is shown in Figure 2. Figure 7 shown; Figure 7 The image obtained by brightness enhancement is as follows Figure 8 shown; Figure 7 The image obtained by adding noise is as follows Fig. 9 shown; Figure 7 The image obtained by flipping is as follows Fig.10 After expanding and sorting the data set, a total of 6499 images and 8705 objects are obtained. This embodiment uses the LabelImg annotation tool to annotate the data set. The experimental training set, validation set, and test set are divided according to the ratio of 7:2:1.
[0064] S203: Train the CenterNet network.
[0065] I: Set the loss function.
[0066] Let the input image be I∈R W× H× C , after entering the model, a key point heat map will be generated Where R is the downsampling factor, and in this embodiment, R is 4. When , it means that there is a target center point of category C at the current position. When , it means the current position is the background. The heat map loss calculation formula is as follows:
[0067]
[0068] Where N represents the number of key points in the image. represents the predicted value of the heat map at the coordinate (x, y, c), indicating the probability that the coordinate (x, y, c) is the center point of the target; Y xyc Represents the true value of the heat map at the coordinate (x, y, c). When the coordinate (x, y, c) is the center point of the target, Y xyc =1, otherwise 0; in this embodiment, α is set to 2 and β is set to 4.
[0069] Since the downsampling process will cause the predicted coordinates to deviate, CenterNet needs to predict the offset of each position. The calculation formula for the offset loss is as follows:
[0070]
[0071] In the formula, Represents the predicted center point coordinates, express The predicted offset; p represents the real coordinates of the target, and R is the downsampling factor; express The actual offset.
[0072] During training, the width and height loss is calculated as follows:
[0073]
[0074] In the formula, Indicates the size of the predicted target, s k Indicates the true size of the target.
[0075] The total loss value of CenterNet is L det is the heat map loss L k , offset loss L off And the width and height loss L size The linear weighted sum of the three. The total loss calculation formula of CenterNet is as follows:
[0076] L det =L k +λ size L size +λ off L off
[0077] The hyperparameter is set as: size =0.1,λ size = 1. The loss function iteration curve is as follows Fig.11 As shown, the dotted line is the change in loss value during the original CenterNet network training process, and the solid line is the change in loss value during the improved CenterNet network training process.
[0078] II: Set evaluation indicators.
[0079] In order to verify the performance of the algorithm, considering the characteristics of the Uyghur data set, this embodiment experiment uses the AP (averane precision) value when the intersection over union ratio IoU = 0.5 and the number of pictures that the algorithm can detect per second FPS as the main evaluation indicators:
[0080]
[0081] In the formula, P represents precision, R represents recall, TP represents the number of correctly detected texts, FP represents the number of incorrectly detected texts, and FN represents the number of incorrectly detected non-texts. The average precision (AP) iteration curve is as follows Fig.12 As shown in , the dotted line is the average precision change during the original CenterNet network training process, and the solid line is the average precision change during the improved CenterNet network training process. The detection accuracy of the model obtained by the original CenterNet network training is shown in Fig.13 As shown; the detection accuracy of the model trained by the improved CenterNet network is as follows Fig.14 shown.
[0082] III: Set up the experimental environment.
[0083] In this example, the size of the input image is uniformly scaled to 512×512, and the Adam optimizer is used to train the network weights. The total number of epochs is set to 50, the initial learning rate is 5e-4, and the batch size is 4. The GPU used in the experiment is NVIDIARTX3060, the python version is 3.8, the CUDA version is 11.0, and the deep learning framework is Pytorch1.7.1.
[0084] S3: Input the Uyghur image to be detected into the detection model, and extract features of the Uyghur image to be detected by improving the residual module in the ResNet50 module. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain the Uyghur multi-channel feature map; the compression and excitation attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain the Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain the Uyghur recovery feature map; the expansion coding module is used to search the position of the Uyghur in the Uyghur recovery feature map at different scales to obtain the Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output.
[0085] This embodiment applies the CenterNet network model to Uyghur detection. Aiming at the problems of unstable image quality, difficult feature extraction and various target forms in Uyghur scenes, an improved CenterNet Uyghur detection method is proposed. The BN in the shallow network is replaced by IBN-Net to improve the robustness of the model under unstable image quality conditions; the SE attention mechanism is introduced into ResNet50 to enhance the network's ability to extract features; and an expansion coding module is added to the model to increase the model's adaptability to Uyghur characters of different target sizes.
[0086] The above is a Uyghur detection method provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding Uyghur detection device, including:
[0087] A model building module is used to add a compression and excitation attention mechanism module at the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, wherein the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; add a dilation coding module at the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and construct an improved CenterNet network including an improved ResNet50 module, an improved deconvolution module and a prediction module in the original CenterNet network.
[0088] The model training module is used to collect images containing Uyghur characters to build a data set, and use the data set to train the improved CenterNet network to obtain a detection model for detecting Uyghur characters.
[0089] The Uyghur detection module is used to input the Uyghur image to be detected into the detection model, and extract features of the Uyghur image to be detected by improving the residual module in the ResNet50 module. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain a Uyghur multi-channel feature map; the compression and excitation attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain a Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain a Uyghur recovery feature map; the expansion coding module is used to search for the position of Uyghur in the Uyghur recovery feature map at different scales to obtain a Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output.
[0090] For the specific definition of the Uyghur detection device, please refer to the definition of the Uyghur detection method above, which will not be repeated here. Each module in the above-mentioned Uyghur detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0091] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provided Uyghur detection method.
[0092] The present invention also provides a computer device structure. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Provided Uyghur detection method.
[0093] 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0094] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.
Claims
1. A Uighur language detection method, characterized in that: include: A compression and excitation attention mechanism module is added to the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, wherein the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; a dilation coding module is added to the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and an improved CenterNet network including the improved ResNet50 module, the improved deconvolution module and the prediction module in the original CenterNet network is constructed; Collect images containing Uyghur characters to build a data set, use the data set to train the improved CenterNet network, and obtain a detection model for detecting Uyghur characters; The Uyghur image to be detected is input into the detection model, and the residual module in the improved ResNet50 module is used to extract features of the Uyghur image to be detected. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain a Uyghur multi-channel feature map; the compression and excitation attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain a Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain a Uyghur recovery feature map; the expansion coding module is used to search the position of Uyghur in the Uyghur recovery feature map at different scales to obtain a Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output; The expansion coding module includes four parallel hole residual modules; Each dilated residual module performs zero padding of different numbers between the elements of the convolution kernel to expand the observation area of the convolution kernel in the Uyghur restored feature map without increasing the number of parameters, and performs searches of different scales in the Uyghur restored feature map. The outputs of four parallel atrous residual modules are fused to obtain the Uyghur position feature map.
2. The Uighur language detection method according to claim 1, wherein: The improved ResNet50 module further includes: Replace the batch normalization layer in the residual module with an instance-batch normalization layer; The instance-batch normalization layer is achieved by dividing the intermediate multi-channel feature map generated by the residual module during the Uyghur feature extraction process into half; normalizing one half of the map according to the feature distribution of a single channel, and normalizing the other half according to the feature distribution of all channels; and fusing the two normalized parts to enhance the generalization performance of the extracted Uyghur features.
3. The Uighur language detection method according to claim 1, wherein: The method of assigning weights to each channel according to the degree of relevance between each channel and Uyghur in the Uyghur multi-channel feature map by compressing and stimulating the attention mechanism module to obtain a Uyghur weighted feature map specifically includes: The Uyghur multi-channel feature map is compressed along its spatial dimension by compressing and stimulating the attention mechanism module, and the dimension of the feature map of each channel is reduced; Different weights are assigned to the feature maps of each channel after dimensionality reduction and compression according to the relevance of different feature channels to Uyghur. The weights corresponding to each channel are multiplied channel by channel with the Uyghur multi-channel feature map to obtain the Uyghur weighted feature map.
4. A device for implementing the Uighur language detection method according to claim 1, characterized in that: include: A model building module, for adding a compression and excitation attention mechanism module to the output end of the residual module in the ResNet50 module of the original CenterNet network to form an improved ResNet50 module, wherein the residual module includes a residual connection module for concatenating the input of the residual module and the output of the residual module; adding a dilation coding module to the output end of the deconvolution module in the original CenterNet network to form an improved deconvolution module; and constructing an improved CenterNet network including the improved ResNet50 module, the improved deconvolution module and the prediction module in the original CenterNet network; The model training module is used to collect images containing Uyghur characters to build a data set, and use the data set to train the improved CenterNet network to obtain a detection model for detecting Uyghur characters; The Uyghur detection module is used to input the Uyghur image to be detected into the detection model, and extract features of the Uyghur image to be detected by improving the residual module in the ResNet50 module. In the feature extraction process, the input of the residual module is spliced with the output of the residual module through the residual connection module to obtain a Uyghur multi-channel feature map; the compression and excitation attention mechanism module assigns weights to each channel according to the degree of correlation between each channel and Uyghur in the Uyghur multi-channel feature map to obtain a Uyghur weighted feature map; the deconvolution module is used to expand the spatial size of the Uyghur weighted feature map to restore the feature map size that has been reduced during the feature extraction process to obtain a Uyghur recovery feature map; the expansion coding module is used to search for the position of Uyghur in the Uyghur recovery feature map at different scales to obtain a Uyghur position feature map; the prediction module is used to detect the position of the Uyghur position feature map, and the Uyghur position in the Uyghur image to be detected is output.
5. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
6. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Uygur language detection method and system under complex background and electronic equipment
CN110309825A
Lightweight track foreign matter detection method based on attention mechanism
CN118038404A