A target detection method, device, apparatus and storage medium

By performing feature extraction and transpose on the feature sequence, a target feature matrix containing global information is generated, which solves the problem of inaccurate detection results caused by ignoring global information in the existing technology and improves the accuracy of target detection.

CN113850225BActive Publication Date: 2025-12-23SIWAVE INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111187034.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-12
Publication Date
2025-12-23
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

Existing object detection algorithms ignore global information in the image during convolution operations, resulting in inaccurate detection results.

Method used

By acquiring the feature sequence of the image to be detected, feature extraction and transposition are performed to generate a target feature matrix containing global features, and a recurrent neural network model is used for target detection.

Benefits of technology

It improves the accuracy of target detection, enabling more accurate identification of targets in images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850225B_ABST
    Figure CN113850225B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a target detection method, device and equipment and a storage medium, which obtain at least one feature sequence of a picture to be detected; perform feature extraction and transposition processing on each feature sequence to obtain a target feature matrix; and perform target detection according to each target feature matrix to determine a target detection result. The embodiments solve the problem of inaccurate detection results caused by neglecting global information in the target detection process. Through feature extraction and transposition processing on the feature sequence, each point in the obtained target feature matrix is related to all points, and the global feature of the picture is extracted. When target detection is performed through the target feature matrix, the global feature can be considered, and the accuracy of target detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image processing, and particularly relate to a target detection method and device, equipment and a storage medium. BACKGROUND

[0002] A target detection algorithm is one of the key research directions of computer vision, and the purpose is to detect the target attributes in a picture, including the position, size and category of the target and the like. Existing target detection algorithms can be mainly divided into two categories. One is to directly calculate the candidate frame of the target by using a convolutional neural network, and related algorithms include YOLO, SSD and the like. The other is to judge the category of each pixel point from a pixel level by using an image segmentation method, so as to detect the target in the image. The feature extraction layer of the existing target detection algorithm is composed of multiple layers of convolutional neural networks, and only local information of a picture can be extracted at the input end of the neural network algorithm, and then global information of the picture is gradually extracted.

[0003] The existing target detection algorithm is mainly composed of a convolutional neural network. After a picture is input into the network, a plurality of convolutional layers are used to extract features, and then a prediction network is used to obtain a prediction result. In the convolution operation, different channel numbers of feature layers are generated, and the feature scale also changes. When the convolution operation is performed, the elements in the new feature layer are often only related to the local features of the previous layer, and the whole features cannot be considered. Figure 1 An implementation example of a convolutional network in the prior art for processing a picture is shown, and the convolution implementation process is further described. It is assumed that the channel number of all features is 1, the size of the original picture input is 8x8, the size of the convolution kernel is 2x2, and the convolution step is 2. After the original picture is subjected to the first convolution, feature 1 is obtained, and the size of feature 1 is reduced to 4x4. The values of each point in feature 1 are derived from the values of 4 points in the 1-g mark in the picture 1, that is, each point in feature 1 is only related to the values of 4 points in the picture. Feature 2 is obtained by performing a convolution operation on feature 1, and the size of feature 2 is reduced to 2x2. The values of each point in feature 2 are derived from the values of 4 points in the 1-4 mark in feature 1. For example, the first point of feature 2 is composed of the 4 points in the upper left corner of feature 1, and the 4 points in the upper left corner of feature 1 are obtained by performing a convolution operation on the pixel points in 1, 2, 5 and 6 in the original picture. Then, the value of the first point in the upper left corner of feature 2 is related to the values of 16 points in the upper left corner of 1, 2, 4 and 5 in the original picture. From the above process, it can be seen that the feature obtained by the convolution operation is only derived from the local information of the previous layer, and the whole information is ignored, so that the accuracy of the picture detection is low when the picture is recognized due to the ignored global information. SUMMARY

[0004] The application provides a target detection method, device and equipment and a storage medium to realize accurate detection of a target.

[0005] In a first aspect, the application provides a target detection method, which comprises the following steps.

[0006] At least one feature sequence of a picture to be detected is acquired.

[0007] Feature extraction and transposition processing are performed on each feature sequence to obtain a target feature matrix.

[0008] Target detection is performed according to each target feature matrix to determine a target detection result.

[0009] In a second aspect, the application also provides a target detection device, which comprises the following modules.

[0010] A sequence acquisition module is configured to acquire at least one feature sequence of a picture to be detected.

[0011] A sequence processing module is configured to perform feature extraction and transposition processing on each feature sequence to obtain a target feature matrix.

[0012] A detection module is configured to perform target detection according to each target feature matrix to determine a target detection result.

[0013] In a third aspect, the application also provides a computer device, which comprises the following modules.

[0014] One or more processors;

[0015] A memory is configured to store one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement a target detection method as described in any of the embodiments of the application.

[0017] In a fourth aspect, the application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement a target detection method as described in any of the embodiments of the application.

[0018] This invention provides a target detection method, apparatus, device, and storage medium. The method involves acquiring at least one feature sequence of an image to be detected; performing feature extraction and transposition on each feature sequence to obtain a target feature matrix; and performing target detection based on the target feature matrix to determine the target detection result. This solves the problem of inaccurate detection results caused by ignoring global information during target detection. By performing feature extraction and transposition on the feature sequences, each point in the obtained target feature matrix is ​​correlated with all points, thus extracting global features of the image. Therefore, when performing target detection using the target feature matrix, global features can be considered, improving the accuracy of target detection. Attached Figure Description

[0019] Figure 1 This is an example diagram illustrating how a convolutional network processes images in existing technology.

[0020] Figure 2 This is a flowchart of a target detection method according to Embodiment 1 of the present invention;

[0021] Figure 3 This is a flowchart of a target detection method according to Embodiment 2 of the present invention;

[0022] Figure 4 This is an example diagram of a network structure for implementing a target detection method according to Embodiment 2 of the present invention;

[0023] Figure 5 This is an example diagram illustrating the implementation of determining the target feature matrix in a target detection method according to Embodiment 2 of the present invention;

[0024] Figure 6 This is a schematic diagram of the structure of a target detection device according to Embodiment 3 of the present invention;

[0025] Figure 7 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0027] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0028] In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to 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 existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0029] Example 1

[0030] Figure 2 A flowchart of a target detection method provided in Embodiment 1 of this application is given. This method is suitable for situations where high accuracy detection results are obtained when target detection is performed early. This method can be executed by a computer device, which can consist of two or more physical entities, or a single physical entity. Generally, the computer device can be a laptop, desktop computer, or smart tablet, etc.

[0031] like Figure 2 As shown in the figure, the target detection method provided in this embodiment includes the following steps:

[0032] S101. Obtain at least one feature sequence of the image to be detected.

[0033] In this embodiment, the image to be detected can be specifically understood as an image requiring detection. Taking autonomous driving as an example, the image acquisition device on the vehicle acquires images during vehicle operation. These images may include buildings, pedestrians, motor vehicles, and non-motor vehicles. The acquired images are used as the images to be detected for target detection, enabling the identification of pedestrians, motor vehicles, and non-motor vehicles, providing a basis for autonomous driving, such as route planning based on the identification results. The feature sequence can be specifically understood as a sequence of pixel values ​​in different dimensions within the image.

[0034] Specifically, a to-be-detected picture is acquired, sequence conversion is performed on the to-be-detected picture, pixel values are extracted from different color channels to obtain corresponding feature sequences, or a converted feature sequence is directly acquired. The number of feature sequences is the same as the number of picture color channels of the to-be-detected picture.

[0035] In S102, feature extraction and transposition processing are performed on each feature sequence to obtain a target feature matrix.

[0036] In this embodiment, the target feature matrix can be specifically understood as a feature matrix containing global feature information. The value of each data item in the target feature matrix is related to all points in the feature sequence.

[0037] Specifically, feature extraction is performed on the feature sequence by using a feature extraction algorithm, and then transposition processing is performed, and the feature extraction and the transposition processing are repeatedly performed, so that each point is related to all points in the sequence, and the obtained target feature matrix contains global information. Each feature sequence is processed by using the same processing mode.

[0038] In S103, target detection is performed according to each target feature matrix to determine a target detection result.

[0039] In this embodiment, the target detection result can be specifically understood as a detection result of a target contained in the to-be-detected picture. For example, the to-be-detected picture contains a background picture of pedestrians, vehicles (motor vehicles and non-motor vehicles), buildings and the like, and the target detection result can be the positions of the pedestrians and the vehicles. The pedestrians and the vehicles are framed by using a detection frame, and then the position positioning of the pedestrians and the vehicles is realized. The target feature matrix is processed by using a feature extraction algorithm and a prediction network model, a possible target is detected, the position of the target is framed by using a detection frame, and then the target detection result is obtained. The target detection result can also include a probability, for example, the probability that the target framed by the detection frame is a pedestrian, the probability that the target is a motor vehicle, the probability that the target is a non-motor vehicle, and the like.

[0040] The embodiment of the present application provides a target detection method, at least one feature sequence of a to-be-detected picture is acquired, feature extraction and transposition processing are performed on each feature sequence to obtain a target feature matrix, and target detection is performed according to each target feature matrix to determine a target detection result. The problem that the detection result is inaccurate due to the neglect of global information in the target detection process is solved. Feature extraction and transposition processing are performed on the feature sequence, so that each point in the obtained target feature matrix is related to all points, and the global feature of the picture is extracted. Then, the global feature can be considered when target detection is performed by using the target feature matrix, and the accuracy of the target detection is improved.

[0041] Embodiment two

[0042] Figure 3A flow chart of a target detection method provided for the second embodiment of the present application. The technical solution of the present embodiment is further refined on the basis of the technical solution described above, and specifically mainly includes the following steps:

[0043] S201, acquire a picture to be detected.

[0044] S202, determine the color channels of the picture to be detected.

[0045] Specifically, when the picture to be detected is a grayscale picture, the color channels only have one; when the picture to be detected is a color picture, the color channels include R, G and B three channels.

[0046] S203, perform sequence conversion according to each color channel to obtain a feature sequence corresponding to each color channel.

[0047] Perform sequence conversion on each color channel respectively, select the width or height of the picture as the sequence length, and correspondingly, the height or width as the dimension, extract the pixel value to obtain the feature sequence corresponding to each color channel.

[0048] As an optional embodiment of the present embodiment, the sequence conversion according to each color channel to obtain the feature sequence corresponding to each color channel is further optimized as:

[0049] A1, for each color channel, perform conversion according to the row direction of the picture to be detected to obtain a feature sequence with a length of a target width and a feature dimension of a target height.

[0050] In the present embodiment, the target width is the width of the picture to be detected, and the target height is the height of the picture to be detected.

[0051] Taking the width W and the height H of the picture to be detected as an example, correspondingly, the target width is W and the target height is H. For each color channel, the corresponding feature sequence is determined. The pixel value of the pixel point of the picture to be detected is extracted along the row direction to obtain a feature sequence with a length of W and a feature dimension of H.

[0052] A2, or, perform conversion according to the column direction of the picture to be detected to obtain a feature sequence with a length of a target height and a feature dimension of a target width.

[0053] When the picture to be detected is converted into a feature sequence, conversion can also be performed along the column direction. The pixel value of the pixel point of the picture to be detected is extracted along the column direction to obtain a feature sequence with a length of H and a feature dimension of W.

[0054] S204, determine the target processing number of each feature sequence.

[0055] In the embodiment, the feature sequence is repeatedly processed according to the requirement, and n times of feature extraction and transposition processing are regarded as one complete processing. The target processing number can be understood as the number of times of processing the feature sequence. In the case of ensuring that the sizes of the target feature matrices corresponding to the feature sequences are the same, the target processing numbers of the feature sequences are usually set to the same size to reduce the processing complexity. The target processing number of the feature sequence can be set in advance, and the target processing number of the feature sequence set in advance is directly obtained when the feature sequence is processed.

[0056] In the embodiment, the current processing number can be understood as the number of times of processing the feature sequence at present, that is, the number of times of processing the feature sequence at present. Before processing the feature sequence, the current processing number is set to 0, and the feature sequence is regarded as a current to-be-processed matrix.

[0057] In the embodiment, the current processing number can be understood as the number of times of processing the feature sequence at present, that is, the number of times of processing the feature sequence at present. Before processing the feature sequence, the current processing number is set to 0, and the feature sequence is regarded as a current to-be-processed matrix.

[0058] In the embodiment, the current processing number can be understood as the number of times of processing the feature sequence at present, that is, the number of times of processing the feature sequence at present. Before processing the feature sequence, the current processing number is set to 0, and the feature sequence is regarded as a current to-be-processed matrix.

[0059] In the embodiment, the recurrent neural network model is a pre-trained neural network model, and the recurrent neural network model can process a long sequence. The target processing matrix can be understood as a feature matrix obtained after one complete processing. The current to-be-processed matrix is processed by the recurrent neural network model for multiple times of feature extraction, and the matrix after the feature extraction is transposed to obtain the target processing matrix.

[0060] As an optional embodiment of the embodiment, the optional embodiment further optimizes the step of obtaining the target processing matrix based on the predetermined recurrent neural network model to:

[0061] B1, inputting the current to-be-processed matrix into the predetermined first recurrent neural network model to obtain a first feature matrix output by the first recurrent neural network model.

[0062] In the embodiment, the first recurrent neural network model is one of recurrent neural network models. The first feature matrix is a feature matrix processed by the first recurrent neural network model. The first recurrent neural network model is obtained by training according to training samples in advance. The current to-be-processed matrix is input into the first recurrent neural network model, and the first recurrent neural network model processes the current to-be-processed matrix according to learned experience to obtain and output the first feature matrix. Taking the length of the feature sequence as W and the feature dimension as H as an example, the length of the current to-be-processed matrix is W and the feature dimension is H. The width of the obtained first feature matrix is W and the feature dimension is H1, and the size of H1 depends on the dimension of the hidden state of the first recurrent neural network model. The number of convolution layers of the first recurrent neural network model can be one layer or multiple layers.

[0063] B2, determining whether the feature dimension of the first feature matrix is the same as the feature dimension of the current to-be-processed matrix, if yes, performing B3; otherwise, performing B4.

[0064] If the feature dimension of the first feature matrix is the same as the feature dimension of the current to-be-processed matrix, whether performing steps B3-B6 to process the first feature matrix, the result is consistent. In the case that the feature dimension of the first feature matrix is the same as the feature dimension of the current to-be-processed matrix, B3 is performed. In the case that the feature dimension of the first feature matrix is different from the feature dimension of the current to-be-processed matrix, B4-B6 are performed to process the first feature matrix to obtain the target processing matrix.

[0065] B3, determining the first feature matrix as the target processing matrix.

[0066] B4, performing transpose processing on the first feature matrix to obtain a second feature matrix.

[0067] In the embodiment, the second feature matrix is a feature matrix after transpose processing. The first feature matrix is transposed to obtain a second feature matrix with a length of H1 and a feature dimension of W.

[0068] B5, inputting the second feature matrix into a predetermined second recurrent neural network model to obtain a third feature matrix output by the second recurrent neural network model.

[0069] In this embodiment, the second recurrent neural network model is one of the recurrent neural network models. The second recurrent neural network model can be the same as or different from the first recurrent neural network model. The third feature matrix is a feature matrix processed by the second recurrent neural network model. The second recurrent neural network model is obtained by pre-training according to training samples, or the first recurrent neural network model is directly used as the second recurrent neural network model. The current to-be-processed matrix is input into the second recurrent neural network model, and the second recurrent neural network model processes the second feature matrix according to learned experience to obtain and output the third feature matrix. The width of the third feature matrix is H1, and the feature dimension is W1. The size of W1 depends on the dimension of the hidden state of the second recurrent neural network model. The number of convolution layers of the second recurrent neural network model can be one layer or multiple layers.

[0070] B6, performing transpose processing on the third feature matrix to obtain a target processing matrix.

[0071] The third feature matrix is transposed to obtain a target processing matrix with a length of W1 and a feature dimension of H1.

[0072] S207, accumulating the current processing number by 1.

[0073] S208, determining whether the current processing number is greater than or equal to the target processing number. If yes, performing S209; otherwise, performing S210.

[0074] S209, determining the target processing matrix as the target feature matrix, and performing S211.

[0075] S210, taking the target processing matrix as a new current to-be-processed matrix, and returning to perform S206.

[0076] If the current processing number is greater than or equal to the target processing number, the current processing of the feature matrix is completed, and the target processing matrix is directly taken as the target feature matrix. If the current processing number is less than the target processing number, the processing of the feature matrix is not completed, and the processing is continued, that is, the target processing matrix is taken as a new current to-be-processed matrix, and S206 is returned to continue to extract features from the current to-be-processed matrix by the recurrent neural network model, and to obtain the target processing matrix by transpose processing.

[0077] S211, inputting each target feature matrix into a predetermined target detection network model.

[0078] In this embodiment, the target detection network model can be specifically understood as a neural network model used for target detection. The target detection network model in this application includes a convolution feature extraction and prediction network, and realizes feature extraction and target prediction.

[0079] Specifically, the neural network model is trained in advance to obtain a target detection network model satisfying a convergence condition. The target detection network model can realize detection of a target, prediction of a target type contained in a picture, and prediction of a probability, etc. A target is framed and displayed by a detection frame. Each target feature matrix is input into the target detection network model, and the target detection network model processes each target feature matrix according to network parameters.

[0080] S212, determining a target detection result of the picture to be detected according to an output result of the target detection network model.

[0081] The output result of the target detection network model can be a picture to be detected containing a detection frame, and can also output a type and a probability of each detection frame. For example, the type of the detection frame 1 is a pedestrian, and the probability is 0.8. The output result of the target detection network model is the target detection result of the picture to be detected.

[0082] It can be known that the target detection network model in the present application can also be other deep learning models.

[0083] Exemplarily, Figure 4 An example diagram of a network structure for implementing a target detection method is provided. A picture to be detected 31 is converted into a feature sequence in a row direction, a width W is kept as a sequence length, and a height H direction is taken as a sequence feature, to obtain a feature sequence F0 corresponding to one color channel, where N0 is the color channel. The present application takes the feature sequence F0 corresponding to one color channel and a target processing number equal to 1 as an example to explain the process of determining a target detection result. The feature sequence F0 is input into a first recurrent neural network model 32 as a current matrix to be processed, to obtain a first feature matrix F1 with a width W and a feature dimension H1. Assuming that the feature dimension of the first feature matrix F1 is different from the feature dimension of the current matrix to be processed, the first feature matrix F1 is transposed to convert it into a second feature matrix F2 with a sequence length H1 and a feature dimension W. The second feature matrix F2 is input into a second recurrent neural network model 33 to obtain a third feature matrix F3 with a width H1 and a feature dimension W1. The third feature matrix F3 is transposed to obtain a target processing matrix F4 with a dimension W1xH1. The target processing matrix F4 is processed by a target detection network model 34 to obtain a target detection result 35 of the picture to be detected 31.

[0084] Figure 5 An example diagram for determining a target feature matrix in a target detection method is provided. To further explain how the algorithm extracts global information, the following describes the process of determining a target feature matrix by taking a picture to be detected 41 as an example. Figure 5Explain. Assume that the size of the picture to be detected is 8x8, and the number of color channels is 1. The picture to be detected can be converted into a feature sequence F0 with a length of 8 and a feature dimension of 8. After passing through the first recurrent neural network model 32, the output is a first feature matrix F1 with a dimension of 8x4. After transposition, the second feature matrix F2 is obtained. The dimension of the second feature matrix is 4x8, which can be regarded as a sequence with a length of 4 and a feature dimension of 8. After passing through the second recurrent neural network model 33, the third feature matrix F3 with a dimension of 4x4 is output. After transposition, the target processing matrix is obtained. The value of each point in the target processing matrix is related to the value of each point in the picture to be detected, thereby containing the global information of the picture data. The network input end of the target detection network model 34 is increased with a recurrent neural network, and the global feature information is extracted by combining the transposition operation. The target detection network model 34 can use the obtained global feature information for target detection, and can improve the detection accuracy of the algorithm.

[0085] The embodiment of the present application provides a target detection method, which comprises the following steps: acquiring at least one feature sequence of a picture to be detected; performing feature extraction and transposition processing on each feature sequence to obtain a target feature matrix; and performing target detection according to each target feature matrix to determine a target detection result. The problem of inaccurate detection results caused by ignoring global information in the target detection process is solved. The feature sequence is processed by a recurrent neural network model, and the processed feature matrix is transposed. Each point in the final obtained target feature matrix is related to all points in the picture to be detected, thereby extracting the global features of the picture. When target detection is performed by using the target feature matrix, the global features can be considered, and the accuracy of target detection is improved.

[0086] Embodiment three

[0087] Figure 6 The structure diagram of a target detection device provided by the embodiment three of the present application is shown in the figure. The device comprises a sequence acquisition module 41, a sequence processing module 42 and a detection module 43.

[0088] The sequence acquisition module 41 is used for acquiring at least one feature sequence of a picture to be detected.

[0089] The sequence processing module 42 is used for performing feature extraction and transposition processing on each feature sequence to obtain a target feature matrix.

[0090] The detection module 43 is used for performing target detection according to each target feature matrix to determine a target detection result.

[0091] The embodiment of the present application provides a target detection device, at least one feature sequence of a picture to be detected is acquired; feature extraction and transposition processing are performed on each feature sequence to obtain a target feature matrix; target detection is performed according to each target feature matrix to determine a target detection result. The problem that the detection result is inaccurate due to the neglect of global information in the target detection process is solved. Through the feature extraction and transposition processing on the feature sequence, each point in the obtained target feature matrix is related to all points, and the global feature of the picture is extracted. Then, the global feature can be considered when the target detection is performed through the target feature matrix, and the accuracy of the target detection is improved.

[0092] Further, the sequence acquisition module 41 comprises:

[0093] A picture acquisition unit is configured to acquire a picture to be detected.

[0094] A channel determination unit is configured to determine a color channel of the picture to be detected.

[0095] A sequence acquisition unit is configured to perform sequence conversion according to each color channel to obtain a feature sequence corresponding to each color channel.

[0096] Further, the sequence acquisition unit is configured to, for each color channel, perform conversion according to a row direction of the picture to be detected to obtain a feature sequence with a length of a target width and a feature dimension of a target height, or perform conversion according to a column direction of the picture to be detected to obtain a feature sequence with a length of a target height and a feature dimension of a target width, wherein the target width is the width of the picture to be detected, and the target height is the height of the picture to be detected.

[0097] Further, the sequence processing module 42 comprises:

[0098] A processing number determination unit is configured to determine a target processing number of each feature sequence.

[0099] An initialization unit is configured to set a current processing number of the feature sequence to 0 and take the feature sequence as a current to-be-processed matrix.

[0100] A processing unit is configured to perform feature extraction and transposition processing on the current to-be-processed matrix based on a predetermined recurrent neural network model to obtain a target processing matrix.

[0101] An accumulation unit is configured to accumulate the current processing number by 1.

[0102] The judgment unit is used to determine whether the current number of processing times is greater than or equal to the target number of processing times. If so, the target processing matrix is ​​determined as the target feature matrix; otherwise, the target processing matrix is ​​used as the new current matrix to be processed, and the operation of determining the target processing matrix is ​​returned.

[0103] Further, the processing unit is specifically configured to input the current matrix to be processed into a predetermined first recurrent neural network model to obtain a first feature matrix output by the first recurrent neural network model; determine whether the feature dimension of the first feature matrix is ​​the same as the feature dimension of the current matrix to be processed; if so, determine the first feature matrix as the target processing matrix; otherwise, transpose the first feature matrix to obtain a second feature matrix; input the second feature matrix into a predetermined second recurrent neural network model to obtain a third feature matrix output by the second recurrent neural network model; and transpose the third feature matrix to obtain the target processing matrix.

[0104] Furthermore, the detection module 43 includes:

[0105] The input unit is used to input each of the target feature matrices into a pre-determined target detection network model;

[0106] The detection result determination unit is used to determine the target detection result of the image to be detected based on the output result of the target detection network model.

[0107] The target detection device provided in the embodiments of the present invention can execute the target detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0108] Example 4

[0109] Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention, as shown below. Figure 7 As shown, the device includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of processors 50 in the device can be one or more. Figure 7 Taking a processor 50 as an example; the processor 50, memory 51, input device 52, and output device 53 in the device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.

[0110] The memory 51 can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the target detection method in the embodiments of the present application (for example, the sequence acquisition module 41, the sequence processing module 42 and the detection module 43 in the target detection device). The processor 50 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 51, that is, implements the target detection method described above.

[0111] The memory 51 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the terminal and the like. In addition, the memory 51 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 51 can further include a memory remotely arranged with respect to the processor 50, which can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0112] The input device 52 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 53 can include a display device such as a display screen.

[0113] Embodiment five

[0114] The embodiment five of the present application also provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to execute a target detection method, the method comprising:

[0115] Obtaining at least one feature sequence of a picture to be detected;

[0116] Performing feature extraction and transposition processing on each of the feature sequences to obtain a target feature matrix;

[0117] Performing target detection according to each of the target feature matrices to determine a target detection result.

[0118] Of course, the computer executable instructions of the storage medium provided by the embodiment of the present application are not limited to the method operations described above, but can also perform related operations in the target detection method provided by any embodiment of the present application.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0120] It is worth noting that in the above embodiments of the target detection device, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual differentiation, and do not limit the protection scope of the present application.

[0121] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A target detection method characterized by, The method comprises the following steps: obtaining at least one feature sequence of a to-be-detected picture; performing feature extraction and transposition processing on each feature sequence to obtain a target feature matrix; performing target detection according to each target feature matrix to determine a target detection result; wherein, the feature extraction and transposition processing on each feature sequence to obtain a target feature matrix comprises: for each feature sequence, determining a target processing number of the feature sequence; the target processing number is a number of times that the feature sequence needs to be processed which is set in advance; setting a current processing number of the feature sequence to 0 and taking the feature sequence as a current to-be-processed matrix; performing feature extraction and transposition processing on the current to-be-processed matrix based on a predetermined recurrent neural network model to obtain a target processing matrix; accumulating the current processing number by 1; determining whether the current processing number is greater than or equal to the target processing number, if yes, taking the target processing matrix as the target feature matrix; otherwise, taking the target processing matrix as a new current to-be-processed matrix and returning to perform the operation of determining the target processing matrix; the feature extraction and transposition processing on the current to-be-processed matrix based on a predetermined recurrent neural network model to obtain a target processing matrix comprises: inputting the current to-be-processed matrix into a predetermined first recurrent neural network model to obtain a first feature matrix output by the first recurrent neural network model; the first recurrent neural network model is one of recurrent neural network models; determining whether the feature dimension of the first feature matrix is the same as the feature dimension of the current to-be-processed matrix, if yes, taking the first feature matrix as the target processing matrix; otherwise, performing transposition processing on the first feature matrix to obtain a second feature matrix; inputting the second feature matrix into a predetermined second recurrent neural network model to obtain a third feature matrix output by the second recurrent neural network model; performing transposition processing on the third feature matrix to obtain the target processing matrix.

2. The method of claim 1, wherein, The method comprises the following steps: obtaining a to-be-detected picture; determining color channels of the to-be-detected picture; performing sequence conversion according to each color channel to obtain a feature sequence corresponding to each color channel.

3. The method of claim 2, wherein, The sequence conversion according to each color channel to obtain a feature sequence corresponding to each color channel comprises: for each color channel, performing conversion according to the row direction of the to-be-detected picture to obtain a feature sequence with a target width as the length and a target height as the feature dimension; or performing conversion according to the column direction of the to-be-detected picture to obtain a feature sequence with a target height as the length and a target width as the feature dimension; wherein, the target width is the width of the to-be-detected picture, and the target height is the height of the to-be-detected picture.

4. The method of claim 1, wherein, The method comprises the following steps: inputting each target feature matrix into a predetermined target detection network model; determining a target detection result of the to-be-detected picture according to the output result of the target detection network model.

5. A target detection apparatus characterized by comprising: The method comprises the following steps: The sequence obtaining module is configured to obtain at least one feature sequence of a picture to be detected. The sequence processing module is configured to perform feature extraction and transposition processing on each feature sequence to obtain a target feature matrix. The detection module is configured to perform target detection according to each target feature matrix to determine a target detection result. The sequence processing module further includes: The processing number determining unit is configured to determine, for each feature sequence, a target processing number of the feature sequence; the target processing number is a number of times of processing of the feature sequence that is set in advance. The initialization unit is configured to set a current processing number of the feature sequence to 0 and take the feature sequence as a current to-be-processed matrix. The processing unit is configured to perform feature extraction and transposition processing on the current to-be-processed matrix based on a pre-determined recurrent neural network model to obtain a target processing matrix. The accumulation unit is configured to accumulate the current processing number by 1. The judgment unit is configured to determine whether the current processing number is greater than or equal to the target processing number; if yes, the target processing matrix is determined as a target feature matrix; otherwise, the target processing matrix is taken as a new current to-be-processed matrix, and the operation of determining the target processing matrix is performed again. The processing unit is further configured to input the current to-be-processed matrix into a pre-determined first recurrent neural network model to obtain a first feature matrix output by the first recurrent neural network model; the first recurrent neural network model is one of recurrent neural network models. The judgment unit is configured to determine whether a feature dimension of the first feature matrix is same as a feature dimension of the current to-be-processed matrix; if yes, the first feature matrix is determined as the target processing matrix; otherwise, The first feature matrix is subjected to transposition processing to obtain a second feature matrix. The second feature matrix is input into a pre-determined second recurrent neural network model to obtain a third feature matrix output by the second recurrent neural network model. The third feature matrix is subjected to transposition processing to obtain the target processing matrix.

6. The apparatus of claim 5, wherein, The sequence obtaining module includes: The picture obtaining unit is configured to obtain a picture to be detected. The channel determining unit is configured to determine color channels of the picture to be detected. The sequence obtaining unit is configured to perform sequence conversion according to each color channel to obtain a feature sequence corresponding to each color channel.

7. A computer device, comprising: The device includes: One or more processors; Memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the target detection method according to any one of claims 1-4.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the target detection method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Bill image text detection and recognition method

    CN110033000A

  • Target detection method and device, computer readable storage medium and computer device

    CN110309876A