Target detection method, system and in-memory computing chip
By deploying the target detection network and neural network on the in-memory computing chip, end-to-end target detection is achieved, solving the problems of target detection complexity and high energy consumption under the von Neumann architecture, and providing high parallelism and low energy consumption. Ultra-low power consumption detection system.
Patent Information
- Application Number
- CN202210694506.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-17
AI Technical Summary
The traditional von Neumann architecture has "storage wall" and "power wall" problems in big data AI calculations, resulting in high complexity and high energy consumption of target detection algorithms. In particular, non-maximum suppression algorithms need to be run on the CPU. Done, increasing system complexity.
Deploy the target detection network, message communication neural network and feature post-processing neural network on the in-memory computing chip to achieve end-to-end target detection, avoid using the CPU, and use the learnable NMS network to remove redundant frames, reducing system complexity and functionality. Consumption.
It simplifies the system architecture, reduces development and deployment costs, achieves high-parallel, low-energy target detection, and provides an ultra-low-power detection system.
Smart Images

Figure CN114998705B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a target detection method, system and in-memory computing chip. Background Art
[0002] The von Neumann architecture is commonly used in modern computer system structures. In this architecture, the processor that performs computing tasks and the memory responsible for data storage are usually separated from each other. Therefore, each time the processor performs an operation, it needs to read data from the memory into the processor, wait for the data to be processed, and then write it back to the memory. Under AI computing based on big data, the "storage wall" and "power consumption wall" challenges of the von Neumann architecture are highlighted. The so-called "storage wall" problem refers to the growing gap between memory performance and operator performance; and the "power consumption wall" problem refers to the high energy cost of moving data back and forth between the memory and the operator.
[0003] Target detection is one of the basic tasks in the field of machine vision. Its core work is to detect and identify target objects in image information. Therefore, it is also used in various application scenarios, such as target detection in video surveillance. Its effect will directly affect the subsequent tracking, action recognition and behavior description. In related technologies, target detection usually requires the use of non-maximum suppression (NMS) algorithm. From the algorithm flow of NMS, it can be seen that the algorithm has a large number of loops and sorting operations, which need to be completed by a CPU based on the traditional von Neumann architecture. In this case, it is also necessary to design additional data buses, drivers, etc. between the CPU based on the traditional von Neumann architecture and the in-memory computing chip as an accelerator, making the system more complicated. Summary of the invention
[0004] The purpose of the present invention is to provide a target detection method, system and in-memory computing chip to reduce the deployment complexity of the target detection method. End-to-end target detection can be achieved only on the in-memory computing chip without using a CPU, and system power consumption can be reduced.
[0005] In order to achieve the above object, in a first aspect, the present invention provides a target detection method, which is applied to an in-memory computing chip, in which a target detection network, a message communication neural network, and a feature post-processing neural network are all deployed, and the method comprises:
[0006] Acquire the image to be detected;
[0007] Inputting the image to be detected into the target detection network, obtaining first anchor point feature information in the image to be detected output by the target detection network, wherein each anchor point corresponds to a candidate prediction box;
[0008] Inputting the first anchor point feature information into the message communication neural network, so that the message communication neural network performs a convolution operation on the first anchor point feature information to obtain second anchor point feature information;
[0009] Inputting the second anchor point feature information into the feature post-processing neural network to obtain target confidence of each of the plurality of anchor points;
[0010] According to the target confidence, a target frame is determined from multiple candidate prediction frames, and information of the target frame is sent to a display device so that the display device displays the target frame.
[0011] Optionally, the message communication neural network is trained in the following manner:
[0012] Get training images from the training dataset;
[0013] Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point;
[0014] Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point;
[0015] According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames;
[0016] Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame;
[0017] The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
[0018] Optionally, the message communication neural network includes a Concatenate network, and the message communication neural network is used to obtain the second anchor point feature information in the following manner:
[0019] The Concatenate network concatenates the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature;
[0020] The anchor point feature information output by the Concatenate network is convolutionally compressed to obtain the second anchor point feature information.
[0021] Optionally, the message communication neural network is a learnable NMS network.
[0022] In a second aspect, the present invention provides a target detection system, wherein the system is deployed in an in-memory computing chip, and the target detection network, message communication neural network, and feature post-processing neural network included in the system are all deployed in the in-memory computing chip;
[0023] The target detection network is used to process the image to be detected to obtain first anchor point feature information in the image to be detected, wherein each anchor point corresponds to a candidate prediction box;
[0024] The message communication neural network is used to perform a convolution operation on the first anchor point feature information to obtain second anchor point feature information;
[0025] The feature post-processing neural network is used to obtain target confidence of each of the plurality of anchor points according to the feature information of the second anchor point;
[0026] A result output module is used to determine a target frame from multiple candidate prediction frames according to the target confidence, and send information of the target frame to a display device so that the display device displays the target frame.
[0027] Optionally, the message communication neural network is trained in the following manner:
[0028] Get training images from the training dataset;
[0029] Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point;
[0030] Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point;
[0031] According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames;
[0032] Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame;
[0033] The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
[0034] Optionally, the message communication neural network includes a Concatenate network:
[0035] The Concatenate network is used to concatenate the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature;
[0036] The message communication neural network is used to perform convolution compression on the anchor point feature information output by the Concatenate network to obtain the second anchor point feature information.
[0037] Optionally, the message communication neural network is a learnable NMS network.
[0038] In a third aspect, the present invention provides an in-memory computing chip, comprising the target detection system provided by any embodiment of the second aspect of the present invention.
[0039] Through the above technical solution, firstly, the target detection network, message communication neural network, and feature post-processing neural network are all deployed in the in-memory computing chip, and there is no need to use the CPU for target detection, which reduces the design complexity of the target detection method and solves the problem that the traditional target detection algorithm requires a CPU based on the von Neumann architecture, thus simplifying the overall system architecture and indirectly reducing the development and deployment costs. Secondly, since the end-to-end target detection method is implemented on the in-memory computing chip, the entire target detection network can enjoy the benefits of high parallelism and low energy consumption of in-memory computing, providing a feasible means of realizing ultra-low power target detection systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of CrossBar, the core unit in the in-memory computing chip architecture.
[0041] Figure 2 It is a schematic diagram of the main steps of the traditional NMS algorithm.
[0042] Figure 3 It is a deployment structure diagram of the target detection algorithm in the related technology.
[0043] Figure 4 It is the parameter processing process of the target detection network.
[0044] Figure 5 It is a flow chart of the target detection method.
[0045] Figure 6 It is a deployment structure diagram of the target detection algorithm in the present invention.
[0046] Figure 7 It is a specific implementation process diagram of the target detection method.
[0047] Figure 8 It is a schematic diagram of the training method of the message communication neural network. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0049] Before introducing the embodiments of the present invention, the problems existing in the related art are first analyzed.
[0050] In recent years, with the technological advancement of target detection algorithms and edge computing devices, many designs for edge target detection devices have appeared on the market. A complete design solution includes two parts: algorithm design and chip architecture selection. From the perspective of algorithm design, target detection algorithms usually include two core steps: deep learning-based detection networks and non-maximum suppression. This type of target detection algorithm usually runs on a general-purpose processor based on the von Neumann architecture. From the perspective of chip architecture selection, the non-maximum suppression algorithm is not suitable for in-memory computing chip architectures, so it is usually necessary to use additional chips (such as general-purpose processors based on the von Neumann architecture) in addition to the in-memory computing chip to assist in completing the non-maximum suppression function, and the system complexity is high.
[0051] In order to solve or improve the "storage wall" and "power wall" problems of the von Neumann architecture, the in-memory computing architecture integrates logic units and storage units, and performs operations directly inside the storage units, alleviating the bandwidth and latency bottlenecks between the processor and the memory, and reducing the energy consumption caused by data transfer. In addition, the in-memory computing architecture uses memory arrays to complete large-scale parallel operations, which is suitable for highly parallel operations such as matrix multiplication. This is another major advantage compared to the traditional von Neumann architecture that executes instructions sequentially. At present, the core of AI based on deep learning is large-scale matrix operations. Under the in-memory computing architecture, large-scale matrix operations can be efficiently mapped to the Crossbar array. Figure 1 As shown, if you want to complete the dot multiplication operation between matrix W and vector X, where matrix W includes w1, w2, w3, w4, w5, w6, w7, w8, w9, and vector X includes x1, x2, x3, Crossbar saves the data in matrix W in the form of resistance, and vector X is input in the form of voltage. According to Ohm's law, the output of Crossbar is the result of the matrix dot multiplication operation in the form of current. Therefore, the Crossbar in the in-memory computing architecture can also be said to be a "natural" matrix multiplication operation unit. Compared with the traditional von Neumann architecture that sequentially fetches instructions, fetches several data each time for multiplication or addition operations, and finally stores the results back to the memory, the in-memory computing architecture has great power consumption advantages. For example Figure 1 As shown, CrossBar completes one operation as shown in the figure, and the traditional CPU needs 9 multiplication operations and 6 addition operations.
[0052] In order to improve the accuracy of the target detection algorithm, the mainstream algorithm divides the target detection task into two steps. In the first step, the target detection algorithm finds as many target boxes as possible as candidates to cover the vast majority of objects in the scene. However, this may cause the algorithm to propose multiple candidate target boxes for an object, and these target boxes are highly overlapping. Therefore, in the second step, it is usually necessary to use the non-maximum suppression algorithm (NMS) to delete redundant candidate target boxes and retain the most desired candidate target box as the final detection result.
[0053] The key operations of the NMS algorithm are as follows: Figure 2As shown. R represents the target frame coordinate set that is finally retained, B represents the coordinate information set of the candidate target frame proposed by AI, and S represents the confidence set of the candidate target frame proposed by AI. The overall process is: when B is not empty, continuously take out a highest score s from S (one by one in order from high to low), and the corresponding candidate target frame coordinate information H, and add H to R, and delete H from B. Then traverse the remaining B sets, and delete the coordinate information and confidence of the candidate target frame whose intersection ratio (intersection area / union area) with the candidate target frame represented by H reaches a certain threshold from the B set and the S set, until B is finally an empty set, the algorithm ends, and returns the retained target frame coordinate set R. Therefore, the NMS algorithm can retain the one with the highest confidence among multiple candidate target frames that are close to each other, and delete other redundant candidate target frames.
[0054] The cost of deploying the traditional NMS algorithm on the in-memory computing architecture is high. From the NMS algorithm flow, it can be seen that the algorithm has a large number of loops and sorting operations, which are more suitable for completion under the traditional von Neumann architecture and are not suitable for the in-memory computing architecture. It is for this reason that the in-memory computing chip is often used as an accelerator to complete the matrix multiplication operation in the target detection backbone network, while the NMS algorithm is handed over to the CPU based on the traditional von Neumann architecture to complete. Figure 3 It is a deployment structure diagram of the target detection algorithm in related technologies, such as Figure 3 As shown in FIG. 1 , the traditional NMS algorithm is deployed in the CPU. In this case, it is necessary to design additional data buses, drivers, etc. between the CPU based on the traditional von Neumann architecture and the in-memory computing chip as an accelerator, which makes the system more complicated.
[0055] In addition, in the related art, the first step for target detection is to extract artificial features of the candidate boxes. The production of artificial features again involves operations that in-memory computing chips are not good at. Taking the calculation of the intersection-over-union (IOU) value as an example, it involves the calculation of the intersection area of the two candidate boxes, the calculation of the union area, and the ratio between the intersection and the union. It is essentially not suitable for completion on the in-memory computing chip architecture based on the Crossbar array. The Crossbar array is only suitable for multiplication of two matrices, where one matrix represents the input information and the other matrix represents the matrix projection operation on the input information, and the latter is often numerically fixed. If you want to use the Crossbar array to perform IOU calculations on two candidate boxes, it means that both matrices processed by the Crossbar array are flexible and variable.
[0056] Figure 4 It is the parameter processing process of the target detection network. Figure 4As shown in Figure 2, for example, the size of the input image to be detected is 448×448×3. After several convolutional and pooling layer operations, the output information of 14×14×25 can be obtained. The parameters used in the processing process have been Figure 4 For example, the first convolution operation parameter Filter is 3×3, Padding is 1, and other parameters are not listed one by one.
[0057] In view of this, the present invention proposes a design scheme that can implement an end-to-end target detection algorithm on an in-memory computing chip architecture through the joint design of a target detection algorithm and an in-memory computing chip architecture, thereby reducing the system complexity and facilitating the realization of an ultra-low power consumption target detection system.
[0058] Figure 5 is a flow chart of a target detection method, wherein the method is applied to an in-memory computing chip, in which a target detection network, a message communication neural network, and a feature post-processing neural network are all deployed. Figure 5 As shown, the method includes S101 to S105.
[0059] In S101, an image to be detected is obtained.
[0060] In S102, the image to be detected is input into the target detection network to obtain the first anchor point feature information in the image to be detected output by the target detection network, wherein each anchor point corresponds to a candidate prediction box.
[0061] In S103, the first anchor feature information is input into the message communication neural network, so that the message communication neural network performs a convolution operation on the first anchor feature information to obtain the second anchor feature information. The message communication neural network may be a learnable NMS neural network.
[0062] In S104, the second anchor point feature information is input into a feature post-processing neural network to obtain target confidences of the multiple anchor points.
[0063] In S105 , a target frame is determined from a plurality of candidate prediction frames according to the target confidence, and information of the target frame is sent to a display device so that the display device displays the target frame.
[0064] Figure 6 It is a deployment structure diagram of the target detection algorithm in the present invention. Figure 6 As shown, the target detection network, message communication neural network, and feature post-processing neural network are all deployed in the in-memory computing chip. In the present invention, an end-to-end target detection algorithm is implemented on the in-memory computing chip architecture without the need to use a CPU, thereby reducing system complexity and system power consumption.
[0065] The target detection network is designed based on the idea of anchors, so for an image to be detected, the corresponding anchor information will be generated. For learnable NMS, anchor feature information is input. The biggest advantage of this method is that it does not require arithmetic operations (such as division) that are difficult to deploy on in-memory computing chips, and can be achieved by relying solely on the neural network itself, thereby reducing the complexity of deployment. Since the anchor feature information is a 3D structure (all anchors form a 2D grid, and each anchor contains information such as confidence, position, width and height), the message communication network module learns the local features of each anchor through a 3D convolution operator, and then splices the features learned by the previous message communication network module at a ratio of 2:1 (reducing the impact of the previous message communication network on the network), and further fuses the information before outputting.
[0066] Through the above technical solution, firstly, the target detection network, message communication neural network, and feature post-processing neural network are all deployed in the in-memory computing chip, and there is no need to use the CPU for target detection, which reduces the design complexity of the target detection method and solves the problem that the traditional target detection algorithm requires a CPU based on the von Neumann architecture, thus simplifying the overall system architecture and indirectly reducing the development and deployment costs. Secondly, since the end-to-end target detection method is implemented on the in-memory computing chip, the entire target detection network can enjoy the benefits of high parallelism and low energy consumption of in-memory computing, providing a feasible means of realizing ultra-low power target detection systems.
[0067] Figure 7 It is a specific implementation process diagram of the target detection method, such as Figure 7 As shown in the figure, the image to be detected is input into the target detection network to obtain the Anchor feature information of size 14×14×25, that is, the first anchor feature information, where 14×14 represents the number of anchor points, 25 refers to 5 feature values and 20 category information. The 14×14×25 information is obtained by Figure 4 The processing method shown is obtained.
[0068] The message communication neural network includes a Concatenate network, and the message communication neural network is used to obtain the second anchor point feature information in the following manner:
[0069] The Concatenate network concatenates the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature;
[0070] The anchor point feature information output by the Concatenate network is convolutionally compressed to obtain the second anchor point feature information.
[0071] like Figure 7 As shown in the figure, the first anchor feature information after convolution processing, that is, the 14×14×25 anchor feature information is processed into the 14×14×128 anchor feature. The Concatenate network concatenates the 14×14×128 anchor feature with the zero matrix or the anchor feature information output by the message communication neural network of size 14×14×256, and outputs the anchor feature of size 14×14×512 to expand the receptive field of the anchor feature. Then, the 14×14×512 anchor feature is convoluted and compressed to obtain the 14×14×256 anchor feature, that is, the second anchor feature output by the message communication neural network. After that, the 14×14×256 anchor feature is input into the feature post-processing neural network, and the output is a result of size 14×14×1, that is, including the target confidence of each of the multiple anchors, which represents the possibility of including the target in the candidate prediction box corresponding to the anchor. For example, the candidate prediction box corresponding to the anchor point with the largest target confidence can be used as the target box.
[0072] In the present invention, the message communication neural network is trained in the following way:
[0073] Get training images from the training dataset;
[0074] Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point;
[0075] Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point;
[0076] According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames;
[0077] Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame;
[0078] The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
[0079] Figure 8 This is a schematic diagram of the training method of the message communication neural network. Figure 8 As shown in the figure, the image under test is the training image, and the Anchor feature is the anchor feature. confidence' is the first confidence, x' is the horizontal coordinate of the center point of the prediction box corresponding to the anchor, y' is the vertical coordinate of the center point of the prediction box corresponding to the anchor, w' is the width of the prediction box corresponding to the anchor, h' is the height of the prediction box corresponding to the anchor, confidence'' is the second confidence, confidence is the true confidence, x is the horizontal coordinate of the center point of the true target box, y is the vertical coordinate of the center point of the true target box, w is the width of the true target box, and h is the height of the true target box.
[0080] In traditional solutions, the target detection network will obtain a series of candidate target boxes (with a lot of redundancy) based on the original image, and then use the Greedy NMS algorithm to remove the redundancy. However, the Greedy NMS algorithm cannot be deployed in the in-memory computing chip, so we designed a learnable NMS network to replace the Greedy NMS algorithm.
[0081] The learnable NMS network takes advantage of the Anchor design in the target detection network. Anchors are commonly found in traditional CNN target detection networks. They work as follows: first, the image is divided into several subgrids, and each subgrid will propose one or more Anchors, where the Anchor containing the target object becomes the candidate target box, and the others are invalid boxes. Since the Anchor has all the information of the candidate target box, and adjacent Anchors are naturally close to each other in space, we can use 3D convolution operations to learn local Anchor features, process the relationship between each Anchor and other Anchors, and then recalculate the confidence of each Anchor to remove redundancy.
[0082] like Figure 8 As shown in the figure, the image under test is sent to the target detection network to obtain the Anchor features, where the black dots represent invalid frames, the triangles and hollow squares represent candidate target frames (in the visualized image, they are the two candidate target frames of the bicycle), and the learnable NMS network further extracts the local feature relationship of each Anchor through the convolution structure, and recalculates the confidence and then filters it to obtain the final target frame (i.e., the triangle and hollow square in the figure).
[0083] The final target box is matched with the real target box, and the matching result and the new confidence are sent to the matching module to get the final loss, so as to continuously iterate the training and finally train a learnable NMS network, that is, a message communication neural network.
[0084] Based on the same inventive concept, the present invention also provides a target detection system, the system is deployed in an in-memory computing chip, and the target detection network, message communication neural network, and feature post-processing neural network included in the system are all deployed in the in-memory computing chip;
[0085] The target detection network is used to process the image to be detected to obtain first anchor point feature information in the image to be detected, wherein each anchor point corresponds to a candidate prediction box;
[0086] The message communication neural network is used to perform a convolution operation on the first anchor point feature information to obtain second anchor point feature information;
[0087] The feature post-processing neural network is used to obtain target confidence of each of the plurality of anchor points according to the feature information of the second anchor point;
[0088] A result output module is used to determine a target frame from multiple candidate prediction frames according to the target confidence, and send information of the target frame to a display device so that the display device displays the target frame.
[0089] Optionally, the message communication neural network is trained in the following manner:
[0090] Get training images from the training dataset;
[0091] Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point;
[0092] Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point;
[0093] According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames;
[0094] Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame;
[0095] The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
[0096] Optionally, the message communication neural network includes a Concatenate network:
[0097] The Concatenate network is used to concatenate the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature;
[0098] The message communication neural network is used to perform convolution compression on the anchor point feature information output by the Concatenate network to obtain the second anchor point feature information.
[0099] Optionally, the message communication neural network is a learnable NMS network.
[0100] The present invention also provides an in-memory computing chip, comprising the target detection system provided in the above embodiment.
[0101] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A target detection method, characterized in that: The method is applied to an in-memory computing chip, in which a target detection network, a message communication neural network, and a feature post-processing neural network are all deployed. The method includes: Acquire the image to be detected; Inputting the image to be detected into the target detection network, obtaining first anchor point feature information in the image to be detected output by the target detection network, wherein each anchor point corresponds to a candidate prediction box; Inputting the first anchor point feature information into the message communication neural network, so that the message communication neural network performs a convolution operation on the first anchor point feature information to obtain second anchor point feature information; Inputting the second anchor point feature information into the feature post-processing neural network to obtain target confidence of each of the plurality of anchor points; Determining a target frame from a plurality of candidate prediction frames according to the target confidence, and sending information of the target frame to a display device so that the display device displays the target frame; The message communication neural network is trained in the following way: Get training images from the training dataset; Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point; Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point; According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames; Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame; The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
2. The method according to claim 1, characterized in that The message communication neural network includes a Concatenate network, and the message communication neural network is used to obtain the second anchor point feature information in the following manner: The Concatenate network concatenates the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature; The anchor point feature information output by the Concatenate network is convolutionally compressed to obtain the second anchor point feature information.
3. The method according to claim 1 or 2, characterized in that: The message communication neural network is a learnable NMS network.
4. A target detection system, characterized in that: The system is deployed on an in-memory computing chip, and the target detection network, message communication neural network, and feature post-processing neural network included in the system are all deployed on the in-memory computing chip; The target detection network is used to process the image to be detected to obtain first anchor point feature information in the image to be detected, wherein each anchor point corresponds to a candidate prediction box; The message communication neural network is used to perform a convolution operation on the first anchor point feature information to obtain second anchor point feature information; The feature post-processing neural network is used to obtain target confidence of each of the plurality of anchor points according to the feature information of the second anchor point; A result output module, used for determining a target frame from multiple candidate prediction frames according to the target confidence, and sending information of the target frame to a display device so that the display device displays the target frame; The message communication neural network is trained in the following way: Get training images from the training dataset; Inputting the training image into the object detection network to obtain anchor feature information of each of the plurality of anchor points, wherein the plurality of anchor points correspond one-to-one to the plurality of prediction boxes, and the anchor feature information of the anchor point includes a first confidence that the prediction box corresponding to the anchor point contains the training object, the center point coordinates of the prediction box corresponding to the anchor point, and the width and height of the prediction box corresponding to the anchor point; Inputting anchor point feature information of each of the plurality of anchor points into a convolution kernel of a neural network, so that the convolution kernel extracts a local feature relationship of each anchor point, and calculates a second confidence that a training target is included in a prediction box corresponding to the anchor point; According to the second confidence level, redundant prediction frames are removed from the multiple prediction frames and invalid prediction frames are filtered out to obtain training prediction frames; Calculate the loss value according to the second confidence that the training target is contained in the training prediction frame, the center point coordinates, width and height of the training prediction frame, and the real confidence that the training target is contained in the real target frame of the training image, the center point coordinates, width and height of the real target frame; The convolution kernel of the neural network is iteratively trained according to the loss value, and when the training is completed, the message communication neural network is obtained.
5. The system according to claim 4, characterized in that The message communication neural network includes a Concatenate network: The Concatenate network is used to concatenate the first anchor feature information after convolution processing with one of the following information: a zero matrix, and the anchor feature information outputted last by the message communication neural network, so as to expand the receptive field of the anchor feature; The message communication neural network is used to perform convolution compression on the anchor point feature information output by the Concatenate network to obtain the second anchor point feature information.
6. The system according to claim 4 or 5, characterized in that: The message communication neural network is a learnable NMS network.
7. An in-memory computing chip, characterized in that: A target detection system comprising any one of claims 4 to 6.
Citation Information
Patent Citations
Target detection method and device and computer readable storage medium
CN108875577A
Target detection model training method and device
CN110751185A
Target detection processing method, apparatus and device
CN113222108A
Target detector training method and device, storage medium and electronic equipment
CN114511731A
Target detection method and apparatus
WO2021254205A1
