An intelligent identification method, device and equipment of a target image and a storage medium

By constructing a pre-defined feature extraction model and a feature pyramid network, the problem of poor target image recognition in complex scenes is solved, and fast and accurate target image recognition is achieved on devices with limited computing power.

CN115937537BActive Publication Date: 2026-05-12NORTHKING INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHKING INFORMATION TECH CO LTD
Filing Date
2022-12-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing target image detection algorithms do not perform well in complex scenes such as image wrinkles, dark images, and image deformation.

Method used

A pre-defined feature extraction model, including a first sub-model, a second sub-model, and a third sub-model, is used to construct a feature pyramid network. Feature maps of different scales are extracted and fused step by step to obtain target information such as location, category confidence, orientation confidence, and deflection angle confidence, and finally determine the target image of the target to be identified.

Benefits of technology

Fast and accurate target image recognition has been achieved on electronic devices with limited computing power, applicable to both simple and complex scenarios, improving recognition speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937537B_ABST
    Figure CN115937537B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent identification method, device and equipment of target image and storage medium.The method comprises: the initial image is input into the first submodel of pre-set feature extraction model, and at least three different scale first feature maps are obtained;First feature map is input into second submodel, and at least three different scale second feature maps are obtained;Second feature map is input into third submodel, and the target information of the target to be identified is obtained, and according to target information, the target image of the target to be identified is determined from initial image, wherein, target information includes position information, category confidence, direction confidence and deflection angle confidence.The technical scheme of the embodiment of the application balances in the speed and accuracy of image recognition, and can quickly and accurately determine the image of the target to be identified in various simple or complex scenes, and solves the problem of poor image recognition effect in complex scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for intelligent recognition of target images. Background Technology

[0002] With the rapid development of new-generation information technologies such as artificial intelligence, big data, and cloud computing, image recognition has become a fundamental part of enterprise digital transformation.

[0003] Currently, deep learning-based detection algorithms are commonly used to extract target features from images. These algorithms can capture the differences between different target images and have good anti-interference capabilities. The mainstream detection algorithms include the YOLO (You Only Look Once) series and RCNN (Region Convolutional Neural Networks) algorithms, both of which are suitable for different detection scenarios.

[0004] However, conventional target image detection methods have certain limitations and cannot achieve good results in complex scenes such as image wrinkles, dark images, and image deformations. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for intelligent recognition of target images, in order to solve the problem of poor recognition performance of target images in complex scenes.

[0006] In a first aspect, the present invention provides an intelligent recognition method for target images, comprising:

[0007] The initial image is input into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model;

[0008] The first feature map is input into the second sub-model to obtain at least three second feature maps of different scales, wherein the second sub-model is constructed based on a feature pyramid network;

[0009] The second feature map is input into the third sub-model to obtain the target information of the target to be identified, and the target image of the target to be identified is determined from the initial image based on the target information. The target information includes location information, category confidence, orientation confidence and deflection angle confidence.

[0010] Secondly, the present invention provides an intelligent recognition device for target images, comprising:

[0011] The first feature map determination module is used to input the initial image into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model;

[0012] The second feature map determination module is used to input the first feature map into the second sub-model to obtain at least three second feature maps at different scales, wherein the second sub-model is constructed based on a feature pyramid network;

[0013] The target image determination module is used to input the second feature map into the third sub-model to obtain the target information of the target to be identified, and to determine the target image of the target to be identified from the initial image based on the target information, wherein the target information includes position information, category confidence, orientation confidence and deflection angle confidence.

[0014] Thirdly, the present invention provides an electronic device comprising:

[0015] At least one processor;

[0016] and memory that is communicatively connected to at least one processor;

[0017] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform the intelligent recognition method for the target image described in the first aspect.

[0018] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to execute the intelligent recognition method for the target image described in the first aspect.

[0019] The intelligent image recognition scheme provided by this invention inputs an initial image into a first sub-model of a preset feature extraction model to obtain at least three first feature maps at different scales. The preset feature extraction model includes at least the first sub-model, the second sub-model, and the third sub-model. The first feature maps are input into the second sub-model to obtain at least three second feature maps at different scales. The second sub-model is constructed based on a feature pyramid network. The second feature maps are input into the third sub-model to obtain target information of the target to be recognized. Based on the target information, the target image of the target to be recognized is determined from the initial image. The target information includes location information, category confidence, orientation confidence, and deflection angle confidence. By adopting the above technical solution, the initial image is first processed using the first sub-model of the preset feature extraction model to obtain features of different scales (first feature maps) of the initial image. Then, the features are processed using the second sub-model built based on the feature pyramid network to obtain fine features of different scales of the initial image (second feature maps). Finally, all the second feature maps are input into the third sub-model to obtain the target information of the target to be identified in the initial image. Based on this target information, the target image of the target to be identified can be determined. Compared with traditional complex image detection algorithms, the lightweight model (preset feature extraction model) used in this method is suitable for electronic devices with limited computing power, such as mobile phones, and achieves a balance between the speed and accuracy of image recognition. Using this preset feature extraction model, the images of the target to be identified in various simple or complex scenes can be quickly and accurately determined, solving the problem of poor image recognition performance in complex scenes.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart of an intelligent recognition method for target images provided according to Embodiment 1 of the present invention;

[0023] Figure 2 This is a flowchart of an intelligent recognition method for target images provided according to Embodiment 2 of the present invention;

[0024] Figure 3 This is a schematic diagram of a sample orientation provided according to Embodiment 2 of the present invention;

[0025] Figure 4 This is a schematic diagram of an initial sample image provided according to Embodiment 2 of the present invention;

[0026] Figure 5 This is a schematic diagram of a sample image provided according to Embodiment 2 of the present invention;

[0027] Figure 6 This is a schematic diagram of a target detection box provided according to Embodiment 2 of the present invention;

[0028] Figure 7 This is a schematic diagram of the structure of an intelligent recognition device for target images provided in Embodiment 3 of the present invention;

[0029] Figure 8 This is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0032] Example 1

[0033] Figure 1 The flowchart below shows a method for intelligent recognition of a target image according to Embodiment 1 of the present invention. This embodiment is applicable to situations where a target image is determined. The method can be executed by an intelligent recognition device for the target image. The intelligent recognition device for the target image can be implemented in hardware and / or software. The intelligent recognition device for the target image can be configured in an electronic device, such as a mobile phone. The electronic device can be composed of two or more physical entities, or it can be composed of a single physical entity.

[0034] like Figure 1 As shown, the intelligent recognition method for target images provided in Embodiment 1 of the present invention specifically includes the following steps:

[0035] S101. Input the initial image into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model.

[0036] In this embodiment, a preset camera device, such as a mobile phone camera, can be used to acquire an image (initial image) containing at least one target to be identified. This image is then input into a preset feature extraction model. After processing by the first sub-model of the preset feature extraction model, at least three feature maps of different scales (first feature maps) can be obtained, such as feature maps with scales of 80*80, 40*40, and 20*20 pixels. The target to be identified can be any object, such as a person, animal, or any inanimate object. The scale can be understood as the size of the image; for example, a scale of 80*80 can represent an image with a length and width of 80 pixels.

[0037] Optionally, the first sub-model includes at least a convolutional layer, a batch normalization layer, an activation function layer, and a pooling layer.

[0038] Specifically, convolutional layers can use multiple different convolutional kernels to process the initial image, obtaining feature maps at different levels. Batch normalization layers calculate the mean and variance of pixel values ​​across all feature maps output by the convolutional layers, then determine the difference between a pixel value and the mean, and finally calculate the quotient of this difference and the variance, thus achieving normalization. Activation function layers can be PReLU (Parametric Rectified Linear Unit) layers or ReLU (Rectified Linear Unit) layers, etc., and can perform non-linear processing on the feature maps output by the batch normalization layers. Pooling layers can downsample the feature maps output by the activation function layers, thereby obtaining first feature maps at different scales.

[0039] S102. Input the first feature map into the second sub-model to obtain at least three second feature maps of different scales, wherein the second sub-model is constructed based on a feature pyramid network.

[0040] In this embodiment, after obtaining the first feature map, a second sub-model of a preset feature extraction model can be used to fuse the first feature maps at different scales, thereby obtaining at least three second feature maps at different scales. The second sub-model possesses the superior characteristics of a feature pyramid network, which can improve the accuracy of the first feature map and process feature data faster. The scale of the second feature map is usually consistent with that of the first feature map, but the second feature map contains more fine-grained feature information. The second sub-model typically contains multiple feature extraction layers.

[0041] S103. Input the second feature map into the third sub-model to obtain the target information of the target to be identified, and determine the target image of the target to be identified from the initial image based on the target information, wherein the target information includes position information, category confidence, direction confidence and deflection angle confidence.

[0042] In this embodiment, after obtaining the second feature map, all the second feature maps can be input into the third sub-model. The third sub-model can contain multiple convolutional layers, such as a convolutional layer composed of multiple 1*1 convolutional kernels. This convolutional layer can be used to extract target information from the second feature maps at different scales. Each target to be identified in each second feature map corresponds to a set of target information including location information, category confidence, orientation confidence, and deflection angle confidence. Target information that meets preset requirements can be selected from multiple sets of target information, such as category confidence, orientation confidence, and deflection angle confidence being greater than the corresponding preset confidence threshold. Based on the location information, the orientation corresponding to the orientation confidence, and the deflection angle corresponding to the deflection angle confidence in the target information that meets the preset requirements, the target image of the target to be identified can be cropped from the initial image to obtain the target image.

[0043] Among these, the location information in the target information can be understood as the position coordinates of the target to be identified in the image coordinate system of the initial image. The category confidence score can be understood as the confidence level that the target to be identified belongs to a preset category. The orientation confidence score can be understood as the confidence level that the target to be identified is in a preset orientation. The deflection angle confidence score can be understood as the confidence level that the target to be identified is in a preset deflection angle. The preset category of the target to be identified can be a person, animal, or any inanimate object, such as a ticket. The preset direction can be the orientation of the target, such as upward, downward, leftward, or rightward. The orientation and deflection angle of the target can be based on the target's preset information. For example, if the target is a ticket, the orientation of the text on the ticket can be used as the reference; if the text is upward, the target is oriented upward. If the text is deflected 30 degrees relative to the horizontal line, the target's deflection angle is 30 degrees. If the target is a person, animal, or plant, the orientation and deflection angle can be determined based on the shape information of the target's preset position. The preset deflection angle can be any angle within a preset range, such as any angle greater than or equal to 0 degrees and less than 360 degrees.

[0044] The intelligent image recognition method for target images provided in this embodiment of the invention inputs an initial image into a first sub-model of a preset feature extraction model to obtain at least three first feature maps at different scales. The preset feature extraction model includes at least the first sub-model, the second sub-model, and the third sub-model. The first feature maps are input into the second sub-model to obtain at least three second feature maps at different scales. The second sub-model is constructed based on a feature pyramid network. The second feature maps are input into the third sub-model to obtain target information of the target to be recognized. Based on the target information, the target image of the target to be recognized is determined from the initial image. The target information includes location information, category confidence, orientation confidence, and deflection angle confidence. The technical solution of this invention first processes the initial image using a first sub-model of a preset feature extraction model to obtain features (first feature maps) at different scales. Then, it processes these features using a second sub-model built on a feature pyramid network to obtain fine features (second feature maps) at different scales. Finally, all the second feature maps are input into a third sub-model to obtain the target information of the target to be identified in the initial image. Based on this target information, the target image of the target to be identified can be determined. Compared with traditional complex image detection algorithms, the lightweight model (preset feature extraction model) used in this method is suitable for electronic devices with limited computing power, such as mobile phones, achieving a balance between image recognition speed and accuracy. Using this preset feature extraction model, the images of the target to be identified in various simple or complex scenes can be quickly and accurately determined, solving the problem of poor image recognition performance in complex scenes.

[0045] Example 2

[0046] Figure 2 This is a flowchart of an intelligent recognition method for target images provided in Embodiment 2 of the present invention. The technical solution of the present invention is further optimized based on the above optional technical solutions, and a specific method for determining the target image is given.

[0047] Optionally, the step of inputting the first feature map into the second sub-model to obtain at least three second feature maps of different scales includes: inputting the first feature map into the second sub-model, performing a second convolution on the deep feature map using the second sub-model, performing a first upsampling on the second convolution result, and concatenating the first upsampling result with the middle feature map to obtain a first concatenated feature; performing a third convolution on the first concatenated feature, performing a second upsampling on the third convolution result, and concatenating the second upsampling result with the shallow feature map to obtain a second concatenated feature; and further concatenating the first concatenated feature with the deep feature map using the second sub-model. After the second concatenated feature undergoes a fourth convolution, the result of the fourth convolution is subjected to a fifth convolution, and the result of the fifth convolution and the result of the third convolution are concatenated to obtain the third concatenated feature. After the third concatenated feature undergoes a sixth convolution, the result of the sixth convolution is subjected to a seventh convolution, and the result of the seventh convolution and the result of the second convolution are concatenated to obtain the fourth concatenated feature. Finally, the fourth concatenated feature undergoes an eighth convolution to obtain the eighth convolution result. The second feature map includes the results of the fourth, sixth, and eighth convolutions. The advantage of this setup is that by using the second sub-model to perform convolution and concatenation on the first feature map, the goal of optimizing deep features using shallow features is achieved, enhancing the transmission of positional information within the model.

[0048] Optionally, the step of inputting the second feature map into the third sub-model to obtain target information of the target to be identified, and determining the target image of the target to be identified from the initial image based on the target information, includes: inputting the second feature map into the third sub-model; for each second feature map, performing a ninth convolution on the current second feature map using the third sub-model to obtain target information of the detection box of the target to be identified; using a non-maximum suppression algorithm to filter the target information of the detection box to determine the target position, target direction, and target deflection angle of the target detection box; and cropping the image corresponding to the target detection box from the initial image based on the target position, target direction, and target deflection angle to obtain the target image of the target to be identified. The advantage of this setup is that using a non-maximum suppression algorithm to filter redundant detection boxes enhances the accuracy of the target image.

[0049] like Figure 2 As shown in Embodiment 2 of the present invention, an intelligent recognition method for target images specifically includes the following steps:

[0050] S201. Input the initial image into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales.

[0051] Optionally, the step of inputting the initial image into a first sub-model of a preset feature extraction model to obtain at least three first feature maps at different scales includes: inputting the initial image into a convolutional layer, a batch normalization layer, and an activation function layer to obtain shallow feature maps, mid-level feature maps, and an initial deep feature map with different scales; performing a first convolutional process on the initial deep feature map, and then performing pooling processing on the result of the first convolutional process to obtain multiple pooling processing results at different scales, wherein the scale of the initial deep feature map is smaller than that of the shallow feature map and the mid-level feature map; concatenating the multiple pooling processing results at different scales to obtain a deep feature map, wherein the first feature map includes the deep feature map, the shallow feature map, and the mid-level feature map. The advantage of this setup is that, through the processing of the convolutional layer, the batch normalization layer, the activation function layer, and the pooling layer in the first sub-model, the obtained first feature map contains feature information at different levels.

[0052] Specifically, the initial image is first input into a first sub-model containing convolutional layers, batch normalization layers, and activation function layers. This yields three first feature maps at different scales: a shallow feature map, a mid-level feature map, and an initial deep feature map. The shallow feature map is larger than the mid-level feature map, and the mid-level feature map is larger than the initial deep feature map. Convolutional layers can be used to extract features from the initial deep feature map. Then, pooling is performed on the extracted features to obtain multiple features at different scales (pooling results). Finally, these features at different scales are concatenated to obtain the deep feature map. The pooling kernel can have at least four sizes, such as 1*1, 5*5, 9*9, and 13*13.

[0053] Optionally, the method for determining the preset feature extraction model includes:

[0054] 1) Obtain a sample image containing a preset ground truth bounding box, wherein the sample image contains at least one sample target image, the preset ground truth bounding box is used to frame the sample target image, and the preset ground truth bounding box is configured with a sample label.

[0055] Specifically, all images of the target samples to be identified, i.e., sample target images, can be pre-defined in the sample images using ground truth bounding boxes (preset ground truth boxes). Each preset ground truth box is associated with a sample label. These label can include a sample location label, a sample category label, a sample orientation label, and a sample deflection angle label. The sample location label represents the coordinates of the preset ground truth box within the image coordinate system of the sample image; the sample category label represents the category of the object within the preset ground truth box, such as a ticket or ID card; and the sample orientation label represents the orientation of the preset ground truth box. Figure 3 This is a schematic diagram of a sample orientation; the sample orientation label may include the positive direction ( Figure 3The direction shown in the leftmost image), the downward direction ( Figure 3 The direction shown in the second image from the left), the left direction ( Figure 3 (The directions shown in the three images from the left and right) and the right direction ( Figure 3 (The direction shown in the fourth image from the left), etc., the sample deflection angle label can be the angle of the preset real box offset from the horizontal line.

[0056] 2) Input the sample image into the first initial sub-model of the preset initial model to obtain at least three first sample feature maps of different scales, wherein the preset initial model includes at least the first initial sub-model, the second initial sub-model and the third initial sub-model.

[0057] Specifically, sample images can be input into the first initial sub-model to obtain first sample feature maps at least three different scales. The first initial sub-model may include an initial convolutional layer, an initial batch normalization layer, an initial activation function layer, and an initial pooling layer.

[0058] Optionally, before inputting the sample image into the first initial sub-model, the sample deflection angle of the sample target image can be converted into an angle within a preset angle range. For example, if the range of the sample deflection angle is greater than -90 degrees and less than or equal to 0 degrees, the following conversion method can be used.

[0059]

[0060] The sample deflection angle is converted into an angle within the range of 0 degrees or greater and 180 degrees or less. Here, theta is the converted angle, and width and height are the width and height of the target image, respectively. The sample deflection angle can be determined using a preset method, such as OpenCV. If the sample deflection angle is negative, it indicates that the deflection direction is negative; for example, if left is positive, then right is negative.

[0061] 3) Input the first sample feature map into the second initial sub-model to obtain at least three second sample feature maps of different scales, wherein the second initial sub-model is constructed based on a feature pyramid network.

[0062] 4) Input the second sample feature map into the third initial sub-model to obtain the sample target information of the sample detection box of the sample target to be identified, wherein the sample target information includes sample location information, sample category confidence, sample direction confidence and sample deflection angle confidence.

[0063] Specifically, after processing by the third initial sub-model, the detection box of the target sample to be identified, i.e. the sample detection box, can be obtained, and the sample target information of the detection box can also be determined.

[0064] 5) Determine the loss function based on the sample target information and the sample label, and use the loss function to train the preset initial model to obtain the preset feature extraction model.

[0065] Specifically, a loss function can be established based on the sample target information and the sample labels. For example, based on the sample location information and sample location labels in the sample target information, a regression loss function can be determined. This loss function can be used as the model's loss function. The loss function can be used to calculate the difference between the sample detection box and the preset ground truth box (the result of the loss function). Based on the magnitude of the loss function result, a preset initial model is trained. When the result of the loss function is less than the preset loss function value, it indicates that the preset initial model has been trained. The trained preset initial model is the preset feature extraction model.

[0066] The advantage of this setup is that by using sample images containing preset ground truth bounding boxes to train the preset initial model, and by using a loss function to determine whether training is complete, the accuracy of the preset feature extraction model is guaranteed.

[0067] Furthermore, the loss functions include: a regression loss function, a confidence loss function, a category loss function, an angle loss function, and a direction loss function. The regression loss function is determined based on the intersection-union ratio (IU) of the sample detection box and the preset ground truth box, and the area of ​​the minimum convex closed box formed by the sample detection box and the preset ground truth box. The advantage of this setup is that by utilizing five loss functions, the training effect of the preset initial model can be comprehensively evaluated, and the complete training of the preset initial model can be determined holistically, thereby improving the accuracy of the preset feature extraction model.

[0068] For example, the loss function can be determined in the following way:

[0069] Loss=αL1+βL2+θL3+γL4+δL5

[0070] Where α, β, θ, γ, and δ are the coefficients of the loss function, L1 is the regression loss function, L2 is the confidence loss function, L3 is the category loss function, L4 is the angle loss function, and L5 is the direction loss function. The regression loss function can be determined in the following way.

[0071]

[0072] Where A represents the area of ​​the preset ground truth bounding box, B represents the area of ​​the sample detection bounding box, || represents taking the absolute value, IOU represents the intersection-union ratio of A and B, C represents the area of ​​the smallest convex closed bounding box of A and B, and \ represents the subtraction operation of the area. The confidence loss function, class loss function, angle loss function, and orientation loss function can be determined in the following way.

[0073]

[0074] Where y is the probability of the preset true bounding box. y represents the confidence score of the sample detection box, namely the confidence score of the sample category, the confidence score of the sample orientation, or the confidence score of the sample deflection angle. Specifically, if the sample label of the preset ground truth box matches the sample target information of the corresponding sample detection box, then y = 1; otherwise, y = 0. For example, if the sample category label of the preset ground truth box is "ID card," and the category corresponding to the sample category confidence score of the sample detection box is "invoice," then y = 0.

[0075] Optionally, before obtaining the sample image containing the preset real bounding box, the method further includes:

[0076] 1) Obtain an initial sample image containing a preset initial ground truth bounding box, wherein the initial sample image contains at least one initial sample target image, the preset initial ground truth bounding box is used to frame the initial sample target image, the preset initial ground truth bounding box is configured with an initial sample label, and the initial sample label contains an initial sample direction label.

[0077] 2) Perform preset image processing on the initial sample image to obtain a sample image, and update the initial sample label according to the processing procedure of the preset image processing to determine the sample label.

[0078] Specifically, the preset image processing can include fixed image scale processing, image stitching processing, image translation processing, image cropping processing, image flipping processing, and image rotation processing. One or more of these preset image processing methods can be selected to process the initial sample image with equal probability. The processed initial sample image is then the sample image. If the information corresponding to the initial sample image after preset image processing is inconsistent with the initial sample label, the initial sample label needs to be adjusted according to the preset image processing procedure to obtain the sample label. For example, if the initial sample label is positive, and after image flipping processing, the orientation of the initial sample image is flipped by 180 degrees, then the flipped initial sample image is the sample image, and the initial sample label can be updated to the downward direction. The downward direction is the sample label for this sample image.

[0079] The fixed image scale processing can be achieved by unifying all initial sample images to a specific size, such as 640*640. To avoid destroying the original features of the initial sample images, they can be scaled proportionally. Initial sample images that do not meet the scale requirements can be padded, for example, with the pixel values ​​of the three primary colors (114, 114, 114), to achieve the goal of uniform scale. The image stitching processing can be achieved by randomly selecting a preset number of initial sample images, such as four initial sample images, performing fixed image scale processing on these initial sample images, stitching them together, and then scaling them to the set scale, such as 640*640. For example, a point can be randomly selected within the center of a preset area of ​​1280*1280 pixels. Four initial sample images are then randomly placed in the upper left, lower left, upper right, and lower right regions of this selected point. If some initial sample images extend beyond the preset area, indicating truncation, and if the area of ​​the initial sample images within the preset area is more than 40% of the total area, those images are retained. If the area is less than 40%, the initial sample images are considered invalid. Finally, the stitched initial sample images are scaled to the set size to complete the image stitching process. Image translation can be performed by translating the initial sample images vertically, horizontally, or left-right, with the translation size preset. Image cropping can be performed by randomly cropping the initial sample images. During this process, some initial sample images may be truncated; in this case, the methods for handling truncation can be used to determine which initial sample images to retain, and then the initial sample images can be fixed to a specific scale. Image flipping can be performed by randomly flipping the initial sample images vertically, horizontally, or left-right. Image rotation processing can be performed by randomly rotating the initial input sample image. The rotation angle range can be preset, such as clockwise or counterclockwise rotation, and the rotation angle is less than 44 degrees. Figure 4 This is a schematic diagram of an initial sample image. Figure 5 This is a schematic diagram of a sample image, such as... Figure 4 The initial sample image shown, after undergoing fixed image scale processing, image stitching, and image rotation, can be processed to obtain the following sample image: Figure 5 As shown.

[0080] The step of performing preset image processing on the initial sample image to obtain a sample image, and updating the initial sample label according to the preset image processing procedure to determine the sample label includes:

[0081] If it is determined that the initial sample image will be rotated, then before performing the rotation, a preset angle is determined, wherein the preset angle is the angle in the preset angle set that is closest to the rotation angle corresponding to the image rotation. The initial sample image is rotated to the first position corresponding to the preset angle, and the first order of the first corner point coordinates is determined according to a preset sorting method, wherein the first corner point coordinates are the coordinates of the corner points of the preset initial true bounding box after the preset angle rotation, and the preset sorting method includes sorting by the absolute values ​​of the coordinates of the preset coordinate axes. After restoring the initial sample image to its initial position before rotation, the initial sample image is rotated to the second position corresponding to the rotation angle, and the initial sample image at the second position is determined as the sample image. The second order of the second corner point coordinates is determined according to the preset sorting method. If the second order is the same as the first order, then the sample direction corresponding to the preset angle is determined as the sample direction label in the sample label of the sample image.

[0082] For example, if the initial sample image is in the positive direction, the rotation angle corresponding to the image rotation processing is 93 degrees, and the rotation direction is to the left. The preset angle set includes 90 degrees, 180 degrees, 270 degrees, and 360 degrees, so the preset angle is 90 degrees, and the rotation direction is also to the left. The initial sample image can be rotated to 90 degrees first, and then sorted in ascending order according to the x-coordinate values ​​of its corner points in the preset coordinate system. If the sorting (first order) of the corner points in the preset coordinate system is corner point 1, corner point 3, corner point 2, and corner point 4, then the initial sample image is restored to its original position, and then rotated to 93 degrees again, and sorted in ascending order according to the x-coordinate values ​​of its corner points in the preset coordinate system. If the sorting (second order) of the corner points in the preset coordinate system is still corner point 1, corner point 3, corner point 2, and corner point 4, then the sample direction (to the left) corresponding to the 90-degree rotation can be determined as the sample direction label of the sample image. If the first order and the second order are different, and the rotation angle is greater than the preset angle, then the next direction of the sample direction corresponding to the preset rotation angle can be determined as the sample direction label of the sample image. For example, the next direction of the left direction is the down direction, so the down direction is the sample direction label. If the first order and the second order are different, and the rotation angle is less than the preset angle, then the previous direction of the sample direction corresponding to the preset rotation angle can be determined as the sample direction label of the sample image. For example, the previous direction of the left direction is the positive direction, so the up direction is the sample direction label.

[0083] Optionally, instead of presetting a preset angle set, the rotation angle corresponding to the image rotation processing and the preset angle, such as 90 degrees, are calculated, along with the modulus of the quotient. The initial sample image is then rotated to the set angle corresponding to the product of the preset angle and the modulus. The third order of the third corner point coordinates is determined according to a preset sorting method. After restoring the initial sample image to its initial position before rotation, it is rotated again to the position corresponding to the rotation angle to obtain the sample image. The fourth order of the fourth corner point coordinates is determined according to a preset sorting method. If the fourth order is the same as the third order, the sample direction corresponding to the set angle is determined as the sample direction label in the sample label of the sample image.

[0084] The advantage of this setup is that by performing pre-processing on the initial sample images and correcting the sample labels, both the diversity of the sample images and the accuracy of the sample labels are ensured, thereby improving the accuracy of the pre-defined feature extraction model.

[0085] S202. Input the first feature map into the second sub-model, use the second sub-model to perform a second convolution on the deep feature map, perform a first upsampling on the result of the second convolution, and stitch the first upsampling result and the middle feature map together to obtain the first stitched feature.

[0086] For example, if the three first feature maps are c3, c4, and c5, where c3 is a shallow feature map determined by downsampling by 8 times, c4 is a middle feature map determined by downsampling by 16 times, and c5 is a deep feature map determined by downsampling by 32 times, then the deep feature map can be processed by the second sub-model to obtain a refined second convolution result p4. Then, p4 is processed by the first upsampling. The first upsampling result has the same scale as the middle feature map. The first upsampling result and the middle feature map can be concatenated to obtain the first concatenated feature.

[0087] S203. After performing a third convolution on the first spliced ​​feature, perform a second upsampling on the result of the third convolution, and splice the second upsampling result and the shallow feature map to obtain the second spliced ​​feature.

[0088] For example, after performing a third convolution on the obtained first concatenated feature, the third convolution result p3 can be obtained. Then, a second upsampling process is performed on p3. The obtained second upsampling result has the same scale as the shallow feature map. The second upsampling result and the shallow feature map can be concatenated to obtain the second concatenated feature.

[0089] S204. After performing a fourth convolution on the second splicing feature, perform a fifth convolution on the result of the fourth convolution, and splice the result of the fifth convolution and the result of the third convolution to obtain the third splicing feature.

[0090] For example, after performing a fourth convolution on the obtained second concatenated feature, the fourth convolution result h3 can be obtained. Then, a fifth convolution is performed on h3, and the resulting fifth convolution result has the same scale as p3. The fifth convolution result and p3 can be concatenated to obtain the third concatenated feature.

[0091] S205. After performing a sixth convolution on the third splicing feature, perform a seventh convolution on the result of the sixth convolution, splice the result of the seventh convolution and the result of the second convolution to obtain a fourth splicing feature, and then perform an eighth convolution on the fourth splicing feature to obtain an eighth convolution result.

[0092] The second feature map includes the results of the fourth convolution, the sixth convolution, and the eighth convolution.

[0093] For example, after performing a sixth convolution on the obtained third concatenated feature, we can obtain the sixth convolution result h4. Then, we perform a seventh convolution on h3. The seventh convolution result has the same scale as p4. We can concatenate the seventh convolution result and p4 to obtain the fourth concatenated feature. After performing an eighth convolution on the obtained fourth concatenated feature, we can obtain the eighth convolution result h5. Thus, we obtain the second feature map h3, the second feature map h4, and the second feature map h5.

[0094] S206. Input the second feature map into the third sub-model. For each second feature map, use the third sub-model to perform a ninth convolution on the current second feature map to obtain the target information of the detection box of the target to be identified.

[0095] For example, as described above, h3, h4, and h5 are input into the third sub-model. For each second feature map, the third sub-model is used to perform a ninth convolution on the current second feature map to obtain the target information of the detection box of the target to be identified.

[0096] S207. The nonmaximum suppression algorithm is used to filter the target information of the detection box to determine the target position, target direction and target deflection angle of the target detection box.

[0097] Specifically, since the second feature map can contain multiple detection boxes for multiple targets to be identified, it is necessary to filter the detection boxes. Using the non-maximum suppression algorithm, redundant detection boxes can be removed, such as detection boxes with low class confidence, thereby obtaining the target detection box. The position information of the target detection box is the target position, the class corresponding to the class confidence of the target detection box is the target class, the direction corresponding to the direction confidence of the target detection box is the target direction, and the deflection angle corresponding to the deflection angle confidence of the target detection box is the target deflection angle.

[0098] For example, the screening steps corresponding to the nonmaximum suppression algorithm can be as follows: 1) Use the classification score threshold to filter out detection boxes with a class confidence score lower than the threshold; 2) Sort the class confidence scores of the remaining prediction boxes to determine the highest class confidence score and its corresponding first detection box; 3) Traverse the remaining detection boxes except for the first detection box. If the rotation intersection-union ratio of the current detection box and the first detection box is greater than the set intersection-union ratio threshold, delete the current detection box and keep the first detection box; 4) Repeat step 2).

[0099] S208. Based on the target position, target direction, and target deflection angle, crop the image corresponding to the target detection box from the initial image to obtain the target image of the target to be identified.

[0100] Specifically, Figure 6 This is a schematic diagram of a target detection bounding box. Figure 6 The dataset contains four images, each with a bounding box (the detection box). The detection boxes in the left column are generated by traditional image detection algorithms, while the detection boxes in the right column are generated using the proposed method. It is evident that the accuracy of the target detection boxes in identifying the target is higher than that of the traditional detection boxes, meaning that the proposed method outperforms traditional methods in identifying the target. The target detection boxes can be cropped from the initial image based on the target position and its deflection angle. Furthermore, the image corresponding to the target detection box is rotated to the correct orientation based on the target deflection angle, thus obtaining the target image.

[0101] The intelligent image recognition method for target images provided in this invention first processes the initial image using a first sub-model of a preset feature extraction model to obtain first feature maps at different scales. Then, a second sub-model based on a feature pyramid network is used to perform multiple convolution processes on the first feature maps, aligning the scales of the first feature maps at different scales with the scales of the convolution processing results. These are then stitched together to obtain fine features (second feature maps) consistent with the scale of the first feature maps. Finally, all the second feature maps are input into a third sub-model to obtain the target information of the target to be recognized in the initial image. The non-maximum suppression algorithm is used to filter this target information, thereby determining the target detection box and its corresponding target image. By using the lightweight feature extraction model in this method to process the initial image, it is possible to detect and classify the target to be recognized in any direction under different scenes, and correct the orientation of the image of the target to be recognized, greatly improving the efficiency of image recognition.

[0102] Example 3

[0103] Figure 7 This is a schematic diagram of the structure of an intelligent target image recognition device provided in Embodiment 3 of the present invention. Figure 7 As shown, the device includes: a first feature map determination module 301, a second feature map determination module 302, and a target image determination module 303, wherein:

[0104] The first feature map determination module is used to input the initial image into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model;

[0105] The second feature map determination module is used to input the first feature map into the second sub-model to obtain at least three second feature maps at different scales, wherein the second sub-model is constructed based on a feature pyramid network;

[0106] The target image determination module is used to input the second feature map into the third sub-model to obtain the target information of the target to be identified, and to determine the target image of the target to be identified from the initial image based on the target information, wherein the target information includes position information, category confidence, orientation confidence and deflection angle confidence.

[0107] The intelligent image recognition device for targets provided in this invention first processes the initial image using a first sub-model of a preset feature extraction model to obtain features (first feature maps) at different scales. Then, it processes these features using a second sub-model constructed based on a feature pyramid network to obtain fine features (second feature maps) at different scales. Finally, all the second feature maps are input into a third sub-model to obtain the target information of the target to be recognized in the initial image. Based on this target information, the target image of the target to be recognized can be determined. Compared with traditional complex image detection devices, the lightweight model (preset feature extraction model) used in this device is suitable for electronic devices with limited computing power, such as mobile phones, achieving a balance between image recognition speed and accuracy. Using this preset feature extraction model, the images of the target to be recognized in various simple or complex scenes can be quickly and accurately determined, solving the problem of poor image recognition performance in complex scenes.

[0108] Optionally, the first sub-model includes at least a convolutional layer, a batch normalization layer, an activation function layer, and a pooling layer.

[0109] Optionally, the first feature map determination module includes:

[0110] The feature map determination unit is used to input the initial image into a convolutional layer, a batch normalization layer, and an activation function layer to obtain shallow feature maps, mid-level feature maps, and initial deep feature maps with different scales.

[0111] The pooling processing unit is used to perform a first convolution processing on the initial deep feature map, and then perform pooling processing on the result of the first convolution processing to obtain multiple pooling processing results of different scales, wherein the scale of the initial deep feature map is smaller than that of the shallow feature map and the middle feature map.

[0112] The splicing unit is used to splice the pooling results of multiple different scales to obtain a deep feature map, wherein the first feature map includes the deep feature map, the shallow feature map and the middle feature map.

[0113] Optionally, the second feature map determination module includes:

[0114] The first splicing feature determination unit is used to input the first feature map into the second sub-model, perform a second convolution process on the deep feature map using the second sub-model, perform a first upsampling process on the second convolution process result, and splice the first upsampling result and the middle layer feature map to obtain the first splicing feature.

[0115] The second splicing feature determination unit is used to perform a third convolution processing on the first splicing feature, perform a second upsampling processing on the third convolution processing result, and splice the second upsampling result and the shallow feature map to obtain the second splicing feature.

[0116] The third splicing feature determination unit is used to perform a fourth convolution process on the second splicing feature, perform a fifth convolution process on the result of the fourth convolution process, and splice the result of the fifth convolution process and the result of the third convolution process to obtain the third splicing feature.

[0117] The second feature map determination unit is used to perform a sixth convolution process on the third spliced ​​feature, then perform a seventh convolution process on the result of the sixth convolution process, splice the result of the seventh convolution process and the result of the second convolution process to obtain a fourth spliced ​​feature, and then perform an eighth convolution process on the fourth spliced ​​feature to obtain an eighth convolution process result. The second feature map includes the result of the fourth convolution process, the result of the sixth convolution process and the result of the eighth convolution process.

[0118] Optionally, the target image determination module includes:

[0119] The target information determination unit is used to input the second feature map into the third sub-model, and for each second feature map, use the third sub-model to perform a ninth convolution process on the current second feature map to obtain the target information of the detection box of the target to be identified;

[0120] The filtering unit is used to filter the target information of the detection box using a non-maximum suppression algorithm to determine the target position, target direction and target deflection angle of the target detection box;

[0121] The target image determination unit is used to crop the image corresponding to the target detection box from the initial image according to the target position, target direction and target deflection angle, so as to obtain the target image of the target to be identified.

[0122] Optionally, the determination method of the preset feature extraction model includes: acquiring sample images containing preset ground truth boxes, wherein the sample images contain at least one sample target image, the preset ground truth boxes are used to frame the sample target image, and the preset ground truth boxes are configured with sample labels; inputting the sample images into a first initial sub-model of a preset initial model to obtain at least three first sample feature maps at different scales, wherein the preset initial model includes at least the first initial sub-model, a second initial sub-model, and a third initial sub-model; inputting the first sample feature maps into the second initial sub-model to obtain at least three second sample feature maps at different scales, wherein the second initial sub-model is constructed based on a feature pyramid network; inputting the second sample feature maps into the third initial sub-model to obtain sample target information of the sample detection box of the sample target to be identified, wherein the sample target information includes sample location information, sample category confidence, sample orientation confidence, and sample deflection angle confidence; determining a loss function based on the sample target information and the sample labels, and using the loss function to train the preset initial model to obtain the preset feature extraction model.

[0123] Optionally, before obtaining the sample image containing the preset ground truth bounding box, the method further includes: obtaining an initial sample image containing the preset initial ground truth bounding box, wherein the initial sample image contains at least one initial sample target image, the preset initial ground truth bounding box is used to frame the initial sample target image, the preset initial ground truth bounding box is configured with an initial sample label, and the initial sample label includes an initial sample orientation label; performing preset image processing on the initial sample image to obtain a sample image, and updating the initial sample label according to the preset image processing procedure to determine the sample label; wherein, performing preset image processing on the initial sample image to obtain a sample image, and updating the initial sample label according to the preset image processing procedure to determine the sample label includes: if it is determined that the initial sample image will be rotated, then before performing the rotation image processing, a preset angle is determined, wherein... The preset angle is the angle in the preset angle set that is closest to the rotation angle corresponding to the image rotation processing; the initial sample image is rotated to the first position corresponding to the preset angle, and the first order of the first corner point coordinates is determined according to a preset sorting method, wherein the first corner point coordinates are the coordinates of the corner point of the preset initial true bounding box after the preset angle rotation, and the preset sorting method includes sorting by the size of the absolute values ​​of the coordinates of the preset coordinate axes; after restoring the initial sample image to its initial position before rotation, the initial sample image is rotated to the second position corresponding to the rotation angle, the initial sample image at the second position is determined as the sample image, and the second order of the second corner point coordinates is determined according to the preset sorting method. If the second order is the same as the first order, the sample direction corresponding to the preset angle is determined as the sample direction label in the sample label of the sample image.

[0124] Furthermore, the loss function includes: a regression loss function, a confidence loss function, a category loss function, an angle loss function, and a direction loss function. The regression loss function is determined based on the intersection-union ratio of the sample detection box and the preset ground truth box, and the area of ​​the minimum convex closed box of the sample detection box and the preset ground truth box.

[0125] The intelligent image recognition device for target images provided in the embodiments of the present invention can execute the intelligent image recognition method for target images provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0126] Example 4

[0127] Figure 8A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0128] like Figure 8 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0129] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0130] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as intelligent recognition methods for target images.

[0131] In some embodiments, the intelligent image recognition method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the intelligent image recognition method described above can be performed. Alternatively, in other embodiments, processor 41 can be configured to perform the intelligent image recognition method by any other suitable means (e.g., by means of firmware).

[0132] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0134] The computer equipment provided above can be used to execute the intelligent recognition method for target images provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0135] Example 5

[0136] In the context of this invention, the computer-readable storage medium may be a tangible medium, and the computer-executable instructions, when executed by a computer processor, are used to perform an intelligent recognition method for a target image, the method comprising:

[0137] The initial image is input into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model;

[0138] The first feature map is input into the second sub-model to obtain at least three second feature maps of different scales, wherein the second sub-model is constructed based on a feature pyramid network;

[0139] The second feature map is input into the third sub-model to obtain the target information of the target to be identified, and the target image of the target to be identified is determined from the initial image based on the target information. The target information includes location information, category confidence, orientation confidence and deflection angle confidence.

[0140] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by, or in conjunction with, an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0141] The computer equipment provided above can be used to execute the intelligent recognition method for target images provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0142] It is worth noting that in the embodiments of the above-mentioned intelligent recognition device for target images, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0143] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for intelligent recognition of target images, characterized in that, include: The initial image is input into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model; The first feature map is input into the second sub-model to obtain at least three second feature maps of different scales, wherein the second sub-model is constructed based on a feature pyramid network; The second feature map is input into the third sub-model to obtain the target information of the target to be identified, and the target image of the target to be identified is determined from the initial image based on the target information. The target information includes location information, category confidence, orientation confidence and deflection angle confidence. The step of inputting the second feature map into the third sub-model to obtain target information of the target to be identified, and determining the target image of the target to be identified from the initial image based on the target information, includes: The second feature map is input into the third sub-model. For each second feature map, the third sub-model is used to perform a ninth convolution on the current second feature map to obtain the target information of the detection box of the target to be identified. The nonmaximum suppression algorithm is used to filter the target information of the detection box to determine the target position, target direction and target deflection angle of the target detection box; Based on the target position, target direction, and target deflection angle, the image corresponding to the target detection box is cropped from the initial image to obtain the target image of the target to be identified.

2. The method according to claim 1, characterized in that, The first sub-model includes at least a convolutional layer, a batch normalization layer, an activation function layer, and a pooling layer; wherein, inputting the initial image into the first sub-model of the preset feature extraction model yields at least three first feature maps of different scales, including: The initial image is input into a convolutional layer, a batch normalization layer, and an activation function layer to obtain shallow feature maps, mid-level feature maps, and an initial deep feature map with different scales. After performing a first convolution on the initial deep feature map, the result of the first convolution is then pooled to obtain multiple pooling results at different scales, wherein the scale of the initial deep feature map is smaller than that of the shallow feature map and the middle feature map. By concatenating the pooling results of multiple different scales, a deep feature map is obtained, wherein the first feature map includes the deep feature map, the shallow feature map, and the middle feature map.

3. The method according to claim 2, characterized in that, The step of inputting the first feature map into the second sub-model to obtain at least three second feature maps of different scales includes: The first feature map is input into the second sub-model. The second sub-model is used to perform a second convolution on the deep feature map. The result of the second convolution is then subjected to a first upsampling process. The first upsampling result and the middle feature map are then concatenated to obtain the first concatenated feature. After performing a third convolution on the first spliced ​​feature, a second upsampling process is performed on the result of the third convolution, and the second upsampling result and the shallow feature map are spliced ​​together to obtain the second spliced ​​feature. After performing a fourth convolution on the second splicing feature, a fifth convolution is performed on the result of the fourth convolution, and the result of the fifth convolution and the result of the third convolution are spliced ​​together to obtain the third splicing feature. After performing a sixth convolution on the third splicing feature, a seventh convolution is performed on the result of the sixth convolution. The result of the seventh convolution and the result of the second convolution are spliced ​​together to obtain a fourth splicing feature. After performing an eighth convolution on the fourth splicing feature, an eighth convolution result is obtained. The second feature map includes the result of the fourth convolution, the result of the sixth convolution, and the result of the eighth convolution.

4. The method according to claim 1, characterized in that, The method for determining the preset feature extraction model includes: Obtain a sample image containing a preset ground truth bounding box, wherein the sample image contains at least one sample target image, the preset ground truth bounding box is used to define the sample target image, and the preset ground truth bounding box is configured with a sample label; The sample image is input into the first initial sub-model of the preset initial model to obtain at least three first sample feature maps of different scales, wherein the preset initial model includes at least the first initial sub-model, the second initial sub-model and the third initial sub-model; The first sample feature map is input into the second initial sub-model to obtain at least three second sample feature maps of different scales, wherein the second initial sub-model is constructed based on a feature pyramid network; The second sample feature map is input into the third initial sub-model to obtain the sample target information of the sample detection box of the sample target to be identified, wherein the sample target information includes sample location information, sample category confidence, sample orientation confidence and sample deflection angle confidence; Based on the sample target information and the sample label, a loss function is determined, and the preset initial model is trained using the loss function to obtain a preset feature extraction model.

5. The method according to claim 4, characterized in that, Before obtaining the sample image containing the preset real bounding box, the method further includes: Obtain an initial sample image containing a preset initial ground truth bounding box, wherein the initial sample image contains at least one initial sample target image, the preset initial ground truth bounding box is used to define the initial sample target image, the preset initial ground truth bounding box is configured with an initial sample label, and the initial sample label includes an initial sample orientation label; The initial sample image is subjected to a preset image processing to obtain a sample image, and the initial sample label is updated according to the processing procedure of the preset image processing to determine the sample label; The step of performing preset image processing on the initial sample image to obtain a sample image, and updating the initial sample label according to the preset image processing procedure to determine the sample label includes: If it is determined that the initial sample image will be rotated, a preset angle is determined before the rotation image processing is performed, wherein the preset angle is the angle in the preset angle set that is closest to the rotation angle corresponding to the image rotation processing. The initial sample image is rotated to the first position corresponding to the preset angle, and the first order of the coordinates of the first corner point is determined according to the preset sorting method. The coordinates of the first corner point are the coordinates of the corner point of the preset initial true bounding box after the preset angle is rotated. The preset sorting method includes sorting by the size of the absolute values ​​of the coordinates of the preset coordinate axes. After restoring the initial sample image to its initial position before rotation, the initial sample image is rotated to the second position corresponding to the rotation angle. The initial sample image at the second position is determined as the sample image, and the second order of the second corner point coordinates is determined according to the preset sorting method. If the second order is the same as the first order, the sample direction corresponding to the preset angle is determined as the sample direction label in the sample label of the sample image.

6. The method according to claim 4, characterized in that, The loss function includes: regression loss function, confidence loss function, category loss function, angle loss function, and orientation loss function. The regression loss function is determined based on the intersection-union ratio of the sample detection box and the preset ground truth box, and the area of ​​the minimum convex closed box of the sample detection box and the preset ground truth box.

7. An intelligent recognition device for target images, characterized in that, include: The first feature map determination module is used to input the initial image into the first sub-model of the preset feature extraction model to obtain at least three first feature maps of different scales, wherein the preset feature extraction model includes at least the first sub-model, the second sub-model and the third sub-model; The second feature map determination module is used to input the first feature map into the second sub-model to obtain at least three second feature maps at different scales, wherein the second sub-model is constructed based on a feature pyramid network; The target image determination module is used to input the second feature map into the third sub-model to obtain the target information of the target to be identified, and to determine the target image of the target to be identified from the initial image based on the target information, wherein the target information includes position information, category confidence, orientation confidence and deflection angle confidence; The target image determination module includes: The target information determination unit is used to input the second feature map into the third sub-model, and for each second feature map, use the third sub-model to perform a ninth convolution process on the current second feature map to obtain the target information of the detection box of the target to be identified; The filtering unit is used to filter the target information of the detection box using a non-maximum suppression algorithm to determine the target position, target direction and target deflection angle of the target detection box; The target image determination unit is used to crop the image corresponding to the target detection box from the initial image according to the target position, target direction and target deflection angle, so as to obtain the target image of the target to be identified.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the intelligent recognition method for the target image according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the intelligent recognition method for the target image according to any one of claims 1-6.